/* ==========================================================================
   Thaleric Limited — styles.css
   Static site, no framework, no build step. All colour / spacing / type
   values live as tokens in :root — do not hardcode them further down.
   Palette: warm "oyster" paper + aubergine ink + electric violet + ember.
   ========================================================================== */

/* ---------- tokens ---------- */
:root {
  /* surfaces */
  --bg:         #efe9de;
  --bg-2:       #e6ddce;
  --paper:      #fbf8f2;
  --ink:        #171021;
  --ink-2:      #211830;
  --scrim:      23, 16, 33;          /* --ink as an rgb triplet, for gradients */

  /* text */
  --text:       #241a31;
  --text-dim:   #5e5268;
  --on-ink:     #f6f1ea;
  --on-ink-dim: #b7abc4;

  /* accents */
  --violet:     #4b36e0;
  --violet-hi:  #6a55ff;
  --violet-pr:  #3b28bd;
  --lilac:      #c7bdff;
  --ember:      #e2542b;
  --ember-hi:   #f06b41;

  /* lines */
  --line:       #d6cbb8;
  --line-ink:   rgba(255, 255, 255, .13);

  /* layout */
  --pad-x:      clamp(20px, 5.5vw, 80px);
  --section-py: clamp(64px, 9vw, 132px);
  --nav-h:      76px;
  --r:          14px;
  --r-sm:       10px;

  /* type scale — the only place font sizes are defined */
  --t-hero:  clamp(40px, 7.4vw, 108px);
  --t-h2:    clamp(28px, 3.5vw, 50px);
  --t-h3:    clamp(18px, 1.45vw, 22px);
  --t-stat:  clamp(34px, 3.9vw, 58px);
  --t-lead:  clamp(16.5px, 1.3vw, 19px);
  --t-body:  clamp(15px, 1.05vw, 16.5px);
  --t-small: 14px;
  --t-label: clamp(10.5px, .78vw, 12px);

  /* fonts */
  --f-display: "Fraunces", "Iowan Old Style", Georgia, serif;
  --f-sans:    "Inter Tight", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  --f-mono:    "JetBrains Mono", ui-monospace, "SFMono-Regular", Consolas, monospace;

  --ease: cubic-bezier(.22, .61, .36, 1);
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0 auto;
  max-width: 1440px;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: var(--f-sans);
  font-size: var(--t-body);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  /* barely-there paper grain so the flat oyster background is not dead flat */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)' opacity='.035'/%3E%3C/svg%3E");
}

img, svg { display: block; max-width: 100%; }
h1, h2, h3, p, ul, ol, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
address { font-style: normal; }
button { font: inherit; }

:focus-visible {
  outline: 2px solid var(--violet);
  outline-offset: 3px;
  border-radius: 3px;
}
.section--ink :focus-visible { outline-color: var(--lilac); }

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  padding: 12px 18px;
  background: var(--ink);
  color: var(--on-ink);
}
.skip-link:focus { left: 8px; top: 8px; }

/* ---------- typography ---------- */
h1, h2 {
  font-family: var(--f-display);
  font-weight: 500;
  letter-spacing: -.02em;
  line-height: 1.02;
  font-variation-settings: "SOFT" 0, "WONK" 1;
}
h1 { font-size: var(--t-hero); }
h2 { font-size: var(--t-h2); line-height: 1.06; }
h1 em, h2 em {
  font-style: italic;
  font-weight: 400;
  color: var(--ember);
}
.section--ink h1 em, .section--ink h2 em { color: var(--ember-hi); }

h3 {
  font-family: var(--f-sans);
  font-size: var(--t-h3);
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -.01em;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--f-mono);
  font-size: var(--t-label);
  font-weight: 500;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--violet);
}
.eyebrow i { display: block; width: 26px; height: 1px; background: var(--ember); flex: none; }
.section--ink .eyebrow { color: var(--lilac); }

