/* =========================================================================
   CFO International LLC — cfointl.com
   "The Operator's Ledger" — editorial financial atelier
   Refined gold-on-ink identity. Hand-crafted, no framework, no build step.
   ========================================================================= */

/* ---- Fonts (self-hosted, latin subset, variable) ---------------------- */
@font-face {
  font-family: "Source Serif 4";
  font-style: normal;
  font-weight: 200 900;
  font-display: swap;
  src: url("/assets/fonts/source-serif-4-var.woff2") format("woff2");
}
@font-face {
  font-family: "Source Serif 4";
  font-style: italic;
  font-weight: 200 900;
  font-display: swap;
  src: url("/assets/fonts/source-serif-4-var-italic.woff2") format("woff2");
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url("/assets/fonts/inter-var.woff2") format("woff2");
}

/* ---- Fonts (Cyrillic subset, variable) — loaded only for RU/UK glyphs -
   Same family names as the Latin faces above; the unicode-range keeps these
   from downloading for Latin-only pages. Ranges copied from Google Fonts
   css2 (cyrillic subset). Do not merge with the Latin blocks. */
@font-face {
  font-family: "Source Serif 4";
  font-style: normal;
  font-weight: 200 900;
  font-display: swap;
  src: url("/assets/fonts/source-serif-4-var-cyr.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Source Serif 4";
  font-style: italic;
  font-weight: 200 900;
  font-display: swap;
  src: url("/assets/fonts/source-serif-4-var-italic-cyr.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url("/assets/fonts/inter-var-cyr.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

/* ---- Design tokens ---------------------------------------------------- */
:root {
  /* Core palette */
  --ink: #101418;
  --ink-2: #171d24;
  --ink-3: #1e2630;
  --paper: #faf8f4;
  --paper-2: #f2ede3;
  --paper-3: #ebe4d7;
  --gold: #c9a227;
  --gold-bright: #d9b64a;
  --gold-ink: #6f5510; /* AA-compliant "gold" for text on paper */

  /* Text on paper */
  --t-strong: #14181d;
  --t-body: #38414b;
  --t-muted: #5c6670;

  /* Text on ink */
  --t-paper: #faf8f4;
  --t-paper-soft: #d7d2c8;
  --t-paper-muted: #9aa2ab;

  /* Lines */
  --line: #e2dccf;
  --line-strong: #d0c8b6;
  --line-ink: rgba(201, 162, 39, 0.22);
  --hairline-ink: rgba(250, 248, 244, 0.12);

  /* Type */
  --serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  /* Rhythm */
  --wrap: 1200px;
  --wrap-narrow: 820px;
  --gutter: clamp(1.25rem, 5vw, 3rem);
  --section-y: clamp(4.5rem, 9vw, 8rem);
  --radius: 3px;

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --shadow-card: 0 1px 2px rgba(16, 20, 24, 0.04), 0 18px 42px -28px rgba(16, 20, 24, 0.28);
  color-scheme: light;
}

/* ---- Reset / base ----------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 92px;
}

body {
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--t-body);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-feature-settings: "kern" 1, "liga" 1, "calt" 1;
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 3px; }
button { font: inherit; color: inherit; cursor: pointer; }
:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
  border-radius: 2px;
}
::selection { background: rgba(201, 162, 39, 0.28); color: var(--ink); }

/* ---- Typography ------------------------------------------------------- */
h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 460;
  line-height: 1.08;
  letter-spacing: -0.012em;
  color: var(--t-strong);
  font-optical-sizing: auto;
  text-wrap: balance;
}

.display {
  font-size: clamp(2.6rem, 1.4rem + 4.4vw, 4.7rem);
  font-weight: 420;
  line-height: 1.015;
  letter-spacing: -0.021em;
  font-optical-sizing: auto;
}
.display em {
  font-style: italic;
  font-weight: 420;
  color: var(--gold-ink);
}
.section--ink .display em { color: var(--gold-bright); }

h2 { font-size: clamp(1.85rem, 1.1rem + 2.6vw, 2.85rem); }
h3 { font-size: 1.34rem; letter-spacing: -0.006em; }

p { text-wrap: pretty; }
strong { color: var(--t-strong); font-weight: 600; }
.section--ink strong { color: var(--t-paper); }

/* Eyebrow / kicker label */
.kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.65em;
  font-family: var(--sans);
  font-size: 0.84rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold-ink);
}
.kicker::before {
  content: "";
  width: 1.8rem;
  height: 1px;
  background: currentColor;
  opacity: 0.9;
}
.kicker--center::after {
  content: "";
  width: 1.8rem;
  height: 1px;
  background: currentColor;
  opacity: 0.9;
}
.section--ink .kicker,
.hero .kicker,
.page-404 .kicker { color: var(--gold-bright); }

