/* =========================================================
   QUANTROL — Design System
   Editorial-engineering minimalism, light cream scheme
   ========================================================= */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,300;9..144,400;9..144,500;9..144,600&family=Inter+Tight:wght@300;400;500;600&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  /* — Palette — */
  --cream:        #F4F1EA;   /* page background */
  --cream-deep:   #ECE7DC;   /* surfaces, hover */
  --paper:        #FBF9F4;   /* card surfaces */
  --ink:          #131311;   /* primary text */
  --ink-soft:     #2A2A26;   /* secondary text */
  --muted:        #6B6A63;   /* meta, captions */
  --line:         #D9D3C4;   /* hairlines */
  --line-soft:    #E5E0D2;
  --ochre:        #B8662B;   /* accent — warm */
  --moss:         #4A5938;   /* accent — cool */
  --ochre-soft:   #E8D8C2;

  /* — Typography — */
  --font-serif:   'Fraunces', 'Times New Roman', serif;
  --font-sans:    'Inter Tight', system-ui, sans-serif;
  --font-mono:    'JetBrains Mono', ui-monospace, monospace;

  /* — Layout — */
  --max:          1320px;
  --gutter:       clamp(20px, 4vw, 56px);

  /* — Motion — */
  --ease:         cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* — Reset — */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
body {
  font-family: var(--font-sans);
  font-weight: 400;
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--cream);
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
input, textarea, select { font: inherit; color: inherit; }

/* — Typography Scale — */
.display {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: clamp(48px, 9vw, 132px);
  line-height: 0.92;
  letter-spacing: -0.04em;
  font-variation-settings: "opsz" 144;
}
.display em {
  font-style: italic;
  font-weight: 300;
  color: var(--ochre);
}
h1, .h1 {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: clamp(40px, 6vw, 84px);
  line-height: 0.98;
  letter-spacing: -0.03em;
}
h2, .h2 {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: clamp(32px, 4.5vw, 56px);
  line-height: 1.05;
  letter-spacing: -0.025em;
}
h3, .h3 {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: clamp(24px, 2.8vw, 34px);
  line-height: 1.15;
  letter-spacing: -0.015em;
}
h4, .h4 {
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: 18px;
  letter-spacing: -0.005em;
}
.lead {
  font-family: var(--font-sans);
  font-weight: 400;
  font-size: clamp(18px, 1.6vw, 22px);
  line-height: 1.5;
  color: var(--ink-soft);
  letter-spacing: -0.005em;
}
.eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--muted);
}
.serif-italic { font-family: var(--font-serif); font-style: italic; font-weight: 300; }
.mono { font-family: var(--font-mono); font-size: 0.875em; }

