/* Shared landing-page system.
   Reference: Oku (mobbin.com/sites/sections/13234fca-475c-4254-8856-fc85132b1dd8)
   — serif display headline, left-aligned, one primary CTA, real whitespace.
   Each app supplies its own palette via custom properties; the structure is
   identical so a fifth app is a config file, not a rebuild. */

:root {
  --measure: 38rem;
  --gutter: clamp(1.25rem, 5vw, 4rem);
  --space-s: 0.75rem;
  --space-m: 1.5rem;
  --space-l: 3rem;
  --space-xl: clamp(4rem, 10vw, 7rem);
  --radius: 4px;
  --font-body: ui-sans-serif, -apple-system, "Segoe UI", system-ui, sans-serif;
  --font-editorial: ui-serif, Georgia, "Times New Roman", serif;

  /* Selected Open Props easing tokens, MIT, Adam Argyle.
     https://github.com/argyleink/open-props */
  --ease-out-5: cubic-bezier(0, 0, 0, 1);
  --ease-quint-out: cubic-bezier(.23, 1, .32, 1);

  /* Overridden per app */
  --paper: #f4eee3;
  --raised: #fbf7ef;
  --ink: #101d31;
  --muted: #5d6470;
  --accent: #b83a2d;
  --rule: #b8b2a8;
  --on-accent: #ffffff;
}

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

html {
  overflow-x: clip;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  overflow-x: clip;
  background: var(--paper);
  color: var(--ink);
  font: 400 1.0625rem/1.65 var(--font-body);
  text-rendering: optimizeLegibility;
}

.wrap {
  max-width: 62rem;
  margin: 0 auto;
  padding-inline: var(--gutter);
}

/* --- Typography ------------------------------------------------------ */

h1, h2, h3 {
  font-family: var(--font-editorial);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin: 0;
  text-wrap: balance;
}

h1 { font-size: clamp(2.5rem, 7vw, 4.25rem); }
h2 { font-size: clamp(1.75rem, 4vw, 2.5rem); }
h3 { font-size: 1.25rem; letter-spacing: -0.01em; }

p { margin: 0 0 var(--space-m); max-width: var(--measure); }
.lede { font-size: clamp(1.125rem, 2vw, 1.3125rem); color: var(--muted); }

.eyebrow {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 var(--space-m);
}

/* --- Header ---------------------------------------------------------- */

.masthead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-m);
  padding-block: var(--space-m);
  flex-wrap: wrap;
}

.wordmark {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--ink);
  text-decoration: none;
}

.wordmark img { flex: none; border-radius: 9px; }

.wordmark .mark { width: 26px; height: 26px; border-radius: 6px; background: var(--accent); flex: none; }

.masthead nav { display: flex; gap: var(--space-m); }
.masthead nav a { min-height: 44px; display: inline-flex; align-items: center; color: var(--muted); text-decoration: none; font-size: 0.9375rem; }
.masthead nav a:hover, .masthead nav a:focus-visible { color: var(--ink); text-decoration: underline; }

/* --- Hero ------------------------------------------------------------ */

.hero { padding-block: var(--space-xl) var(--space-l); }
.hero h1 { margin-bottom: var(--space-m); }
.hero .lede { margin-bottom: var(--space-l); }

.cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--ink);
  color: var(--paper);
  text-decoration: none;
  font-weight: 600;
  padding: 0.9rem 1.5rem;
  border-radius: var(--radius);
  min-height: 44px;
}
a.cta:hover, a.cta:focus-visible { background: var(--accent); color: var(--on-accent); }
.cta-status {
  background: var(--raised);
  color: var(--ink);
  border: 1px solid var(--rule);
  cursor: default;
}

.cta-note { font-size: 0.875rem; color: var(--muted); margin-top: var(--space-s); }

.release-note {
  max-width: 35rem;
  margin: 0.85rem 0 0;
  color: var(--muted);
  font-size: 0.85rem;
}

/* --- Sections -------------------------------------------------------- */

section { padding-block: var(--space-xl); border-top: 1px solid var(--rule); }
section:first-of-type { border-top: 0; }

.steps { display: grid; gap: var(--space-l); grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); margin-top: var(--space-l); }
.step h3 { margin-bottom: 0.5rem; }
.step p { color: var(--muted); margin: 0; }
.step .num { font-size: 0.75rem; font-weight: 700; letter-spacing: 0.12em; color: var(--accent); display: block; margin-bottom: 0.6rem; }

/* The refusal — the section that actually differentiates these apps. */
.refusal { background: var(--raised); }
.refusal ul { list-style: none; margin: var(--space-l) 0 0; padding: 0; display: grid; gap: var(--space-m); max-width: var(--measure); }
.refusal li { padding-left: 1.75rem; position: relative; color: var(--ink); }
.refusal li::before {
  content: "";
  position: absolute; left: 0; top: 0.75em;
  width: 1rem; height: 2px; background: var(--accent);
}

.limits { font-size: 0.9375rem; color: var(--muted); }
.limits strong { color: var(--ink); }

/* --- Shots ----------------------------------------------------------- */

.shots { display: grid; gap: var(--space-m); grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); margin-top: var(--space-l); }
.shot figure { margin: 0; }
.shot img { width: 100%; height: auto; display: block; background: var(--raised); }
.shot figcaption { font-size: 0.9375rem; color: var(--muted); margin-top: 0.75rem; }
.shot .pending {
  aspect-ratio: 9 / 19.5;
  display: grid; place-items: center;
  border: 1px dashed var(--rule); border-radius: 12px;
  color: var(--muted); font-size: 0.875rem; text-align: center; padding: 1rem;
}