.lead, .sec-lead {
  font-size: var(--t-lead);
  line-height: 1.6;
  color: var(--text-dim);
}
.section--ink .sec-lead { color: var(--on-ink-dim); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 24px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: var(--t-small);
  font-weight: 600;
  letter-spacing: .01em;
  cursor: pointer;
  transition: background-color .2s var(--ease), color .2s var(--ease),
              border-color .2s var(--ease), transform .12s var(--ease);
}
.btn-primary { background: var(--violet); color: #fff; }
.btn-primary:hover { background: var(--violet-hi); transform: translateY(-1px); }
.btn-primary:active { background: var(--violet-pr); transform: translateY(1px); }

.btn-ghost { border-color: var(--line); color: var(--text); background: transparent; }
.btn-ghost:hover { border-color: var(--ink); background: rgba(var(--scrim), .05); transform: translateY(-1px); }
.btn-ghost:active { transform: translateY(1px); }
.section--ink .btn-ghost { border-color: var(--line-ink); color: var(--on-ink); }
.section--ink .btn-ghost:hover { border-color: var(--lilac); background: rgba(255, 255, 255, .06); }

.btn-arrow::after {
  content: "";
  width: 16px; height: 8px;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='8'%3E%3Cpath d='M0 4h14M10.5 .5 14.5 4l-4 3.5' fill='none' stroke='%23000' stroke-width='1.6'/%3E%3C/svg%3E") no-repeat center;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='8'%3E%3Cpath d='M0 4h14M10.5 .5 14.5 4l-4 3.5' fill='none' stroke='%23000' stroke-width='1.6'/%3E%3C/svg%3E") no-repeat center;
  transition: transform .2s var(--ease);
}
.btn-arrow:hover::after { transform: translateX(3px); }

/* ---------- header ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--nav-h);
  background: var(--bg);
  border-bottom: 1px solid transparent;
  transition: border-color .25s var(--ease), box-shadow .25s var(--ease);
}
.nav.is-stuck {
  border-bottom-color: var(--line);
  box-shadow: 0 10px 30px -22px rgba(var(--scrim), .6);
}
.nav-inner {
  height: 100%;
  padding: 0 var(--pad-x);
  display: flex;
  align-items: center;
  gap: clamp(16px, 3vw, 44px);
}
.brand { display: flex; align-items: center; margin-right: auto; }
/* логотип — готовый горизонтальный лок-ап из brand-kit (текст в кривых),
   размер задаём высотой, ширина едет за пропорцией 1100:272 */
.brand-logo { width: auto; height: clamp(32px, 2.9vw, 42px); max-width: none; flex: none; }

.nav-links { display: flex; align-items: center; gap: clamp(14px, 1.9vw, 30px); }
.nav-links a {
  position: relative;
  font-size: var(--t-small);
  font-weight: 500;
  color: var(--text-dim);
  padding: 6px 0;
  transition: color .18s var(--ease);
}
.nav-links a::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 100%; height: 1px;
  background: var(--ember);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .22s var(--ease);
}
.nav-links a:hover { color: var(--text); }
.nav-links a:hover::after { transform: scaleX(1); }

.nav-cta { padding: 11px 20px; }

.burger {
  display: none;
  width: 42px; height: 42px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: transparent;
  cursor: pointer;
}
.burger span {
  display: block;
  width: 18px; height: 1.5px;
  margin: 3.5px auto;
  background: var(--text);
  transition: transform .22s var(--ease), opacity .18s var(--ease);
}
.burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(5px) rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-5px) rotate(-45deg); }

/* ---------- hero ---------- */
/* Первый экран без правой панели: заголовок на всю ширину, под ним подвал из
   двух колонок лида и колонки кнопок. Строки Mandate / Horizon / Domicile тут
   больше нет — она дублировала полосу фактов, которая идёт сразу следом. */