/* — Layout primitives — */
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.section { padding: clamp(80px, 12vw, 160px) 0; }
.section-tight { padding: clamp(60px, 8vw, 100px) 0; }
.grid { display: grid; gap: clamp(24px, 3vw, 48px); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-12 { grid-template-columns: repeat(12, 1fr); }
@media (max-width: 900px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .grid-12 { grid-template-columns: repeat(6, 1fr); }
}

/* — Hairlines & dividers — */
.rule { height: 1px; background: var(--line); width: 100%; }
.rule-soft { height: 1px; background: var(--line-soft); width: 100%; }

/* =========================================================
   NAV
   ========================================================= */
.nav {
  position: fixed; top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 18px var(--gutter);
  background: rgba(244, 241, 234, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s var(--ease);
}
.nav.scrolled { border-bottom-color: var(--line-soft); }
.nav-inner {
  max-width: var(--max);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand {
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 500;
  letter-spacing: -0.01em;
  display: flex;
  align-items: baseline;
  gap: 6px;
}
.brand-mark {
  display: inline-block;
  width: 7px; height: 7px;
  background: var(--ochre);
  border-radius: 50%;
  margin-right: 4px;
  transform: translateY(-2px);
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
}
.nav-links a {
  font-size: 14px;
  color: var(--ink-soft);
  font-weight: 400;
  position: relative;
  transition: color 0.25s var(--ease);
}
.nav-links a:hover { color: var(--ochre); }
.nav-links a.active { color: var(--ink); }
.nav-links a.active::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -6px;
  height: 1px;
  background: var(--ochre);
}
.nav-cta {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 20px;
  background: var(--ochre);
  color: #FFFFFF;
  border-radius: 100px;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.01em;
  box-shadow: 0 1px 0 rgba(0,0,0,0.04), 0 4px 14px -6px rgba(184, 102, 43, 0.45);
  transition: background 0.25s var(--ease), transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.nav-cta:hover {
  background: var(--ink);
  color: var(--cream);
  transform: translateY(-1px);
  box-shadow: 0 1px 0 rgba(0,0,0,0.04), 0 6px 18px -6px rgba(19, 19, 17, 0.4);
}
.nav-cta.active { color: #FFFFFF; }
.nav-cta.active::after { display: none; }
.nav-toggle { display: none; width: 28px; height: 22px; position: relative; }
.nav-toggle span {
  position: absolute; left: 0; right: 0; height: 1.5px;
  background: var(--ink);
  transition: transform 0.3s var(--ease), opacity 0.3s var(--ease);
}
.nav-toggle span:nth-child(1) { top: 4px; }
.nav-toggle span:nth-child(2) { top: 50%; transform: translateY(-50%); }
.nav-toggle span:nth-child(3) { bottom: 4px; }
.nav.open .nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav.open .nav-toggle span:nth-child(2) { opacity: 0; }
.nav.open .nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 800px) {
  .nav-toggle { display: block; }
  .nav-links {
    position: fixed;
    top: 64px; left: 0; right: 0; bottom: 0;
    flex-direction: column;
    align-items: flex-start;
    padding: 40px var(--gutter);
    background: var(--cream);
    gap: 24px;
    transform: translateX(100%);
    transition: transform 0.4s var(--ease);
  }
  .nav.open .nav-links { transform: translateX(0); }
  .nav-links a { font-size: 24px; font-family: var(--font-serif); }
  .nav-cta { font-size: 16px; padding: 14px 24px; }
}

/* =========================================================
   BUTTONS
   ========================================================= */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 16px 28px;
  border-radius: 100px;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.005em;
  transition: all 0.3s var(--ease);
  cursor: pointer;
  white-space: nowrap;
}
.btn-primary { background: var(--ink); color: var(--cream); }
.btn-primary:hover { background: var(--ochre); transform: translateY(-2px); }
.btn-ghost { background: transparent; color: var(--ink); border: 1px solid var(--line); }
.btn-ghost:hover { background: var(--ink); color: var(--cream); border-color: var(--ink); }
.btn-arrow { transition: transform 0.3s var(--ease); }
.btn:hover .btn-arrow { transform: translateX(4px); }

/* =========================================================
   FOOTER
   ========================================================= */
.footer {
  padding: 100px var(--gutter) 40px;
  background: var(--ink);
  color: var(--cream);
  position: relative;
}
.footer-inner { max-width: var(--max); margin: 0 auto; }
.footer-top {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr 1fr;
  gap: 48px;
  padding-bottom: 80px;
  border-bottom: 1px solid rgba(244, 241, 234, 0.12);
}
@media (max-width: 1000px) {
  .footer-top { grid-template-columns: 2fr 1fr 1fr; gap: 40px; }
}
@media (max-width: 800px) {
  .footer-top { grid-template-columns: 1fr 1fr; gap: 40px; }
}
.footer-tag {
  font-family: var(--font-serif);
  font-size: clamp(28px, 3.5vw, 42px);
  line-height: 1.05;
  letter-spacing: -0.02em;
  max-width: 380px;
}
.footer-tag em { font-style: italic; color: var(--ochre-soft); font-weight: 300; }
.footer-col h5 {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: rgba(244, 241, 234, 0.5);
  margin-bottom: 18px;
}
.footer-col a {
  display: block;
  font-size: 14px;
  color: rgba(244, 241, 234, 0.8);
  margin-bottom: 10px;
  transition: color 0.25s var(--ease);
}
.footer-col a:hover { color: var(--ochre-soft); }
.footer-bot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 32px;
  font-size: 12px;
  color: rgba(244, 241, 234, 0.5);
  font-family: var(--font-mono);
  letter-spacing: 0.04em;
}
@media (max-width: 600px) {
  .footer-bot { flex-direction: column; gap: 16px; text-align: center; }
}

/* =========================================================
   ANIMATIONS — entrance reveals
   ========================================================= */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.9s var(--ease), transform 0.9s var(--ease); }
