@import url('fonts.css');

/* ------------------------------------------------------------------
   Loopmio landing - design tokens
   Colours are lifted from the app icon and the in-game home screen so
   the site and the store listing read as one thing.
------------------------------------------------------------------ */
:root {
  --navy-950: #0b1531;
  --navy-900: #10204a;
  --navy-800: #16294f;
  --navy-700: #1d3363;
  --navy-600: #27437c;
  --navy-500: #33538f;
  --navy-400: #4a6ba6;

  --blue:   #33a6f2;
  --green:  #7ee08c;
  --pink:   #f2508f;
  --orange: #fba31e;
  --gold:   #f5c451;
  --cream:  #ffdfa3;

  --ink:      #0f1f45;
  --text:     #eef3ff;
  --text-dim: #a9bfe6;
  --line:     rgba(155, 185, 235, .22);

  --font-display: 'Fredoka', 'Trebuchet MS', 'Segoe UI', system-ui, sans-serif;
  --font-body: 'Nunito', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;

  --r-sm: 10px;
  --r-md: 16px;
  --r-lg: 24px;
  --r-xl: 34px;

  --shadow-sm: 0 4px 14px rgba(5, 14, 40, .35);
  --shadow-md: 0 14px 34px rgba(5, 14, 40, .45);
  --shadow-lg: 0 30px 70px rgba(4, 11, 35, .55);

  --wrap: 1140px;
  --gutter: clamp(20px, 5vw, 40px);
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: clamp(16px, 1.05vw, 17.5px);
  line-height: 1.65;
  color: var(--text);
  background: var(--navy-900);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

h1, h2, h3, h4, .display {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -.01em;
  margin: 0 0 .5em;
  text-wrap: balance;
}

p { margin: 0 0 1em; text-wrap: pretty; }
p:last-child { margin-bottom: 0; }

a { color: var(--blue); text-decoration-thickness: 2px; text-underline-offset: 3px; }
a:hover { color: #7cc8ff; }

img, svg { max-width: 100%; }
img { height: auto; display: block; }
/* must win over `img { display: block }` above */
[hidden] { display: none !important; }

:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
  border-radius: 6px;
}

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.skip {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  background: var(--gold); color: var(--ink);
  padding: 10px 18px; border-radius: var(--r-sm); font-weight: 800;
  text-decoration: none; transition: top .15s ease;
}
.skip:focus { top: 12px; color: var(--ink); }

/* ---------------------------------------------------------------- header */
.site-head {
  position: sticky; top: 0; z-index: 50;
  background: rgba(11, 21, 49, .82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.site-head .wrap {
  display: flex; align-items: center; gap: 18px;
  min-height: 68px;
}
.brand {
  display: inline-flex; align-items: center; gap: 11px;
  font-family: var(--font-display); font-weight: 600; font-size: 21px;
  color: var(--text); text-decoration: none; letter-spacing: -.02em;
  margin-right: auto;
}
.brand img { width: 34px; height: 34px; border-radius: 9px; box-shadow: var(--shadow-sm); }

.nav { display: flex; align-items: center; gap: 6px; }
.nav a {
  color: var(--text-dim); text-decoration: none; font-weight: 700; font-size: 15px;
  padding: 8px 13px; border-radius: 999px; transition: color .15s ease, background .15s ease;
}
.nav a:hover { color: var(--text); background: rgba(120, 160, 220, .14); }

.nav-toggle {
  display: none;
  width: 42px; height: 42px; padding: 0; border: 0; border-radius: 12px;
  background: rgba(120, 160, 220, .14); box-shadow: inset 0 0 0 1px var(--line);
  color: var(--text); cursor: pointer;
  align-items: center; justify-content: center;
}
.nav-toggle svg { width: 20px; height: 20px; }
.nav-toggle .icon-close { display: none; }
.nav-toggle[aria-expanded='true'] .icon-open { display: none; }
.nav-toggle[aria-expanded='true'] .icon-close { display: block; }

@media (max-width: 860px) {
  .nav-toggle { display: inline-flex; }
  .nav {
    display: none;
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 2px;
    padding: 10px var(--gutter) 18px;
    background: rgba(11, 21, 49, .97);
    backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-md);
  }
  .nav.is-open { display: flex; }
  .nav a { padding: 13px 16px; border-radius: var(--r-sm); font-size: 16px; }
}

/* ---------------------------------------------------------------- buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font-family: var(--font-display); font-weight: 600; font-size: 17px;
  padding: 14px 26px; border-radius: 999px; border: 0;
  text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

.btn-primary { background: var(--green); color: var(--ink); box-shadow: 0 6px 0 #4fae62, var(--shadow-sm); }
.btn-primary:hover { background: #92e89e; color: var(--ink); box-shadow: 0 8px 0 #4fae62, var(--shadow-md); }
.btn-primary:active { box-shadow: 0 3px 0 #4fae62, var(--shadow-sm); }

.btn-ghost {
  background: rgba(120, 160, 220, .14); color: var(--text);
  box-shadow: inset 0 0 0 2px var(--line);
}
.btn-ghost:hover { background: rgba(120, 160, 220, .24); color: var(--text); }

/* store buttons: placeholders until the listings are live.
   Swap for the official Apple / Google badge artwork on launch. */
.stores { display: flex; flex-wrap: wrap; gap: 14px; }
.store-btn {
  display: inline-flex; align-items: center; gap: 13px;
  padding: 12px 22px 12px 18px; border-radius: 14px;
  background: #050c22; color: #fff; text-decoration: none;
  box-shadow: inset 0 0 0 1.5px rgba(190, 210, 245, .35), var(--shadow-sm);
  transition: transform .15s ease, box-shadow .15s ease;
}
.store-btn:hover { transform: translateY(-2px); color: #fff; box-shadow: inset 0 0 0 1.5px rgba(190,210,245,.6), var(--shadow-md); }
.store-btn svg { width: 27px; height: 27px; flex: none; }
.store-btn b { display: block; font-family: var(--font-display); font-weight: 500; font-size: 17px; line-height: 1.15; }
.store-btn span { display: block; font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: #a9bfe6; font-weight: 800; }
.store-btn[aria-disabled='true'] { cursor: default; opacity: .92; }
.store-btn[aria-disabled='true']:hover { transform: none; }

/* ---------------------------------------------------------------- sections */
.section { padding: clamp(64px, 9vw, 112px) 0; }
.section-head { max-width: 660px; margin: 0 auto clamp(38px, 5vw, 60px); text-align: center; }
.section-head h2 { font-size: clamp(30px, 4.4vw, 46px); }
.section-head p { color: var(--text-dim); font-size: 1.08em; margin: 0; }

.eyebrow {
  display: inline-block; font-family: var(--font-display); font-weight: 600;
  font-size: 13px; letter-spacing: .18em; text-transform: uppercase;
  color: var(--gold); margin-bottom: 14px;
}

/* ---------------------------------------------------------------- hero */
.hero {
  position: relative; overflow: hidden;
  padding: clamp(48px, 7vw, 92px) 0 clamp(56px, 8vw, 104px);
  background:
    radial-gradient(1100px 620px at 78% -8%, rgba(51, 166, 242, .22), transparent 62%),
    radial-gradient(900px 560px at 8% 12%, rgba(242, 80, 143, .16), transparent 60%),
    linear-gradient(180deg, var(--navy-900) 0%, var(--navy-800) 55%, var(--navy-900) 100%);
}
.hero::after {
  content: ''; position: absolute; inset: auto 0 -1px 0; height: 1px; background: var(--line);
}
.hero-grid {
  display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
  gap: clamp(32px, 5vw, 72px); align-items: center;
}
@media (max-width: 940px) {
  .hero-grid { grid-template-columns: 1fr; text-align: center; }
  .hero-copy .stores, .hero-copy .hero-meta { justify-content: center; }
}
.hero h1 {
  font-size: clamp(38px, 6.4vw, 68px);
  font-weight: 600;
  margin-bottom: 16px;
}
.hero h1 .accent { color: var(--gold); display: block; }
.hero-lede { font-size: clamp(17px, 1.6vw, 20.5px); color: #d5e2fb; max-width: 34em; margin-bottom: 28px; }
@media (max-width: 940px) { .hero-lede { margin-inline: auto; } }

.hero-meta {
  display: flex; flex-wrap: wrap; gap: 8px 10px; margin-top: 26px;
  font-size: 14px; color: var(--text-dim);
}
.hero-meta li { list-style: none; }
.hero-meta { padding: 0; }
.pill {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 6px 14px; border-radius: 999px;
  background: rgba(120, 160, 220, .13); box-shadow: inset 0 0 0 1px var(--line);
  font-weight: 700;
}
.pill::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--green); }
.pill.p-blue::before { background: var(--blue); }
.pill.p-pink::before { background: var(--pink); }
.pill.p-orange::before { background: var(--orange); }

/* ---------------------------------------------------------------- phone */
.phone-stage { display: flex; justify-content: center; position: relative; }
.phone-stage::before {
  content: ''; position: absolute; width: 78%; aspect-ratio: 1; border-radius: 50%;
  background: radial-gradient(circle, rgba(51,166,242,.3), transparent 66%);
  filter: blur(18px);
}
.phone {
  position: relative; width: min(310px, 82vw); aspect-ratio: 9 / 19.2;
  border-radius: 44px; padding: 11px;
  background: linear-gradient(160deg, #47608c, #1b2b4d 55%, #33456c);
  box-shadow: var(--shadow-lg), inset 0 0 0 1px rgba(190, 214, 250, .3);
}
.phone-screen {
  position: relative; height: 100%; border-radius: 34px; overflow: hidden;
  background: linear-gradient(180deg, #24396d 0%, #1c2d59 60%, #182750 100%);
  display: flex; flex-direction: column; align-items: center;
  padding: 30px 20px 22px; text-align: center;
}
.phone-notch {
  position: absolute; top: 9px; left: 50%; transform: translateX(-50%);
  width: 92px; height: 22px; border-radius: 999px; background: #0d1731; z-index: 3;
}
.phone-screen-shot { display: block; padding: 0; }
.phone-shot { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ---------------------------------------------------------------- card (reused by arcade) */
.card {
  background: linear-gradient(165deg, rgba(46, 74, 128, .55), rgba(22, 41, 79, .8));
  border-radius: var(--r-lg);
  padding: clamp(26px, 3vw, 34px);
  box-shadow: inset 0 0 0 1px var(--line), var(--shadow-sm);
  position: relative; overflow: hidden;
}
.card h3 { font-size: 23px; margin-bottom: 10px; }
.card p { color: var(--text-dim); margin: 0; }

/* ---------------------------------------------------------------- how to play */
.steps { display: grid; gap: clamp(20px, 3vw, 30px); grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); counter-reset: step; }
.step {
  background: rgba(20, 38, 74, .6); border-radius: var(--r-lg); padding: clamp(24px, 3vw, 30px);
  box-shadow: inset 0 0 0 1px var(--line);
}
.step-n {
  counter-increment: step;
  display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 50%;
  background: var(--gold); color: var(--ink); font-family: var(--font-display); font-weight: 600; font-size: 19px;
  margin-bottom: 16px;
}
.step-n::before { content: counter(step); }
.step h3 { font-size: 20px; margin-bottom: 8px; }
.step p { color: var(--text-dim); margin: 0; font-size: .97em; }

.demo-panel {
  margin-top: clamp(34px, 4vw, 48px);
  background: linear-gradient(165deg, rgba(46, 74, 128, .5), rgba(20, 36, 72, .82));
  border-radius: var(--r-xl); padding: clamp(26px, 4vw, 46px);
  box-shadow: inset 0 0 0 1px var(--line), var(--shadow-md);
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(26px, 4vw, 52px); align-items: center;
}
@media (max-width: 820px) { .demo-panel { grid-template-columns: 1fr; } }
.demo-panel h3 { font-size: clamp(24px, 3vw, 32px); }
.demo-panel p { color: var(--text-dim); }
.demo-svg { width: 100%; max-width: 470px; margin-inline: auto; }

/* ---------------------------------------------------------------- gallery carousel */
.carousel { max-width: 300px; margin-inline: auto; }
.carousel-frame {
  position: relative; aspect-ratio: 9 / 19.5; border-radius: var(--r-lg); overflow: hidden;
  background: linear-gradient(170deg, #2a4176, #16274f);
  box-shadow: inset 0 0 0 1px var(--line), var(--shadow-md);
}
.carousel-slide {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  opacity: 0; transition: opacity .6s ease;
}
.carousel-slide.is-active { opacity: 1; }
.carousel-caption {
  margin: 18px 0 0; font-size: 15px; color: var(--text-dim); font-weight: 700; text-align: center;
}
.carousel-dots { display: flex; justify-content: center; gap: 9px; margin-top: 16px; padding: 0; }
.carousel-dots button {
  width: 9px; height: 9px; padding: 0; border: 0; border-radius: 999px;
  background: var(--line); cursor: pointer; transition: width .25s ease, background .25s ease;
}
.carousel-dots button.is-active { width: 24px; background: var(--gold); }
@media (prefers-reduced-motion: reduce) {
  .carousel-slide { transition: none; }
}

/* ---------------------------------------------------------------- offline strip */
.strip {
  background: linear-gradient(120deg, rgba(51,166,242,.14), rgba(242,80,143,.12) 55%, rgba(251,163,30,.14));
  border-block: 1px solid var(--line);
}
.strip-grid { display: grid; gap: clamp(20px, 3vw, 34px); grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
.fact h3 { font-size: 18px; margin-bottom: 6px; display: flex; align-items: center; gap: 9px; }
.fact h3 svg { width: 21px; height: 21px; flex: none; color: var(--gold); }
.fact p { color: var(--text-dim); font-size: .95em; margin: 0; }

/* ---------------------------------------------------------------- faq */
.faq { max-width: 800px; margin-inline: auto; }
.faq details {
  border-radius: var(--r-md); background: rgba(20, 38, 74, .55);
  box-shadow: inset 0 0 0 1px var(--line); margin-bottom: 12px; overflow: hidden;
}
.faq summary {
  cursor: pointer; list-style: none; padding: 18px 54px 18px 22px; position: relative;
  font-family: var(--font-display); font-weight: 500; font-size: 18px; color: var(--text);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ''; position: absolute; right: 22px; top: 50%; width: 11px; height: 11px;
  border-right: 2.5px solid var(--gold); border-bottom: 2.5px solid var(--gold);
  transform: translateY(-70%) rotate(45deg); transition: transform .25s ease;
}
.faq:not(.js) details[open] summary::after,
.faq details.is-open summary::after { transform: translateY(-30%) rotate(-135deg); }
.faq summary:hover { background: rgba(120, 160, 220, .1); }
.faq .faq-body { padding: 0 22px 20px; color: var(--text-dim); overflow: hidden; transition: max-height .3s cubic-bezier(.4,0,.2,1); }
@media (prefers-reduced-motion: reduce) {
  .faq .faq-body { transition: none; }
}

/* ---------------------------------------------------------------- cta */
.cta {
  text-align: center;
  background:
    radial-gradient(700px 380px at 50% 0%, rgba(126, 224, 140, .16), transparent 65%),
    linear-gradient(180deg, var(--navy-800), var(--navy-950));
}
.cta h2 { font-size: clamp(32px, 5vw, 52px); }
.cta p { color: var(--text-dim); max-width: 46ch; margin-inline: auto; }
.cta .stores { justify-content: center; margin-top: 30px; }

/* ---------------------------------------------------------------- footer */
.site-foot {
  background: var(--navy-950); border-top: 1px solid var(--line);
  padding: clamp(40px, 5vw, 60px) 0 34px; font-size: 15px; color: var(--text-dim);
}
.foot-grid { display: flex; flex-wrap: wrap; gap: 26px 46px; justify-content: space-between; align-items: flex-start; }
.foot-brand { display: flex; align-items: center; gap: 12px; font-family: var(--font-display); font-size: 20px; color: var(--text); }
.foot-brand img { width: 40px; height: 40px; border-radius: 11px; }
.foot-links { display: flex; flex-wrap: wrap; gap: 10px 26px; padding: 0; margin: 0; list-style: none; }
.foot-links a { color: var(--text-dim); text-decoration: none; font-weight: 700; }
.foot-links a:hover { color: var(--text); text-decoration: underline; }
.foot-note { margin-top: 30px; padding-top: 22px; border-top: 1px solid var(--line); font-size: 13.5px; }

/* ---------------------------------------------------------------- legal pages */
.doc { padding: clamp(48px, 6vw, 80px) 0 clamp(56px, 7vw, 96px); }
.doc .wrap { max-width: 780px; }
.doc h1 { font-size: clamp(32px, 5vw, 46px); margin-bottom: 10px; }
.doc .updated { color: var(--text-dim); font-size: 14.5px; margin-bottom: 40px; }
.doc h2 { font-size: clamp(22px, 3vw, 28px); margin-top: 44px; }
.doc h3 { font-size: 19px; margin-top: 28px; }
.doc ul, .doc ol { color: #d5e2fb; padding-left: 22px; }
.doc li { margin-bottom: 9px; }
.doc p { color: #d5e2fb; }
.callout {
  background: rgba(251, 163, 30, .12); box-shadow: inset 0 0 0 1px rgba(251, 163, 30, .38);
  border-radius: var(--r-md); padding: 18px 22px; margin: 26px 0;
}
.callout p { margin: 0; color: var(--cream); font-size: .95em; }
.doc table { width: 100%; border-collapse: collapse; margin: 22px 0; font-size: .95em; }
.doc th, .doc td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.doc th { font-family: var(--font-display); font-weight: 500; color: var(--text); }
.doc td { color: var(--text-dim); }

/* ---------------------------------------------------------------- motion */
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-11px); } }
.floaty { animation: float 6.5s ease-in-out infinite; }

@keyframes reveal { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
.reveal { animation: reveal .6s cubic-bezier(.22,.9,.32,1) both; }
.reveal-2 { animation-delay: .08s; }
.reveal-3 { animation-delay: .16s; }