.hero {
  padding: clamp(44px, 6vw, 96px) var(--pad-x) clamp(48px, 6vw, 92px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: clamp(20px, 2.4vw, 34px);
  min-height: clamp(460px, calc(100svh - var(--nav-h)), 720px);
}

.hero-foot {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(190px, 250px);
  gap: clamp(20px, 3vw, 52px);
  align-items: start;
  margin-top: clamp(8px, 1.4vw, 20px);
  padding-top: clamp(22px, 2.6vw, 36px);
  border-top: 1px solid var(--line);
}
.hero-actions { display: flex; flex-direction: column; gap: 10px; }
.hero-actions .btn { justify-content: center; }

/* ---------- stats strip ---------- */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--line);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.stat {
  background: var(--bg);
  padding: clamp(24px, 3.2vw, 44px) clamp(18px, 2.4vw, 36px);
}
.stat b {
  display: block;
  font-family: var(--f-display);
  font-size: var(--t-stat);
  font-weight: 500;
  line-height: 1;
  letter-spacing: -.03em;
  color: var(--ink);
}
.stat span {
  display: block;
  margin-top: 10px;
  font-size: var(--t-small);
  line-height: 1.45;
  color: var(--text-dim);
  max-width: 22ch;
}
.stat:first-child b { color: var(--violet); }
.stat:nth-child(2) b { color: var(--ember); }

/* ---------- sections ---------- */
.section { padding: var(--section-py) var(--pad-x); }
.section--alt { background: var(--bg-2); }
.section--ink { background: var(--ink); color: var(--on-ink); }

.sec-head { max-width: 62ch; display: flex; flex-direction: column; gap: 18px; }
.sec-head h2 { max-width: 17ch; }

/* ---------- mandate cards ---------- */
.cards {
  margin-top: clamp(40px, 5vw, 70px);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(14px, 1.6vw, 22px);
}
.card {
  position: relative;
  padding: clamp(24px, 2.4vw, 34px);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r);
  transition: transform .25s var(--ease), border-color .25s var(--ease), box-shadow .25s var(--ease);
}
.card:hover {
  transform: translateY(-4px);
  border-color: var(--violet);
  box-shadow: 0 24px 44px -32px rgba(var(--scrim), .75);
}
.card-num {
  position: absolute;
  top: clamp(24px, 2.4vw, 34px);
  right: clamp(24px, 2.4vw, 34px);
  font-family: var(--f-mono);
  font-size: var(--t-label);
  letter-spacing: .12em;
  color: var(--text-dim);
  opacity: .65;
}
.ico { width: 32px; height: 32px; color: var(--violet); margin-bottom: 20px; }
.card h3 { margin-bottom: 10px; }
.card p { color: var(--text-dim); font-size: var(--t-small); line-height: 1.6; }

/* ---------- sectors ---------- */
.sectors {
  margin-top: clamp(40px, 5vw, 70px);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--r);
  overflow: hidden;
}
.sector {
  background: var(--bg);
  padding: clamp(26px, 3vw, 40px);
  transition: background-color .25s var(--ease);
}
.sector:hover { background: var(--paper); }
.s-tag {
  display: inline-block;
  font-family: var(--f-mono);
  font-size: var(--t-label);
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--text-dim);
  padding: 4px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  margin-bottom: 18px;
}
.sector--core .s-tag { color: var(--violet); border-color: var(--violet); }
.sector h3 { margin-bottom: 8px; }
.sector--core h3 { position: relative; padding-left: 16px; }
.sector--core h3::before {
  content: "";
  position: absolute;
  left: 0; top: .55em;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--ember);
}
.sector p { color: var(--text-dim); font-size: var(--t-small); line-height: 1.6; }