.reveal.in { opacity: 1; transform: translateY(0); }
.reveal[data-delay="1"] { transition-delay: 0.08s; }
.reveal[data-delay="2"] { transition-delay: 0.16s; }
.reveal[data-delay="3"] { transition-delay: 0.24s; }
.reveal[data-delay="4"] { transition-delay: 0.32s; }
.reveal[data-delay="5"] { transition-delay: 0.40s; }
.reveal[data-delay="6"] { transition-delay: 0.48s; }

/* =========================================================
   HOMEPAGE — Hero
   ========================================================= */
.hero {
  padding: 180px var(--gutter) 100px;
  position: relative;
  overflow: hidden;
}
.hero-inner { max-width: var(--max); margin: 0 auto; position: relative; z-index: 2; }
.hero-meta {
  display: flex; gap: 24px; align-items: center;
  margin-bottom: 56px;
  flex-wrap: wrap;
}
.hero-meta-dot {
  display: inline-block;
  width: 6px; height: 6px;
  background: var(--moss);
  border-radius: 50%;
  animation: pulse 2.4s var(--ease) infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(1.4); }
}
.hero-title {
  margin-bottom: 48px;
  max-width: 16ch;
}
.hero-foot {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 60px;
  align-items: end;
  padding-top: 48px;
  border-top: 1px solid var(--line);
}
@media (max-width: 800px) {
  .hero-foot { grid-template-columns: 1fr; gap: 32px; }
}
.hero-desc { max-width: 540px; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }

/* — Hero ornament — */
.hero-mark {
  position: absolute;
  top: 50%; right: -10%;
  width: 60vw;
  max-width: 880px;
  opacity: 0.07;
  transform: translateY(-50%);
  pointer-events: none;
  z-index: 1;
}

/* =========================================================
   HOMEPAGE — Services preview
   ========================================================= */
.svc-list { border-top: 1px solid var(--line); }
.svc-row {
  display: grid;
  grid-template-columns: 80px 1fr 2fr auto;
  gap: 32px;
  padding: 36px 0;
  border-bottom: 1px solid var(--line);
  align-items: baseline;
  transition: padding 0.4s var(--ease);
  position: relative;
}
.svc-row::before {
  content: "";
  position: absolute;
  top: 0; left: 0;
  width: 0; height: 100%;
  background: linear-gradient(90deg, var(--cream-deep) 0%, transparent 100%);
  transition: width 0.5s var(--ease);
  z-index: -1;
}
.svc-row:hover::before { width: 100%; }
.svc-row:hover { padding-left: 24px; }
.svc-num { font-family: var(--font-mono); font-size: 13px; color: var(--muted); }
.svc-title { font-family: var(--font-serif); font-size: clamp(24px, 3vw, 38px); letter-spacing: -0.02em; line-height: 1.1; }
.svc-desc { color: var(--muted); font-size: 15px; line-height: 1.55; max-width: 460px; }
.svc-arrow { color: var(--ink); transition: transform 0.4s var(--ease); }
.svc-row:hover .svc-arrow { transform: translateX(6px); color: var(--ochre); }
@media (max-width: 800px) {
  .svc-row { grid-template-columns: 50px 1fr; row-gap: 12px; }
  .svc-desc, .svc-arrow { grid-column: 1 / -1; }
  .svc-arrow { justify-self: end; margin-top: 8px; }
}