.lead {
  font-size: clamp(1.08rem, 1rem + 0.4vw, 1.28rem);
  line-height: 1.55;
  color: var(--t-body);
}
.section--ink .lead { color: var(--t-paper-soft); }
.section--ink { color: var(--t-paper-soft); }
/* Headings inside dark sections must flip to paper — the base h1-h4 color is
   near-black and unreadable on ink. Component rules later in the sheet (e.g.
   .card h3) still win at equal specificity for nested light surfaces. */
.section--ink h1,
.section--ink h2,
.section--ink h3,
.section--ink h4 { color: var(--t-paper); }

/* Section index numeral (memo/prospectus style) */
.index-num {
  font-family: var(--sans);
  font-size: 0.84rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  color: var(--gold-ink);
  font-variant-numeric: tabular-nums;
}
.section--ink .index-num { color: var(--gold-bright); }

/* ---- Layout ----------------------------------------------------------- */
.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.section { padding-block: var(--section-y); position: relative; }
.section--ink { background: var(--ink); color: var(--t-paper-soft); }
.section--paper2 { background: var(--paper-2); }
.section--tight { padding-block: clamp(3rem, 5vw, 4.5rem); }

.section-head { max-width: 720px; margin-bottom: clamp(2.4rem, 4vw, 3.6rem); }
.section-head .kicker { margin-bottom: 1.1rem; }
.section-head h2 { margin-bottom: 1rem; }
.section-head p { color: var(--t-muted); max-width: 60ch; }
.section--ink .section-head p { color: var(--t-paper-muted); }

.rule {
  height: 1px;
  background: var(--line);
  border: 0;
}
.section--ink .rule { background: var(--hairline-ink); }

/* ---- Header ----------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(250, 248, 244, 0.82);
  backdrop-filter: saturate(1.4) blur(14px);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s var(--ease), background 0.3s var(--ease);
}
.site-header.is-stuck {
  border-bottom-color: var(--line);
  background: rgba(250, 248, 244, 0.94);
}
/* Header above an ink hero: solid ink so the band merges with the hero and
   the light text/wordmark actually has contrast (sticky headers don't overlap
   the hero — a transparent bg would show the paper body behind instead). */
.site-header.on-ink {
  background: var(--ink);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
.site-header.on-ink:not(.is-stuck) { color: var(--t-paper); }
.site-header.on-ink:not(.is-stuck) .nav-link { color: var(--t-paper-soft); }
.site-header.on-ink:not(.is-stuck) .wordmark { color: var(--t-paper); }
.site-header.on-ink.is-stuck {
  background: rgba(16, 20, 24, 0.9);
  backdrop-filter: saturate(1.4) blur(14px);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom-color: var(--hairline-ink);
  color: var(--t-paper);
}
.site-header.on-ink.is-stuck .nav-link { color: var(--t-paper-soft); }
.site-header.on-ink.is-stuck .wordmark { color: var(--t-paper); }
.site-header.on-ink.is-stuck .nav-toggle span { background: var(--t-paper); }

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  height: 74px;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  color: var(--t-strong);
  text-decoration: none;
  letter-spacing: 0.01em;
}
.wordmark svg { width: 30px; height: 30px; flex: none; }
.wordmark-text {
  font-family: var(--serif);
  font-size: 1.06rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  line-height: 1;
}
.wordmark-text b { font-weight: 500; }
.wordmark-text .wm-sub {
  display: block;
  font-family: var(--sans);
  font-size: 0.56rem;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--gold-ink);
  margin-top: 3px;
}
.site-header.on-ink:not(.is-stuck) .wm-sub,
.site-header.on-ink.is-stuck .wm-sub { color: var(--gold-bright); }

.primary-nav { display: flex; align-items: center; gap: clamp(1.2rem, 2.6vw, 2.3rem); }
.nav-links { display: flex; align-items: center; gap: clamp(1.2rem, 2.4vw, 2.1rem); list-style: none; padding: 0; }
.nav-link {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--t-body);
  text-decoration: none;
  letter-spacing: 0.01em;
  position: relative;
  padding-block: 0.4rem;
  transition: color 0.2s var(--ease);
}
.nav-link::after {
  content: "";
  position: absolute;
  left: 0; right: 100%;
  bottom: 0;
  height: 1px;
  background: var(--gold);
  transition: right 0.28s var(--ease);
}
.nav-link:hover { color: var(--t-strong); }
.nav-link:hover::after { right: 0; }
.site-header.on-ink:not(.is-stuck) .nav-link:hover { color: var(--t-paper); }

.nav-toggle {
  display: none;
  width: 42px; height: 42px;
  border: 0;
  background: none;
  position: relative;
  border-radius: 4px;
}
.nav-toggle span {
  position: absolute;
  left: 10px; right: 10px;
  height: 1.5px;
  background: var(--t-strong);
  transition: transform 0.3s var(--ease), opacity 0.2s var(--ease);
}
.nav-toggle span:nth-child(1) { top: 15px; }
.nav-toggle span:nth-child(2) { top: 20px; }
.nav-toggle span:nth-child(3) { top: 25px; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-5px) rotate(-45deg); }

