/* =========================================================
   Ole tus webs — COMING SOON (apex landing)
   Same brand language as ole-tus-webs-v3/ "Pizarra": midnight-amber dark palette,
   IBM Plex Sans + Mono, zero radius committed, giant compressed hero type.

   DIFFERENCES FROM v3, all deliberate for a one-screen teaser:
     · No .js gate and no reveal-on-scroll: nothing is hidden by default, so there is
       nothing that can be stranded if a script fails — because there is no script.
     · Entrance choreography is pure CSS (nth data-step delays below). It lives inside
       @media (prefers-reduced-motion: no-preference) and uses fill-mode both, so the
       base state of every element is VISIBLE and the animation only ever adds polish.
       Longest delay 240ms + 440ms duration = last element lands ~680ms after paint.
     · Line-length caps in rem/ch are set per element (a `ch` cap on a 16px container
       measures the CONTAINER's font, not the heading's — that trap cost real time in v3).

   GATES honored: no `transition: all`; only transform/opacity animate; hover effects
   wrapped in @media (hover:hover); shadows tinted with the bg hue (never pure black);
   every moving rule collapses under prefers-reduced-motion.
   ========================================================= */

/* ---------- Tokens: palette midnight-amber (palettes.json, AA-verified in v3) ---------- */
:root {
  --bg:          #1A1B1E;
  --surface:     #26282C;
  --fg:          #F1F3F5;   /* on bg 15.48:1 */
  --muted:       #CED4DA;   /* on bg 11.53:1 */
  --border:      #3A3D42;
  --brand:       #FFC419;
  --brand-hover: #FAB005;
  --on-brand:    #1A1B1E;   /* ink on amber 10.79:1 */

  /* Fallback first for browsers without color-mix(); the mix is ~5.8:1 on amber. */
  --muted-on-brand: #534518;
  --muted-on-brand: color-mix(in srgb, var(--on-brand) 75%, var(--brand));

  --rule: 1px solid var(--border);

  --space-2xs: 4px;  --space-xs: 8px;   --space-sm: 12px;  --space-md: 16px;
  --space-lg: 24px;  --space-xl: 32px;  --space-2xl: 48px; --space-3xl: 64px;
  --space-4xl: 96px;

  --text-caption: 0.75rem;
  --text-small:   0.875rem;
  --text-body:    1rem;
  --text-lead:    clamp(1.125rem, 1rem + 0.6vw, 1.375rem);
  --text-h2:      clamp(1.953rem, 1.6rem + 1.6vw, 2.441rem);
  --text-h4:      clamp(1.563rem, 1.4rem + 0.8vw, 1.953rem);
  /* Studio → Giant Compressed Hero Text: THE signature move. Sized to hold one word
     per line at 320px without a horizontal scrollbar (verified: line box < viewport). */
  --text-giant:   clamp(3.25rem, 17vw, 11rem);

  --radius-sm: 0; --radius-md: 0; --radius-lg: 0; --radius-pill: 0;

  --container-max: 1200px;
  --gutter: clamp(1rem, 4vw, 3rem);
  --section-pad: clamp(3rem, 8vw, 6rem);

  --font-sans: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --ease-out:        cubic-bezier(0.22, 1, 0.36, 1);
  --ease-out-strong: cubic-bezier(0.16, 1, 0.3, 1);
  --duration-fast: 140ms;
  --duration-base: 240ms;

  /* Elevation re-tinted to the bg hue (#1a1b1e) — never pure black. On a dark ground
     shadows barely read, so depth comes from 2px rules and the amber band instead. */
  --shadow-press: 0 6px 0 rgba(26, 27, 30, 0.9);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-sans);
  font-size: var(--text-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: inherit; }

:focus-visible {
  outline: 3px solid var(--brand);
  outline-offset: 3px;
}

/* Film grain over everything, never intercepting clicks. Decorative only. */
.grain {
  position: fixed;
  inset: 0;
  z-index: 9;
  pointer-events: none;
  opacity: 0.3;
  background-repeat: repeat;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='120' height='120' filter='url(%23n)' opacity='0.42'/%3E%3C/svg%3E");
}

.page {
  flex: 1;
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding: clamp(2rem, 6vw, 4rem) var(--gutter) var(--section-pad);
}

/* ---------- Masthead ---------- */
.masthead {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-sm) var(--space-md);
  padding-bottom: var(--space-lg);
  border-bottom: var(--rule);
}

.mark { display: inline-flex; color: var(--brand); }

.wordmark {
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: var(--text-body);
  letter-spacing: 0.02em;
}