/* =========================================================
   HOMEPAGE — Manifesto / quote section
   ========================================================= */
.manifesto {
  padding: clamp(100px, 14vw, 200px) 0;
  background: var(--paper);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.manifesto-quote {
  font-family: var(--font-serif);
  font-weight: 300;
  font-style: italic;
  font-size: clamp(28px, 4.2vw, 56px);
  line-height: 1.15;
  letter-spacing: -0.02em;
  max-width: 18ch;
  margin-bottom: 48px;
}
.manifesto-quote span { color: var(--ochre); font-style: italic; }

/* =========================================================
   HOMEPAGE — Cases preview cards
   ========================================================= */
.case-card {
  display: block;
  border-top: 1px solid var(--line);
  padding: 40px 0;
  transition: padding 0.4s var(--ease);
}
.case-card:hover { padding-left: 20px; padding-right: 20px; background: var(--cream-deep); }
.case-card:last-child { border-bottom: 1px solid var(--line); }
.case-card-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 24px;
  gap: 24px;
  flex-wrap: wrap;
}
.case-card-title { font-family: var(--font-serif); font-size: clamp(28px, 3.5vw, 44px); letter-spacing: -0.02em; line-height: 1.05; }
.case-card-tag {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}
.case-card-metrics { display: flex; gap: clamp(24px, 4vw, 64px); flex-wrap: wrap; }
.case-metric { display: flex; flex-direction: column; gap: 4px; }
.case-metric-value {
  font-family: var(--font-serif);
  font-size: clamp(28px, 3.5vw, 44px);
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.case-metric-value em { font-style: italic; color: var(--ochre); font-weight: 300; }
.case-metric-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

/* =========================================================
   SERVICES PAGE — sticky-style sections
   ========================================================= */
.svc-detail {
  padding: 100px 0;
  border-bottom: 1px solid var(--line);
}
.svc-detail-inner {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: clamp(40px, 6vw, 100px);
  align-items: start;
}
@media (max-width: 900px) { .svc-detail-inner { grid-template-columns: 1fr; } }
.svc-detail-num {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.14em;
  margin-bottom: 24px;
}
.svc-detail-title {
  font-family: var(--font-serif);
  font-size: clamp(36px, 5vw, 64px);
  line-height: 1;
  letter-spacing: -0.025em;
  margin-bottom: 24px;
}
.svc-detail-sub {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 300;
  font-size: clamp(18px, 1.8vw, 22px);
  color: var(--ochre);
  margin-bottom: 24px;
}
.svc-features { margin-top: 32px; }
.svc-feature {
  padding: 24px 0;
  border-top: 1px solid var(--line-soft);
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 16px;
}
.svc-feature:last-child { border-bottom: 1px solid var(--line-soft); }
.svc-feature-icon {
  width: 8px; height: 8px;
  border: 1px solid var(--ochre);
  margin-top: 8px;
  transform: rotate(45deg);
}
.svc-feature h4 { margin-bottom: 6px; }
.svc-feature p { font-size: 14px; color: var(--muted); }

/* =========================================================
   CASES PAGE
   ========================================================= */
.case-detail {
  padding: 80px 0;
  border-bottom: 1px solid var(--line);
}
.case-hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: end;
  margin-bottom: 60px;
}
@media (max-width: 900px) { .case-hero { grid-template-columns: 1fr; } }
.case-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px;
  padding: 40px;
  background: var(--paper);
  border: 1px solid var(--line);
}
.case-stat-value {
  font-family: var(--font-serif);
  font-size: clamp(40px, 5vw, 64px);
  line-height: 0.95;
  letter-spacing: -0.025em;
  margin-bottom: 6px;
}
.case-stat-value em { font-style: italic; color: var(--ochre); font-weight: 300; }
.case-stat-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

/* =========================================================
   ABOUT PAGE
   ========================================================= */
