/* ============ Tokens ============ */
:root {
  --paper: #f6f4ef;
  --surface: #ffffff;
  --ink: #16222e;
  --ink-2: #51606f;
  --ink-3: #636e7a;
  --navy: #0d2137;
  --navy-2: #123252;
  --navy-ink: #c8d4e2;
  --accent: #0f4c81;
  --accent-h: #0c3f6b;
  --gold: #c19a3d;
  --gold-deep: #856920;
  --gold-soft: #e8dcc0;
  --line: #e4dfd3;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(13, 33, 55, .05), 0 8px 28px rgba(13, 33, 55, .08);
  --font-body: 'Manrope', 'Segoe UI', system-ui, -apple-system, sans-serif;
  --font-display: 'Playfair Display', 'Georgia', 'Times New Roman', serif;
}

/* Dark theme (chosen with the sun/moon toggle; light is the default) */
html[data-theme="dark"] {
  --paper: #0f1a27;
  --surface: #172538;
  --ink: #eef2f7;
  --ink-2: #b7c3d2;
  --ink-3: #8d9bac;
  --navy: #0a1421;
  --navy-2: #0e1d30;
  --navy-ink: #b7c3d2;
  --accent: #6aaaf0;
  --accent-h: #8bbdf5;
  --gold: #d6b05a;
  --gold-soft: #3b3220;
  --gold-deep: #d6b05a;
  --line: #27394f;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 28px rgba(0, 0, 0, .35);
  color-scheme: dark;
}
html[data-theme="dark"] .btn-primary,
html[data-theme="dark"] .btn-nav { background: #2b6cb0; color: #fff; }
html[data-theme="dark"] .btn-primary:hover,
html[data-theme="dark"] .btn-nav:hover { background: #3a7fc7; }
html[data-theme="dark"] .btn-ghost:hover { background: var(--ink); color: var(--paper); }
html[data-theme="dark"] .nav { background: rgba(15, 26, 39, .88); }
html[data-theme="dark"] .hero-photo::after { opacity: .35; }
html[data-theme="dark"] .photo-frame::before { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08); }
html[data-theme="dark"] .client-logo { background: #f3f1ec; border-color: #e4dfd3; }   /* logos stay on a light tile */
html[data-theme="dark"] .client-logo:hover { border-color: var(--gold); }
html[data-theme="dark"] .media-lang { background: var(--paper); }
html[data-theme="dark"] .lang-switch a:hover { background: rgba(106, 170, 240, .14); }
html[data-theme="dark"] .contact-card { background: rgba(255, 255, 255, .05); }

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.6;
  font-size: 16.5px;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--accent); text-decoration: none; }

.container { max-width: 1160px; margin: 0 auto; padding: 0 24px; }

/* ============ Reveal animation (gated on .js so no-JS visitors see everything) ============ */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s ease; }
.js .reveal.in { opacity: 1; transform: none; }
.js .reveal.d1 { transition-delay: .08s; }
.js .reveal.d2 { transition-delay: .16s; }
.js .reveal.d3 { transition-delay: .24s; }
.js .reveal.d4 { transition-delay: .32s; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
}

/* Visually hidden, available to screen readers */
.sr-only {
  position: absolute; width: 1px; height: 1px; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}

/* ============ Nav ============ */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(246, 244, 239, .88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  max-width: 1160px; margin: 0 auto; padding: 14px 24px;
  display: flex; align-items: center; gap: 28px;
}
.nav-brand {
  font-family: var(--font-display);
  font-weight: 700; font-size: 19px; color: var(--ink);
  white-space: nowrap;
}
.nav-links { display: flex; gap: 22px; margin-left: auto; }
.nav-links a { color: var(--ink-2); font-weight: 600; font-size: 14.5px; transition: color .2s; }
.nav-links a:hover { color: var(--accent); }
.nav-links .nav-contact { display: none; }
.nav-burger { display: none; }

/* Language switcher */
.lang-switch { display: flex; align-items: center; gap: 2px; }
.lang-switch a, .lang-switch .lang-current {
  font-size: 12.5px; font-weight: 800; letter-spacing: .08em;
  padding: 5px 8px; border-radius: 6px; line-height: 1;
}
.lang-switch a { color: var(--ink-3); transition: color .2s, background .2s; }
.lang-switch a:hover { color: var(--accent); background: rgba(15, 76, 129, .08); }
.lang-switch .lang-current { color: var(--ink); background: var(--gold-soft); }
.lang-switch-menu { display: none; }
.lang-switch-bar { margin-left: 4px; }

