/* FLOPS website. Tokens follow the game's Diorama theme (flops docs/diorama-handoff-v2). */

@font-face { font-family: "Rubik"; src: url("../fonts/Rubik-Medium.ttf") format("truetype"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Rubik"; src: url("../fonts/Rubik-SemiBold.ttf") format("truetype"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Rubik"; src: url("../fonts/Rubik-Bold.ttf") format("truetype"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Rubik"; src: url("../fonts/Rubik-ExtraBold.ttf") format("truetype"); font-weight: 800; font-display: swap; }

:root {
  --bg: #e8edf4;
  --surface: #ffffff;
  --surface-1: #f4f6fa;
  --surface-2: #eef1f6;
  --surface-3: #dde3ec;
  --border: #d3dbe6;
  --fg: #131926;
  --fg-dim: #3e4859;
  --fg-muted: #556075;
  --blue: #2f6bff;
  --blue-edge: #1f4fd1;
  --blue-tint: #e6edff;
  --orange: #ff8a1f;
  --orange-edge: #d9690a;
  --orange-text: #8a4500;
  --orange-tint: #fff1e3;
  --violet: #7a5af8;
  --violet-text: #5b3fe0;
  --violet-tint: #eee9ff;
  --green: #0f8a4a;
  --green-tint: #e3f5ea;
  --teal: #0b7f90;
  --teal-tint: #e0f5f8;
  --red-text: #b21f2c;
  --red-tint: #fdecee;

  --edge: 0 2px 0 var(--border);
  --card-shadow: 0 2px 0 var(--border), 0 10px 24px rgba(19, 25, 38, 0.05);
  --float-shadow: 0 2px 0 var(--border), 0 6px 14px rgba(19, 25, 38, 0.08);
  --r-card: 20px;
  --r-dialog: 24px;
  --r-control: 14px;
  --r-tile: 16px;

  --gutter: 16px;
  --max: 1120px;
  --font: "Rubik", system-ui, -apple-system, "Segoe UI", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; overflow-x: clip; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 500 17px/1.6 var(--font);
  overflow-x: clip;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--blue-edge); text-decoration-thickness: 2px; text-underline-offset: 3px; }
a:hover { color: var(--blue); }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3 { font-weight: 800; line-height: 1.15; letter-spacing: -0.01em; margin: 0 0 0.5em; }
h1 { font-size: clamp(2.2rem, 5.4vw, 3.6rem); }
h2 { font-size: clamp(1.7rem, 3.6vw, 2.4rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }
.num { font-variant-numeric: tabular-nums; }

.skip { position: absolute; left: -999px; top: 8px; background: var(--surface); padding: 8px 14px; border-radius: 10px; z-index: 100; }
.skip:focus { left: 8px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.section { padding: clamp(56px, 9vw, 104px) 0; }
.section--tight { padding: clamp(36px, 6vw, 64px) 0; }
.section__head { max-width: 680px; margin-bottom: 36px; }
.section__head--center { margin-left: auto; margin-right: auto; text-align: center; }
.lede { font-size: 1.15rem; color: var(--fg-dim); }
.eyebrow { font-size: 0.8rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--violet-text); margin-bottom: 10px; display: block; }

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 50; padding: 12px 0; }
.site-header__bar {
  display: flex; align-items: center; gap: 12px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(1.4) blur(10px);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-radius: 999px; padding: 8px 8px 8px 10px;
  box-shadow: var(--float-shadow);
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--fg); font-weight: 800; font-size: 1.25rem; letter-spacing: 0.02em; }
.brand img { width: 40px; height: 40px; border-radius: 11px; box-shadow: var(--edge); }
.nav { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.nav a:not(.btn) { color: var(--fg-dim); text-decoration: none; font-weight: 600; padding: 8px 14px; border-radius: 999px; font-size: 0.98rem; }
.nav a:not(.btn):hover { background: var(--surface-2); color: var(--fg); }
.nav a[aria-current="page"] { color: var(--blue-edge); background: var(--blue-tint); }
.nav .btn { margin-left: 6px; }
.menu-btn { display: none; margin-left: auto; width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--surface-2); cursor: pointer; align-items: center; justify-content: center; }
.menu-btn svg { width: 22px; height: 22px; }

@media (max-width: 820px) {
  .menu-btn { display: inline-flex; }
  .nav {
    position: absolute; top: calc(100% + 4px); left: var(--gutter); right: var(--gutter);
    flex-direction: column; align-items: stretch; gap: 2px;
    background: var(--surface); border-radius: var(--r-card); padding: 10px; box-shadow: var(--card-shadow);
    display: none;
  }
  .nav.is-open { display: flex; }
  .nav a:not(.btn) { padding: 12px 14px; border-radius: 12px; }
  .nav .btn { margin: 6px 0 0; }
  .site-header .wrap { position: relative; }
}

/* ---------- Buttons ---------- */
.btn {
  --b: var(--blue); --e: var(--blue-edge); --t: #fff;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 22px; border-radius: var(--r-control); border: 0;
  background: var(--b); color: var(--t); font: 700 1rem/1 var(--font); text-decoration: none; cursor: pointer;
  box-shadow: 0 4px 0 var(--e); transform: translateY(0); transition: transform 0.08s, box-shadow 0.08s, filter 0.15s;
  white-space: nowrap;
}
.btn:hover { color: var(--t); filter: brightness(1.05); }
.btn:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--e); }
.btn--accent { --b: var(--orange); --e: var(--orange-edge); }
.btn--secondary { --b: var(--surface); --e: var(--border); --t: var(--blue-edge); box-shadow: inset 0 0 0 2px var(--blue), 0 4px 0 var(--border); }
.btn--secondary:active { box-shadow: inset 0 0 0 2px var(--blue), 0 1px 0 var(--border); }
.btn--sm { min-height: 40px; padding: 0 16px; font-size: 0.95rem; border-radius: 12px; }
.btn[disabled] { opacity: 0.6; cursor: progress; }