.about-block {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: clamp(40px, 6vw, 100px);
  padding: 80px 0;
  border-top: 1px solid var(--line);
}
@media (max-width: 800px) { .about-block { grid-template-columns: 1fr; } }
.about-block:last-child { border-bottom: 1px solid var(--line); }
.about-prose p { font-size: 18px; color: var(--ink-soft); margin-bottom: 18px; line-height: 1.6; max-width: 60ch; }
.about-prose p em { font-style: italic; font-family: var(--font-serif); font-weight: 300; color: var(--ochre); font-size: 1.05em; }

.principle-list { counter-reset: principle; }
.principle {
  padding: 32px 0;
  border-top: 1px solid var(--line-soft);
  display: grid;
  grid-template-columns: 60px 1fr;
  gap: 24px;
}
.principle::before {
  counter-increment: principle;
  content: "0" counter(principle);
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--ochre);
  letter-spacing: 0.1em;
  padding-top: 6px;
}
.principle h3 { font-size: 24px; margin-bottom: 8px; }
.principle p { color: var(--muted); max-width: 56ch; }

/* =========================================================
   CONTACT / FORM PAGE
   ========================================================= */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(40px, 6vw, 100px);
  padding-top: 60px;
}
@media (max-width: 900px) { .contact-grid { grid-template-columns: 1fr; } }
.contact-info-block { padding: 32px 0; border-top: 1px solid var(--line); }
.contact-info-block:last-child { border-bottom: 1px solid var(--line); }
.contact-info-label {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--muted);
  margin-bottom: 12px;
}
.contact-info-value {
  font-family: var(--font-serif);
  font-size: clamp(22px, 2.4vw, 30px);
  letter-spacing: -0.015em;
  line-height: 1.2;
}
.contact-info-value a { transition: color 0.25s var(--ease); }
.contact-info-value a:hover { color: var(--ochre); }

