/* Site-wide system layer, loaded last. Typography scale, content width, header, buttons and
   heading reveals follow steep.app's proportions with ELET's own colors and backgrounds.
   Values: see deliverables/night-polish-plan-2026-10-20.md. */

:root {
  --serif: 'Newsreader', 'Iowan Old Style', Georgia, serif;
  --ink-strong: #0d2130;
  --ink-soft: rgba(13, 33, 48, .66);
  --content: 1200px;
  --gutter: max(clamp(24px, 5vw, 78px), calc((100vw - var(--content)) / 2));
  --e-power3: cubic-bezier(.215, .61, .355, 1);
  --e-power2: cubic-bezier(.25, .46, .45, .94);
  --e-expo: cubic-bezier(.19, 1, .22, 1);
  --e-out: cubic-bezier(0, 0, .2, 1);
}

/* Default pair: serif display + Manrope text. "manrope" keeps the earlier all-Manrope look. */
html[data-font="serif"] { --display: var(--serif); --body: 'Manrope', sans-serif; }
html[data-font="manrope"] { --display: 'Manrope', sans-serif; --body: 'Manrope', sans-serif; }

body { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }

/* ---------- Content width: one 1200px column on wide screens ---------- */
.panel:not(.hero__stage):not(.workflow-stage) { padding-left: var(--gutter); padding-right: var(--gutter); }
.workflow-stage.panel { padding-left: var(--gutter); padding-right: var(--gutter); max-width: none; }

/* ---------- Type scale ---------- */
.hero__stage h1 {
  font-family: var(--display);
  font-size: clamp(54px, 6.4vw, 96px);
  line-height: 1.02;
  letter-spacing: -.025em;
  font-weight: 400;
  max-width: 900px;
}
html[data-font="manrope"] .hero__stage h1 { font-weight: 500; letter-spacing: -.05em; line-height: .98; }

.section-head h2, .section-lead h2, .workflow-heading h2, .author-copy h2, .outcomes__intro h2, .pains h2, .handover h2 {
  font-family: var(--display);
  font-size: clamp(40px, 4.3vw, 62px);
  line-height: 1.08;
  letter-spacing: -.02em;
  font-weight: 400;
  color: var(--ink-strong);
  text-wrap: balance;
}
html[data-font="manrope"] :is(.section-head h2, .section-lead h2, .workflow-heading h2, .author-copy h2, .outcomes__intro h2, .pains h2, .handover h2) { font-weight: 500; letter-spacing: -.045em; line-height: 1.04; }

.section-head > p:last-child, .section-lead > p:last-child, .workflow-heading > p:last-child, .outcomes__intro > p:last-child, .hero__lead {
  font-size: clamp(17px, 1.4vw, 20px);
  line-height: 1.5;
  color: var(--ink-soft);
}

.section-head, .section-lead { margin-bottom: 56px; }

/* ---------- Header ---------- */
.theme-light .site-header { transition: background-color .3s ease, box-shadow .3s ease, backdrop-filter .3s ease; }
.theme-light .site-header.is-scrolled {
  background: rgba(255, 255, 255, .8);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  backdrop-filter: blur(16px) saturate(140%);
  box-shadow: 0 1px 0 rgba(13, 33, 48, .06), 0 10px 30px rgba(36, 74, 99, .08);
}
/* The lime "I" of the wordmark must read as a letter, not a smudge. */
.theme-light .wordmark i {
  width: 5px;
  background: #a6d95a;
  box-shadow: 0 0 0 1px rgba(77, 122, 26, .25), 0 0 10px rgba(166, 217, 90, .7);
}