/* Sun / moon theme toggle */
.theme-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; flex-shrink: 0;
  border-radius: 50%; border: 1px solid var(--line);
  background: var(--surface); color: var(--ink-2); cursor: pointer;
  transition: color .2s, border-color .2s, background .2s, transform .15s;
}
.theme-toggle:hover { color: var(--accent); border-color: var(--accent); transform: rotate(15deg); }
.theme-toggle:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.theme-toggle .icon-moon { display: none; }
html[data-theme="dark"] .theme-toggle .icon-sun { display: none; }
html[data-theme="dark"] .theme-toggle .icon-moon { display: block; }

/* ============ Buttons ============ */
.btn {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 13px 26px; border-radius: 999px;
  font-weight: 700; font-size: 15.5px; font-family: var(--font-body);
  border: 1.5px solid transparent; cursor: pointer;
  transition: background .2s, color .2s, border-color .2s, transform .15s;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-h); transform: translateY(-1px); }
.btn-ghost { border-color: var(--ink); color: var(--ink); background: transparent; }
.btn-ghost:hover { background: var(--ink); color: var(--paper); }
.btn-nav { background: var(--accent); color: #fff; padding: 9px 20px; font-size: 14px; }
.btn-nav:hover { background: var(--accent-h); }

/* ============ Hero ============ */
.hero { padding: 72px 0 88px; overflow: hidden; }
.hero-grid {
  display: grid; grid-template-columns: 1.25fr 1fr;
  gap: 64px; align-items: center;
}
.eyebrow {
  font-size: 13px; font-weight: 800; letter-spacing: .14em;
  text-transform: uppercase; color: var(--gold-deep);
  margin-bottom: 18px;
}
.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(44px, 6vw, 72px);
  line-height: 1.06; font-weight: 800;
  letter-spacing: -.01em;
  margin-bottom: 26px;
}
.hero-lead { font-size: 18px; color: var(--ink-2); max-width: 56ch; margin-bottom: 34px; }
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 34px; }
.hero-badges { display: flex; gap: 10px; flex-wrap: wrap; }
.badge {
  font-size: 13.5px; color: var(--ink-2);
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 999px; padding: 8px 16px;
}
.badge b { color: var(--ink); }

.hero-photo { position: relative; }
.photo-frame {
  position: relative; border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow);
  aspect-ratio: 4 / 5;
}
.photo-frame::before {
  content: ''; position: absolute; inset: 0; z-index: 1;
  box-shadow: inset 0 0 0 1px rgba(13, 33, 55, .08);
  border-radius: var(--radius);
}
.photo-frame img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 20%; }
.hero-photo::after {
  content: ''; position: absolute; z-index: -1;
  right: -26px; bottom: -26px; width: 62%; height: 62%;
  border-radius: var(--radius);
  background: linear-gradient(135deg, var(--gold-soft), var(--gold));
  opacity: .55;
}

/* ============ Stats ============ */
.stats {
  background: linear-gradient(160deg, var(--navy) 0%, var(--navy-2) 100%);
  padding: 64px 0;
}
.stats-grid {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 40px 32px;
}
.stat { text-align: left; }
.stat-value {
  font-weight: 800; font-size: 48px; line-height: 1.05;
  color: #fff; margin-bottom: 8px;
}
.stat-value .plus { color: var(--gold); }
.stat-label { font-size: 14.5px; color: var(--navy-ink); line-height: 1.45; max-width: 24ch; }

