/* Twinglow site: a dark, glowing night garden. */
:root {
  --night: #0d1424;
  --night-2: #13203a;
  --teal-deep: #0e2f36;
  --panel: rgba(16, 32, 44, 0.72);
  --panel-edge: rgba(110, 220, 205, 0.22);
  --cream: #f8e7cf;
  --muted: #a7bab6;
  --teal: #6edbcc;
  --mint: #9cf5df;
  --amber: #f3b35c;
  --amber-deep: #d9852c;
  --violet: #9b6cf0;
  --pink: #ff8fb8;
  --ink: #2a1a08;
  --radius: 26px;
  --max: 1120px;
  --font-head: "Fredoka", "Nunito", system-ui, sans-serif;
  --font-body: "Nunito", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--cream);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  background:
    radial-gradient(1200px 700px at 50% -10%, rgba(155, 108, 240, 0.28), transparent 60%),
    radial-gradient(900px 600px at 100% 40%, rgba(110, 219, 204, 0.12), transparent 60%),
    radial-gradient(900px 700px at 0% 75%, rgba(243, 179, 92, 0.10), transparent 60%),
    linear-gradient(180deg, var(--night) 0%, var(--night-2) 45%, var(--teal-deep) 100%);
  background-color: var(--night);
  min-height: 100vh;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: var(--mint); }
a:hover { color: var(--cream); }

#fireflies { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 0; }
main, header, footer { position: relative; z-index: 1; }

.wrap { width: min(var(--max), 100% - 32px); margin-inline: auto; }