.kicker {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: var(--text-caption);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ---------- Hero: the type wall ---------- */
.hero { margin-top: clamp(2.5rem, 8vw, 6rem); }

.giant {
  margin: 0;
  font-size: var(--text-giant);
  font-weight: 700;
  line-height: 0.85;
  letter-spacing: -0.045em;
  text-transform: uppercase;
}

.giant-line { display: block; }
.giant-line--accent { color: var(--brand); }

.lead {
  margin: var(--space-2xl) 0 0;
  max-width: 46ch;
  font-size: var(--text-lead);
  color: var(--muted);
}

/* ---------- The three figures ---------- */
.facts-wrap {
  margin-top: clamp(2.5rem, 7vw, 5rem);
  padding-top: var(--space-xl);
  border-top: var(--rule);
}

.facts-title {
  margin: 0 0 var(--space-xl);
  font-family: var(--font-mono);
  font-size: var(--text-caption);
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

.facts {
  display: grid;
  /* minmax(0,1fr) not repeat(3, auto): auto tracks size to min-content and overflow
     the viewport on a phone. This is the v3 defect that cost a fix round. */
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-lg) var(--space-md);
  margin: 0;
}

.fact { border-top: 2px solid var(--brand); padding-top: var(--space-sm); min-width: 0; }

.fact dt {
  font-family: var(--font-mono);
  font-size: var(--text-caption);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.fact dd {
  margin: var(--space-2xs) 0 0;
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: var(--text-h4);
  font-variant-numeric: tabular-nums;
  color: var(--fg);
}

.facts-note {
  margin: var(--space-xl) 0 0;
  max-width: 56ch;
  font-size: var(--text-small);
  color: var(--muted);
}

/* ---------- Amber contact band (Alternating Light/Dark rhythm) ---------- */
.band {
  background: var(--brand);
  color: var(--on-brand);
  padding: var(--section-pad) var(--gutter);
}

.band-inner { max-width: var(--container-max); margin-inline: auto; }

.band-title {
  margin: 0;
  font-size: var(--text-h2);
  line-height: 1.05;
  letter-spacing: -0.02em;
}

.band-lead {
  margin: var(--space-lg) 0 0;
  max-width: 52ch;
  font-size: var(--text-lead);
  color: var(--muted-on-brand);
}

.band-cta { margin: var(--space-2xl) 0 0; }

/* Inverted press button: ink fill with an amber label ON the amber band. Brand-on-brand
   would leave no visible fill (v3 lesson). 10.79:1 either way round. */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  padding: var(--space-md) var(--space-xl);
  background: var(--on-brand);
  color: var(--brand);
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: var(--text-body);
  text-decoration: none;
  border: 2px solid var(--on-brand);
  box-shadow: var(--shadow-press);
  transition: transform var(--duration-fast) var(--ease-out),
              box-shadow var(--duration-fast) var(--ease-out),
              background-color var(--duration-fast) var(--ease-out);
}

.band-note {
  margin: var(--space-xl) 0 0;
  max-width: 52ch;
  font-size: var(--text-small);
  color: var(--muted-on-brand);
}

/* ---------- Footer ---------- */
.foot {
  padding: var(--space-2xl) var(--gutter);
  border-top: var(--rule);
  text-align: center;
}

.signoff {
  margin: 0;
  font-family: var(--font-mono);
  font-size: var(--text-small);
  letter-spacing: 0.06em;
  color: var(--brand);
}

.foot-meta {
  margin: var(--space-sm) 0 0;
  font-size: var(--text-small);
  color: var(--muted);
}

.foot-meta a { color: var(--muted); }

/* ---------- Hover-only affordances (never on touch, where :hover sticks) ---------- */
@media (hover: hover) {
  .btn:hover {
    background: color-mix(in srgb, var(--on-brand) 84%, var(--brand));
    box-shadow: 0 3px 0 rgba(26, 27, 30, 0.9);
    transform: translateY(3px);
  }
  .foot-meta a:hover { color: var(--fg); }
}

/* ---------- Narrow screens ---------- */
@media (max-width: 700px) {
  .kicker { flex-basis: 100%; margin-left: 0; }
  .giant { line-height: 0.88; }
  .facts-title { margin-bottom: var(--space-lg); }
}

/* ---------- Entrance choreography (pure CSS, only when motion is welcome) ---------- */
@media (prefers-reduced-motion: no-preference) {
  .rise {
    animation: rise 440ms var(--ease-out-strong) both;
  }
  .rise[data-step="1"] { animation-delay: 0ms; }
  .rise[data-step="2"] { animation-delay: 60ms; }
  .rise[data-step="3"] { animation-delay: 120ms; }
  .rise[data-step="4"] { animation-delay: 180ms; }
  .rise[data-step="5"] { animation-delay: 240ms; }

  @keyframes rise {
    from { opacity: 0; transform: translateY(var(--space-md)); }
    to   { opacity: 1; transform: none; }
  }
}

/* ---------- Reduced motion: a guard that actually wins the cascade ----------
   The entrance animation simply never applies (it lives in the no-preference block above).
   The button is the one element with a transition outside that block, and it needs an
   override of its own: same specificity as the base rule, placed later, so it wins. The
   hover state still changes instantly — no movement, no smoothing. */
@media (prefers-reduced-motion: reduce) {
  .btn { transition: none; }
}
