/* =====================================================================
   INGENIUM CREATUS — Stylesheet  v3
   A studio of Ingenius LLC.

   Brand: Davinci's direction 02, THE MONUMENT — his mark geometry, his type
   (Sora / Manrope / JetBrains Mono) and his layout discipline, carried on
   LEX'S COLOUR TREATMENT at Timn's direction (2026-09-05):
   *"I like the colors both for the webpage and the icon and words that lex
   made, bring that to the new one on top of what Davinci made."*

   So the ground goes back to the cooler #06090C, the accent back to the
   brighter cyan #7FD4E8, and the two-tone treatment returns to both the mark
   and the wordmark.

   DELIBERATE DEPARTURE from Davinci's guardrail: he capped the accent at two
   uses per screen. Timn asked for the two-tone look back, which spends more
   than that. Kept from his rules, because these are objective rather than
   taste: control outlines never use a decorative hairline colour, nothing
   text-bearing drops below 4.5:1, surfaces stay matte, motion stays slow.
   Every value below is MEASURED by the contrast test, not estimated.

   ===================================================================== */

/* ---------- Reset & base ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
/* overflow-x:clip, never `hidden` — `hidden` displaces the click hitboxes of
   every position:fixed element. See Lex CLAUDE.md "Known Bugs & Lessons". */
body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--ground);
  line-height: 1.6;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img, svg, video { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

/* ---------- Tokens — Lex palette on Davinci's structure ---------- */
:root {
  --ground:       #06090C;   /* near-black, cool green-blue cast */
  --surface:      #0C1319;
  --surface-2:    #101A21;
  --rule:         #1C2830;   /*  1.33:1 — decorative hairlines ONLY */
  --rule-strong:  #6E8290;   /*  5.00:1 — control outlines AND valid as text */
  --ink:          #DCE6EC;   /* 15.75:1 */
  --ink-mute:     #8FA3B0;   /*  7.64:1 */
  --ink-faint:    #6E8290;   /*  5.00:1 — the faintest text tone */
  --accent:       #7FD4E8;   /* 11.87:1 — the brighter cyan */
  --accent-deep:  #3E93AB;   /*  5.67:1 */
  --signal:       #D9A04A;   /*  8.63:1 */
  --accent-ink:   #06090C;
  --signal-ink:   #06090C;

  --font-display: 'Sora', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-body:    'Manrope', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-mono:    'JetBrains Mono', ui-monospace, Menlo, Consolas, monospace;

  /* Soft bloom behind the mark. The one sanctioned use of accent as light. */
  --bloom:        rgba(127, 212, 232, 0.15);

  --ease:         cubic-bezier(0.16, 1, 0.3, 1);
  --wrap-narrow:  760px;

  /* Fractal-noise tile for the grain overlay. Inline SVG as a data URI so it
     costs no request and needs no img-src host beyond `data:`. */
  --grain-url: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.82' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)' opacity='0.55'/%3E%3C/svg%3E");
}

/* ---------- Film grain ----------
   The single most important detail for "grounded". Without it the page reads
   as glass; with it, as a surface. Fixed, non-interactive, very low opacity. */
.grain {
  position: fixed; inset: -50%;
  z-index: 60;
  pointer-events: none;      /* decorative overlay — MUST NOT eat clicks */
  opacity: 0.15;
  background-image: var(--grain-url);
  background-size: 180px 180px;
  animation: grain-drift 6s steps(6) infinite;
  will-change: transform;
}
@keyframes grain-drift {
  0%   { transform: translate(0, 0); }
  20%  { transform: translate(-3%, 2%); }
  40%  { transform: translate(2%, -3%); }
  60%  { transform: translate(-2%, -2%); }
  80%  { transform: translate(3%, 1%); }
  100% { transform: translate(0, 0); }
}

/* ---------- Reticle ----------
   Corner brackets that trail the pointer and snap open around whatever is
   hoverable. Accent throughout, as Lex had it. Fine pointers only. */
.reticle {
  position: fixed; top: 0; left: 0;
  z-index: 55;
  pointer-events: none;      /* decorative overlay — MUST NOT eat clicks */
  opacity: 0;
  transition: opacity 0.5s var(--ease);
  will-change: transform;
}
.reticle.is-live { opacity: 1; }
.reticle__corner {
  position: absolute;
  width: 9px; height: 9px;
  border: 1px solid var(--accent);
  opacity: 0.85;
}
.reticle__corner--tl { border-right: 0; border-bottom: 0; }
.reticle__corner--tr { border-left: 0;  border-bottom: 0; }
.reticle__corner--bl { border-right: 0; border-top: 0; }
.reticle__corner--br { border-left: 0;  border-top: 0; }
.reticle__dot {
  position: absolute; left: 50%; top: 50%;
  width: 2px; height: 2px; margin: -1px 0 0 -1px;
  background: var(--accent);
  transition: opacity 0.3s var(--ease);
}
.reticle.is-locked .reticle__dot { opacity: 0; }

@media (hover: none), (pointer: coarse) {
  .reticle { display: none; }
}

/* ---------- Stage (the one screen) ---------- */
.stage {
  position: relative;
  min-height: 100svh;
  display: grid;
  grid-template-rows: auto 1fr auto;
  overflow: hidden;
}

/* Depth layers. Amplitude is deliberately tiny — parallax you notice is
   parallax that is too strong. */
.layer { position: absolute; inset: 0; pointer-events: none; will-change: transform; }

.layer--dust  { z-index: 1; }
.layer--ring  { z-index: 2; display: grid; place-items: center; }
.layer--vignette {
  z-index: 3;
  background:
    radial-gradient(ellipse 90% 70% at 50% 45%, transparent 0%, rgba(6,9,12,0.58) 70%, var(--ground) 100%);
}

#dust { width: 100%; height: 100%; display: block; }

/* Soft bloom behind the mark — Davinci's one sanctioned accent-as-light. */
.layer--ring::before {
  content: "";
  position: absolute;
  width: min(72vmin, 660px); aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, var(--bloom) 0%, transparent 62%);
  animation: breathe 11s ease-in-out infinite;
}
@keyframes breathe {
  0%, 100% { opacity: 0.55; transform: scale(1); }
  50%      { opacity: 1;    transform: scale(1.05); }
}

