/* ==========================================================================
   ENFILADE CAPITAL — DESIGN SYSTEM v2
   Monochrome research-house. Editorial. Strict contrast.
   --------------------------------------------------------------------------
   Architecture
     1. Tokens (raw values)               — palette, type, space, motion
     2. Surface system (the key idea)     — wrap any block in .surface-*
                                            child components auto-adapt via
                                            cascading custom properties
     3. Reset + base typography
     4. Layout primitives                 — container, section, grid
     5. Typography utilities              — display / eyebrow / label / body
     6. Rules + dividers
     7. Components                        — card variants, ledger row, kpi,
                                            button, form, nav, hero,
                                            section-index, dateline, tag
     8. Footer
     9. Reveal-on-scroll animation
    10. Responsive
   --------------------------------------------------------------------------
   Pages link one file: <link rel="stylesheet" href="css/enfilade.css">
   Adding a new page = composing classes, never writing new CSS.
   ========================================================================== */


/* ==========================================================================
   1. TOKENS — raw values
   ========================================================================== */
:root{

  /* ---- Monochrome scale (true black/white, no warm tint) ---------------- */
  --ec-white:      #FFFFFF;
  --ec-paper:      #FFFFFF;     /* primary page background                  */
  --ec-mist:       #F5F5F3;     /* tier-2 alternating section               */
  --ec-fog:        #ECECEA;     /* tier-3 inset / quiet panel               */
  --ec-stone:      #D9D9D6;     /* hairline rule                            */
  --ec-pewter:     #B5B5B0;     /* secondary edge / faint figure            */
  --ec-graphite:   #1A1A1A;     /* dark surface (near-black)                */
  --ec-ink:        #000000;     /* darkest surface / strong rule            */

  /* text on light surfaces */
  --ec-text:           #111111;
  --ec-text-secondary: #4A4A4A;
  --ec-text-muted:     #7A7A78;
  --ec-text-faint:     #A7A7A4;

  /* text on dark surfaces */
  --ec-text-inv:           #FFFFFF;
  --ec-text-inv-secondary: #C8C8C5;
  --ec-text-inv-muted:     #8A8A87;
  --ec-text-inv-faint:     #5A5A57;

  /* rules */
  --ec-rule-faint:  #ECECEA;
  --ec-rule:        #D9D9D6;
  --ec-rule-mid:    #8E8E8A;
  --ec-rule-strong: #000000;

  /* ---- Type ------------------------------------------------------------- */
  /* Cormorant Garamond (display) + Inter (body): high-contrast editorial serif
     with proper Cyrillic + Latin coverage, paired with neutral geometric sans.
     Private-banking / Pictet-Rothschild register. */
  --ec-sans:  'Inter', -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --ec-serif: 'Cormorant Garamond', 'Source Serif 4', Georgia, 'Times New Roman', serif;
  --ec-mono:  'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, Consolas, monospace;

  /* ---- Layout ----------------------------------------------------------- */
  --ec-maxw:     1280px;
  --ec-maxw-narrow: 920px;
  --ec-gutter:   56px;
  --ec-section-y: 144px;
  --ec-section-y-sm: 96px;

  /* ---- Motion ----------------------------------------------------------- */
  --ec-ease:     cubic-bezier(.22,.61,.36,1);
  --ec-ease-out: cubic-bezier(.16,1,.3,1);
  --ec-dur-fast: 220ms;
  --ec-dur:      360ms;
  --ec-dur-slow: 720ms;
}


/* ==========================================================================
   2. SURFACE SYSTEM
   --------------------------------------------------------------------------
   The .surface-* class on a wrapper overrides --surface-* tokens.
   Every component (card, rule, button, body, label, etc.) reads from
   --surface-* instead of hard-coding a color. Same markup, any background.
   ========================================================================== */

/* default — implied .surface-paper if nothing is set */
body, .surface-paper{
  --surface-bg:           var(--ec-paper);
  --surface-text:         var(--ec-text);
  --surface-text-secondary: var(--ec-text-secondary);
  --surface-text-muted:   var(--ec-text-muted);
  --surface-text-faint:   var(--ec-text-faint);

  --surface-rule:         var(--ec-rule);
  --surface-rule-faint:   var(--ec-rule-faint);
  --surface-rule-strong:  var(--ec-rule-strong);

  --surface-card-bg:      var(--ec-paper);
  --surface-card-border:  var(--ec-rule);
  --surface-card-hover-border: var(--ec-ink);
  --surface-card-flat-bg: var(--ec-mist);

  --surface-btn-bg:       var(--ec-ink);
  --surface-btn-text:     var(--ec-white);
  --surface-btn-ghost-border: var(--ec-ink);
  --surface-btn-ghost-text:   var(--ec-ink);

  --surface-input-rule:   var(--ec-stone);
  --surface-input-rule-focus: var(--ec-ink);
}

.surface-paper{ background: var(--surface-bg); color: var(--surface-text); }

.surface-mist{
  --surface-bg:           var(--ec-mist);
  --surface-text:         var(--ec-text);
  --surface-text-secondary: var(--ec-text-secondary);
  --surface-text-muted:   var(--ec-text-muted);
  --surface-text-faint:   var(--ec-text-faint);

  --surface-rule:         #D2D2CF;
  --surface-rule-faint:   #E2E2DF;
  --surface-rule-strong:  var(--ec-ink);

  --surface-card-bg:      var(--ec-paper);     /* card rises above mist */
  --surface-card-border:  var(--ec-rule);
  --surface-card-hover-border: var(--ec-ink);
  --surface-card-flat-bg: var(--ec-fog);

  --surface-btn-bg:       var(--ec-ink);
  --surface-btn-text:     var(--ec-white);
  --surface-btn-ghost-border: var(--ec-ink);
  --surface-btn-ghost-text:   var(--ec-ink);

  --surface-input-rule:   #C7C7C3;
  --surface-input-rule-focus: var(--ec-ink);

  background: var(--surface-bg);
  color: var(--surface-text);
}