/* ---------- Buttons: the arrow slides out and back in on hover ---------- */
.button span[aria-hidden="true"], .usecase-card__action span[aria-hidden="true"] { display: inline-block; }
@media (hover: hover) {
  .button:hover span[aria-hidden="true"], .pains-next:hover span[aria-hidden="true"] { animation: arrow-slide .5s var(--e-out); }
}
@keyframes arrow-slide {
  0% { transform: translate(0, 0); opacity: 1; }
  45% { transform: translate(var(--arrow-dx, 10px), var(--arrow-dy, 0)); opacity: 0; }
  46% { transform: translate(calc(var(--arrow-dx, 10px) * -1), calc(var(--arrow-dy, 0px) * -1)); opacity: 0; }
  100% { transform: translate(0, 0); opacity: 1; }
}
.hero__actions .button--primary span[aria-hidden="true"] { --arrow-dx: 0px; --arrow-dy: 8px; }

/* ---------- Heading reveal: words rise out of a line mask (Steep: .6s, 80ms stagger, power3.out) ---------- */
.reveal-word { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: .14em; margin-bottom: -.14em; }
.reveal-word > span { display: inline-block; transition: transform .6s var(--e-power3), opacity .6s var(--e-power3); transition-delay: var(--wd, 0ms); }
.has-reveal:not(.is-revealed) .reveal-word > span { transform: translateY(105%); opacity: 0; }
.has-reveal .reveal-follow { transition: transform .72s var(--e-power3), opacity .72s var(--e-power3); transition-delay: var(--fd, 200ms); }
.has-reveal:not(.is-revealed) .reveal-follow { transform: translateY(40px); opacity: 0; }

/* ---------- Prototype font switch: hidden unless ?dev ---------- */
.prototype-controls { display: none; }
html.is-dev .prototype-controls { display: flex; }

/* ---------- Footer ---------- */
.site-footer {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 40px var(--gutter) 48px;
  border-top: 1px solid rgba(13, 33, 48, .08);
  color: rgba(13, 33, 48, .6);
  font-size: 14px;
}
.site-footer a { color: inherit; text-decoration: none; }
.site-footer a:hover { color: var(--ink-strong); }
.site-footer nav { display: flex; gap: 24px; }

@media (prefers-reduced-motion: reduce) {
  .reveal-word > span, .has-reveal .reveal-follow { transition: none; }
  .has-reveal:not(.is-revealed) .reveal-word > span, .has-reveal:not(.is-revealed) .reveal-follow { transform: none; opacity: 1; }
}

/* Heading rhythm: tighter lines inside a heading, a clear gap before its description */
.section-head h2, .section-lead h2, .workflow-heading h2, .author-copy h2, .outcomes__intro h2, .pains h2, .handover h2 { line-height: 1.04; margin-bottom: 28px; }
.section-head > p:last-child, .section-lead > p:last-child, .workflow-heading > p:last-child, .outcomes__intro > p:last-child { margin-top: 0; line-height: 1.5; }
.section-head, .section-lead { margin-bottom: 52px; }

/* ---------- One eyebrow style across the site (taken from section 04, a touch stronger) ----------
   Tier 1 · eyebrow: section and card labels. Tier 2 · row label: small labels inside cards. */