/* Back on the accent, per Timn — held down by opacity rather than by hue. */
.ring { width: min(70vmin, 620px); opacity: 0.5; color: var(--accent); }
.ring__slow { transform-origin: 50% 50%; animation: spin 190s linear infinite; }
.ring__fast { transform-origin: 50% 50%; animation: spin 92s linear infinite reverse; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Content ---------- */
.stage__top, .stage__mid, .stage__base {
  position: relative; z-index: 10;
  padding-inline: clamp(20px, 5vw, 56px);
}
.stage__top  { padding-top: clamp(22px, 4vh, 40px);
               display: flex; justify-content: space-between; gap: 16px; }
.stage__base { padding-bottom: clamp(22px, 4vh, 40px);
               display: flex; flex-wrap: wrap; gap: 10px 26px;
               align-items: baseline; justify-content: space-between; }
.stage__mid  { display: grid; place-items: center; text-align: center; }

/* HUD micro-label. --rule-strong would read better here but misses 4.5:1 as
   text, so the recession is done with size and tracking, not colour. */
.hud {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--ink-faint);   /* 5.00:1 — recessed and still legible */
}

/* The mark is two-tone: the heptagon C takes the accent, the I slot the ink. */
.mark {
  width: clamp(56px, 8.6vmin, 88px);
  margin: 0 auto 36px;
  color: var(--accent);          /* the heptagon */
}
.mark .mark__slot { fill: var(--ink); }   /* the I */

/* Weight, not colour, separates the two words — which only works because the
   faces are self-hosted statics. On the Google CDN's variable file, Sora 300
   and Sora 600 render identically. */
.wordmark {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(26px, 6.4vw, 66px);
  line-height: 1;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--ink);
  margin-right: -0.15em;          /* optical: cancel the trailing tracking */
}
/* Two-tone, as Lex had it: weight AND colour separate the two words. */
.wordmark b { font-weight: 600; color: var(--accent); }