/* Real screenshots, framed with a local CSS device shell. The screen remains
   the untouched capture; the shell provides physical depth without an image
   dependency or a generic stock mockup. */
.device-frame {
  position: relative;
  isolation: isolate;
  padding: clamp(5px, 0.75vw, 9px);
  border: 1px solid rgb(255 255 255 / 20%);
  border-radius: clamp(24px, 3vw, 38px);
  background: linear-gradient(145deg, #4d535a 0%, #11151a 17%, #050709 72%, #353b42 100%);
  box-shadow:
    inset 0 0 0 1px rgb(255 255 255 / 12%),
    inset 0 0 0 3px rgb(0 0 0 / 42%),
    0 2.2rem 5rem rgb(0 0 0 / 24%);
}

.device-frame::before {
  content: "";
  position: absolute;
  z-index: -1;
  left: -4px;
  top: 19%;
  width: 3px;
  height: 15%;
  border-radius: 3px 0 0 3px;
  background: #161a1f;
  box-shadow: 0 2.4rem 0 #161a1f;
}

.device-frame::after {
  content: "";
  position: absolute;
  z-index: 2;
  inset: 1px;
  border-radius: inherit;
  background: linear-gradient(118deg, rgb(255 255 255 / 16%), transparent 17% 78%, rgb(255 255 255 / 8%));
  pointer-events: none;
}

.device-screen {
  position: relative;
  z-index: 1;
  overflow: hidden;
  border: 1px solid rgb(255 255 255 / 10%);
  border-radius: clamp(19px, 2.55vw, 31px);
  background: #050709;
}

.device-screen img {
  display: block;
  width: 100%;
  height: auto;
}

/* --- Footer ---------------------------------------------------------- */

footer { border-top: 1px solid var(--rule); padding-block: var(--space-l) var(--space-xl); font-size: 0.9375rem; color: var(--muted); }
footer nav { display: flex; flex-wrap: wrap; gap: var(--space-m); margin-bottom: var(--space-m); }
footer a { min-height: 44px; display: inline-flex; align-items: center; color: var(--ink); }
footer .trader { max-width: var(--measure); }

/* --- Long-form legal pages ------------------------------------------- */

.doc {
  width: 100%;
  max-width: 46rem;
  margin-inline: auto;
  padding-block: clamp(3.5rem, 8vw, 6.5rem) var(--space-xl);
  font-size: 1.0625rem;
  line-height: 1.72;
}
.doc h1 { max-width: 16ch; font-size: clamp(2.5rem, 6vw, 4.25rem); line-height: 1; margin-bottom: clamp(2rem, 5vw, 3.5rem); }
.doc h2 { font-size: clamp(1.45rem, 3vw, 1.85rem); line-height: 1.16; margin-top: clamp(3rem, 7vw, 4.5rem); margin-bottom: 1rem; }
.doc h3 { font-size: 1.125rem; line-height: 1.35; margin-top: 2rem; margin-bottom: 0.6rem; }
.doc p, .doc li { max-width: 42rem; }
.doc p { margin-bottom: 1.35rem; }
.doc ul, .doc ol { margin-block: 0 1.75rem; padding-left: 1.35rem; }
.doc li { margin-bottom: 0.75rem; padding-left: 0.2rem; }
.doc table { border-collapse: collapse; width: 100%; max-width: 100%; margin: 2rem 0; font-size: 0.9375rem; line-height: 1.5; }
.doc th, .doc td { text-align: left; padding: 0.8rem 0.85rem; border-bottom: 1px solid var(--rule); vertical-align: top; }
.doc code { background: var(--raised); padding: 0.15em 0.4em; border-radius: 3px; font-size: 0.9em; }
.doc hr { border: 0; border-top: 1px solid var(--rule); margin: var(--space-l) 0; }
.doc blockquote { margin: 0 0 var(--space-m); padding-left: 1rem; border-left: 3px solid var(--accent); color: var(--muted); }
.doc a {
  min-height: 44px;
  max-width: 100%;
  display: inline-flex;
  align-items: center;
  overflow-wrap: anywhere;
  word-break: break-word;
  text-underline-offset: 0.18em;
}

/* Progressive scroll choreography. Content is visible by default and is only
   staged after the local script confirms both JS and motion permission. */
html.motion-enabled [data-reveal] {
  opacity: 0;
  transform: translateY(clamp(1.25rem, 3vw, 2.5rem));
  transition:
    opacity 700ms var(--ease-out-5),
    transform 900ms var(--ease-quint-out);
}

html.motion-enabled [data-reveal] [data-reveal-item] {
  opacity: 0;
  transform: translateY(1rem);
  transition:
    opacity 600ms var(--ease-out-5) calc(var(--reveal-index, 0) * 70ms + 100ms),
    transform 760ms var(--ease-quint-out) calc(var(--reveal-index, 0) * 70ms + 100ms);
}

html.motion-enabled [data-reveal].is-visible,
html.motion-enabled [data-reveal].is-visible [data-reveal-item] {
  opacity: 1;
  transform: translateY(0);
}

/* --- Accessibility --------------------------------------------------- */

a:focus-visible, .cta:focus-visible, button:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}

.skip {
  position: absolute; left: -9999px;
  background: var(--ink); color: var(--paper);
  padding: 0.75rem 1rem; border-radius: var(--radius); z-index: 10;
}
.skip:focus { left: var(--gutter); top: var(--space-s); }

@media (prefers-reduced-motion: no-preference) {
  a, .cta { transition: color 120ms ease, background-color 120ms ease; }
}

@media (prefers-reduced-motion: reduce) {
  [data-reveal],
  [data-reveal-item] {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}

@media print {
  .masthead nav, .cta { display: none; }
  body { background: #fff; color: #000; }
}
