:root {
  --cream: #fff7f0;
  --pink: #f7c6d3;
  --pink-deep: #e5859f;
  --lilac: #cdb8e6;
  --lilac-deep: #8f6cc0;
  --ginger: #c9773a;
  --ink: #1d1a22;
  --ink-soft: #5b5464;
  --card: #ffffff;
  --shadow: 0 10px 30px rgba(60, 30, 70, .12);
  --radius: 24px;
  --display: "Fredoka", "Comic Sans MS", system-ui, sans-serif;
  --body: "Nunito", system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }

body {
  margin: 0;
  font-family: var(--body);
  color: var(--ink);
  background-color: var(--cream);
  /* scattered paw-print wallpaper */
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160' viewBox='0 0 160 160'%3E%3Cg fill='%23f3d9e1'%3E%3Cg transform='translate(20 24) rotate(-18)'%3E%3Cellipse cx='16' cy='21' rx='7' ry='6'/%3E%3Cellipse cx='7' cy='12' rx='3' ry='4'/%3E%3Cellipse cx='13' cy='6' rx='3' ry='4'/%3E%3Cellipse cx='20' cy='6' rx='3' ry='4'/%3E%3Cellipse cx='26' cy='12' rx='3' ry='4'/%3E%3C/g%3E%3Cg transform='translate(100 96) rotate(22)'%3E%3Cellipse cx='16' cy='21' rx='7' ry='6'/%3E%3Cellipse cx='7' cy='12' rx='3' ry='4'/%3E%3Cellipse cx='13' cy='6' rx='3' ry='4'/%3E%3Cellipse cx='20' cy='6' rx='3' ry='4'/%3E%3Cellipse cx='26' cy='12' rx='3' ry='4'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  line-height: 1.55;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
code { background: #f4e9f7; padding: .1em .4em; border-radius: 6px; font-size: .9em; }

/* ---------- Top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 12px clamp(16px, 4vw, 40px);
  background: rgba(255, 247, 240, .88);
  backdrop-filter: blur(10px);
  border-bottom: 3px dashed var(--pink);
}
.brand {
  display: flex; align-items: center; gap: 8px;
  font-family: var(--display); font-weight: 700; font-size: 1.4rem;
  color: var(--ink); text-decoration: none;
}
.brand span { color: var(--pink-deep); }
.brand-paw { width: 28px; height: 28px; fill: var(--ink); transition: transform .3s; }
.brand:hover .brand-paw { transform: rotate(-20deg) scale(1.1); }
.topbar nav { display: flex; gap: 4px; flex-wrap: wrap; }
.topbar nav a {
  font-family: var(--display); font-weight: 500;
  color: var(--ink-soft); text-decoration: none;
  padding: 6px 12px; border-radius: 999px;
  transition: background .2s, color .2s;
}
.topbar nav a:hover { background: var(--pink); color: var(--ink); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--display); font-weight: 600; font-size: 1.05rem;
  padding: 12px 22px; border-radius: 999px; border: 3px solid var(--ink);
  background: var(--card); color: var(--ink); text-decoration: none; cursor: pointer;
  box-shadow: 4px 4px 0 var(--ink);
  transition: transform .15s, box-shadow .15s;
}
.btn:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--ink); }
.btn:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink); }
.btn-big { font-size: 1.3rem; padding: 16px 30px; background: var(--pink-deep); color: #fff; }
.btn-icon {
  display: inline-grid; place-items: center;
  width: 34px; height: 34px; border-radius: 50%;
  background: #fff; color: var(--pink-deep); font-size: .9rem; padding-left: 3px;
}
.btn-ghost { background: var(--lilac); }
.btn-small { font-size: .9rem; padding: 6px 14px; box-shadow: 3px 3px 0 var(--ink); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  display: grid; grid-template-columns: 1fr 1.15fr; align-items: center; gap: clamp(24px, 5vw, 64px);
  max-width: 1200px; margin: 0 auto;
  padding: clamp(32px, 7vw, 90px) clamp(16px, 4vw, 40px) clamp(40px, 6vw, 80px);
}
.eyebrow {
  font-family: var(--display); font-weight: 500; color: var(--lilac-deep);
  text-transform: uppercase; letter-spacing: .12em; font-size: .85rem; margin: 0 0 6px;
}
.hero h1 {
  font-family: var(--display); font-weight: 700;
  font-size: clamp(3rem, 9vw, 6.2rem); line-height: .95; margin: 0 0 18px;
}
.hero h1 .name { display: inline-block; }
.hero h1 .amp { color: var(--pink-deep); display: inline-block; transform: rotate(-8deg); margin: 0 .05em; }
.elsie-name { animation: bob 3.2s ease-in-out infinite; }
.eva-name { animation: bob 3.2s ease-in-out infinite 1.6s; }
@keyframes bob { 0%,100% { transform: translateY(0) rotate(0); } 50% { transform: translateY(-6px) rotate(-2deg); } }
.tagline { font-size: 1.2rem; color: var(--ink-soft); max-width: 32ch; margin: 0 0 28px; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }

.hero-photo { position: relative; margin: 0; }
.hero-photo img {
  border-radius: var(--radius); border: 6px solid #fff;
  box-shadow: var(--shadow); transform: rotate(2deg);
  aspect-ratio: 4 / 3; object-fit: cover; width: 100%; height: auto;
}
.ears { position: absolute; inset: -38px 12% auto; display: flex; justify-content: space-between; pointer-events: none; z-index: -1; }
.ears i, .tv-ears i {
  width: 90px; height: 90px; background: var(--ink);
  clip-path: polygon(50% 0, 100% 100%, 0 100%);
  border-radius: 12px;
}
.ears i:first-child { transform: rotate(-14deg); }
.ears i:last-child { transform: rotate(18deg); }
.ears i::after, .tv-ears i::after { content: ""; }

.tag {
  position: absolute; bottom: 18px;
  font-family: var(--display); font-weight: 600; font-size: 1.05rem;
  background: #fff; padding: 4px 14px; border-radius: 999px; border: 3px solid var(--ink);
  box-shadow: 3px 3px 0 var(--ink);
}
.tag-left { left: 10%; transform: rotate(-6deg); background: var(--pink); }
.tag-right { right: 8%; transform: rotate(5deg); background: var(--lilac); }

.yarn { position: absolute; pointer-events: none; }
.yarn-1 { width: 90px; height: 90px; color: var(--pink); left: -10px; bottom: 0; animation: roll 9s ease-in-out infinite; }
.yarn-2 { width: 60px; height: 60px; color: var(--lilac); right: 2%; top: 20px; animation: roll 7s ease-in-out infinite reverse; }
@keyframes roll { 0%,100% { transform: translateX(0) rotate(0); } 50% { transform: translateX(30px) rotate(160deg); } }

/* ---------- Panels / sections ---------- */
.panel { max-width: 1200px; margin: 0 auto; padding: clamp(40px, 6vw, 80px) clamp(16px, 4vw, 40px); }
.section-head { text-align: center; margin-bottom: 32px; }
.section-head h2 {
  font-family: var(--display); font-weight: 700; font-size: clamp(2rem, 5vw, 3rem);
  margin: 0 0 8px; display: inline-flex; align-items: center; gap: 12px;
}
.section-head h2::before, .section-head h2::after {
  content: ""; width: 30px; height: 30px; flex: none;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64'%3E%3Cellipse cx='32' cy='42' rx='14' ry='12'/%3E%3Cellipse cx='14' cy='26' rx='6' ry='8'/%3E%3Cellipse cx='26' cy='15' rx='6' ry='8.5'/%3E%3Cellipse cx='38' cy='15' rx='6' ry='8.5'/%3E%3Cellipse cx='50' cy='26' rx='6' ry='8'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64'%3E%3Cellipse cx='32' cy='42' rx='14' ry='12'/%3E%3Cellipse cx='14' cy='26' rx='6' ry='8'/%3E%3Cellipse cx='26' cy='15' rx='6' ry='8.5'/%3E%3Cellipse cx='38' cy='15' rx='6' ry='8.5'/%3E%3Cellipse cx='50' cy='26' rx='6' ry='8'/%3E%3C/svg%3E") center / contain no-repeat;
  color: var(--pink-deep);
}
.section-head h2::after { color: var(--lilac-deep); transform: scaleX(-1); }
.section-head p { color: var(--ink-soft); margin: 0 auto; max-width: 52ch; font-size: 1.1rem; }

/* ---------- Timelapse "cat TV" ---------- */
.tv {
  position: relative; max-width: 960px; margin: 70px auto 0;
  background: var(--ink); border-radius: 36px; padding: 18px 18px 14px;
  box-shadow: 0 20px 50px rgba(29, 26, 34, .35);
}
.tv-ears { position: absolute; top: -62px; left: 8%; right: 8%; display: flex; justify-content: space-between; pointer-events: none; }
.tv-ears i { position: relative; width: 110px; height: 80px; }
.tv-ears i::after {
  position: absolute; inset: 30px 28px 0; background: var(--pink);
  clip-path: polygon(50% 0, 100% 100%, 0 100%);
}
.tv-screen { position: relative; border-radius: 22px; overflow: hidden; background: #000; aspect-ratio: 16 / 9; }
.tv-screen video { width: 100%; height: 100%; display: block; object-fit: contain; background: #000; }
.video-missing {
  position: absolute; inset: 0; display: grid; place-content: center; text-align: center; gap: 4px;
  background: linear-gradient(135deg, #2b2533, #3d2f47); color: #f2e9f7; padding: 20px;
}
.video-missing[hidden], .gallery-empty[hidden] { display: none; }
.video-missing code { background: rgba(255,255,255,.12); color: #fff; }
.sleepy { font-size: 3.4rem; animation: bob 3s ease-in-out infinite; }
.tv-controls {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 14px 6px 4px; color: #f2e9f7; font-family: var(--display);
}
.speed-label { font-weight: 500; opacity: .8; }
.speeds, .sort { display: inline-flex; background: rgba(255,255,255,.08); border-radius: 999px; padding: 4px; gap: 2px; }
.speeds button, .sort button {
  font: 600 .95rem var(--display); border: 0; cursor: pointer;
  background: transparent; color: inherit; padding: 6px 12px; border-radius: 999px;
}
.speeds button.on { background: var(--pink-deep); color: #fff; }
.updated { margin-left: auto; font-size: .9rem; opacity: .75; }
.tv-controls .btn-small { border-color: #fff; box-shadow: 3px 3px 0 var(--pink-deep); }

/* ---------- Meet the girls ---------- */
.cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(20px, 4vw, 44px); max-width: 900px; margin: 0 auto; }
.cat-card {
  background: var(--card); border-radius: var(--radius); padding: 28px 26px 26px; text-align: center;
  box-shadow: var(--shadow); border: 3px solid var(--ink);
  transition: transform .25s;
}
.cat-card.elsie { transform: rotate(-1.5deg); }
.cat-card.eva { transform: rotate(1.5deg); }
.cat-card:hover { transform: rotate(0) translateY(-6px); }
.face {
  width: 180px; height: 180px; margin: 0 auto 14px; border-radius: 50%; overflow: hidden;
  border: 6px solid var(--pink);
}
.eva .face { border-color: var(--lilac); }
.face img { width: 100%; height: 100% !important; object-fit: cover; transition: transform .4s; }
.cat-card:hover .face img { transform: scale(1.08); }
.cat-card h3 { font-family: var(--display); font-size: 2.2rem; margin: 0; }
.where { margin: 0 0 14px; color: var(--ink-soft); font-weight: 600; }
.facts { list-style: none; padding: 0; margin: 0 0 20px; text-align: left; }
.facts li { padding: 8px 0; border-top: 2px dotted #eadfee; }
.facts span {
  display: inline-block; min-width: 92px; font-family: var(--display); font-weight: 600; font-size: .85rem;
  color: var(--pink-deep); text-transform: uppercase; letter-spacing: .05em;
}
.eva .facts span { color: var(--lilac-deep); }
.boop {
  font: 600 1rem var(--display); cursor: pointer; border: 3px solid var(--ink); border-radius: 999px;
  background: var(--pink); padding: 8px 20px; box-shadow: 3px 3px 0 var(--ink); transition: transform .1s;
}
.eva .boop { background: var(--lilac); }
.boop:active { transform: scale(.94); }
.boop-count { text-align: center; font-family: var(--display); color: var(--ink-soft); min-height: 1.6em; margin-top: 24px; }

.float-paw {
  position: fixed; pointer-events: none; z-index: 60; font-size: 1.8rem;
  animation: floatUp 1.1s ease-out forwards;
}
@keyframes floatUp { to { transform: translate(var(--dx), -110px) rotate(var(--rot)); opacity: 0; } }

/* ---------- Gallery ---------- */
.gallery-bar {
  display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap;
  margin-bottom: 18px; font-family: var(--display); font-weight: 500; color: var(--ink-soft);
}
.sort { background: #fff; border: 2px solid var(--ink); }
.sort button.on { background: var(--ink); color: #fff; }

.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 14px; }
.thumb {
  position: relative; padding: 0; border: 0; cursor: zoom-in; background: #efe4ea;
  border-radius: 16px; overflow: hidden; aspect-ratio: 4 / 3;
  box-shadow: 0 4px 12px rgba(60, 30, 70, .10);
  transition: transform .2s, box-shadow .2s;
}
.thumb:nth-child(3n+1) { --tilt: -1.2deg; }
.thumb:nth-child(3n+2) { --tilt: .8deg; }
.thumb:hover, .thumb:focus-visible { transform: rotate(var(--tilt, 0)) scale(1.04); box-shadow: 0 10px 24px rgba(60, 30, 70, .2); z-index: 1; }
.thumb img { width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .4s; }
.thumb img.loaded { opacity: 1; }
.thumb .cap {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 18px 10px 6px;
  font-size: .78rem; font-weight: 600; color: #fff; text-align: left;
  background: linear-gradient(transparent, rgba(0,0,0,.6));
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.gallery-empty { text-align: center; padding: 40px 20px; color: var(--ink-soft); }
.more-wrap { text-align: center; margin-top: 28px; }

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed; inset: 0; z-index: 50;
  display: grid; grid-template-columns: auto 1fr auto; grid-template-rows: 1fr auto; align-items: center;
  background: rgba(20, 16, 26, .94); color: #fff; padding: 16px;
}
.lightbox[hidden] { display: none; }
.lb-stage { grid-column: 2; margin: 0; display: flex; flex-direction: column; align-items: center; gap: 10px; min-width: 0; min-height: 0; max-height: 100%; }
.lb-stage img { max-height: calc(100vh - 140px); max-width: 100%; object-fit: contain; border-radius: 12px; box-shadow: 0 10px 40px rgba(0,0,0,.5); }
.lb-stage figcaption { display: flex; gap: 14px; font-family: var(--display); font-size: 1rem; text-align: center; flex-wrap: wrap; justify-content: center; }
.lb-pos { opacity: .6; }
.lb-nav, .lb-close {
  border: 0; cursor: pointer; color: #fff; background: rgba(255,255,255,.1);
  border-radius: 50%; display: grid; place-items: center; transition: background .2s;
}
.lb-nav:hover, .lb-close:hover { background: var(--pink-deep); }
.lb-nav { width: 56px; height: 56px; font-size: 2.2rem; line-height: 1; padding-bottom: 4px; }
.lb-prev { grid-column: 1; }
.lb-next { grid-column: 3; }
.lb-close { position: absolute; top: 14px; right: 14px; width: 44px; height: 44px; font-size: 1.2rem; z-index: 2; }
.lb-tools { grid-column: 1 / -1; display: flex; justify-content: center; gap: 12px; padding-top: 12px; }
.lb-tools button, .lb-tools a {
  font: 600 .95rem var(--display); color: #fff; text-decoration: none; cursor: pointer;
  background: rgba(255,255,255,.12); border: 0; padding: 8px 18px; border-radius: 999px;
}
.lb-tools button:hover, .lb-tools a:hover { background: var(--lilac-deep); }

/* ---------- Footer ---------- */
footer { text-align: center; padding: 30px 16px 40px; color: var(--ink-soft); font-family: var(--display); }

/* ---------- Small screens ---------- */
@media (max-width: 820px) {
  .hero { grid-template-columns: 1fr; text-align: center; }
  .tagline { margin-left: auto; margin-right: auto; }
  .hero-actions { justify-content: center; }
  .hero-photo { margin-top: 30px; }
  .cards { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .topbar { flex-direction: column; gap: 6px; padding-top: 8px; padding-bottom: 8px; }
  .topbar nav a { padding: 4px 10px; font-size: .95rem; }
  .ears i { width: 60px; height: 60px; }
  .ears { top: -26px; }
  .tv { padding: 10px 10px 8px; border-radius: 24px; margin-top: 50px; }
  .tv-ears { top: -44px; }
  .tv-ears i { width: 70px; height: 52px; }
  .tv-ears i::after { inset: 20px 18px 0; }
  .tv-screen { border-radius: 16px; }
  .updated { margin-left: 0; width: 100%; order: 5; }
  .gallery { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .lightbox { grid-template-columns: 1fr 1fr; grid-template-rows: 1fr auto auto; padding: 56px 10px 16px; }
  .lb-stage { grid-column: 1 / -1; grid-row: 1; }
  .lb-prev { grid-column: 1; grid-row: 2; justify-self: end; margin-right: 12px; }
  .lb-next { grid-column: 2; grid-row: 2; justify-self: start; margin-left: 12px; }
  .lb-tools { grid-row: 3; }
  .lb-stage img { max-height: calc(100vh - 220px); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}