.surface-fog{
  --surface-bg:           var(--ec-fog);
  --surface-text:         var(--ec-text);
  --surface-text-secondary: var(--ec-text-secondary);
  --surface-text-muted:   var(--ec-text-muted);
  --surface-text-faint:   var(--ec-text-faint);

  --surface-rule:         #C7C7C3;
  --surface-rule-faint:   #D9D9D6;
  --surface-rule-strong:  var(--ec-ink);

  --surface-card-bg:      var(--ec-paper);
  --surface-card-border:  #C7C7C3;
  --surface-card-hover-border: var(--ec-ink);
  --surface-card-flat-bg: #DFDFDC;

  --surface-btn-bg:       var(--ec-ink);
  --surface-btn-text:     var(--ec-white);
  --surface-btn-ghost-border: var(--ec-ink);
  --surface-btn-ghost-text:   var(--ec-ink);

  --surface-input-rule:   #B5B5B0;
  --surface-input-rule-focus: var(--ec-ink);

  background: var(--surface-bg);
  color: var(--surface-text);
}

.surface-graphite{
  --surface-bg:           var(--ec-graphite);
  --surface-text:         var(--ec-text-inv);
  --surface-text-secondary: var(--ec-text-inv-secondary);
  --surface-text-muted:   var(--ec-text-inv-muted);
  --surface-text-faint:   var(--ec-text-inv-faint);

  --surface-rule:         #2D2D2D;
  --surface-rule-faint:   #232323;
  --surface-rule-strong:  var(--ec-white);

  --surface-card-bg:      #111111;
  --surface-card-border:  #2D2D2D;
  --surface-card-hover-border: var(--ec-white);
  --surface-card-flat-bg: #232323;

  --surface-btn-bg:       var(--ec-white);
  --surface-btn-text:     var(--ec-ink);
  --surface-btn-ghost-border: var(--ec-white);
  --surface-btn-ghost-text:   var(--ec-white);

  --surface-input-rule:   #3A3A3A;
  --surface-input-rule-focus: var(--ec-white);

  background: var(--surface-bg);
  color: var(--surface-text);
}

.surface-ink{
  --surface-bg:           var(--ec-ink);
  --surface-text:         var(--ec-text-inv);
  --surface-text-secondary: var(--ec-text-inv-secondary);
  --surface-text-muted:   var(--ec-text-inv-muted);
  --surface-text-faint:   var(--ec-text-inv-faint);

  --surface-rule:         #232323;
  --surface-rule-faint:   #161616;
  --surface-rule-strong:  var(--ec-white);

  --surface-card-bg:      #0A0A0A;
  --surface-card-border:  #232323;
  --surface-card-hover-border: var(--ec-white);
  --surface-card-flat-bg: #161616;

  --surface-btn-bg:       var(--ec-white);
  --surface-btn-text:     var(--ec-ink);
  --surface-btn-ghost-border: var(--ec-white);
  --surface-btn-ghost-text:   var(--ec-white);

  --surface-input-rule:   #2D2D2D;
  --surface-input-rule-focus: var(--ec-white);

  background: var(--surface-bg);
  color: var(--surface-text);
}


/* ==========================================================================
   3. RESET + BASE
   ========================================================================== */
*,*::before,*::after{ box-sizing: border-box; }
html{ scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body{
  margin: 0;
  font-family: var(--ec-sans);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.6;
  color: var(--surface-text);
  background: var(--surface-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-feature-settings: "kern" 1, "liga" 1, "calt" 1;
}
img,svg,video{ display: block; max-width: 100%; }
a{ color: inherit; text-decoration: none; }
button{ font: inherit; cursor: pointer; }
h1,h2,h3,h4,h5,h6{ margin: 0; font-weight: 500; text-wrap: balance; color: var(--surface-text); }
p{ margin: 0; text-wrap: pretty; }
hr{ border: 0; margin: 0; }
::selection{ background: var(--ec-ink); color: var(--ec-white); }
.surface-graphite ::selection,
.surface-ink ::selection{ background: var(--ec-white); color: var(--ec-ink); }


/* ==========================================================================
   4. LAYOUT PRIMITIVES
   ========================================================================== */
.ec-container{
  max-width: var(--ec-maxw);
  margin: 0 auto;
  padding: 0 var(--ec-gutter);
}
.ec-container--narrow{ max-width: var(--ec-maxw-narrow); }
.ec-container--wide{ max-width: 1440px; }
.ec-container--full{ max-width: none; padding: 0 var(--ec-gutter); }

.ec-section{
  padding: var(--ec-section-y) 0;
  background: var(--surface-bg);
  color: var(--surface-text);
  position: relative;
}
.ec-section--tight  { padding: calc(var(--ec-section-y) * .6) 0; }
.ec-section--xtight { padding: calc(var(--ec-section-y) * .4) 0; }

/* universal column grids — collapse to 1 col below 900px */
.ec-grid{
  display: grid;
  gap: 24px;
}
.ec-grid--2{ grid-template-columns: repeat(2, minmax(0,1fr)); }
.ec-grid--3{ grid-template-columns: repeat(3, minmax(0,1fr)); }
.ec-grid--4{ grid-template-columns: repeat(4, minmax(0,1fr)); }
.ec-grid--6{ grid-template-columns: repeat(6, minmax(0,1fr)); }
.ec-grid--12{ grid-template-columns: repeat(12, minmax(0,1fr)); }
.ec-grid--gap-sm { gap: 16px; }
.ec-grid--gap-lg { gap: 40px; }
.ec-grid--gap-xl { gap: 64px; }

/* asymmetric editorial splits */
.ec-split-1-2{ display: grid; grid-template-columns: 1fr 2fr; gap: 64px; }
.ec-split-2-1{ display: grid; grid-template-columns: 2fr 1fr; gap: 64px; }
.ec-split-1-1{ display: grid; grid-template-columns: 1fr 1fr; gap: 64px; }
.ec-split-5-7{ display: grid; grid-template-columns: 5fr 7fr; gap: 80px; }
.ec-split-7-5{ display: grid; grid-template-columns: 7fr 5fr; gap: 80px; }

/* utility — vertical stacks with consistent rhythm */
.ec-stack > * + *{ margin-top: 24px; }
.ec-stack--sm > * + *{ margin-top: 12px; }
.ec-stack--lg > * + *{ margin-top: 40px; }
.ec-stack--xl > * + *{ margin-top: 64px; }


/* ==========================================================================
   5. TYPOGRAPHY
   --------------------------------------------------------------------------
   All text scales fluidly and reads --surface-* for color so it just works
   on any surface. Never set fixed text color in components.
   ========================================================================== */

/* ---- 5.1 Display (editorial serif) ------------------------------------- */
.ec-display{
  font-family: var(--ec-serif);
  font-weight: 500;
  font-style: normal;
  line-height: 1.08;
  letter-spacing: -.005em;
  color: var(--surface-text);
  margin: 0;
}
.ec-display--xxl{ font-size: clamp(56px, 7.2vw, 112px); line-height: .98; letter-spacing: -.015em; }
.ec-display--xl { font-size: clamp(46px, 5.6vw, 84px);  line-height: 1.02; letter-spacing: -.012em; }
.ec-display--lg { font-size: clamp(38px, 4.4vw, 64px);  line-height: 1.08; letter-spacing: -.008em; }
.ec-display--md { font-size: clamp(30px, 3.4vw, 48px);  line-height: 1.14; }
.ec-display--sm { font-size: clamp(24px, 2.4vw, 34px);  line-height: 1.22; }
.ec-display--italic{ font-style: italic; }

/* ---- 5.2 Sans-serif headings (alternate to serif display) -------------- */
.ec-head{
  font-family: var(--ec-sans);
  font-weight: 500;
  letter-spacing: -.015em;
  line-height: 1.1;
  color: var(--surface-text);
  margin: 0;
}
.ec-head--xl{ font-size: clamp(40px, 5vw, 72px); }
.ec-head--lg{ font-size: clamp(32px, 4vw, 52px); }
.ec-head--md{ font-size: clamp(24px, 2.8vw, 36px); }
.ec-head--sm{ font-size: clamp(20px, 2vw, 26px); font-weight: 600; letter-spacing: -.01em; }

/* ---- 5.3 Eyebrow / Label (uppercase, tracked) -------------------------- */
.ec-eyebrow{
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--ec-sans);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--surface-text-muted);
  line-height: 1;
}
.ec-eyebrow::before{
  content: '';
  width: 24px;
  height: 1px;
  background: currentColor;
  opacity: .6;
}
.ec-eyebrow--bare{ }
.ec-eyebrow--bare::before{ display: none; }
.ec-eyebrow--strong{ color: var(--surface-text); }