/* — Form — */
.form { display: grid; gap: 28px; }
.field { display: flex; flex-direction: column; gap: 8px; }
.field label {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--muted);
}
.field input,
.field textarea,
.field select {
  appearance: none;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--line);
  padding: 12px 0 14px;
  font-family: var(--font-serif);
  font-size: 20px;
  letter-spacing: -0.01em;
  color: var(--ink);
  transition: border-color 0.25s var(--ease);
  border-radius: 0;
  width: 100%;
}
.field input:focus,
.field textarea:focus,
.field select:focus {
  outline: none;
  border-bottom-color: var(--ochre);
}
.field textarea { resize: vertical; min-height: 110px; font-family: var(--font-sans); font-size: 16px; line-height: 1.55; }
.field select { background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'><path d='M1 1l5 5 5-5' stroke='%23131311' stroke-width='1.2' fill='none'/></svg>"); background-repeat: no-repeat; background-position: right 4px center; padding-right: 24px; }

.chip-group { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.chip {
  padding: 10px 16px;
  border: 1px solid var(--line);
  border-radius: 100px;
  background: transparent;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.25s var(--ease);
  color: var(--ink-soft);
}
.chip:hover { border-color: var(--ink); }
.chip.active { background: var(--ink); color: var(--cream); border-color: var(--ink); }

.form-submit { margin-top: 16px; }
.form-success {
  padding: 32px;
  background: var(--paper);
  border: 1px solid var(--moss);
  font-family: var(--font-serif);
  font-size: 22px;
  line-height: 1.4;
  display: none;
}
.form-success.show { display: block; }

/* =========================================================
   PAGE HEAD (sub-pages)
   ========================================================= */
.page-head {
  padding: 180px var(--gutter) 80px;
  border-bottom: 1px solid var(--line);
}
.page-head-inner { max-width: var(--max); margin: 0 auto; }
.page-head-eyebrow { margin-bottom: 32px; }
.page-head-title { max-width: 16ch; margin-bottom: 32px; }
.page-head-lead { max-width: 580px; }

/* =========================================================
   UTILS
   ========================================================= */
.text-ochre { color: var(--ochre); }
.text-muted { color: var(--muted); }
.italic { font-style: italic; }
.serif { font-family: var(--font-serif); }
.mt-1 { margin-top: 8px; } .mt-2 { margin-top: 16px; } .mt-3 { margin-top: 24px; } .mt-4 { margin-top: 32px; } .mt-6 { margin-top: 48px; }
.mb-1 { margin-bottom: 8px; } .mb-2 { margin-bottom: 16px; } .mb-3 { margin-bottom: 24px; } .mb-4 { margin-bottom: 32px; } .mb-6 { margin-bottom: 48px; }

/* =========================================================
   LEGAL PAGES
   ========================================================= */
.legal-page { padding: 140px var(--gutter) 80px; max-width: 920px; margin: 0 auto; }
.legal-head { padding-bottom: 32px; border-bottom: 1px solid var(--line); margin-bottom: 48px; }
.legal-title {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: clamp(36px, 5vw, 60px);
  line-height: 1;
  letter-spacing: -0.025em;
  margin: 18px 0 12px;
}
.legal-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin-top: 24px;
}
.lang-switch { display: flex; gap: 2px; }
.lang-switch button {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 8px 14px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: all 0.2s var(--ease);
}
.lang-switch button:first-child { border-radius: 4px 0 0 4px; }
.lang-switch button:last-child { border-radius: 0 4px 4px 0; }
.lang-switch button + button { border-left: none; }
.lang-switch button.active { background: var(--ink); color: var(--cream); border-color: var(--ink); }
.lang-switch button:hover:not(.active) { color: var(--ink); }

.legal-content { font-size: 16px; line-height: 1.65; color: var(--ink-soft); }
.legal-content > div { display: none; }
.legal-content > div.active { display: block; }
.legal-content h2 {
  font-family: var(--font-serif);
  font-size: clamp(22px, 2.4vw, 28px);
  font-weight: 500;
  color: var(--ink);
  letter-spacing: -0.01em;
  margin: 48px 0 16px;
  padding-top: 12px;
}
.legal-content h2:first-child { margin-top: 0; padding-top: 0; }
.legal-content h3 {
  font-family: var(--font-sans);
  font-size: 17px;
  font-weight: 600;
  color: var(--ink);
  margin: 28px 0 10px;
}
.legal-content p { margin-bottom: 14px; }
.legal-content ul { margin: 8px 0 18px 0; padding-left: 0; }
.legal-content ul li {
  position: relative;
  padding-left: 22px;
  margin-bottom: 8px;
  list-style: none;
}
.legal-content ul li::before {
  content: "—";
  position: absolute;
  left: 0;
  color: var(--ochre);
}
.legal-content a { color: var(--ochre); border-bottom: 1px solid var(--ochre); transition: opacity 0.2s; }
.legal-content a:hover { opacity: 0.7; }
.legal-content strong { color: var(--ink); font-weight: 600; }
.legal-content em { font-style: italic; color: var(--ink); }
.legal-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0 24px;
  font-size: 14px;
}
.legal-content th, .legal-content td {
  padding: 12px 14px;
  text-align: left;
  border: 1px solid var(--line);
  vertical-align: top;
}
.legal-content th {
  background: var(--paper);
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  font-weight: 500;
}
.legal-callout {
  padding: 20px 24px;
  background: var(--paper);
  border-left: 3px solid var(--ochre);
  margin: 24px 0;
  font-size: 15px;
}
.legal-toc {
  padding: 24px;
  background: var(--paper);
  border: 1px solid var(--line);
  margin-bottom: 40px;
}
.legal-toc-title {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--muted);
  margin-bottom: 12px;
}
.legal-toc ol { padding-left: 20px; counter-reset: toc; list-style: decimal-leading-zero; }
.legal-toc ol li { padding: 4px 0; font-size: 14px; }
.legal-toc ol li::marker { color: var(--muted); font-family: var(--font-mono); font-size: 11px; }
.legal-toc a { color: var(--ink-soft); border-bottom: none; }
.legal-toc a:hover { color: var(--ochre); }

/* =========================================================
   COOKIE BANNER
   ========================================================= */
