/* AKAMENA base — reset, typography and shared primitives (ported from the spec). */

* { box-sizing: border-box; }
html { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--ivory);
  color: var(--body);
  font-family: var(--text);
  font-weight: 300;
  font-size: 19px;
  line-height: 1.7;
  overflow-x: hidden;
}
::selection { background: var(--champagne); color: var(--ink); }
h1, h2, h3, h4 { margin: 0; font-family: var(--serif); font-weight: 400; color: var(--ink); }
p { margin: 0; }
a { color: inherit; text-decoration: none; }
img { display: block; }

/* Accessible skip link */
.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--ink); color: var(--ivory);
  font-family: var(--mono); font-size: 0.75rem; letter-spacing: 0.12em; text-transform: uppercase;
  padding: 10px 16px;
}
.skip-link:focus { left: 12px; top: 12px; }

:where(a, button, input, select, textarea):focus-visible {
  outline: 2px solid var(--gold); outline-offset: 2px;
}

/* ---------- data voice (Space Grotesk) ---------- */
.dv {
  font-family: var(--mono);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
}
.dv b { color: var(--gold); font-weight: 500; }

.idx { font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.2em; color: var(--gold); font-weight: 500; }

/* registration mark */
.reg { position: relative; }
.reg::before, .reg::after {
  content: ""; position: absolute; width: 9px; height: 9px; pointer-events: none;
}
.reg::before { top: -1px; left: -1px; border-top: 1px solid var(--gold); border-left: 1px solid var(--gold); }
.reg::after { bottom: -1px; right: -1px; border-bottom: 1px solid var(--gold); border-right: 1px solid var(--gold); }

/* width:100% matters: inside the flex-column .act-sec sections, auto margins would
   otherwise disable stretching and shrink each wrap to its own content width —
   making sections render at different widths (an inherited spec quirk). */
.wrap { width: 100%; max-width: 1280px; margin: 0 auto; padding-left: var(--pad); padding-right: var(--pad); }

/* ---------- pill button ---------- */
.pill {
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--ink);
  background: transparent;
  border: 1px solid var(--ink);
  padding: 14px 28px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: color .45s var(--ease), border-color .45s var(--ease);
}
.pill::before {
  content: ""; position: absolute; inset: 0;
  background: var(--ink);
  transform: scaleX(0); transform-origin: left;
  transition: transform .45s var(--ease);
  z-index: -1;
}
.pill:hover { color: var(--ivory); }
.pill:hover::before { transform: scaleX(1); }
.pill.gold { border-color: var(--gold); color: var(--gold); }
.pill.gold::before { background: var(--gold); }
.pill.gold:hover { color: var(--white); }
.pill.light { border-color: rgba(255, 255, 255, 0.6); color: var(--ivory); }
.pill.light::before { background: var(--ivory); }
.pill.light:hover { color: var(--night); }

/* ---------- section intro / eyebrow (big label that minimises on scroll, C10) ----------
   Reduced state matches the v2 spec eyebrow: clamp(0.82rem,1vw,0.95rem), 0.3em tracking,
   with the rule filling the rest of the row. --p (1 = big, 0 = minimised) is driven by
   section-intro.js. */
.sec-intro {
  --p: 1;
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: calc(clamp(28px, 5vh, 54px) + var(--p) * 34px);
  will-change: font-size;
}
.sec-intro .dv {
  font-size: calc(clamp(0.82rem, 1vw, 0.95rem) + var(--p) * 1.5rem);
  letter-spacing: calc(0.3em - var(--p) * 0.18em);
  line-height: 1.1;
  white-space: nowrap;
}
.sec-intro .rule { flex: 1; height: 1px; background: var(--hairline); opacity: calc(1 - var(--p)); }
[data-dark] .sec-intro .dv { color: rgba(255, 255, 255, 0.5); }
[data-dark] .sec-intro .dv b { color: var(--gold-bright); }
[data-dark] .sec-intro .rule { background: var(--hairline-dark); }
@media (prefers-reduced-motion: reduce) { .sec-intro { --p: 0 !important; } }
/* narrow screens: smaller "big" state so the nowrap label never overflows */
@media (max-width: 600px) {
  .sec-intro .dv { font-size: calc(clamp(0.82rem, 1vw, 0.95rem) + var(--p) * 0.7rem); }
}

/* ---------- section eyebrow (v5: static chapter marker + rule, revealed via .rv) ----------
   Home and Product use this; the .sec-intro shrink above stays for the older sub-pages. */