.ec-label{
  font-family: var(--ec-sans);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--surface-text-muted);
}
.ec-label--sm    { font-size: 10.5px; letter-spacing: .24em; }
.ec-label--strong{ color: var(--surface-text); font-weight: 600; }
.ec-label--ink   { color: var(--surface-text); }

/* section header — label + flexible rule */
.ec-section-head{
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 56px;
}
.ec-section-head .ec-label{ flex-shrink: 0; }
.ec-section-head__rule{
  flex: 1;
  height: 1px;
  background: var(--surface-rule);
}

/* ---- 5.4 Body / lede / caption ---------------------------------------- */
.ec-body{
  font-family: var(--ec-sans);
  font-size: 16px;
  line-height: 1.75;
  color: var(--surface-text-secondary);
  margin: 0;
}
.ec-body--lg{ font-size: 18px; line-height: 1.7; }
.ec-body--sm{ font-size: 14px; line-height: 1.65; }
.ec-body--ink{ color: var(--surface-text); }

.ec-lede{
  font-family: var(--ec-sans);
  font-size: clamp(18px, 1.6vw, 22px);
  line-height: 1.55;
  font-weight: 400;
  color: var(--surface-text);
  letter-spacing: -.005em;
}

.ec-caption{
  font-family: var(--ec-sans);
  font-size: 12px;
  line-height: 1.5;
  color: var(--surface-text-muted);
}

/* ---- 5.5 Quote / pull-quote ------------------------------------------- */
.ec-quote{
  font-family: var(--ec-serif);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(28px, 3.2vw, 44px);
  line-height: 1.25;
  letter-spacing: -.005em;
  color: var(--surface-text);
  margin: 0;
}
.ec-quote--lg{ font-size: clamp(34px, 4vw, 56px); line-height: 1.18; }
.ec-quote--sm{ font-size: clamp(20px, 2vw, 26px); line-height: 1.4; }

/* ---- 5.6 Numerals / KPI ------------------------------------------------ */
.ec-numeral{
  font-family: var(--ec-serif);
  font-style: italic;
  font-weight: 500;
  line-height: .9;
  color: var(--surface-text);
  font-variant-numeric: lining-nums;
  letter-spacing: -.02em;
}
.ec-numeral--xl{ font-size: clamp(60px, 8vw, 120px); }
.ec-numeral--lg{ font-size: clamp(48px, 6vw, 88px); }
.ec-numeral--md{ font-size: clamp(36px, 4vw, 56px); }
.ec-numeral--sm{ font-size: clamp(24px, 2.4vw, 36px); }

.ec-mono{
  font-family: var(--ec-mono);
  font-size: 12px;
  letter-spacing: .04em;
  color: var(--surface-text-muted);
  font-variant-numeric: tabular-nums;
}

/* ---- 5.7 Dateline / byline (editorial meta) --------------------------- */
.ec-dateline{
  display: inline-flex;
  align-items: center;
  gap: 18px;
  font-family: var(--ec-sans);
  font-size: 11px;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--surface-text-muted);
}
.ec-dateline > * + *::before{
  content: '·';
  margin-right: 18px;
  opacity: .5;
}

/* ---- 5.8 Inline text utilities ---------------------------------------- */
.ec-ink     { color: var(--surface-text); }
.ec-muted   { color: var(--surface-text-muted); }
.ec-faint   { color: var(--surface-text-faint); }
.ec-italic  { font-style: italic; }
.ec-serif   { font-family: var(--ec-serif); }
.ec-sans-up { font-family: var(--ec-sans); }


/* ==========================================================================
   6. RULES + DIVIDERS
   ========================================================================== */