.cookie-banner {
  position: fixed;
  bottom: 24px;
  left: 24px;
  right: 24px;
  max-width: 540px;
  margin-left: auto;
  z-index: 200;
  padding: 22px 26px;
  background: var(--ink);
  color: var(--cream);
  border-radius: 14px;
  box-shadow: 0 18px 40px -10px rgba(0,0,0,0.25);
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s var(--ease), transform 0.5s var(--ease);
  pointer-events: none;
}
.cookie-banner.show { opacity: 1; transform: translateY(0); pointer-events: auto; }
.cookie-banner p { font-size: 13.5px; line-height: 1.5; margin-bottom: 14px; color: rgba(244, 241, 234, 0.88); }
.cookie-banner p a { color: var(--ochre-soft); border-bottom: 1px solid rgba(232, 216, 194, 0.4); }
.cookie-banner-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.cookie-banner-btn {
  padding: 9px 18px;
  border-radius: 100px;
  font-size: 12.5px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.25s var(--ease);
  font-family: var(--font-sans);
  letter-spacing: 0.01em;
}
.cookie-banner-btn.primary { background: var(--ochre); color: #FFFFFF; border: none; }
.cookie-banner-btn.primary:hover { background: var(--cream); color: var(--ink); }
.cookie-banner-btn.ghost { background: transparent; color: var(--cream); border: 1px solid rgba(244, 241, 234, 0.25); }
.cookie-banner-btn.ghost:hover { border-color: var(--cream); }
@media (max-width: 600px) {
  .cookie-banner { left: 12px; right: 12px; bottom: 12px; padding: 18px 20px; }
}

/* =========================================================
   GLOBAL LANGUAGE SWITCHER (in nav)
   ========================================================= */
.nav-lang {
  display: inline-flex;
  align-items: center;
  gap: 1px;
  margin-right: 4px;
}
.nav-lang button {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 6px 8px;
  background: transparent;
  border: none;
  color: var(--muted);
  cursor: pointer;
  transition: color 0.2s var(--ease);
  border-radius: 4px;
}
.nav-lang button:hover { color: var(--ink); }
.nav-lang button.active { color: var(--ink); background: var(--cream-deep); }
.nav-lang .sep {
  width: 1px;
  height: 12px;
  background: var(--line);
  display: inline-block;
}

@media (max-width: 800px) {
  .nav-lang {
    margin: 12px 0 24px;
    padding: 8px;
    background: var(--cream-deep);
    border-radius: 8px;
  }
  .nav-lang button { font-size: 13px; padding: 8px 14px; }
}

/* Translation utility: show only active language */
[data-tr] { display: none; }
[data-tr].active-lang { display: inherit; }
[data-tr][data-tr-inline] { display: inline; }
[data-tr][data-tr-inline].active-lang { display: inline; }
[data-tr].active-lang.was-block { display: block; }

/* ---- Submit button loading state ---- */
.btn .btn-text-loading { display: none; }
.btn.is-loading .btn-text { display: none; }
.btn.is-loading .btn-text-loading { display: inline; }
.btn.is-loading .btn-arrow { opacity: 0.5; }
.btn[disabled] { cursor: wait; opacity: 0.7; }

/* =========================================================
   NICHES TABS (cases page)
   ========================================================= */
.niches {
  margin-top: 40px;
}
.niches-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 60px;
  padding-bottom: 0;
}
.niche-tab {
  position: relative;
  padding: 14px 22px;
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 500;
  color: var(--muted);
  background: transparent;
  border: none;
  cursor: pointer;
  transition: color 0.2s var(--ease);
  white-space: nowrap;
}
.niche-tab:hover { color: var(--ink); }
.niche-tab::after {
  content: "";
  position: absolute;
  left: 22px; right: 22px;
  bottom: -1px;
  height: 2px;
  background: var(--ochre);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.25s var(--ease);
}
.niche-tab.active {
  color: var(--ink);
}
.niche-tab.active::after {
  transform: scaleX(1);
}