/* ============ Sections ============ */
.section { padding: 92px 0; }
.section-alt { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-head { max-width: 760px; margin-bottom: 52px; }
.section-head h2 {
  font-family: var(--font-display);
  font-size: clamp(30px, 4vw, 42px); font-weight: 700;
  line-height: 1.15; margin-bottom: 16px;
}
.section-sub { color: var(--ink-2); font-size: 17px; }

/* ============ Timeline ============ */
.timeline { position: relative; max-width: 860px; }
.timeline::before {
  content: ''; position: absolute; left: 46px; top: 8px; bottom: 8px;
  width: 1.5px; background: var(--line);
}
.tl-item {
  position: relative; display: grid;
  grid-template-columns: 92px 1fr; gap: 28px;
  padding: 0 0 40px;
}
.tl-item:last-child { padding-bottom: 0; }
.tl-year {
  font-weight: 800; font-size: 17px; color: var(--gold-deep);
  background: var(--paper);
  align-self: start; text-align: center;
  position: relative; z-index: 1;
  padding: 2px 0;
}
.section-alt .tl-year { background: var(--surface); }
.tl-body h3 { font-size: 19px; font-weight: 700; line-height: 1.35; margin-bottom: 6px; }
.tl-body p { color: var(--ink-2); font-size: 15.5px; }

/* ============ Services ============ */
.service-card {
  background: var(--paper);
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 40px; margin-bottom: 28px;
  display: grid; grid-template-columns: 1fr 1.4fr; gap: 44px;
}
.service-card:last-child { margin-bottom: 0; }
.service-intro h3 {
  font-family: var(--font-display);
  font-size: 26px; font-weight: 700; line-height: 1.25;
  margin-bottom: 14px;
}
.service-intro p { color: var(--ink-2); font-size: 16px; }
.service-table { display: flex; flex-direction: column; }
.st-head, .st-row {
  display: grid; grid-template-columns: 1fr 1fr; gap: 24px;
  padding: 14px 0;
}
.st-head {
  font-size: 12.5px; font-weight: 800; letter-spacing: .1em;
  text-transform: uppercase; color: var(--ink-3);
  border-bottom: 2px solid var(--ink);
  padding-top: 0;
}
.st-row { border-bottom: 1px solid var(--line); font-size: 15.5px; }
.st-row:last-child { border-bottom: none; }
.st-row [role="cell"]:first-child { font-weight: 600; }
.st-row [role="cell"]:last-child { color: var(--ink-2); position: relative; padding-left: 26px; }
.st-row [role="cell"]:last-child::before {
  content: '→'; position: absolute; left: 0; color: var(--gold-deep); font-weight: 700;
}

/* ============ Cases ============ */
.cases-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.case-card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 38px;
  box-shadow: var(--shadow);
}
.case-num {
  font-size: 13px; font-weight: 800; letter-spacing: .14em;
  text-transform: uppercase; color: var(--gold-deep); margin-bottom: 12px;
}
.case-client { font-size: 17px; font-weight: 700; line-height: 1.45; margin-bottom: 18px; }
.case-client span { color: var(--ink-3); font-weight: 600; }
.case-list { list-style: none; }
.case-list li {
  position: relative; padding: 0 0 12px 26px;
  color: var(--ink-2); font-size: 15.5px;
}
.case-list li::before {
  content: ''; position: absolute; left: 0; top: 9px;
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--accent);
}
.case-list b { color: var(--ink); }

/* ============ Clients ============ */
.clients-grid {
  display: grid; grid-template-columns: repeat(5, 1fr);
  gap: 18px;
}
.client-logo {
  background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  padding: 26px 22px; min-height: 110px;
  transition: border-color .25s, box-shadow .25s;
}
.client-logo:hover { border-color: var(--gold); box-shadow: var(--shadow); }
.client-logo img {
  max-height: 56px; max-width: 100%; width: auto; object-fit: contain;
  filter: grayscale(1) brightness(.62); opacity: .85;
  transition: filter .25s, opacity .25s;
}
.client-logo:hover img { filter: none; opacity: 1; }

/* ============ Publications ============ */
.pub-list {
  list-style: none; counter-reset: pub;
  max-width: 900px;
}
.pub-list li {
  counter-increment: pub;
  position: relative;
  padding: 20px 0 20px 64px;
  border-bottom: 1px solid var(--line);
  font-size: 15.5px; color: var(--ink-2); line-height: 1.65;
}
.pub-list li::before {
  content: counter(pub, decimal-leading-zero);
  position: absolute; left: 0; top: 18px;
  font-family: var(--font-display);
  font-size: 22px; font-weight: 700; color: var(--gold-deep);
}
.pub-list b { color: var(--ink); font-weight: 700; }
.pub-list i { color: var(--ink); }
.pub-more { margin-top: 26px; font-size: 16px; color: var(--ink-2); }
.pub-more a { font-weight: 700; border-bottom: 1.5px solid currentColor; }

/* ============ Media ============ */
.media-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.media-card {
  display: flex; flex-direction: column; gap: 10px;
  background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 26px;
  transition: border-color .25s, box-shadow .25s, transform .2s;
}
.media-card:hover { border-color: var(--accent); box-shadow: var(--shadow); transform: translateY(-3px); }
.media-source {
  font-size: 12.5px; font-weight: 800; letter-spacing: .1em;
  text-transform: uppercase; color: var(--gold-deep);
  display: flex; align-items: center; gap: 8px;
}
.media-lang {
  font-size: 10.5px; letter-spacing: .06em; color: var(--ink-3);
  border: 1px solid var(--line); border-radius: 4px; padding: 2px 5px;
  background: var(--surface);
}
.media-title { color: var(--ink); font-weight: 600; font-size: 16px; line-height: 1.45; flex: 1; }
.media-arrow { color: var(--accent); font-weight: 700; font-size: 14px; }