.ec-rule         { height: 1px; background: var(--surface-rule); border: 0; width: 100%; }
.ec-rule--faint  { background: var(--surface-rule-faint); }
.ec-rule--strong { height: 2px; background: var(--surface-rule-strong); }
.ec-rule--heavy  { height: 4px; background: var(--surface-rule-strong); }
.ec-vrule        { width: 1px; background: var(--surface-rule); align-self: stretch; }
.ec-vrule--strong{ background: var(--surface-rule-strong); }


/* ==========================================================================
   7. COMPONENTS
   ========================================================================== */

/* ---- 7.1 CARD (the workhorse) ----------------------------------------- */
/*
   Five variants, all read --surface-* so they auto-flip on dark surfaces:
     .ec-card                  default — bordered, raised, hover lift
     .ec-card--bordered        same but strong 2px top rule (editorial)
     .ec-card--flat            no border, filled with --surface-card-flat-bg
     .ec-card--compact         smaller padding/numeral
     .ec-card--research        long-form, eyebrow + headline + abstract
     .ec-card--kpi             single big serif number + label + delta
*/
.ec-card{
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--surface-card-bg);
  border: 1px solid var(--surface-card-border);
  color: var(--surface-text);
  padding: 40px;
  transition:
    border-color  var(--ec-dur) var(--ec-ease),
    background    var(--ec-dur) var(--ec-ease),
    transform     var(--ec-dur) var(--ec-ease);
}
.ec-card:hover{
  border-color: var(--surface-card-hover-border);
}
.ec-card--hover-lift:hover{ transform: translateY(-3px); }

.ec-card__head{
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 32px;
}
.ec-card__num{
  font-family: var(--ec-serif);
  font-style: italic;
  font-weight: 500;
  font-size: 48px;
  line-height: .85;
  color: var(--surface-text);
}
.ec-card__meta{
  font-family: var(--ec-sans);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: .24em;
  text-transform: uppercase;
  color: var(--surface-text-muted);
}
.ec-card__title{
  font-family: var(--ec-sans);
  font-size: 22px;
  font-weight: 500;
  line-height: 1.22;
  letter-spacing: -.01em;
  color: var(--surface-text);
  margin: 0 0 14px;
}
.ec-card__text{
  font-family: var(--ec-sans);
  font-size: 15px;
  line-height: 1.65;
  color: var(--surface-text-secondary);
  margin: 0;
}
.ec-card__foot{
  margin-top: auto;
  padding-top: 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-family: var(--ec-sans);
  font-size: 11px;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--surface-text-muted);
}

.ec-card--bordered{
  border: 0;
  border-top: 2px solid var(--surface-rule-strong);
  padding: 32px 0 0;
  background: transparent;
}
.ec-card--bordered:hover{ border-top-color: var(--surface-text); }

.ec-card--flat{
  background: var(--surface-card-flat-bg);
  border: 0;
}
.ec-card--flat:hover{ background: var(--surface-card-flat-bg); }

.ec-card--compact{
  padding: 28px;
}
.ec-card--compact .ec-card__head{ margin-bottom: 22px; }
.ec-card--compact .ec-card__num  { font-size: 34px; }
.ec-card--compact .ec-card__title{ font-size: 18px; font-weight: 600; margin-bottom: 10px; }
.ec-card--compact .ec-card__text { font-size: 14px; line-height: 1.6; }

.ec-card--research{
  padding: 56px 48px;
}
.ec-card--research .ec-card__head{ margin-bottom: 40px; }
.ec-card--research .ec-card__title{
  font-family: var(--ec-serif);
  font-weight: 500;
  font-size: 32px;
  line-height: 1.18;
  letter-spacing: -.005em;
}
.ec-card--research .ec-card__text{ font-size: 16px; line-height: 1.72; }

/* KPI card — big number, label, delta */
.ec-card--kpi{
  padding: 36px 32px 28px;
}
.ec-card--kpi .ec-kpi__value{
  font-family: var(--ec-serif);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(54px, 5.5vw, 84px);
  line-height: .85;
  color: var(--surface-text);
  margin: 0 0 18px;
  font-variant-numeric: lining-nums;
  letter-spacing: -.025em;
}
.ec-card--kpi .ec-kpi__label{
  font-family: var(--ec-sans);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--surface-text-muted);
  margin: 0 0 6px;
}
.ec-card--kpi .ec-kpi__sub{
  font-family: var(--ec-sans);
  font-size: 13px;
  color: var(--surface-text-secondary);
  margin: 0;
}

/* ---- 7.2 LEDGER ROW (capabilities list) ------------------------------- */
.ec-row{
  display: grid;
  grid-template-columns: 48px 1fr auto;
  gap: 24px;
  align-items: baseline;
  padding: 22px 0;
  border-top: 1px solid var(--surface-rule);
  transition: padding-left var(--ec-dur) var(--ec-ease),
              background   var(--ec-dur) var(--ec-ease);
}
.ec-row:last-child{ border-bottom: 1px solid var(--surface-rule); }
.ec-row:hover{ padding-left: 10px; }
.ec-row__num  { font-family: var(--ec-mono); font-size: 11px; color: var(--surface-text-faint); letter-spacing: .04em; }
.ec-row__text { font-family: var(--ec-sans); font-size: 18px; color: var(--surface-text); letter-spacing: -.005em; }
.ec-row__meta { font-family: var(--ec-sans); font-size: 11px; letter-spacing: .22em; text-transform: uppercase; color: var(--surface-text-muted); }

/* numbered serif checklist (compact alt) */
.ec-item{
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: 22px;
  align-items: baseline;
  padding: 22px 0;
  border-bottom: 1px solid var(--surface-rule);
}
.ec-item__num{
  font-family: var(--ec-serif);
  font-style: italic;
  font-weight: 500;
  font-size: 22px;
  color: var(--surface-text-muted);
}
.ec-item__text{
  font-family: var(--ec-sans);
  font-size: 16px;
  line-height: 1.55;
  color: var(--surface-text);
}

