/* ═══════════════════════════════════════════════════════════════
   ALCEA TECHNOLOGIES — reimagined site
   Editorial · enterprise · teal. Spectral + Hanken Grotesk + IBM Plex Mono
   ═══════════════════════════════════════════════════════════════ */

/* ── Reset ─────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
img { max-width: 100%; display: block; }

/* ── Tokens ────────────────────────────────────────────────────── */
:root {
  /* Brand teal — sampled from the logo gradient (primary / brand anchor) */
  --teal:        #168f84;
  --teal-deep:   #0d6760;
  --teal-bright: #3fc1a8;
  --teal-glow:   rgba(63,193,168,.16);

  /* Secondary accent — warm Clay by default; switchable via Tweaks "Color pairing".
     This is the colour that creates contrast and tells the eye where to look. */
  --accent:        #db6a40;
  --accent-deep:   #b54e2a;
  --accent-bright: #f0936b;
  --accent-glow:   rgba(219,106,64,.15);

  /* Semantic focal slots — the intensity preset (Tweaks) remaps these.
     focal  = always the accent (top-level highlights)
     support= accent at confident/bold, teal at subtle (mid-level accents)
     loud   = accent only at bold, teal otherwise (eyebrows / labels) */
  --focal:         var(--accent-deep);
  --focal-bright:  var(--accent-bright);
  --focal-glow:    var(--accent-glow);
  --support:       var(--accent-deep);
  --support-bright:var(--accent-bright);
  --support-glow:  var(--accent-glow);
  --loud:          var(--teal-deep);

  /* Logo mark fill — flat by default; overridable via Tweaks "Logo finish".
     Kept separate from the hero/animation gradient so each can be tuned alone. */
  --mark-c1:     var(--teal);
  --mark-c2:     var(--teal);

  /* Ink / neutrals — cool, faintly teal-tinted, premium */
  --ink:      #0e1f1d;   /* headings, primary text */
  --ink-2:    #3a514d;   /* secondary text */
  --ink-3:    #6c827e;   /* tertiary / captions */
  --paper:    #f4f7f5;   /* page background */
  --paper-2:  #eef3f1;   /* alt band */
  --surface:  #ffffff;
  --line:     #e0e8e4;
  --line-2:   #cfdbd6;

  /* Deep section (teal-ink) */
  --deep:     #0a201e;
  --deep-2:   #0e2b28;

  /* Brass — heritage accent, used sparingly */
  --brass:    #b8924e;
  --brass-soft: rgba(184,146,78,.14);

  /* Form validation states */
  --err:      #c0492f;
  --err-soft: rgba(192,73,47,.12);

  /* Type */
  --serif: 'Spectral', Georgia, 'Times New Roman', serif;
  --sans:  'Hanken Grotesk', system-ui, -apple-system, sans-serif;
  --mono:  'IBM Plex Mono', ui-monospace, 'SF Mono', monospace;

  /* Geometry */
  --radius:    14px;
  --radius-sm: 9px;
  --radius-lg: 24px;
  --maxw: 1200px;
  --shadow:    0 2px 8px rgba(14,31,29,.05), 0 10px 30px rgba(14,31,29,.06);
  --shadow-lg: 0 8px 24px rgba(14,31,29,.08), 0 30px 70px rgba(14,31,29,.12);
  --t: .45s cubic-bezier(.22,.61,.36,1);

  --accent: var(--teal);
}

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

/* Tweakable rhythm + corner presets (driven by the Tweaks panel) */
html[data-rhythm="compact"]  .band { padding: clamp(3.5rem, 6vw, 5.5rem) 0; }
html[data-rhythm="spacious"] .band { padding: clamp(6rem, 12vw, 11rem) 0; }
html[data-corners="sharp"] { --radius: 4px;  --radius-sm: 3px;  --radius-lg: 8px; }
html[data-corners="round"] { --radius: 22px; --radius-sm: 15px; --radius-lg: 34px; }

/* Accent-intensity presets (Tweaks "Color emphasis") */
html[data-accent="subtle"] {
  --support: var(--teal-deep); --support-bright: var(--teal-bright); --support-glow: var(--teal-glow);
}
html[data-accent="bold"] {
  --loud: var(--accent-deep);
}

body {
  font-family: var(--sans);
  background: var(--paper);
  color: var(--ink);
  line-height: 1.65;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

::selection { background: var(--teal-bright); color: var(--deep); }

/* ── Typography ───────────────────────────────────────────────── */
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 500; line-height: 1.08; letter-spacing: -.015em; color: var(--ink); }
.display {
  font-size: clamp(2.7rem, 6.4vw, 5.4rem);
  font-weight: 400; line-height: .98; letter-spacing: -.03em;
}
.display em { font-style: italic; color: var(--focal); }
h2.headline { font-size: clamp(2rem, 4.2vw, 3.4rem); letter-spacing: -.025em; }
h3 { font-size: 1.45rem; }
p { text-wrap: pretty; }
a { color: inherit; }