.niche-panel {
  display: none;
  animation: nicheFade 0.4s var(--ease);
}
.niche-panel.active {
  display: block;
}
@keyframes nicheFade {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.niche-head {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  margin-bottom: 60px;
  align-items: start;
}
@media (max-width: 900px) {
  .niche-head { grid-template-columns: 1fr; gap: 32px; }
}
.niche-title {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: clamp(34px, 4.5vw, 56px);
  line-height: 1.02;
  letter-spacing: -0.025em;
  margin-bottom: 18px;
}
.niche-title em {
  font-style: italic;
  color: var(--ochre);
}
.niche-sub {
  font-size: 18px;
  line-height: 1.5;
  color: var(--ink-soft);
}

.niche-metrics {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 28px 32px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-left: 3px solid var(--ochre);
}
.niche-metric-line {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line-soft);
}
.niche-metric-line:last-child { border: none; padding-bottom: 0; }
.niche-metric-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}
.niche-metric-value {
  font-family: var(--font-serif);
  font-size: 28px;
  line-height: 1;
  font-weight: 400;
  color: var(--ink);
}
.niche-metric-value em {
  font-style: italic;
  color: var(--ochre);
}

.niche-body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  padding-top: 40px;
  border-top: 1px solid var(--line);
}
@media (max-width: 900px) {
  .niche-body { grid-template-columns: 1fr; gap: 40px; }
}
.niche-section h3 {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 500;
  margin-bottom: 20px;
}
.niche-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.niche-list li {
  position: relative;
  padding: 16px 0 16px 28px;
  font-size: 16px;
  line-height: 1.5;
  color: var(--ink-soft);
  border-bottom: 1px solid var(--line-soft);
}
.niche-list li:last-child { border-bottom: none; }
.niche-list li::before {
  content: "—";
  position: absolute;
  left: 0;
  top: 16px;
  color: var(--ochre);
  font-weight: 500;
}

/* "Other" section at bottom */
.niches-other {
  margin-top: 80px;
  padding: 48px;
  background: var(--paper);
  border: 1px solid var(--line);
}
.niches-other-title {
  font-family: var(--font-serif);
  font-size: clamp(26px, 3vw, 36px);
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin-bottom: 24px;
}
.niches-other-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 32px;
  margin-top: 32px;
}
.niches-other-item h4 {
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--ink);
}
.niches-other-item p {
  font-size: 14px;
  line-height: 1.5;
  color: var(--ink-soft);
}

/* =========================================================
   APPLICATIONS GRID (homepage preview)
   ========================================================= */
.apps-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}
@media (max-width: 1100px) { .apps-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 800px)  { .apps-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px)  { .apps-grid { grid-template-columns: 1fr; } }

.app-card {
  display: flex;
  flex-direction: column;
  padding: 32px 28px;
  background: var(--cream);
  transition: background 0.25s var(--ease), transform 0.3s var(--ease);
  text-decoration: none;
  color: inherit;
  min-height: 220px;
  position: relative;
  overflow: hidden;
}
.app-card:hover {
  background: var(--paper);
}
.app-card:hover .app-card-tag {
  color: var(--ochre);
}
.app-card-tag {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--muted);
  margin-bottom: 16px;
  transition: color 0.25s var(--ease);
}
.app-card-title {
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: -0.015em;
  color: var(--ink);
  margin: 0 0 12px;
}
.app-card-desc {
  font-size: 14px;
  line-height: 1.5;
  color: var(--ink-soft);
  margin: 0;
  margin-top: auto;
}
.app-card.app-card-more {
  background: var(--paper);
}
.app-card.app-card-more .app-card-tag {
  color: var(--ochre);
  font-size: 22px;
  letter-spacing: 0;
  line-height: 1;
}
.app-card.app-card-more:hover {
  background: var(--ink);
}
.app-card.app-card-more:hover .app-card-title,
.app-card.app-card-more:hover .app-card-desc {
  color: var(--cream);
}
.app-card.app-card-more:hover .app-card-tag {
  color: var(--cream);
}