/* ---- 7.3 BUTTONS ------------------------------------------------------- */
.ec-btn{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  font-family: var(--ec-sans);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .2em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 18px 36px;
  background: var(--surface-btn-bg);
  color: var(--surface-btn-text);
  border: 1px solid var(--surface-btn-bg);
  cursor: pointer;
  transition: background var(--ec-dur) var(--ec-ease),
              color      var(--ec-dur) var(--ec-ease),
              border-color var(--ec-dur) var(--ec-ease);
}
.ec-btn:hover{
  background: transparent;
  color: var(--surface-text);
}
.ec-btn::after{
  content: '→';
  font-family: var(--ec-sans);
  font-size: 14px;
  letter-spacing: 0;
  transform: translateX(0);
  transition: transform var(--ec-dur) var(--ec-ease);
}
.ec-btn:hover::after{ transform: translateX(4px); }

.ec-btn--ghost{
  background: transparent;
  color: var(--surface-btn-ghost-text);
  border-color: var(--surface-btn-ghost-border);
}
.ec-btn--ghost:hover{
  background: var(--surface-btn-ghost-border);
  color: var(--surface-btn-bg);
}

.ec-btn--bare{
  background: transparent;
  color: var(--surface-text);
  border-color: transparent;
  padding: 14px 0;
  border-bottom: 1px solid var(--surface-text);
}
.ec-btn--bare:hover{
  background: transparent;
  color: var(--surface-text);
  border-color: var(--surface-text-muted);
}

/* ---- 7.4 FORM --------------------------------------------------------- */
.ec-form{
  display: flex;
  flex-direction: column;
  gap: 28px;
}
.ec-field{
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.ec-field__label{
  font-family: var(--ec-sans);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: .24em;
  text-transform: uppercase;
  color: var(--surface-text-muted);
}
.ec-input,
.ec-textarea{
  width: 100%;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--surface-input-rule);
  padding: 12px 0;
  font-family: var(--ec-sans);
  font-size: 16px;
  color: var(--surface-text);
  outline: 0;
  transition: border-color var(--ec-dur) var(--ec-ease);
  border-radius: 0;
}
.ec-input::placeholder,
.ec-textarea::placeholder{ color: var(--surface-text-muted); opacity: .8; }
.ec-input:focus,
.ec-textarea:focus{ border-bottom-color: var(--surface-input-rule-focus); }
.ec-textarea{ resize: vertical; min-height: 96px; line-height: 1.6; }

/* ---- 7.5 NAV ---------------------------------------------------------- */
.ec-nav{
  display: flex;
  align-items: center;
  gap: 28px;
}
.ec-nav__link{
  position: relative;
  font-family: var(--ec-sans);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--surface-text);
  white-space: nowrap;
  text-decoration: none;
  padding-bottom: 4px;
  transition: opacity var(--ec-dur-fast) var(--ec-ease);
}
.ec-nav__link::after{
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--ec-dur) var(--ec-ease);
}
.ec-nav__link:hover::after,
.ec-nav__link.is-active::after{ transform: scaleX(1); }

.ec-nav--inline{ gap: 22px; }
.ec-nav--inline .ec-nav__link{ font-size: 11px; letter-spacing: .2em; }

/* top header bar (used inside hero as absolute overlay) */
.ec-topbar{
  position: absolute;
  top: 0; left: 0; right: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 28px var(--ec-gutter);
  color: var(--surface-text);
}
.ec-topbar__brand{
  font-family: var(--ec-sans);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .22em;
  text-transform: uppercase;
}

/* persistent header for content pages — sticky, sits at top, respects surface */
.ec-header{
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--surface-bg);
  color: var(--surface-text);
  /* Hairline only appears on scroll (see .is-scrolled) — keeps the
     header→hero transition seamless with the paper-top wash below. */
  border-bottom: 1px solid transparent;
  transition: border-color var(--ec-dur) var(--ec-ease),
              background   var(--ec-dur) var(--ec-ease);
  transition: background var(--ec-dur) var(--ec-ease),
              border-color var(--ec-dur) var(--ec-ease);
}
.ec-header.is-scrolled{
  background: color-mix(in srgb, var(--surface-bg) 92%, transparent);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom-color: var(--surface-rule);
}
.ec-header__inner{
  max-width: var(--ec-maxw);
  margin: 0 auto;
  padding: 20px var(--ec-gutter);
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 28px;
}
.ec-header__brand{
  font-family: var(--ec-serif);
  font-style: italic;
  font-size: 22px;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
  line-height: 1;
  color: var(--surface-text);
  text-decoration: none;
  white-space: nowrap;
}
.ec-header__nav{
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 22px;
  flex-wrap: wrap;
}
.ec-header__cta{
  font-family: var(--ec-sans);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--surface-text);
  text-decoration: none;
  padding: 9px 16px;
  border: 1px solid var(--surface-text);
  transition: background var(--ec-dur) var(--ec-ease),
              color var(--ec-dur) var(--ec-ease);
  white-space: nowrap;
}
.ec-header__cta:hover{
  background: var(--surface-text);
  color: var(--surface-bg);
}

/* right cluster — language switcher + log-in CTA */
.ec-header__cluster{
  display: flex;
  align-items: center;
  gap: 22px;
}

/* language switcher (RU · EN) */
.ec-langswitch{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--ec-sans);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .22em;
  text-transform: uppercase;
}
.ec-langswitch__link{
  color: var(--surface-text-muted);
  text-decoration: none;
  transition: color var(--ec-dur) var(--ec-ease);
  padding-bottom: 2px;
}
.ec-langswitch__link:hover{ color: var(--surface-text); }
.ec-langswitch__link.is-active{
  color: var(--surface-text);
  font-weight: 700;
  border-bottom: 1px solid var(--surface-text);
}
.ec-langswitch__sep{ color: var(--surface-text-faint); }

@media (max-width: 1100px){
  .ec-header__nav{ gap: 16px; }
  .ec-header__nav .ec-nav__link{ font-size: 11px; letter-spacing: .14em; }
}
@media (max-width: 900px){
  .ec-header__inner{ grid-template-columns: 1fr auto; padding: 16px var(--ec-gutter); }
  .ec-header__nav{ display: none; }
  .ec-header__cluster{ gap: 14px; }
  .ec-header__cta{ padding: 7px 12px; font-size: 10px; }
  .ec-header__cluster .ec-langswitch{ display: none; }
  .ec-header__cluster .ec-header__cta{ display: none; }
}