/* ---- Language dropdown -------------------------------------------------- */
.lang-menu { position: relative; }
.lang-btn { display: inline-flex; align-items: center; gap: 0.45em; background: none; border: 0; padding: 0; }
.lang-caret { transition: transform 0.18s ease; }
.lang-menu.is-open .lang-caret { transform: rotate(180deg); }
.lang-list {
  position: absolute;
  top: calc(100% + 14px);
  right: 0;
  z-index: 130;
  min-width: 172px;
  margin: 0;
  padding: 0.4rem;
  list-style: none;
  background: var(--ink-2);
  border: 1px solid var(--hairline-ink);
  border-radius: 10px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
  display: none;
}
.lang-menu.is-open .lang-list { display: block; }
/* Without JS the toggle can't work — show the list inline instead */
html:not(.js) .lang-list { display: block; position: static; min-width: 0; background: none; border: 0; box-shadow: none; padding: 0; }
.lang-list a {
  display: block;
  padding: 0.5rem 0.85rem;
  border-radius: 6px;
  text-decoration: none;
  font-size: 0.92rem;
  color: var(--t-paper-soft);
}
.lang-list a:hover { color: var(--gold-bright); background: rgba(201, 162, 39, 0.07); }
.lang-list a[aria-current="true"] { color: var(--gold-bright); }

/* ---- Buttons ---------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  font-family: var(--sans);
  font-size: 0.925rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  padding: 0.85em 1.5em;
  border-radius: var(--radius);
  border: 1px solid transparent;
  text-decoration: none;
  transition: transform 0.2s var(--ease), background 0.25s var(--ease), color 0.25s var(--ease), border-color 0.25s var(--ease), box-shadow 0.25s var(--ease);
  will-change: transform;
}
.btn svg { width: 1.05em; height: 1.05em; }
.btn:active { transform: translateY(1px); }

.btn--primary {
  background: var(--gold);
  color: #241c05;
  box-shadow: 0 12px 26px -14px rgba(201, 162, 39, 0.7);
}
.btn--primary:hover { background: var(--gold-bright); transform: translateY(-2px); box-shadow: 0 18px 30px -14px rgba(201, 162, 39, 0.75); }

.btn--ghost {
  background: transparent;
  color: var(--t-strong);
  border-color: var(--line-strong);
}
.btn--ghost:hover { border-color: var(--gold); color: var(--gold-ink); transform: translateY(-2px); }
.section--ink .btn--ghost, .hero .btn--ghost, .page-404 .btn--ghost { color: var(--t-paper); border-color: var(--hairline-ink); }
.section--ink .btn--ghost:hover, .hero .btn--ghost:hover, .page-404 .btn--ghost:hover { border-color: var(--gold); color: var(--gold-bright); background: rgba(201,162,39,0.06); }

.btn--block { width: 100%; justify-content: center; }

/* Text link with arrow */
.arrow-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  font-family: var(--sans);
  font-weight: 600;
  font-size: 0.9rem;
  letter-spacing: 0.01em;
  color: var(--gold-ink);
  text-decoration: none;
}
.arrow-link svg { width: 1.1em; height: 1.1em; transition: transform 0.25s var(--ease); }
.arrow-link:hover svg { transform: translateX(4px); }
.section--ink .arrow-link { color: var(--gold-bright); }

/* ---- Hero ------------------------------------------------------------- */
.hero {
  position: relative;
  background: var(--ink);
  color: var(--t-paper-soft);
  padding-block: clamp(6.5rem, 8vw + 3rem, 11rem) clamp(4.5rem, 8vw, 8rem);
  overflow: hidden;
  isolation: isolate;
}
.hero::before {
  /* faint ledger ruling */
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    repeating-linear-gradient(90deg, transparent 0 119px, rgba(250,248,244,0.028) 119px 120px);
  z-index: -2;
  mask-image: linear-gradient(180deg, transparent, #000 22%, #000 78%, transparent);
}
.hero::after {
  /* gold glow */
  content: "";
  position: absolute;
  top: -12%; right: -6%;
  width: 60vw; max-width: 780px;
  aspect-ratio: 1;
  background: radial-gradient(circle at center, rgba(201,162,39,0.16), transparent 62%);
  z-index: -1;
  pointer-events: none;
}
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: clamp(2.5rem, 5vw, 5rem);
  align-items: center;
}
.hero .kicker { margin-bottom: 1.6rem; }
.hero .display { color: var(--t-paper); margin-bottom: 1.5rem; }
.hero-sub {
  font-size: clamp(1.05rem, 1rem + 0.4vw, 1.24rem);
  line-height: 1.6;
  color: var(--t-paper-soft);
  max-width: 40ch;
  margin-bottom: 2.3rem;
}
.hero-cta { display: flex; flex-wrap: wrap; gap: 0.9rem; }