:root { --eyebrow-ink: #1c5a80; }
.eyebrow, .outcome-panel__eyebrow, .usecase-tasks__label, .usecase-card__kicker, .mech-caption__step,
.weeks-grid article > span, .tracks-grid article > span, .apply-card > span, .tracks-extra__eyebrow {
  font-family: var(--body) !important; font-size: 12.5px !important; font-weight: 750 !important; line-height: 1.3 !important;
  letter-spacing: .14em !important; text-transform: uppercase; color: var(--eyebrow-ink) !important;
}
.outcome-panel--know .outcome-panel__eyebrow { color: #55691f !important; }
.usecase-card__kicker { margin-bottom: 2px !important; font-size: 11.5px !important; }
.usecase-card__label, .uc-brief__label, .uc-sheet__label, .track-specs b, .story__facts dt, .uc-diff__body > small {
  font-family: var(--body); font-size: 11px !important; font-weight: 700 !important; letter-spacing: .1em !important; text-transform: uppercase; color: rgba(13, 33, 48, .56) !important;
}

/* ---------- Header: five sections and a real call to action ---------- */
.theme-light .site-header nav { gap: 30px; font-size: 14px; }
.theme-light .site-header nav a { position: relative; color: rgba(13, 33, 48, .66); text-decoration: none; transition: color .2s ease; }
.theme-light .site-header nav a:hover, .theme-light .site-header nav a.is-current { color: #0d2130; }
.theme-light .site-header nav a::after { content: ''; position: absolute; left: 50%; bottom: -7px; width: 4px; height: 4px; border-radius: 50%; background: #2b7fd0; opacity: 0; transform: translateX(-50%) scale(.4); transition: opacity .25s ease, transform .35s var(--e-expo); }
.theme-light .site-header nav a.is-current::after { opacity: 1; transform: translateX(-50%); }
.theme-light .site-header .header-cta { gap: 6px; min-height: 38px !important; padding: 0 18px !important; border: 0 !important; color: #0d2130 !important; background: #D6F7A3 !important; box-shadow: 0 6px 16px -6px rgba(110, 160, 50, .55); font-size: 14px !important; font-weight: 650 !important; transition: background-color .2s ease, transform .2s ease; }
.theme-light .site-header .header-cta:hover { background: #cdf192 !important; }
.header-cta span { display: inline-block; transition: transform .25s var(--e-out); }
.header-cta:hover span { transform: translateX(3px); }
/* header CTA: the same lime pill as the main button, with a thin edge and a soft shadow so it holds its shape on the frosted header */
.theme-light .site-header .header-cta { align-self: center; min-height: 40px !important; padding: 0 18px 0 20px !important; border: 1px solid rgba(92, 130, 40, .28) !important; box-shadow: 0 1px 0 rgba(255, 255, 255, .7) inset, 0 6px 16px -8px rgba(80, 120, 30, .55) !important; white-space: nowrap; }
.theme-light .site-header nav { gap: 26px; }

/* line breaks: headings balance their lines, paragraphs avoid a lonely last word */
p, li, dd, blockquote, figcaption { text-wrap: pretty; }
.site-footer nav { flex-wrap: wrap; gap: 10px 20px !important; }
/* anchors land below the fixed header */
section[id] { scroll-margin-top: 0; }

/* Calmer heading reveal (owner, 21.10): words one by one only on 02 and 04; elsewhere the heading rises as one line block */
.reveal-block { display: block; overflow: hidden; padding-bottom: .12em; margin-bottom: -.12em; }
.reveal-block > span { display: block; transition: transform .5s var(--e-power3), opacity .5s var(--e-power3); }
.has-reveal:not(.is-revealed) .reveal-block > span { transform: translateY(60%); opacity: 0; }
@media (prefers-reduced-motion: reduce) { .reveal-block > span { transition: none; } .has-reveal:not(.is-revealed) .reveal-block > span { transform: none; opacity: 1; } }

/* ---------- Logo 21 "Воздух без капсулы": drawn letters; after the hero only "AI" stays ---------- */
.theme-light .site-header .wordmark.wm { display: inline-flex; align-items: center; gap: 0; width: max-content; letter-spacing: 0; font-size: 0; line-height: 1; color: #0d2130; text-decoration: none; }
.wordmark.wm i { display: none !important; }
.wordmark.wm .mark { display: block; overflow: visible; }
.wordmark.wm .pre { display: inline-flex; overflow: hidden; max-width: 112px; opacity: 1; transition: max-width .7s cubic-bezier(.22,1,.36,1), opacity .35s ease, transform .7s cubic-bezier(.22,1,.36,1); }
.wordmark.wm .core { display: inline-flex; }
.wordmark.wm.compact .pre { max-width: 0; opacity: 0; transform: translateX(-12px); }
@media (prefers-reduced-motion: reduce) { .wordmark.wm .pre { transition: none; } }