/* ---------- approach steps ---------- */
.steps {
  margin-top: clamp(40px, 5vw, 70px);
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: clamp(14px, 1.6vw, 24px);
  counter-reset: step;
}
.steps li {
  position: relative;
  padding-top: 26px;
  border-top: 2px solid var(--ink);
}
.steps li:nth-child(4) { border-top-color: var(--ember); }
.step-n {
  display: block;
  font-family: var(--f-mono);
  font-size: var(--t-label);
  letter-spacing: .18em;
  color: var(--violet);
  margin-bottom: 12px;
}
.steps li:nth-child(4) .step-n { color: var(--ember); }
.steps h3 { margin-bottom: 10px; }
.steps p { color: var(--text-dim); font-size: var(--t-small); line-height: 1.6; }

/* ---------- governance ---------- */
.gov {
  margin-top: clamp(40px, 5vw, 70px);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(16px, 2vw, 30px);
}
.gov-item .ico { color: var(--ember); }
.gov-item h3 { margin-bottom: 10px; }
.gov-item p { color: var(--text-dim); font-size: var(--t-small); line-height: 1.6; }

/* ---------- contact ---------- */
.contact-wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: clamp(36px, 5vw, 80px);
  align-items: start;
}
.contact-intro { display: flex; flex-direction: column; gap: 18px; }

.contact-list {
  margin-top: clamp(12px, 2vw, 22px);
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.contact-list li { padding-top: 16px; border-top: 1px solid var(--line-ink); }
.contact-list span {
  display: block;
  font-family: var(--f-mono);
  font-size: var(--t-label);
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--lilac);
  margin-bottom: 6px;
}
.contact-list a, .contact-list address { font-size: var(--t-lead); line-height: 1.5; color: var(--on-ink); }
.contact-list a { border-bottom: 1px solid rgba(255, 255, 255, .22); transition: border-color .2s var(--ease); }
.contact-list a:hover { border-bottom-color: var(--ember-hi); }

.contact-form-wrap {
  background: rgba(255, 255, 255, .04);
  border: 1px solid var(--line-ink);
  border-radius: var(--r);
  padding: clamp(24px, 3vw, 40px);
}
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.form-field { display: flex; flex-direction: column; gap: 8px; }
.form-field.full { grid-column: 1 / -1; }
.form-field label {
  font-family: var(--f-mono);
  font-size: var(--t-label);
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--on-ink-dim);
}
.form-field input,
.form-field textarea {
  width: 100%;
  padding: 13px 15px;
  font-family: var(--f-sans);
  font-size: var(--t-small);
  color: var(--on-ink);
  background: rgba(255, 255, 255, .05);
  border: 1px solid var(--line-ink);
  border-radius: var(--r-sm);
  transition: border-color .2s var(--ease), background-color .2s var(--ease);
}
.form-field textarea { resize: vertical; min-height: 130px; line-height: 1.6; }
.form-field input::placeholder,
.form-field textarea::placeholder { color: rgba(183, 171, 196, .7); }
.form-field input:hover,
.form-field textarea:hover { border-color: rgba(255, 255, 255, .26); }
.form-field input:focus,
.form-field textarea:focus {
  outline: none;
  border-color: var(--lilac);
  background: rgba(255, 255, 255, .09);
}

.cf-turnstile { margin: 22px 0 18px; min-height: 65px; }
.form-submit { width: 100%; justify-content: center; }
.form-submit[disabled] { opacity: .6; cursor: progress; }

.form-success {
  margin-top: 18px;
  padding: 14px 16px;
  border-radius: var(--r-sm);
  border: 1px solid var(--ember);
  background: rgba(226, 84, 43, .14);
  color: var(--on-ink);
  font-size: var(--t-small);
}
/* success is not signalled by colour alone — a tick is prepended */
.form-success::before { content: "\2713  "; font-weight: 700; color: var(--ember-hi); }

.form-note {
  margin-top: 16px;
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--on-ink-dim);
}