/* Hero facts card / index */
.hero-card {
  background: linear-gradient(180deg, rgba(250,248,244,0.045), rgba(250,248,244,0.015));
  border: 1px solid var(--line-ink);
  border-radius: var(--radius);
  padding: clamp(1.6rem, 2.4vw, 2.2rem);
  backdrop-filter: blur(2px);
}
.hero-card h2 {
  font-size: 0.72rem;
  font-family: var(--sans);
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold-bright);
  margin-bottom: 1.4rem;
}
.hero-index { list-style: none; padding: 0; display: grid; gap: 0; }
.hero-index li {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  padding: 0.85rem 0;
  border-top: 1px solid var(--hairline-ink);
  color: var(--t-paper-soft);
}
.hero-index li:first-child { border-top: 0; padding-top: 0; }
.hero-index .hi-num {
  font-variant-numeric: tabular-nums;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--gold-bright);
  letter-spacing: 0.08em;
  flex: none;
  width: 1.8rem;
}
.hero-index .hi-label { font-size: 0.98rem; color: var(--t-paper); font-weight: 500; }
.hero-index .hi-note { display: block; font-size: 0.82rem; color: var(--t-paper-muted); font-weight: 400; margin-top: 2px; }

/* ---- Statement band --------------------------------------------------- */
.statement {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.4fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: start;
}
.statement .kicker { margin-bottom: 0; }
.statement-body p + p { margin-top: 1.15rem; }
.statement-quote {
  font-family: var(--serif);
  font-size: clamp(1.5rem, 1.1rem + 1.7vw, 2.25rem);
  line-height: 1.24;
  font-weight: 420;
  letter-spacing: -0.01em;
  color: var(--t-strong);
  margin-bottom: 1.6rem;
}
.statement-quote em { font-style: italic; color: var(--gold-ink); }
.section--ink .statement-quote { color: var(--t-paper); }
.section--ink .statement-quote em { color: var(--gold-bright); }

/* ---- Services grid ---------------------------------------------------- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(1rem, 1.6vw, 1.4rem);
}
.card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  padding: clamp(1.6rem, 2.4vw, 2.15rem);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: transform 0.3s var(--ease), border-color 0.3s var(--ease), box-shadow 0.3s var(--ease);
  overflow: hidden;
}
.section--paper2 .card { background: #fbfaf6; }
.card::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s var(--ease);
}
.card:hover { transform: translateY(-4px); border-color: var(--line-strong); box-shadow: var(--shadow-card); }
.card:hover::before { transform: scaleX(1); }
.card-icon {
  width: 46px; height: 46px;
  display: grid; place-items: center;
  color: var(--gold-ink);
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  margin-bottom: 0.4rem;
}
.card-icon svg { width: 22px; height: 22px; }
.card h3 { color: var(--t-strong); }
.card p { font-size: 0.975rem; color: var(--t-muted); line-height: 1.6; flex: 1; }
.card--flagship,
.section--paper2 .card--flagship { background: var(--ink); border-color: var(--ink-3); }
.card--flagship h3 { color: var(--t-paper); }
.card--flagship p { color: var(--t-paper-muted); }
.card--flagship .card-icon { color: var(--gold-bright); border-color: var(--hairline-ink); }
.card--flagship::before { background: var(--gold-bright); }
.card .card-foot { margin-top: 0.4rem; }
.card-tag {
  font-family: var(--sans);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold-bright);
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
}

/* Full-card link (flagship) */
.card-link { text-decoration: none; color: inherit; }
.card-link:focus-visible { outline-offset: 4px; }

/* ---- Feature / included grid ------------------------------------------ */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(1.6rem, 3vw, 2.6rem) clamp(2rem, 4vw, 3.5rem);
}
.feature {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1.1rem;
  align-items: start;
}
.feature-mark {
  width: 40px; height: 40px;
  flex: none;
  display: grid; place-items: center;
  color: var(--gold-ink);
  border: 1px solid var(--line-strong);
  border-radius: 50%;
}
.section--ink .feature-mark { color: var(--gold-bright); border-color: var(--hairline-ink); }
.feature-mark svg { width: 20px; height: 20px; }
.feature h3 { font-size: 1.14rem; margin-bottom: 0.35rem; }
.section--ink .feature h3 { color: var(--t-paper); }
.feature p { font-size: 0.95rem; color: var(--t-muted); line-height: 1.58; }
.section--ink .feature p { color: var(--t-paper-muted); }

/* ---- Included checklist (compact) ------------------------------------- */
.included {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 0.2rem 2.5rem;
  list-style: none;
  padding: 0;
}
.included li {
  display: flex;
  gap: 0.85rem;
  align-items: baseline;
  padding: 0.95rem 0;
  border-top: 1px solid var(--line);
}
.section--ink .included li { border-top-color: var(--hairline-ink); }
.included li::before {
  content: "";
  width: 7px; height: 7px;
  flex: none;
  border: 1.5px solid var(--gold);
  transform: rotate(45deg);
  translate: 0 -1px;
}
.included .inc-title { font-weight: 600; color: var(--t-strong); font-size: 1rem; }
.section--ink .included .inc-title { color: var(--t-paper); }
.included .inc-note { color: var(--t-muted); font-size: 0.95rem; }
.section--ink .included .inc-note { color: var(--t-paper-muted); }