.eyebrow { display: flex; align-items: center; gap: 20px; margin-bottom: clamp(28px, 5vh, 54px); }
.eyebrow .dv { font-size: clamp(0.94rem, 1.2vw, 1.1rem); letter-spacing: 0.3em; }
.eyebrow .rule { flex: 1; height: 1px; background: var(--hairline); }
.eyebrow.on-dark .rule { background: var(--hairline-dark); }
.eyebrow.on-dark .dv { color: rgba(255, 255, 255, 0.5); }
.eyebrow.on-dark .dv b { color: var(--gold-bright); }

/* ---------- layered text (title → deck → support), shared by home / product ---------- */
.title-xl { font-size: clamp(2.4rem, 5.6vw, 5rem); line-height: 1.03; letter-spacing: -0.005em; max-width: 18ch; }
.title-xl em { font-style: italic; color: var(--gold); }
.deck { margin-top: clamp(20px, 3vh, 32px); font-size: clamp(1.2rem, 2vw, 1.65rem); line-height: 1.4; color: var(--ink); font-weight: 300; max-width: 40ch; }
.deck em { font-style: italic; color: var(--gold); }
.support { margin-top: 22px; font-size: clamp(1rem, 1.35vw, 1.2rem); line-height: 1.65; color: var(--body); max-width: 60ch; }
.support em { font-style: italic; color: var(--ink); }

/* ---------- chips (gold-tick mono labels) ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chips span {
  font-family: var(--mono); font-size: 0.68rem; font-weight: 500; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--ink); border: 1px solid var(--hairline); background: var(--white);
  padding: 9px 14px; display: inline-flex; align-items: center; gap: 9px;
}
.chips span::before { content: ""; width: 5px; height: 5px; background: var(--gold); flex: none; }

/* ---------- delivery-format chips (the flow's visible endpoint) ----------
   Shared by the home flow band and the /product Banker + architecture sections.
   flow.css recolours these for the dark flow band via .flowband overrides. */
.out-formats { margin-top: clamp(26px, 4vh, 40px); display: flex; flex-direction: column; align-items: center; gap: 13px; }
.of-cap { font-family: var(--mono); font-size: 0.56rem; font-weight: 500; letter-spacing: 0.24em; text-transform: uppercase; color: var(--muted); }
.of-items { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.of-item { font-family: var(--mono); font-size: 0.66rem; font-weight: 500; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink); border: 1px solid var(--hairline); background: var(--white); padding: 11px 17px; display: inline-flex; align-items: center; gap: 11px; }
.ofi { position: relative; flex: none; border: 1px solid var(--gold); display: block; }
.ofi-live { width: 17px; height: 12px; }
.ofi-live::after { content: ""; position: absolute; left: 50%; top: 50%; width: 4px; height: 4px; margin: -2px 0 0 -2px; border-radius: 50%; background: var(--gold); }
.ofi-pdf { width: 11px; height: 14px; }
.ofi-pdf::after { content: ""; position: absolute; inset: 3px 2px; background: repeating-linear-gradient(180deg, var(--gold) 0 1px, transparent 1px 4px); opacity: 0.85; }
.ofi-ppt { width: 17px; height: 12px; background-image: linear-gradient(var(--gold), var(--gold)), linear-gradient(var(--gold), var(--gold)), linear-gradient(var(--gold), var(--gold)); background-size: 2px 5px, 2px 8px, 2px 4px; background-position: 3px calc(100% - 2px), 7px calc(100% - 2px), 11px calc(100% - 2px); background-repeat: no-repeat; }

/* ---------- scroll reveals ----------
   Base state is VISIBLE, so no-JS / SEO crawlers / print / reduced-motion never see hidden
   content. reveals.js adds body.anim to arm the hidden→in transition; an IntersectionObserver
   toggles .in as each element scrolls in. .d1–.d4 stagger a group. */
.rv { opacity: 1; }
.ir { opacity: 1; }
body.anim .rv { opacity: 0; transform: translateY(28px); transition: opacity 1s var(--ease), transform 1s var(--ease); }
body.anim .rv.in { opacity: 1; transform: none; }
body.anim .rv.d1 { transition-delay: .1s; }
body.anim .rv.d2 { transition-delay: .2s; }
body.anim .rv.d3 { transition-delay: .3s; }
body.anim .rv.d4 { transition-delay: .4s; }
body.anim .ir { opacity: 0; transform: translateY(32px); transition: opacity 1s var(--ease), transform 1s var(--ease); }
body.anim .ir.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .rv, .ir { opacity: 1 !important; transform: none !important; transition: none !important; }
}

@media (max-width: 980px) {
  body { font-size: 17px; }
}