.tagline {
  display: flex; align-items: center; justify-content: center;
  gap: 0.95em;
  margin-top: 24px;
  font-family: var(--font-mono);
  font-size: clamp(9.5px, 1.4vw, 11px);
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--ink-mute);
}
.tagline span { white-space: nowrap; margin-right: -0.3em; }
/* An empty hairline divider rather than a "/" character: a decorative rule is
   exempt from text contrast, a slash is not. */
.tagline i { display: block; width: 1px; height: 9px; background: var(--accent-deep); flex: none; }

/* ---------- Contact ----------
   A plain mailto anchor wearing HUD clothes. It is an <a>, not a scripted
   button, so it opens the visitor's mail client with JavaScript off, the
   reticle locks onto it like any other link, and long-press / right-click /
   copy-address all behave the way people expect. */
.cta {
  display: inline-flex; align-items: center; gap: 14px;
  margin-top: clamp(34px, 6vh, 56px);
  min-height: 46px;                      /* above the 44pt touch floor */
  padding: 13px 28px;
  position: relative; overflow: hidden;
  border: 1px solid var(--rule-strong);  /* a control outline — never --rule */
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: clamp(10.5px, 1.4vw, 12px);
  letter-spacing: 0.3em;
  text-transform: uppercase;
  transition: color 0.4s var(--ease), border-color 0.4s var(--ease);
}
/* Flat wash, not a gradient — Davinci's rule. It sweeps in from the left so it
   reads as a panel being lit rather than as a fade. */
.cta::before {
  content: ""; position: absolute; inset: 0; z-index: 0;
  background: rgba(127, 212, 232, 0.1);
  transform: scaleX(0); transform-origin: left;
  transition: transform 0.55s var(--ease);
}
.cta__label { position: relative; z-index: 1; margin-right: -0.3em; }
.cta__arrow { position: relative; z-index: 1; width: 18px; height: 8px; flex: none;
              transition: transform 0.45s var(--ease); }
/* Selection ticks, the marks a HUD puts either side of the active item. */
.cta__tick {
  position: absolute; top: 50%; z-index: 1; width: 6px; height: 1px;
  background: var(--accent); opacity: 0;
  transition: opacity 0.4s var(--ease), transform 0.4s var(--ease);
}
.cta__tick--l { left: 0;  transform: translateX(-6px); }
.cta__tick--r { right: 0; transform: translateX(6px); }


.cta:hover, .cta:focus-visible { border-color: var(--accent); color: var(--accent); }
.cta:hover::before, .cta:focus-visible::before { transform: scaleX(1); }
.cta:hover .cta__arrow, .cta:focus-visible .cta__arrow { transform: translateX(5px); }
.cta:hover .cta__tick, .cta:focus-visible .cta__tick { opacity: 1; transform: translateX(0); }

.minilinks { display: flex; flex-wrap: wrap; gap: 10px 22px; }
.minilinks a { transition: color 0.3s var(--ease); }
.minilinks a:hover, .minilinks a:focus-visible { color: var(--accent); }

/* ---------- Boot sequence ----------
   Runs once, on load. A single scan pass, and the wordmark settling out of a
   tracked-out state. Nothing loops; nothing announces itself. */
.scan {
  position: fixed; inset: 0; z-index: 58; pointer-events: none;
  background: linear-gradient(to bottom, transparent 0%, var(--bloom) 48%, transparent 52%);
  opacity: 0;
}
.is-booting .scan { animation: scan-pass 1500ms var(--ease) 120ms 1 both; }
@keyframes scan-pass {
  0%   { opacity: 0;   transform: translateY(-100%); }
  12%  { opacity: 0.9; }
  88%  { opacity: 0.5; }
  100% { opacity: 0;   transform: translateY(100%); }
}