/* ---- Process steps ---------------------------------------------------- */
.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(1.2rem, 2.4vw, 2rem);
  counter-reset: step;
}
.step { position: relative; padding-top: 2.4rem; }
.step::before {
  counter-increment: step;
  content: counter(step, decimal-leading-zero);
  position: absolute;
  top: 0; left: 0;
  font-family: var(--serif);
  font-size: 1.5rem;
  font-weight: 500;
  color: var(--gold-ink);
  font-variant-numeric: tabular-nums;
}
.section--ink .step::before { color: var(--gold-bright); }
.step::after {
  content: "";
  position: absolute;
  top: 0.7rem; left: 3.2rem; right: 0;
  height: 1px;
  background: var(--line);
}
.section--ink .step::after { background: var(--hairline-ink); }
.step:last-child::after { display: none; }
.step h3 { font-size: 1.12rem; margin-bottom: 0.5rem; }
.section--ink .step h3 { color: var(--t-paper); }
.step p { font-size: 0.93rem; color: var(--t-muted); line-height: 1.55; }
.section--ink .step p { color: var(--t-paper-muted); }

/* ---- FAQ (native details) --------------------------------------------- */
.faq { max-width: var(--wrap-narrow); }
.faq-item {
  border-top: 1px solid var(--line);
}
.faq-item:last-child { border-bottom: 1px solid var(--line); }
.faq-item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1.5rem 0;
  cursor: pointer;
  list-style: none;
  font-family: var(--serif);
  font-size: 1.2rem;
  font-weight: 460;
  color: var(--t-strong);
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-icon {
  flex: none;
  width: 22px; height: 22px;
  position: relative;
}
.faq-icon::before, .faq-icon::after {
  content: "";
  position: absolute;
  background: var(--gold);
  transition: transform 0.3s var(--ease), opacity 0.3s var(--ease);
}
.faq-icon::before { top: 10px; left: 2px; right: 2px; height: 1.5px; }
.faq-icon::after { left: 10px; top: 2px; bottom: 2px; width: 1.5px; }
.faq-item[open] .faq-icon::after { transform: scaleY(0); opacity: 0; }
.faq-answer { padding: 0 0 1.6rem; color: var(--t-body); max-width: 68ch; }
.faq-answer p + p { margin-top: 0.9rem; }

/* ---- Principles (why us) ---------------------------------------------- */
.principles {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.principle {
  background: var(--paper);
  padding: clamp(1.7rem, 3vw, 2.5rem);
}
.section--paper2 .principle { background: #fbfaf6; }
.principle .p-num {
  font-family: var(--serif);
  font-size: 1.2rem;
  color: var(--gold-ink);
  font-variant-numeric: tabular-nums;
  display: block;
  margin-bottom: 0.8rem;
}
.principle h3 { font-size: 1.22rem; margin-bottom: 0.55rem; }
.principle p { color: var(--t-muted); font-size: 0.97rem; line-height: 1.6; }
.section--ink .principles { background: var(--hairline-ink); border-color: var(--hairline-ink); }
.section--ink .principle { background: var(--ink-2); }
.section--ink .principle .p-num { color: var(--gold-bright); }
.section--ink .principle h3 { color: var(--t-paper); }
.section--ink .principle p { color: var(--t-paper-muted); }

/* ---- Contact ---------------------------------------------------------- */
.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: start;
}

.form { display: grid; gap: 1.15rem; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.15rem; }
.field { display: grid; gap: 0.45rem; }
.field label {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--t-muted);
}
.field label .req { color: var(--gold-ink); }
.field input,
.field select,
.field textarea {
  font-family: var(--sans);
  font-size: 1rem;
  color: var(--t-strong);
  background: var(--paper);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  padding: 0.8rem 0.95rem;
  width: 100%;
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease), background 0.2s var(--ease);
}
.section--paper2 .field input,
.section--paper2 .field select,
.section--paper2 .field textarea { background: #fbfaf6; }
.field textarea { resize: vertical; min-height: 140px; line-height: 1.55; }
.field select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M2 4l4 4 4-4' fill='none' stroke='%236f5510' stroke-width='1.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 1rem center; padding-right: 2.6rem; }
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(201, 162, 39, 0.16);
}
.field input:invalid:not(:placeholder-shown),
.field textarea:invalid:not(:placeholder-shown) { border-color: #b4472f; }

/* honeypot — visually and programmatically hidden from users */
.hp {
  position: absolute !important;
  left: -9999px !important;
  width: 1px; height: 1px;
  overflow: hidden;
}

.form-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.5rem;
  margin-top: 0.3rem;
}
.form-note { font-size: 0.86rem; color: var(--t-muted); }
.form-note a { color: var(--gold-ink); font-weight: 600; text-decoration: none; }
.form-note a:hover { text-decoration: underline; }