/* ---------- footer ---------- */
.footer { background: var(--ink); color: var(--on-ink); padding: 0 var(--pad-x) clamp(28px, 3vw, 44px); }
.footer-top {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(28px, 4vw, 60px);
  padding: clamp(40px, 5vw, 70px) 0 clamp(32px, 4vw, 48px);
  border-top: 1px solid var(--line-ink);
}
.footer-brand { display: flex; flex-direction: column; gap: 16px; align-items: flex-start; }
.footer-brand .brand-logo { height: clamp(38px, 3.2vw, 46px); }
/* глобальный img{max-width:100%} при заданной высоте сплющивал бы лок-ап по ширине,
   не трогая высоту, — поэтому у логотипа ограничение ширины снято */
.footer-brand p { font-size: var(--t-small); line-height: 1.5; color: var(--on-ink-dim); max-width: 30ch; }

.footer-nav { display: flex; flex-direction: column; gap: 10px; font-size: var(--t-small); }
.footer-nav a { color: var(--on-ink-dim); transition: color .18s var(--ease); }
.footer-nav a:hover { color: var(--ember-hi); }

.footer-contact { display: flex; flex-direction: column; gap: 10px; font-size: var(--t-small); color: var(--on-ink-dim); }
.footer-contact a { color: var(--on-ink); transition: color .18s var(--ease); }
.footer-contact a:hover { color: var(--ember-hi); }

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  gap: 12px clamp(24px, 4vw, 60px);
  padding-top: clamp(20px, 2.5vw, 30px);
  border-top: 1px solid var(--line-ink);
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--on-ink-dim);
}
.footer-bottom .disclaimer { flex: 1 1 460px; max-width: 78ch; opacity: .8; }

/* ---------- scroll reveal ---------- */
.reveal, .reveal-stagger > * {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity .7s var(--ease), transform .7s var(--ease);
}
.reveal.in, .reveal-stagger.in > * { opacity: 1; transform: none; }
.reveal-stagger.in > *:nth-child(1) { transition-delay: 0ms; }
.reveal-stagger.in > *:nth-child(2) { transition-delay: 70ms; }
.reveal-stagger.in > *:nth-child(3) { transition-delay: 140ms; }
.reveal-stagger.in > *:nth-child(4) { transition-delay: 210ms; }
.reveal-stagger.in > *:nth-child(5) { transition-delay: 280ms; }
.reveal-stagger.in > *:nth-child(6) { transition-delay: 350ms; }

/* ==========================================================================
   Tablet — one-column grids, softer spacing
   ========================================================================== */
@media (max-width: 1100px) {
  .hero { min-height: 0; }
  .hero-foot { grid-template-columns: 1fr; gap: 20px; }
  .hero-actions { flex-direction: row; flex-wrap: wrap; gap: 12px; }

  .cards { grid-template-columns: repeat(2, 1fr); }
  .sectors { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); gap: clamp(20px, 3vw, 30px); }
  .gov { grid-template-columns: repeat(2, 1fr); }
  .contact-wrap { grid-template-columns: 1fr; }
  .footer-top { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}

/* ==========================================================================
   Mobile — burger menu, stacked columns
   ========================================================================== */
@media (max-width: 760px) {
  :root { --nav-h: 64px; }

  .nav-cta { display: none; }
  .burger { display: block; }

  .nav-links {
    position: absolute;
    top: var(--nav-h);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px var(--pad-x) 20px;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 24px 40px -30px rgba(var(--scrim), .7);
    display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 16px; color: var(--text); }
  .nav-links a::after { display: none; }

  .hero-actions .btn { flex: 1 1 100%; }

  .stats { grid-template-columns: repeat(2, 1fr); }

  .cards { grid-template-columns: 1fr; }
  .sectors { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .gov { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .footer-top { grid-template-columns: 1fr; }
}

@media (max-width: 400px) {
  .stats { grid-template-columns: 1fr; }
}

/* ==========================================================================
   Reduced motion — no transforms, no reveal, no running dashes
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal, .reveal-stagger > * { opacity: 1 !important; transform: none !important; transition: none !important; }
  .btn, .card, .btn-arrow::after, .nav-links a::after { transition: none !important; }
  .btn:hover, .btn:active, .card:hover { transform: none !important; }
}