/* ---------- top bar ---------- */
.topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 18px 0;
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--cream); }
.brand img { width: 40px; height: 40px; border-radius: 11px; box-shadow: 0 0 18px rgba(155, 108, 240, 0.6); }
.brand span { font-family: var(--font-head); font-weight: 600; font-size: 22px; letter-spacing: 0.3px; }
.nav { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.nav a {
  color: var(--cream); text-decoration: none; font-weight: 700; font-size: 15px;
  padding: 8px 14px; border-radius: 999px;
  background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(255, 255, 255, 0.08);
  transition: background .2s, transform .2s;
}
.nav a:hover { background: rgba(255, 255, 255, 0.12); transform: translateY(-1px); }

/* ---------- hero ---------- */
.hero {
  display: grid; grid-template-columns: 1.05fr 1fr; gap: 40px; align-items: center;
  padding: 30px 0 70px;
}
.hero-logo { width: min(520px, 100%); filter: drop-shadow(0 0 40px rgba(155, 108, 240, 0.55)); animation: bob 6s ease-in-out infinite; }
.tagline {
  font-family: var(--font-head); font-weight: 600; font-size: clamp(26px, 3.4vw, 40px);
  line-height: 1.15; margin: 18px 0 12px;
  background: linear-gradient(180deg, #fff3df, var(--amber));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.lead { color: var(--muted); font-size: 19px; max-width: 30em; margin: 0 0 26px; }
.cta-row { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-head); font-weight: 600; font-size: 19px; text-decoration: none;
  padding: 14px 26px; border-radius: 999px; border: 0; cursor: pointer;
  transition: transform .2s, box-shadow .2s;
}
.btn-amber {
  color: var(--ink);
  background: linear-gradient(180deg, #ffd890, var(--amber) 55%, var(--amber-deep));
  box-shadow: 0 8px 30px rgba(243, 179, 92, 0.45), inset 0 2px 0 rgba(255, 255, 255, 0.5);
}
.btn-amber:hover { transform: translateY(-2px) scale(1.02); box-shadow: 0 12px 40px rgba(243, 179, 92, 0.6), inset 0 2px 0 rgba(255,255,255,.5); color: var(--ink); }
.btn-glass { color: var(--cream); background: rgba(255, 255, 255, 0.07); border: 1px solid rgba(255, 255, 255, 0.14); }
.btn-glass:hover { transform: translateY(-2px); background: rgba(255, 255, 255, 0.12); color: var(--cream); }
.soon { font-size: 14px; color: var(--muted); }
.soon b { color: var(--mint); }

/* the little playable board */
.toy {
  position: relative; justify-self: center; width: min(460px, 100%);
  padding: 22px; border-radius: 40px;
  background: radial-gradient(circle at 50% 45%, rgba(155, 108, 240, 0.22), rgba(13, 20, 36, 0.4) 70%);
  border: 1px solid rgba(155, 108, 240, 0.3);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45), 0 0 60px rgba(155, 108, 240, 0.18) inset;
}
.toy canvas { width: 100%; aspect-ratio: 1; display: block; touch-action: none; cursor: grab; }
.toy canvas:active { cursor: grabbing; }
.toy-hint {
  text-align: center; margin: 12px 0 0; font-weight: 700; color: var(--muted); font-size: 15px; min-height: 1.6em;
}
.toy-hint.win { color: var(--amber); font-family: var(--font-head); font-size: 20px; }
.toy-shuffle {
  position: absolute; top: 16px; right: 16px;
  width: 42px; height: 42px; border-radius: 50%; border: 1px solid rgba(255,255,255,.15);
  background: rgba(255,255,255,.08); color: var(--cream); font-size: 20px; cursor: pointer;
  transition: transform .3s;
}
.toy-shuffle:hover { transform: rotate(-120deg); }

/* ---------- sections ---------- */
section { padding: 70px 0; }
.eyebrow {
  display: inline-block; font-weight: 800; font-size: 13px; letter-spacing: 2px; text-transform: uppercase;
  color: var(--teal); background: rgba(110, 219, 204, 0.1); border: 1px solid rgba(110, 219, 204, 0.25);
  padding: 5px 12px; border-radius: 999px;
}
h2 { font-family: var(--font-head); font-weight: 600; font-size: clamp(30px, 4vw, 46px); line-height: 1.1; margin: 14px 0 10px; }
.section-lead { color: var(--muted); max-width: 40em; margin: 0 0 36px; font-size: 18px; }
.center { text-align: center; }
.center .section-lead { margin-inline: auto; }

/* features */
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.card {
  position: relative; padding: 26px 24px 24px; border-radius: var(--radius);
  background: var(--panel); border: 1px solid var(--panel-edge);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  transition: transform .3s, border-color .3s;
}
.card:hover { transform: translateY(-4px); border-color: rgba(110, 219, 204, 0.5); }
.card img { width: 64px; height: 64px; object-fit: contain; margin-bottom: 12px; filter: drop-shadow(0 4px 14px rgba(243, 179, 92, 0.35)); }
.card h3 { font-family: var(--font-head); font-weight: 600; font-size: 22px; margin: 0 0 6px; }
.card p { margin: 0; color: var(--muted); font-size: 16px; }

/* friends */
.friends { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.friend {
  text-align: center; padding: 22px 16px 18px; border-radius: var(--radius);
  background: var(--panel); border: 1px solid var(--panel-edge);
  transition: transform .3s;
}
.friend:hover { transform: translateY(-6px) rotate(-1deg); }
.friend img { width: 92px; height: 92px; object-fit: contain; margin: 0 auto 8px; animation: bob 4s ease-in-out infinite; }
.friend:nth-child(2n) img { animation-delay: -1.3s; }
.friend:nth-child(3n) img { animation-delay: -2.4s; }
.friend h3 { font-family: var(--font-head); font-weight: 600; font-size: 21px; margin: 0; }
.friend .place { font-size: 12px; font-weight: 800; letter-spacing: 1px; text-transform: uppercase; margin: 2px 0 8px; }
.friend p { margin: 0; color: var(--muted); font-size: 14.5px; line-height: 1.45; }

/* screenshots */
.shots {
  display: grid; grid-auto-flow: column; grid-auto-columns: 250px; gap: 22px;
  overflow-x: auto; scroll-snap-type: x mandatory; padding: 10px 4px 30px;
  scrollbar-width: thin; scrollbar-color: rgba(110,219,204,.4) transparent;
}
.phone {
  scroll-snap-align: center; margin: 0;
  padding: 9px; border-radius: 38px; background: #0b0b12;
  border: 2px solid rgba(160, 150, 190, 0.55);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5), 0 0 40px rgba(155, 108, 240, 0.22);
}
.phone img { border-radius: 30px; width: 100%; aspect-ratio: 1320 / 2868; object-fit: cover; }
.phone figcaption { text-align: center; font-weight: 700; font-size: 14px; color: var(--muted); padding: 10px 4px 2px; }

/* legendary */
.legend {
  display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center;
  padding: 40px; border-radius: 36px;
  background: linear-gradient(135deg, rgba(243, 179, 92, 0.12), rgba(155, 108, 240, 0.14));
  border: 1.5px solid rgba(243, 179, 92, 0.45);
  box-shadow: 0 0 60px rgba(243, 179, 92, 0.12) inset;
}
.dress { position: relative; width: 260px; height: 250px; margin: 0 auto; }
.dress .body { position: absolute; left: 30px; top: 70px; width: 200px; height: 170px; z-index: 2; animation: breathe 3s ease-in-out infinite; }
.dress .acc { position: absolute; transform-origin: center; transition: opacity .35s; }
.dress .acc.off { opacity: 0; pointer-events: none; }
.acc.behind { z-index: 1; }
.acc.front { z-index: 3; }
.acc.flap { animation: flap 1.85s ease-in-out infinite; }
.acc.float { animation: halo 3.1s ease-in-out infinite; }
.acc.pulse { animation: pulse 2.4s ease-in-out infinite; }
.acc.shimmer { animation: flap 1.85s ease-in-out infinite, shimmer 7s ease-in-out infinite; }
.twinkle { position: absolute; width: 26px; z-index: 4; animation: twinkle 2.2s ease-in-out infinite; pointer-events: none; }
.looks { display: flex; flex-wrap: wrap; gap: 10px; margin: 22px 0 0; }
.look {
  font: 700 15px var(--font-body); color: var(--cream); cursor: pointer;
  padding: 10px 16px; border-radius: 999px;
  background: rgba(0, 0, 0, 0.25); border: 1.5px solid rgba(243, 179, 92, 0.35);
  transition: all .2s;
}
.look:hover { border-color: var(--amber); }
.look[aria-pressed="true"] { background: linear-gradient(180deg, #ffd890, var(--amber)); color: var(--ink); border-color: transparent; box-shadow: 0 0 20px rgba(243,179,92,.5); }
.legend .how { margin-top: 14px; font-weight: 700; color: var(--amber); min-height: 1.6em; }

/* promise strip */
.promise { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
.pill {
  display: inline-flex; align-items: center; gap: 8px;
  font-weight: 800; padding: 12px 20px; border-radius: 999px;
  background: rgba(110, 219, 204, 0.09); border: 1px solid rgba(110, 219, 204, 0.3);
}
.pill .x { color: var(--pink); }

/* final call */
.finale { text-align: center; padding: 90px 0 70px; }
.finale .creatures { display: flex; justify-content: center; gap: 4px; margin: 0 0 18px; }
.finale .creatures img { width: 74px; animation: hop 2.6s ease-in-out infinite; }
.finale .creatures img:nth-child(2) { animation-delay: .15s; }
.finale .creatures img:nth-child(3) { animation-delay: .3s; }
.finale .creatures img:nth-child(4) { animation-delay: .45s; }
.finale .creatures img:nth-child(5) { animation-delay: .6s; }

/* ---------- inner pages ---------- */
.page { padding: 20px 0 60px; }
.page-hero { text-align: center; padding: 30px 0 30px; }
.page-hero img { width: 120px; margin: 0 auto 6px; animation: bob 4s ease-in-out infinite; }
.page-hero h1 { font-family: var(--font-head); font-weight: 600; font-size: clamp(34px, 5vw, 52px); margin: 6px 0; }
.page-hero p { color: var(--muted); margin: 0 auto; max-width: 34em; }
.doc {
  max-width: 760px; margin: 0 auto; padding: 36px 40px; border-radius: 32px;
  background: var(--panel); border: 1px solid var(--panel-edge);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.doc h2 { font-size: 26px; margin: 30px 0 8px; display: flex; align-items: center; gap: 10px; }
.doc h2:first-child { margin-top: 0; }
.doc h2 img { width: 32px; height: 32px; object-fit: contain; }
.doc p, .doc li { color: #d7dcd6; }
.doc .big { font-family: var(--font-head); font-size: 26px; color: var(--mint); margin: 0; }
.updated { text-align: center; color: var(--muted); font-size: 14px; margin-top: 18px; }

.faq { max-width: 760px; margin: 0 auto; display: grid; gap: 12px; }
.faq details {
  border-radius: 20px; background: var(--panel); border: 1px solid var(--panel-edge);
  padding: 4px 22px; transition: border-color .2s;
}
.faq details[open] { border-color: rgba(243, 179, 92, 0.5); }
.faq summary {
  cursor: pointer; list-style: none; padding: 16px 0; font-weight: 800; font-size: 18px;
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-family: var(--font-head); font-size: 26px; color: var(--amber); transition: transform .25s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { margin: 0 0 18px; color: var(--muted); }
.contact {
  max-width: 760px; margin: 30px auto 0; text-align: center; padding: 34px 24px; border-radius: 32px;
  background: linear-gradient(135deg, rgba(110, 219, 204, 0.12), rgba(155, 108, 240, 0.14));
  border: 1px solid rgba(110, 219, 204, 0.35);
}
.contact h2 { margin-top: 0; font-size: 30px; }
.contact p { color: var(--muted); }

/* ---------- footer ---------- */
footer { padding: 40px 0 50px; border-top: 1px solid rgba(255, 255, 255, 0.07); margin-top: 20px; }
.foot { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; color: var(--muted); font-size: 15px; }
.foot nav { display: flex; gap: 18px; flex-wrap: wrap; }
.foot a { color: var(--muted); text-decoration: none; font-weight: 700; }
.foot a:hover { color: var(--cream); }

/* reveal on scroll */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .8s ease, transform .8s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ---------- animations ---------- */
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
@keyframes breathe { 0%, 100% { transform: scale(1.03, .97); } 50% { transform: scale(.98, 1.02); } }
@keyframes flap { 0%, 100% { transform: scaleX(1); } 50% { transform: scaleX(.8) scaleY(1.05); } }
@keyframes halo { 0%, 100% { transform: translateY(0) scaleX(1); } 50% { transform: translateY(-10px) scaleX(.93); } }
@keyframes pulse { 0%, 100% { transform: scale(1); filter: drop-shadow(0 0 4px rgba(255, 220, 140, .3)); } 50% { transform: scale(1.05); filter: drop-shadow(0 0 18px rgba(255, 220, 140, .95)) brightness(1.15); } }
@keyframes shimmer { 0%, 100% { filter: hue-rotate(-25deg); } 50% { filter: hue-rotate(25deg); } }
@keyframes twinkle { 0%, 100% { transform: scale(0) rotate(0); opacity: 0; } 50% { transform: scale(1) rotate(45deg); opacity: 1; } }
@keyframes hop { 0%, 60%, 100% { transform: translateY(0) scale(1, 1); } 70% { transform: translateY(0) scale(1.1, .9); } 80% { transform: translateY(-22px) scale(.95, 1.05); } 90% { transform: translateY(0) scale(1.05, .95); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}

/* ---------- small screens ---------- */
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; text-align: center; padding-top: 10px; gap: 26px; }
  .hero-logo { margin: 0 auto; }
  .lead { margin-inline: auto; }
  .cta-row { justify-content: center; }
  .features { grid-template-columns: 1fr 1fr; }
  .friends { grid-template-columns: 1fr 1fr; }
  .legend { grid-template-columns: 1fr; text-align: center; padding: 30px 20px; }
  .looks { justify-content: center; }
}
@media (max-width: 560px) {
  body { font-size: 16px; }
  section { padding: 50px 0; }
  .nav a { padding: 7px 11px; font-size: 14px; }
  .brand span { display: none; }
  .nav .wide { display: none; }
  .features { grid-template-columns: 1fr; }
  .friends { gap: 10px; }
  .friend { padding: 16px 10px; }
  .friend img { width: 72px; height: 72px; }
  .shots { grid-auto-columns: 210px; }
  .doc { padding: 26px 20px; }
  .dress { transform: scale(.85); }
}