.form-status {
  display: none;
  padding: 1rem 1.15rem;
  border-radius: var(--radius);
  font-size: 0.95rem;
  border: 1px solid transparent;
}
.form-status.is-visible { display: block; }
.form-status--ok { background: rgba(201,162,39,0.1); border-color: var(--line-strong); color: var(--t-strong); }
.form-status--err { background: rgba(180,71,47,0.08); border-color: rgba(180,71,47,0.4); color: #8a2f1c; }

button[type="submit"][aria-busy="true"] { opacity: 0.7; pointer-events: none; }

/* Contact facts card */
.facts {
  background: var(--ink);
  color: var(--t-paper-soft);
  border-radius: var(--radius);
  padding: clamp(1.8rem, 3vw, 2.4rem);
}
.facts h3 { color: var(--t-paper); font-size: 1.24rem; margin-bottom: 1.5rem; }
.facts-list { list-style: none; padding: 0; display: grid; gap: 1.3rem; }
.facts-list li { display: grid; grid-template-columns: auto 1fr; gap: 1rem; align-items: start; }
.facts-ico {
  width: 34px; height: 34px; flex: none;
  display: grid; place-items: center;
  color: var(--gold-bright);
  border: 1px solid var(--hairline-ink);
  border-radius: 50%;
}
.facts-ico svg { width: 17px; height: 17px; }
.facts-label {
  font-size: 0.68rem; font-weight: 600; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--gold-bright); margin-bottom: 0.2rem;
}
.facts-val { color: var(--t-paper); font-size: 0.98rem; line-height: 1.5; }
.facts-val a { color: var(--t-paper); text-decoration: none; }
.facts-val a:hover { color: var(--gold-bright); }
.facts .rule { background: var(--hairline-ink); margin: 1.6rem 0; }

/* ---- Prose (privacy) -------------------------------------------------- */
.prose { max-width: 72ch; }
.prose > * + * { margin-top: 1.15rem; }
.prose h2 { font-size: clamp(1.4rem, 1.1rem + 1vw, 1.8rem); margin-top: 2.6rem; }
.prose h2:first-of-type { margin-top: 0; }
.prose h3 { font-size: 1.2rem; margin-top: 1.8rem; }
.prose p, .prose li { color: var(--t-body); }
.prose a { color: var(--gold-ink); font-weight: 600; }
.prose ul { padding-left: 1.3rem; }
.prose li { margin-top: 0.5rem; }
.prose .meta { color: var(--t-muted); font-size: 0.92rem; }

/* ---- Author byline (E-E-A-T) ------------------------------------------ */
.byline {
  font-family: var(--sans);
  font-size: 0.82rem;
  letter-spacing: 0.02em;
  color: var(--t-muted);
  margin-top: 1.1rem;
}
.byline a { color: var(--gold-ink); font-weight: 600; text-decoration: none; }
.byline a:hover { text-decoration: underline; }

/* ---- Note / callout --------------------------------------------------- */
.note {
  display: flex;
  gap: 0.9rem;
  align-items: flex-start;
  padding: 1.15rem 1.3rem;
  border: 1px solid var(--line);
  border-left: 3px solid var(--gold);
  border-radius: var(--radius);
  background: rgba(201,162,39,0.05);
  font-size: 0.92rem;
  color: var(--t-muted);
  max-width: 70ch;
}
.note svg { width: 20px; height: 20px; flex: none; color: var(--gold-ink); translate: 0 1px; }
.section--ink .note { background: rgba(201,162,39,0.07); border-color: var(--hairline-ink); border-left-color: var(--gold); color: var(--t-paper-muted); }
.section--ink .note svg { color: var(--gold-bright); }

/* ---- CTA band --------------------------------------------------------- */
.cta-band { text-align: center; }
.cta-band .kicker { justify-content: center; }
.cta-band .kicker::before { display: none; }
.cta-band h2 { margin: 1rem auto 1.2rem; max-width: 18ch; }
.cta-band p { margin: 0 auto 2rem; max-width: 52ch; color: var(--t-paper-muted); }
.cta-actions { display: inline-flex; flex-wrap: wrap; gap: 0.9rem; justify-content: center; }

/* ---- Footer ----------------------------------------------------------- */
.site-footer {
  background: var(--ink);
  color: var(--t-paper-muted);
  padding-block: clamp(3.5rem, 6vw, 5rem) 2.2rem;
  border-top: 1px solid var(--hairline-ink);
}
.footer-top {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1.1fr;
  gap: clamp(1.6rem, 3vw, 2.6rem);
  padding-bottom: 2.8rem;
  border-bottom: 1px solid var(--hairline-ink);
}
.footer-brand .wordmark { color: var(--t-paper); margin-bottom: 1.1rem; }
.footer-brand p { font-size: 0.92rem; color: var(--t-paper-muted); max-width: 32ch; line-height: 1.6; }
.footer-col h4 {
  font-family: var(--sans);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold-bright);
  margin-bottom: 1.1rem;
}
.footer-col ul { list-style: none; padding: 0; display: grid; gap: 0.7rem; }
.footer-col a, .footer-col address {
  font-style: normal;
  font-size: 0.92rem;
  color: var(--t-paper-soft);
  text-decoration: none;
  line-height: 1.55;
}
.footer-col a:hover { color: var(--gold-bright); }
.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 1.8rem;
  font-size: 0.82rem;
  color: var(--t-paper-muted);
}
.footer-bottom a { color: var(--t-paper-muted); text-decoration: none; }
.footer-bottom a:hover { color: var(--gold-bright); }