/* ==========================================================================
   Mobile navigation — hamburger + full-screen paper overlay
   Hidden on desktop; JS injects the elements on every page.
   ========================================================================== */
.ec-menu-btn{
  display: none;
  position: relative;
  width: 44px;
  height: 44px;
  padding: 0;
  margin: 0;
  background: transparent;
  border: none;
  cursor: pointer;
  z-index: 1200;
  -webkit-tap-highlight-color: transparent;
}
.ec-menu-btn span{
  position: absolute;
  left: 9px;
  right: 9px;
  height: 2px;
  background: var(--ec-ink);
  border-radius: 0;
  transition:
    transform .32s cubic-bezier(.65,.05,.36,1),
    opacity .2s cubic-bezier(.65,.05,.36,1),
    top .32s cubic-bezier(.65,.05,.36,1);
}
.ec-menu-btn span:nth-child(1){ top: 13px; }
.ec-menu-btn span:nth-child(2){ top: 21px; }
.ec-menu-btn span:nth-child(3){ top: 29px; }
.ec-menu-btn.is-active span:nth-child(1){ top: 21px; transform: rotate(45deg); }
.ec-menu-btn.is-active span:nth-child(2){ opacity: 0; }
.ec-menu-btn.is-active span:nth-child(3){ top: 21px; transform: rotate(-45deg); }

.ec-mobile-nav{
  position: fixed;
  inset: 0;
  z-index: 1100;
  background: var(--ec-paper);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 96px 32px 32px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-8px);
  transition: opacity .32s cubic-bezier(.65,.05,.36,1),
              transform .32s cubic-bezier(.65,.05,.36,1);
  overflow-y: auto;
  overscroll-behavior: contain;
}
.ec-mobile-nav.is-open{
  opacity: 1;
  pointer-events: auto;
  transform: none;
}
.ec-mobile-nav__inner{
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;
  width: 100%;
  max-width: 480px;
}
.ec-mobile-nav__inner .ec-nav__link{
  font-family: var(--ec-serif);
  font-style: italic;
  font-weight: 500;
  font-size: 30px;
  letter-spacing: 0;
  text-transform: none;
  padding: 6px 8px;
  line-height: 1.15;
  color: var(--ec-ink);
  opacity: 0;
  transform: translateY(10px);
  transition: opacity .35s cubic-bezier(.65,.05,.36,1),
              transform .35s cubic-bezier(.65,.05,.36,1),
              color .2s ease;
}
.ec-mobile-nav__inner .ec-nav__link::after{ display: none; }
.ec-mobile-nav__inner .ec-nav__link:hover,
.ec-mobile-nav__inner .ec-nav__link.is-active{
  color: var(--ec-text-muted);
}
.ec-mobile-nav.is-open .ec-nav__link{
  opacity: 1;
  transform: none;
}
.ec-mobile-nav.is-open .ec-nav__link:nth-child(1){ transition-delay: 100ms; }
.ec-mobile-nav.is-open .ec-nav__link:nth-child(2){ transition-delay: 150ms; }
.ec-mobile-nav.is-open .ec-nav__link:nth-child(3){ transition-delay: 200ms; }
.ec-mobile-nav.is-open .ec-nav__link:nth-child(4){ transition-delay: 250ms; }
.ec-mobile-nav.is-open .ec-nav__link:nth-child(5){ transition-delay: 300ms; }
.ec-mobile-nav.is-open .ec-nav__link:nth-child(6){ transition-delay: 350ms; }
.ec-mobile-nav.is-open .ec-nav__link:nth-child(7){ transition-delay: 400ms; }
.ec-mobile-nav.is-open .ec-nav__link:nth-child(8){ transition-delay: 450ms; }

.ec-mobile-nav__foot{
  position: absolute;
  left: 0; right: 0;
  bottom: 40px;
  display: flex;
  justify-content: center;
  gap: 22px;
  padding: 0 32px;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity .35s cubic-bezier(.65,.05,.36,1) 520ms,
              transform .35s cubic-bezier(.65,.05,.36,1) 520ms;
}
.ec-mobile-nav.is-open .ec-mobile-nav__foot{
  opacity: 1;
  transform: none;
}
.ec-mobile-nav__foot .ec-header__cta{
  border: 1px solid var(--ec-ink);
  color: var(--ec-ink);
  padding: 12px 24px;
  font-size: 11px;
  letter-spacing: .28em;
}
.ec-mobile-nav__foot .ec-langswitch{
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--ec-mono);
  font-size: 11px;
  letter-spacing: .22em;
  text-transform: uppercase;
}
.ec-mobile-nav__foot .ec-langswitch__link{
  color: var(--ec-text-muted);
  text-decoration: none;
  padding: 6px 2px;
}
.ec-mobile-nav__foot .ec-langswitch__link.is-active{
  color: var(--ec-ink);
  border-bottom: 1px solid var(--ec-ink);
}

/* Body scroll-lock while menu open — position: fixed preserves scroll pos */
body.ec-menu-open{
  position: fixed;
  left: 0; right: 0;
  overflow: hidden;
}

@media (max-width: 900px){
  .ec-menu-btn{ display: block; }
  /* Lift the sticky header above the overlay so the hamburger stays
     tappable when menu is open (button lives in header stacking ctx) */
  .ec-header{ z-index: 1200; }
}
@media (min-width: 901px){
  .ec-mobile-nav{ display: none !important; }
}

/* ---- 7.6 HERO --------------------------------------------------------- */
.ec-hero{
  position: relative;
  min-height: 92vh;
  overflow: hidden;
  background: var(--surface-bg);
  color: var(--surface-text);
  isolation: isolate;
}
.ec-hero--tall{ min-height: 100vh; }
.ec-hero--short{ min-height: 64vh; }

.ec-hero__img{
  position: absolute;
  inset: 0;
  background-position: center 38%;
  background-size: cover;
  background-repeat: no-repeat;
  filter: grayscale(1) contrast(1.08) brightness(.94);
  z-index: -2;
}
.ec-hero__img--zoom{
  transform-origin: center;
  animation: ec-zoom 32s var(--ec-ease-out) forwards;
  will-change: transform;
}
@keyframes ec-zoom{ from{ transform: scale(1.005); } to{ transform: scale(1.08); } }