/* ============ Footer ============ */
.footer {
  background: linear-gradient(160deg, var(--navy) 0%, var(--navy-2) 100%);
  color: var(--navy-ink);
  padding: 88px 0 36px;
}
.footer-cta { text-align: center; max-width: 720px; margin: 0 auto 56px; }
.footer-cta h2 {
  font-family: var(--font-display);
  color: #fff; font-size: clamp(30px, 4vw, 42px);
  font-weight: 700; margin-bottom: 14px;
}
.footer-cta > p { font-size: 17px; margin-bottom: 36px; }
.footer-links { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }
.contact-card {
  display: flex; align-items: center; gap: 14px;
  background: rgba(255, 255, 255, .06);
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: var(--radius); padding: 16px 24px;
  color: #fff; text-align: left;
  transition: background .25s, border-color .25s, transform .2s;
}
.contact-card:hover { background: rgba(255, 255, 255, .12); border-color: var(--gold); transform: translateY(-2px); }
.contact-card svg { color: var(--gold); flex-shrink: 0; }
.contact-card b { display: block; font-size: 15.5px; }
.contact-card small { color: var(--navy-ink); font-size: 13px; }
.footer-bottom {
  display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  border-top: 1px solid rgba(255, 255, 255, .12);
  padding-top: 26px; font-size: 14px;
}
.footer-bottom a { color: #fff; font-weight: 600; }

/* ============ Responsive ============ */
@media (max-width: 1020px) {
  .clients-grid { grid-template-columns: repeat(4, 1fr); }
  .media-grid { grid-template-columns: repeat(2, 1fr); }
  .service-card { grid-template-columns: 1fr; gap: 28px; }
}
@media (max-width: 860px) {
  .hero { padding: 48px 0 64px; }
  .hero-grid { grid-template-columns: 1fr; gap: 44px; }
  .hero-photo { max-width: 420px; margin: 0 auto; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 32px 24px; }
  .cases-grid { grid-template-columns: 1fr; }
  .clients-grid { grid-template-columns: repeat(3, 1fr); }

  .nav-links {
    display: none;
    position: absolute; top: 100%; left: 0; right: 0;
    background: var(--paper); border-bottom: 1px solid var(--line);
    flex-direction: column; gap: 0; padding: 8px 24px 16px;
  }
  .nav-links.open { display: flex; }
  .nav-links > a { padding: 10px 0; font-size: 16px; }
  .nav-links .nav-contact { display: block; color: var(--accent); font-weight: 700; }
  .lang-switch-bar { display: none; }
  .lang-switch-menu { display: flex; gap: 6px; padding: 12px 0 6px; border-top: 1px solid var(--line); margin-top: 6px; }
  .lang-switch-menu a, .lang-switch-menu .lang-current { font-size: 14px; padding: 8px 14px; border: 1px solid var(--line); }
  .nav-inner { gap: 14px; }
  .nav-burger {
    display: flex; flex-direction: column; justify-content: center; gap: 5px;
    width: 40px; height: 40px; padding: 8px; flex-shrink: 0;
    background: none; border: none; cursor: pointer;
  }
  .nav-burger span { display: block; height: 2px; background: var(--ink); border-radius: 2px; transition: transform .25s, opacity .25s; }
  .nav-burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .nav-burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
  .btn-nav { margin-left: auto; }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .nav-inner { padding: 12px 16px; gap: 10px; }
  .nav-brand { font-size: 16px; }
  .btn-nav { padding: 8px 14px; font-size: 13px; }
  .theme-toggle { width: 34px; height: 34px; }
  .nav-links { padding: 8px 16px 16px; }
  .section { padding: 64px 0; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .stat-value { font-size: 38px; }
  .media-grid { grid-template-columns: 1fr; }
  .clients-grid { grid-template-columns: repeat(2, 1fr); }
  .timeline::before { left: 0; display: none; }
  .tl-item { grid-template-columns: 1fr; gap: 6px; padding-bottom: 30px; }
  .tl-year { text-align: left; }
  .st-head, .st-row { grid-template-columns: 1fr; gap: 8px; }
  .st-head [role="columnheader"]:last-child {
    position: absolute; width: 1px; height: 1px; margin: -1px;
    overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
  }
  .hero-photo::after { right: -10px; bottom: -14px; }
  .service-card { padding: 28px 22px; }
  .case-card { padding: 28px 22px; }
  .pub-list li { padding-left: 0; padding-top: 44px; }
  .pub-list li::before { top: 14px; }
  .footer-links { flex-direction: column; align-items: stretch; }
  .footer-bottom { justify-content: center; text-align: center; }
}
@media (max-width: 430px) {
  .btn-nav { display: none; }
  .theme-toggle { margin-left: auto; }
}

/* ============ Print ============ */
@media print {
  html[data-theme="dark"] { --paper: #fff; --surface: #fff; --ink: #000; --ink-2: #333; --ink-3: #555; --line: #ccc; }
  .theme-toggle { display: none; }
  .js .reveal { opacity: 1 !important; transform: none !important; }
  .stats, .footer { background: #fff; }
  .stat-value, .footer-cta h2, .contact-card, .contact-card b, .footer-bottom a { color: #000; }
  .stat-label, .footer, .contact-card small, .footer-bottom { color: #333; }
  .stat-value .plus { color: #000; }
  .nav { position: static; }
  .nav-burger, .btn { display: none; }
  .contact-card { border-color: #ccc; background: none; }
}