.is-booting .mark,
.is-booting .wordmark,
.is-booting .tagline,
.is-booting .cta,
.is-booting .stage__top > *,
.is-booting .stage__base > * { animation: settle 1100ms var(--ease) both; }
.is-booting .mark      { animation-delay: 240ms; }
.is-booting .wordmark  { animation-delay: 380ms; }
.is-booting .tagline   { animation-delay: 620ms; }
.is-booting .cta       { animation-delay: 760ms; }
.is-booting .stage__top > *  { animation-delay: 900ms; }
.is-booting .stage__base > * { animation-delay: 980ms; }
@keyframes settle {
  from { opacity: 0; letter-spacing: 0.42em; filter: blur(5px); }
  to   { opacity: 1; }
}

/* ---------- Focus ---------- */
:focus-visible { outline: 1px solid var(--accent); outline-offset: 5px; }

/* ---------- Document pages (support / privacy / terms) ----------
   Deliberately quiet. These exist because App Store Connect requires a Support
   URL and a Privacy Policy URL — they are reference documents, not part of the
   one-screen experience, and they should not compete with it. */
.doc { max-width: var(--wrap-narrow); margin-inline: auto; padding: 0 24px 110px; }
.doc__nav {
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  padding: 26px 0 0;
}
.doc__nav a { transition: color 0.3s var(--ease); }
.doc__nav a:hover, .doc__nav a:focus-visible { color: var(--accent); }
.doc__head { padding: clamp(56px, 12vh, 110px) 0 30px; border-bottom: 1px solid var(--rule); }
.doc h1 {
  font-family: var(--font-display); font-weight: 300;
  font-size: clamp(26px, 4.6vw, 42px); line-height: 1.12;
  letter-spacing: 0.07em; text-transform: uppercase; color: var(--ink);
}
.doc h2 {
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(15px, 2vw, 17px); letter-spacing: 0.09em; text-transform: uppercase;
  color: var(--ink); margin: 44px 0 12px; padding-top: 16px; border-top: 1px solid var(--rule);
}
.doc p, .doc li { color: var(--ink-mute); font-size: 15.5px; }
.doc p + p { margin-top: 14px; }
.doc .lede { color: var(--ink); font-size: clamp(16px, 2vw, 19px); margin-top: 34px; }
.doc ul { margin-top: 14px; }
.doc li { position: relative; padding-left: 20px; margin-bottom: 9px; }
.doc li::before {
  content: ""; position: absolute; left: 3px; top: 10px;
  width: 4px; height: 4px; background: var(--rule-strong);
}
.doc a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.doc a:hover { color: var(--ink); }
.doc strong { color: var(--ink); font-weight: 600; }
.doc__stamp { margin-top: 14px; }

.callout {
  margin: 24px 0; padding: 18px 22px;
  background: var(--surface); border-left: 1px solid var(--accent);
}
.callout p { color: var(--ink); }

.doc__foot {
  max-width: var(--wrap-narrow); margin-inline: auto; padding: 22px 24px 40px;
  border-top: 1px solid var(--rule);
  display: flex; flex-wrap: wrap; gap: 10px 24px; justify-content: space-between;
}
.doc__foot a { transition: color 0.3s var(--ease); }
.doc__foot a:hover, .doc__foot a:focus-visible { color: var(--accent); }

/* ---------- Responsive ---------- */
@media (max-width: 620px) {
  .stage__top { flex-direction: column; gap: 6px; }
  .stage__base { flex-direction: column; align-items: flex-start; }
  .tagline { gap: 0.7em; letter-spacing: 0.22em; }
}

/* ---------- Reduced motion ----------
   Everything decorative stops. The page still works and still looks composed;
   it simply stops moving. */
@media (prefers-reduced-motion: reduce) {
  .grain, .ring__slow, .ring__fast, .layer--ring::before { animation: none; }
  .is-booting .scan,
  .is-booting .mark, .is-booting .wordmark, .is-booting .tagline,
  .is-booting .cta, .is-booting .stage__top > *, .is-booting .stage__base > * {
    animation: none;
  }
  .reticle { display: none; }
  *, *::before, *::after { transition-duration: 0.01ms !important; }
}

@media print {
  .grain, .reticle, .scan, .layer { display: none; }
  body { background: #fff; color: #000; }
  .doc p, .doc li, .doc h1, .doc h2 { color: #000; }
}