.eyebrow {
  font-family: var(--mono);
  font-size: .72rem; font-weight: 500;
  letter-spacing: .22em; text-transform: uppercase;
  color: var(--loud);
  display: inline-flex; align-items: center; gap: .6rem;
  transition: color var(--t);
}
.eyebrow::before {
  content: ''; width: 26px; height: 1px; background: currentColor; opacity: .55;
}
.eyebrow.center::after {
  content: ''; width: 26px; height: 1px; background: var(--teal); opacity: .6;
}
.lede { font-size: clamp(1.05rem, 1.6vw, 1.3rem); color: var(--ink-2); line-height: 1.6; }

/* ── Layout ───────────────────────────────────────────────────── */
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 2rem; }
.wrap-narrow { max-width: 860px; margin: 0 auto; padding: 0 2rem; }
section { position: relative; }
.band { padding: clamp(5rem, 9vw, 8.5rem) 0; }
.band--alt { background: var(--paper-2); }
.band--paper { background: var(--surface); }
.band--deep { background: var(--deep); color: rgba(255,255,255,.74); }
.band--deep h1, .band--deep h2, .band--deep h3, .band--deep h4 { color: #fff; }
.section-head { max-width: 720px; }
.section-head h2 { margin: 1.1rem 0 0; }
.section-head .lede { margin-top: 1.1rem; }
.center { text-align: center; }
.section-head.center { margin-left: auto; margin-right: auto; }

/* ── Buttons ──────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: .55rem;
  font-family: var(--sans); font-weight: 600; font-size: .94rem;
  padding: .85rem 1.5rem; border-radius: 999px;
  text-decoration: none; cursor: pointer; border: 1.5px solid transparent;
  transition: transform var(--t), background var(--t), border-color var(--t), color var(--t), box-shadow var(--t);
  white-space: nowrap;
}
.btn .arr { transition: transform var(--t); }
.btn:hover .arr { transform: translateX(4px); }
.btn-primary {
  background: var(--teal-deep); color: #fff;
  box-shadow: 0 1px 2px rgba(13,103,96,.3), 0 8px 22px rgba(13,103,96,.22);
}
.btn-primary:hover { background: var(--teal); transform: translateY(-2px); box-shadow: 0 4px 10px rgba(13,103,96,.3), 0 16px 34px rgba(13,103,96,.28); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line-2); }
.btn-ghost:hover { border-color: var(--teal); color: var(--teal-deep); background: var(--surface); }
.btn-on-deep { background: #fff; color: var(--deep); }
.btn-on-deep:hover { transform: translateY(-2px); box-shadow: 0 16px 34px rgba(0,0,0,.35); }
.btn-ghost-deep { background: transparent; color: #fff; border-color: rgba(255,255,255,.28); }
.btn-ghost-deep:hover { border-color: #fff; background: rgba(255,255,255,.07); }
.btn-lg { padding: 1.02rem 1.9rem; font-size: 1rem; }
.link-arrow {
  font-family: var(--sans); font-weight: 600; font-size: .92rem;
  color: var(--teal-deep); text-decoration: none;
  display: inline-flex; align-items: center; gap: .45rem;
}
.link-arrow .arr { transition: transform var(--t); }
.link-arrow:hover .arr { transform: translateX(4px); }

/* ── Reveal animation ─────────────────────────────────────────
   Content is VISIBLE by default. The hide-then-reveal behaviour is
   gated behind html.anim, which app.js adds only when the page is
   actually visible (animations/observers are paused while hidden, so
   defaulting to visible guarantees content always shows). */
html.anim .reveal { opacity: 0; transform: translateY(26px); transition: opacity .9s cubic-bezier(.22,.61,.36,1), transform .9s cubic-bezier(.22,.61,.36,1); }
html.anim .reveal.in { opacity: 1; transform: none; }
html.anim .reveal[data-delay="1"] { transition-delay: .08s; }
html.anim .reveal[data-delay="2"] { transition-delay: .16s; }
html.anim .reveal[data-delay="3"] { transition-delay: .24s; }
html.anim .reveal[data-delay="4"] { transition-delay: .32s; }
html.anim .reveal[data-delay="5"] { transition-delay: .40s; }

/* Hero entrance — self-playing on load when visible */
html.anim .intro { opacity: 0; transform: translateY(22px); animation: introUp .95s cubic-bezier(.22,.61,.36,1) both; }
html.anim .intro[data-delay="1"] { animation-delay: .10s; }
html.anim .intro[data-delay="2"] { animation-delay: .20s; }
html.anim .intro[data-delay="3"] { animation-delay: .30s; }
html.anim .intro[data-delay="4"] { animation-delay: .40s; }
@keyframes introUp { to { opacity: 1; transform: none; } }