/* ---------- Pills, cards, tiles ---------- */
.pill {
  display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 14px 0 6px; border-radius: 999px;
  background: var(--surface); box-shadow: var(--edge); font-weight: 700; font-size: 0.92rem; color: var(--fg);
}
.pill__dot { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: var(--orange-tint); }
.pill__dot::after { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--orange); }
.pill--plain { padding: 0 14px; }

.card { background: var(--surface); border-radius: var(--r-card); box-shadow: var(--card-shadow); padding: 26px; }
.card h3 { margin-bottom: 0.35em; }
.card p:last-child { margin-bottom: 0; }
.icon-tile { width: 56px; height: 56px; border-radius: var(--r-tile); display: grid; place-items: center; margin-bottom: 16px; }
.icon-tile img { width: 44px; height: 44px; }
.tint-blue { background: var(--blue-tint); }
.tint-orange { background: var(--orange-tint); }
.tint-violet { background: var(--violet-tint); }
.tint-green { background: var(--green-tint); }
.tint-teal { background: var(--teal-tint); }

.grid { display: grid; gap: 18px; }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 900px) { .grid--3 { grid-template-columns: 1fr; } }
@media (max-width: 720px) { .grid--2 { grid-template-columns: 1fr; } }

/* ---------- Hero ---------- */
.hero { padding: clamp(28px, 6vw, 72px) 0 clamp(48px, 8vw, 96px); }
.hero__grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); align-items: center; gap: clamp(24px, 5vw, 64px); }
.hero h1 { margin: 18px 0 14px; }
.hero__tag { font-size: clamp(1.3rem, 2.6vw, 1.65rem); font-weight: 800; color: var(--violet-text); margin-bottom: 16px; }
.hero .lede { max-width: 34em; }
.hero__art { position: relative; display: flex; justify-content: center; min-height: 520px; }
.hero__slab {
  position: absolute; left: 50%; bottom: 0; width: min(560px, 120%); transform: translateX(-50%);
  aspect-ratio: 2 / 1; pointer-events: none;
}
.hero__slab::before {
  content: ""; position: absolute; inset: 18% 4% 0; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(47, 107, 255, 0.14), rgba(122, 90, 248, 0.08) 60%, transparent);
}
.hero__bld { position: absolute; width: 34%; filter: drop-shadow(0 8px 10px rgba(19, 25, 38, 0.12)); }
.hero__bld--a { left: -4%; bottom: 6%; }
.hero__bld--b { right: -6%; bottom: 10%; width: 38%; }
.hero__bld--c { left: 12%; bottom: 40%; width: 24%; }
.hero__art .phone { position: relative; z-index: 1; width: min(300px, 76vw); }
@media (max-width: 900px) {
  .hero__grid { grid-template-columns: 1fr; }
  .hero__art { min-height: 0; padding-top: 12px; }
}