/* ---- 404 -------------------------------------------------------------- */
.page-404 {
  min-height: 78vh;
  display: grid;
  place-items: center;
  text-align: center;
  background: var(--ink);
  color: var(--t-paper-soft);
  padding-block: 5rem;
}
.page-404 .big {
  font-family: var(--serif);
  font-size: clamp(5rem, 18vw, 12rem);
  line-height: 0.9;
  color: var(--t-paper);
  font-optical-sizing: auto;
  letter-spacing: -0.02em;
}
.page-404 .big span { color: var(--gold-bright); }
.page-404 h1 { color: var(--t-paper); margin: 1rem 0 0.8rem; }
.page-404 p { color: var(--t-paper-muted); margin-bottom: 2rem; max-width: 44ch; margin-inline: auto; }

/* ---- Reveal animation ------------------------------------------------- */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
.js .reveal.is-in { opacity: 1; transform: none; }
.reveal[data-d="1"] { transition-delay: 0.08s; }
.reveal[data-d="2"] { transition-delay: 0.16s; }
.reveal[data-d="3"] { transition-delay: 0.24s; }
.reveal[data-d="4"] { transition-delay: 0.32s; }

/* Mobile nav panel base (kept off-canvas) */
.nav-scrim { display: none; }

/* ---- Responsive ------------------------------------------------------- */
@media (max-width: 1080px) {
  .footer-top { grid-template-columns: 1fr 1fr; row-gap: 2.4rem; }
  .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 900px) {
  html { scroll-padding-top: 74px; }
  .hero-grid { grid-template-columns: 1fr; gap: 3rem; }
  .hero-card { max-width: 460px; }
  .statement { grid-template-columns: 1fr; gap: 1.5rem; }
  .contact-grid { grid-template-columns: 1fr; }
  .card-grid { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); gap: 2.2rem; }
  .step::after { display: none; }

  .nav-toggle { display: block; z-index: 120; }
  .nav-links {
    position: fixed;
    inset: 0 0 0 auto;
    z-index: 115; /* above the scrim (110) or link taps land on the scrim and just close the drawer */
    width: min(84vw, 340px);
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 0.5rem;
    background: var(--ink);
    padding: 2rem clamp(1.5rem, 6vw, 2.5rem);
    transform: translateX(100%);
    transition: transform 0.4s var(--ease);
    box-shadow: -30px 0 60px -20px rgba(0,0,0,0.5);
  }
  .nav-links.is-open { transform: none; }
  .nav-links .nav-link {
    color: var(--t-paper-soft);
    font-size: 1.4rem;
    font-family: var(--serif);
    font-weight: 460;
    width: 100%;
    padding: 0.7rem 0;
    border-bottom: 1px solid var(--hairline-ink);
  }
  .nav-links .nav-link::after { display: none; }
  .nav-links .btn { margin-top: 1rem; }
  .lang-menu { width: 100%; }
  .lang-btn.nav-link { border-bottom: 1px solid var(--hairline-ink); }
  .lang-menu.is-open .lang-btn.nav-link { border-bottom-color: transparent; }
  .lang-list {
    position: static;
    min-width: 0;
    background: none;
    border: 0;
    box-shadow: none;
    padding: 0 0 0.4rem 1.6rem;
  }
  .lang-list a { font-size: 1.05rem; }
  .nav-scrim.is-open {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(16,20,24,0.5);
    /* Below the header (100): the scrim is a body-level sibling, so anything
       higher would sit over the drawer inside the header's stacking context
       and swallow every nav tap. */
    z-index: 90;
    backdrop-filter: blur(2px);
  }
  body.nav-open { overflow: hidden; }
}