/* wash layers (legibility over photo) — three flavors stack on top */
.ec-hero__wash{ position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.ec-hero__wash--paper-top   { background: linear-gradient(180deg, rgba(255,255,255,1) 0%, rgba(255,255,255,.88) 12%, rgba(255,255,255,0) 46%); }
.ec-hero__wash--paper-bot   { background: linear-gradient(0deg,   rgba(255,255,255,1) 0%, rgba(255,255,255,.88) 12%, rgba(255,255,255,0) 46%); }
.ec-hero__wash--paper-halo  { background: radial-gradient(ellipse 60% 50% at 50% 50%, rgba(255,255,255,.65) 0%, rgba(255,255,255,0) 60%); }
.ec-hero__wash--ink-top     { background: linear-gradient(180deg, rgba(0,0,0,.6) 0%, rgba(0,0,0,0) 35%); }
.ec-hero__wash--ink-bot     { background: linear-gradient(0deg,   rgba(0,0,0,.7) 0%, rgba(0,0,0,0) 35%); }
.ec-hero__wash--ink-fill    { background: rgba(0,0,0,.42); }

.ec-hero__center{
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0 var(--ec-gutter);
}
.ec-hero__logo{
  width: 560px;
  max-width: 72vw;
  mix-blend-mode: multiply;
  filter: contrast(1.1);
}
.surface-ink .ec-hero__logo,
.surface-graphite .ec-hero__logo{
  mix-blend-mode: screen;
  filter: invert(1) contrast(1.1);
}
.ec-hero__tagline{
  margin-top: 28px;
  font-family: var(--ec-sans);
  font-size: clamp(13px, 1.05vw, 15px);
  font-weight: 600;
  letter-spacing: .3em;
  text-transform: uppercase;
  color: var(--ec-ink);
  max-width: 68ch;
  line-height: 1.5;
}

.ec-hero__footer{
  position: absolute;
  bottom: 32px;
  left: 0; right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--ec-gutter);
  font-family: var(--ec-sans);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .24em;
  text-transform: uppercase;
  color: var(--surface-text);
  z-index: 4;
}

/* ---- 7.7 SECTION INDEX (right-edge dots, blends over any bg) --------- */
.ec-index{
  position: fixed;
  right: 28px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 60;
  display: flex;
  flex-direction: column;
  gap: 18px;
  mix-blend-mode: difference;
}
.ec-index__link{
  display: flex;
  align-items: center;
  gap: 12px;
  justify-content: flex-end;
  text-decoration: none;
  color: #fff;
}
.ec-index__lbl{
  font-family: var(--ec-sans);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .2em;
  text-transform: uppercase;
  white-space: nowrap;
  opacity: 0;
  transform: translateX(6px);
  transition: opacity var(--ec-dur) var(--ec-ease), transform var(--ec-dur) var(--ec-ease);
}
.ec-index__dot{
  width: 6px;
  height: 6px;
  border-radius: 50%;
  border: 1px solid #fff;
  background: transparent;
  opacity: .45;
  transition: opacity var(--ec-dur) var(--ec-ease),
              transform var(--ec-dur) var(--ec-ease),
              background var(--ec-dur) var(--ec-ease);
}
.ec-index__link:hover .ec-index__lbl{ opacity: 1; transform: none; }
.ec-index__link:hover .ec-index__dot{ opacity: 1; }
.ec-index__link.is-active .ec-index__dot{ opacity: 1; background: #fff; transform: scale(1.25); }
.ec-index__link.is-active .ec-index__lbl{ opacity: 1; transform: none; }
@media (max-width: 760px){ .ec-index{ display: none; } }

/* ---- 7.8 TAG / CHIP --------------------------------------------------- */
.ec-tag{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  font-family: var(--ec-sans);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--surface-text);
  border: 1px solid var(--surface-rule);
  border-radius: 0;
}
.ec-tag--solid{
  background: var(--surface-text);
  color: var(--surface-bg);
  border-color: var(--surface-text);
}

/* ---- 7.9 BREADCRUMB / SUB-NAV ---------------------------------------- */
.ec-crumb{
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--ec-sans);
  font-size: 11px;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--surface-text-muted);
}
.ec-crumb a{ color: var(--surface-text-muted); text-decoration: none; }
.ec-crumb a:hover{ color: var(--surface-text); }
.ec-crumb__sep{ opacity: .5; }


/* ==========================================================================
   8. FOOTER
   ========================================================================== */
.ec-footer{
  padding: 80px 0 32px;
  background: var(--surface-bg);
  color: var(--surface-text);
}
.ec-footer__top{
  padding-top: 0;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: start;
  gap: 40px;
}
.ec-footer__brand{
  font-family: var(--ec-serif);
  font-style: italic;
  font-weight: 500;
  font-size: 38px;
  line-height: 1;
  color: var(--surface-text);
}
.ec-footer__brand-meta{
  margin-top: 14px;
  font-family: var(--ec-sans);
  font-size: 11px;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--surface-text-muted);
}
.ec-footer__nav{
  display: flex;
  gap: 28px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.ec-footer__bottom{
  margin-top: 56px;
  padding-top: 22px;
  border-top: 1px solid var(--surface-rule);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  font-family: var(--ec-sans);
  font-size: 10.5px;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--surface-text-muted);
}


/* ==========================================================================
   9. REVEAL ON SCROLL (handled by enfilade.js)
   ========================================================================== */
.reveal-on [data-reveal] > *{
  opacity: 0;
  transform: translateY(28px);
  transition: opacity var(--ec-dur-slow) var(--ec-ease),
              transform var(--ec-dur-slow) var(--ec-ease);
}
.reveal-on [data-reveal].is-in > *{
  opacity: 1;
  transform: none;
}
.reveal-on [data-reveal] h2,
.reveal-on [data-reveal] .ec-display{
  clip-path: inset(0 0 100% 0);
}
.reveal-on [data-reveal].is-in h2,
.reveal-on [data-reveal].is-in .ec-display{
  clip-path: inset(0 0 -10% 0);
  transition: opacity var(--ec-dur-slow) var(--ec-ease),
              transform var(--ec-dur-slow) var(--ec-ease),
              clip-path 900ms var(--ec-ease);
}
@media (prefers-reduced-motion: reduce){
  .reveal-on [data-reveal] > *,
  .reveal-on [data-reveal] h2,
  .reveal-on [data-reveal] .ec-display{
    opacity: 1; transform: none; clip-path: none; transition: none;
  }
  .ec-hero__img--zoom{ animation: none; }
}