/* ---------- Phone frame ---------- */
.phone {
  background: #0f1420; border-radius: 44px; padding: 10px; margin: 0;
  box-shadow: 0 2px 0 #2a3142, 0 24px 48px rgba(19, 25, 38, 0.18);
}
.phone img { width: 100%; border-radius: 34px; aspect-ratio: 780 / 1688; object-fit: cover; background: var(--bg); }
.phone--sm { border-radius: 30px; padding: 7px; }
.phone--sm img { border-radius: 23px; }

/* ---------- Notify form ---------- */
.notify { margin-top: 26px; max-width: 480px; }
.notify__row { display: flex; gap: 10px; }
.notify input[type="email"] { flex: 1; min-width: 0; }
.notify__note { font-size: 0.88rem; color: var(--fg-muted); margin: 10px 0 0; }
@media (max-width: 480px) { .notify__row { flex-direction: column; } }

.field { display: block; margin-bottom: 16px; }
.field > span { display: block; font-weight: 700; font-size: 0.92rem; margin-bottom: 6px; }
input[type="email"], input[type="text"], select, textarea {
  width: 100%; min-height: 50px; padding: 12px 16px; border-radius: var(--r-control);
  border: 2px solid var(--border); background: var(--surface); color: var(--fg); font: 500 1rem/1.4 var(--font);
}
textarea { min-height: 150px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 4px var(--blue-tint); }
.honey { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-status { margin: 12px 0 0; font-weight: 600; min-height: 1.6em; }
.form-status.is-ok { color: var(--green); }
.form-status.is-error { color: var(--red-text); }

/* ---------- Strip of screenshots ---------- */
.strip { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(200px, 1fr); gap: 20px; overflow-x: auto; padding: 8px 4px 24px; scroll-snap-type: x mandatory; }
.strip > * { scroll-snap-align: center; }
.shot { margin: 0; text-decoration: none; color: inherit; display: block; }
.shot figcaption { margin-top: 14px; font-weight: 600; font-size: 0.95rem; color: var(--fg-dim); text-align: center; }

/* ---------- Era ladder ---------- */
.ladder { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 14px; counter-reset: era; list-style: none; padding: 0; margin: 0; }
.era { background: var(--surface); border-radius: var(--r-card); box-shadow: var(--card-shadow); padding: 16px 14px 18px; text-align: center; position: relative; }
.era__art { height: 110px; display: flex; align-items: flex-end; justify-content: center; margin-bottom: 12px; }
.era__art img { max-height: 110px; width: auto; filter: drop-shadow(0 6px 6px rgba(19, 25, 38, 0.1)); }
.era h3 { font-size: 1.02rem; margin-bottom: 4px; }
.era p { font-size: 0.86rem; color: var(--fg-muted); line-height: 1.45; margin: 0; }
.era::before {
  counter-increment: era; content: counter(era);
  position: absolute; top: 12px; left: 12px; width: 26px; height: 26px; border-radius: 50%;
  background: var(--violet-tint); color: var(--violet-text); font-weight: 800; font-size: 0.8rem; display: grid; place-items: center;
}
@media (max-width: 1040px) { .ladder { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 640px) { .ladder { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ---------- Feature split ---------- */
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 64px); align-items: center; }
.split--flip > :first-child { order: 2; }
.split .phone { width: min(290px, 80vw); margin: 0 auto; }
@media (max-width: 820px) { .split { grid-template-columns: 1fr; } .split--flip > :first-child { order: 0; } }

.checklist { list-style: none; padding: 0; margin: 0 0 1em; }
.checklist li { position: relative; padding-left: 34px; margin-bottom: 12px; }
.checklist li::before {
  content: ""; position: absolute; left: 0; top: 3px; width: 22px; height: 22px; border-radius: 50%;
  background: var(--green-tint) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230F8A4A' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / 14px no-repeat;
}

/* ---------- Steps ---------- */
.steps { list-style: none; padding: 0; margin: 0; counter-reset: step; display: grid; gap: 12px; }
.steps li { counter-increment: step; background: var(--surface); border-radius: var(--r-tile); box-shadow: var(--edge); padding: 16px 18px 16px 64px; position: relative; }
.steps li::before {
  content: counter(step); position: absolute; left: 16px; top: 14px; width: 32px; height: 32px; border-radius: 10px;
  background: var(--blue); color: #fff; font-weight: 800; display: grid; place-items: center; box-shadow: 0 3px 0 var(--blue-edge);
}
.steps strong { display: block; }
.steps span { color: var(--fg-dim); font-size: 0.97rem; }

/* ---------- Resources ---------- */
.resource { display: flex; gap: 16px; align-items: flex-start; }
.resource .icon-tile { flex: none; margin: 0; }

/* ---------- CTA band ---------- */
.cta {
  background: linear-gradient(135deg, #7a3ff2 0%, #4f4ce6 55%, #2f6bff 100%); color: #fff;
  border-radius: 28px; padding: clamp(32px, 6vw, 64px); display: grid; grid-template-columns: auto minmax(0, 1fr); gap: clamp(20px, 4vw, 44px); align-items: center;
  box-shadow: 0 4px 0 #3a2fb8, 0 24px 48px rgba(79, 76, 230, 0.25);
}
.cta img { width: clamp(96px, 14vw, 150px); border-radius: 30%; box-shadow: 0 6px 0 rgba(0, 0, 0, 0.15); }
.cta h2 { color: #fff; }
.cta p { color: rgba(255, 255, 255, 0.88); }
.cta .notify__note { color: rgba(255, 255, 255, 0.8); }
.cta .form-status.is-ok { color: #d6ffe6; }
.cta .form-status.is-error { color: #ffe0e3; }
.cta input[type="email"] { border-color: transparent; }
@media (max-width: 640px) { .cta { grid-template-columns: 1fr; } }

/* ---------- FAQ ---------- */
.faq { display: grid; gap: 12px; }
.faq details { background: var(--surface); border-radius: var(--r-tile); box-shadow: var(--edge); }
.faq summary { cursor: pointer; list-style: none; padding: 18px 56px 18px 20px; font-weight: 700; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; position: absolute; right: 18px; top: 50%; width: 26px; height: 26px; margin-top: -13px; border-radius: 50%;
  background: var(--blue-tint) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231F4FD1' stroke-width='3' stroke-linecap='round'%3E%3Cpath d='M12 6v12M6 12h12'/%3E%3C/svg%3E") center / 14px no-repeat;
  transition: transform 0.2s;
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details > div { padding: 0 20px 18px; color: var(--fg-dim); }
.faq details > div p:last-child { margin: 0; }

/* ---------- Prose (privacy, help) ---------- */
.prose { max-width: 720px; }
.prose h2 { font-size: 1.45rem; margin-top: 1.8em; }
.prose h3 { margin-top: 1.4em; }
.prose ul { padding-left: 1.2em; }
.prose li { margin-bottom: 0.4em; }
.page-head { padding: clamp(28px, 6vw, 64px) 0 clamp(8px, 2vw, 16px); }
.page-head .lede { max-width: 40em; }

/* ---------- Screenshot gallery ---------- */
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 28px 22px; }

.lightbox { border: 0; padding: 0; background: transparent; max-width: 100vw; max-height: 100vh; }
.lightbox::backdrop { background: rgba(19, 25, 38, 0.72); }
.lightbox__inner { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 16px; }
.lightbox img { max-height: calc(100vh - 120px); width: auto; border-radius: 28px; box-shadow: 0 24px 48px rgba(0, 0, 0, 0.35); }
.lightbox p { color: #fff; font-weight: 600; margin: 0; text-align: center; }
.lightbox__close {
  position: fixed; top: 16px; right: 16px; width: 44px; height: 44px; border-radius: 50%; border: 0; cursor: pointer;
  background: #fff; box-shadow: var(--float-shadow); display: grid; place-items: center;
}
.lightbox__close svg { width: 20px; height: 20px; }

/* ---------- Footer ---------- */
.site-footer { padding: 40px 0 48px; color: var(--fg-muted); font-size: 0.93rem; }
.site-footer__bar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 28px; border-top: 2px solid var(--border); padding-top: 28px; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 6px 20px; margin-left: auto; }
.site-footer a { color: var(--fg-dim); text-decoration: none; font-weight: 600; }
.site-footer a:hover { color: var(--blue-edge); }
.site-footer .brand { font-size: 1.05rem; }
.site-footer .brand img { width: 32px; height: 32px; border-radius: 9px; }

/* ---------- Reveal on scroll ---------- */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.6s ease, transform 0.6s ease; }
.js .reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .btn { transition: none; }
}

/* ---------- Small utilities (no inline styles: the CSP blocks them) ---------- */
.center { text-align: center; margin-left: auto; margin-right: auto; }
.center-img { margin: 0 auto 12px; }
.split--top { align-items: start; }
.stack-gap { margin-bottom: 18px; }
.notify--tight { margin-top: 12px; }
.after-steps { margin-top: 20px; }