@media (max-width: 620px) {
  :root { --section-y: clamp(3.5rem, 12vw, 5rem); }
  .card-grid { grid-template-columns: 1fr; }
  .feature-grid { grid-template-columns: 1fr; gap: 1.6rem; }
  .steps { grid-template-columns: 1fr; }
  .principles { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .hero-cta { flex-direction: column; align-items: stretch; }
  .hero-cta .btn { justify-content: center; }
  .footer-top { grid-template-columns: 1fr; }
  .wordmark-text { font-size: 1rem; }
}

/* ---- Motion / print --------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
  .reveal { opacity: 1; transform: none; }
}

@media print {
  .site-header, .site-footer, .hero-card, .nav-toggle { display: none; }
  body { color: #000; background: #fff; }
  .section--ink, .hero { background: #fff; color: #000; }
}

/* =========================================================================
   /ecommerce/ landing page — scoped additions
   The base .steps grid is tuned for exactly four steps and .card carries no
   list style; these rules let the six-step journey and the service-package
   cards reuse those components cleanly. Nothing here affects other pages.
   ========================================================================= */

/* Journey: render six steps as an even grid that wraps cleanly, and drop the
   connector line at the end of each row. */
.steps--journey { grid-template-columns: repeat(3, 1fr); }
.steps--journey .step:nth-child(3n)::after { display: none; }
@media (max-width: 900px) {
  .steps--journey { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 620px) {
  .steps--journey { grid-template-columns: 1fr; }
}

/* Service packages: reuse .card / .card--flagship / .arrow-link, add a compact
   included-items list, keep the intro line from stretching, and let the top
   tier span the full row on wide screens. */
.pkg-card p { flex: 0 0 auto; }
.pkg-audience {
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold-ink);
}
.card--flagship .pkg-audience { color: var(--gold-bright); }
.pkg-list {
  list-style: none;
  padding: 0;
  margin: 0.35rem 0 0.7rem;
  display: grid;
  gap: 0.6rem;
  flex: 1;
}
.pkg-list li {
  position: relative;
  padding-left: 1.4rem;
  font-size: 0.925rem;
  line-height: 1.45;
  color: var(--t-body);
}
.pkg-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.45em;
  width: 6px; height: 6px;
  border: 1.5px solid var(--gold);
  transform: rotate(45deg);
}
.card--flagship .pkg-list li { color: var(--t-paper-soft); }
.card--flagship .arrow-link { color: var(--gold-bright); }
.pkg-card--wide { grid-column: span 2; }
@media (min-width: 901px) {
  .pkg-card--wide .pkg-list { grid-template-columns: repeat(2, 1fr); column-gap: 2rem; }
}
@media (max-width: 620px) {
  .pkg-card--wide { grid-column: auto; }
}

/* ---- Language selector (RU/EN toggle in nav) -------------------------- */
.nav-lang { text-transform: uppercase; letter-spacing: 0.12em; font-size: 0.8rem; }

/* =========================================================================
   /tools/ — free interactive calculators (scoped). Reuses .field/.form/.card/
   .note; adds a two-column tool layout, checkbox rows, and itemized output.
   Uses existing design tokens only. Appended at end of file — safe zone.
   ========================================================================= */
.tool-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(1.6rem, 3.5vw, 3rem); align-items: start; }
.tool-panel { background: #fbfaf6; border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(1.4rem, 2.6vw, 2rem); }
.tool-out { position: sticky; top: 96px; }
.tools-hub-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: clamp(1rem, 1.6vw, 1.4rem); }
.check-list { list-style: none; padding: 0; margin: 0; }
.check-row { display: flex; align-items: baseline; gap: 0.7rem; padding: 0.6rem 0; border-top: 1px solid var(--line); }
.check-row:first-child { border-top: 0; }
.check-row input { width: 1.05rem; height: 1.05rem; accent-color: var(--gold); flex: none; translate: 0 2px; }
.check-row label { font-size: 0.95rem; color: var(--t-body); cursor: pointer; }
.check-row .cr-note { display: block; font-size: 0.82rem; color: var(--t-muted); margin-top: 1px; }
.check-row .cr-flag { font-weight: 600; color: #8a2f1c; }
.tool-line { display: flex; justify-content: space-between; gap: 1rem; padding: 0.65rem 0; border-top: 1px solid var(--line); font-size: 0.95rem; color: var(--t-body); }
.tool-line:first-child { border-top: 0; }
.tool-line .tl-val { font-variant-numeric: tabular-nums; font-weight: 600; color: var(--t-strong); white-space: nowrap; }
.tool-line .tl-sub { display: block; font-size: 0.8rem; font-weight: 400; color: var(--t-muted); }
.tool-line--total { border-top: 2px solid var(--line-strong); margin-top: 0.35rem; padding-top: 0.85rem; font-family: var(--serif); font-size: 1.1rem; color: var(--t-strong); }
.tool-line--total .tl-val { font-size: 1.28rem; color: var(--gold-ink); }
.tool-figure { font-family: var(--serif); font-size: clamp(2.1rem, 1.4rem + 2.4vw, 3rem); color: var(--t-strong); font-variant-numeric: tabular-nums; line-height: 1.02; margin: 0.15rem 0 0.35rem; }
.tool-figure--risk { color: #8a2f1c; }
.tool-est { font-size: 0.72rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--t-muted); }
.tool-hint { font-size: 0.86rem; color: var(--t-muted); margin-top: 0.3rem; }
@media (max-width: 860px) { .tool-layout { grid-template-columns: 1fr; } .tool-out { position: static; } }
@media (max-width: 620px) { .tools-hub-grid { grid-template-columns: 1fr; } }