/* ==========================================================================
   10. RESPONSIVE
   ========================================================================== */
@media (max-width: 1100px){
  :root{ --ec-gutter: 40px; }
  .ec-split-5-7, .ec-split-7-5{ gap: 56px; }
}
@media (max-width: 900px){
  :root{
    --ec-gutter: 28px;
    --ec-section-y: var(--ec-section-y-sm);
  }
  .ec-grid--2,
  .ec-grid--3,
  .ec-grid--4{ grid-template-columns: 1fr; }
  .ec-grid--6,
  .ec-grid--12{ grid-template-columns: repeat(2, 1fr); }
  .ec-split-1-2,
  .ec-split-2-1,
  .ec-split-1-1,
  .ec-split-5-7,
  .ec-split-7-5{ grid-template-columns: 1fr; gap: 40px; }

  .ec-card{ padding: 28px; }
  .ec-card--research{ padding: 32px 24px; }
  .ec-card__num{ font-size: 36px; }

  .ec-footer__top{ grid-template-columns: 1fr; }
  .ec-footer__nav{ justify-content: flex-start; }

  .ec-topbar{ padding: 22px var(--ec-gutter); }
  .ec-topbar .ec-nav{ display: none; }
}
@media (max-width: 560px){
  .ec-grid--6,
  .ec-grid--12{ grid-template-columns: 1fr; }
  .ec-section-head{ flex-wrap: wrap; }
}


/* ==========================================================================
   11. COOKIE CONSENT BANNER
   --------------------------------------------------------------------------
   Injected by js/cookies.js on first visit. Uses only design-system tokens.
   ========================================================================== */
.ec-cookie{
  position: fixed;
  left: 24px; right: 24px; bottom: 24px;
  z-index: 100;
  background: var(--ec-paper);
  border: 1px solid var(--ec-rule);
  box-shadow:
    0 24px 48px -24px rgba(0,0,0,.22),
    0 10px 20px -10px rgba(0,0,0,.12);
  opacity: 0;
  transform: translateY(24px);
  transition: opacity   var(--ec-dur-slow) var(--ec-ease-out),
              transform var(--ec-dur-slow) var(--ec-ease-out);
}
.ec-cookie.is-in { opacity: 1; transform: none; }
.ec-cookie.is-out{ opacity: 0; transform: translateY(24px); }

.ec-cookie__inner{
  max-width: var(--ec-maxw);
  margin: 0 auto;
  padding: 22px 28px;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 32px;
}

.ec-cookie__text{
  margin: 0;
  font-family: var(--ec-sans);
  font-size: 13px;
  line-height: 1.55;
  color: var(--ec-text-secondary);
  max-width: 76ch;
}
.ec-cookie__link{
  color: var(--ec-ink);
  text-decoration: none;
  border-bottom: 1px solid var(--ec-rule);
  padding-bottom: 1px;
  transition: border-color var(--ec-dur) var(--ec-ease);
}
.ec-cookie__link:hover,
.ec-cookie__link:focus-visible{
  border-bottom-color: var(--ec-ink);
  outline: none;
}

.ec-cookie__actions{
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.ec-cookie__btn{
  font-family: var(--ec-sans);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .22em;
  text-transform: uppercase;
  padding: 12px 20px;
  border-radius: 0;
  cursor: pointer;
  white-space: nowrap;
  transition: background   var(--ec-dur) var(--ec-ease),
              color        var(--ec-dur) var(--ec-ease),
              border-color var(--ec-dur) var(--ec-ease);
}
.ec-cookie__btn:focus-visible{ outline: 2px solid var(--ec-ink); outline-offset: 2px; }

.ec-cookie__btn--ghost{
  background: transparent;
  color: var(--ec-ink);
  border: 1px solid var(--ec-rule);
}
.ec-cookie__btn--ghost:hover{ border-color: var(--ec-ink); }

.ec-cookie__btn--solid{
  background: var(--ec-ink);
  color: var(--ec-white);
  border: 1px solid var(--ec-ink);
}
.ec-cookie__btn--solid:hover{ background: transparent; color: var(--ec-ink); }

@media (max-width: 720px){
  .ec-cookie{ left: 12px; right: 12px; bottom: 12px; }
  .ec-cookie__inner{
    grid-template-columns: 1fr;
    gap: 18px;
    padding: 18px 20px;
  }
  .ec-cookie__text{ font-size: 12.5px; }
  .ec-cookie__actions{ justify-content: stretch; }
  .ec-cookie__btn{ flex: 1; padding: 12px 14px; }
}


/* ==========================================================================
   12. SURFACE BOUNDARIES  (editorial, not cinematic)
   --------------------------------------------------------------------------
   Chapter-boundary approach used by Bloomberg Businessweek (Pentagram),
   the Financial Times and The New Yorker: colour changes are *marked*, not
   *dissolved*.  A 2 px black rule sits at the top of every non-paper
   section — it is the chapter break.  No gradients, no mid-tone mud.

   The rule is drawn on a container that spans the FULL viewport width so it
   reads as a printed folio line, not as a section-head divider.
   ========================================================================== */
.ec-footer{ position: relative; border-top: 2px solid var(--ec-ink); }

.ec-section.surface-mist,
.ec-section.surface-ink,
.ec-footer.surface-ink{
  border-top: 2px solid var(--ec-ink);
}

/* Suppress the top rule when two same-colour sections sit next to each
   other (would double-mark a non-transition). */
.ec-section.surface-mist + .ec-section.surface-mist,
.ec-section.surface-ink  + .ec-section.surface-ink{
  border-top-color: transparent;
}

/* Opt-out marker */
.ec-section--no-transition{ border-top-color: transparent; }
