:root {
  --mist: #F5F5F4;
  --stone: #EDECE9;
  --ink: #2E2D2B;
  --graphite: #55544F;
  --hairline: #DEDDD9;
  --hairline-soft: #E6E5E1;
  --on-dark: #F5F5F4;
  --on-dark-muted: #CFCEC9;
  --serif: 'Bodoni Moda', Didot, 'Times New Roman', serif;
  --sans: 'Jost', 'Futura', 'Century Gothic', sans-serif;
  --max: 1280px;
  --gutter: 48px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
  margin: 0;
  background: var(--mist);
  color: var(--ink);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--ink); text-decoration: none; }
a:hover { color: #000; }
a:focus-visible, button:focus-visible { outline: 2px solid #6B6A66; outline-offset: 3px; }
h1, h2, h3, p { margin: 0; }

.wrap { max-width: var(--max); margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter); }
.serif { font-family: var(--serif); font-weight: 400; }
.lede { font-size: 18px; line-height: 1.65; font-weight: 300; color: var(--graphite); max-width: 520px; }
.section-title { font-family: var(--serif); font-weight: 400; font-size: 56px; line-height: 1.05; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: rgba(245, 245, 244, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--hairline);
}
.nav { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding-top: 16px; padding-bottom: 16px; }
.brand { display: flex; align-items: center; gap: 14px; }
.brand img { width: auto; height: 44px; }
.brand span { font-family: var(--serif); font-size: 20px; letter-spacing: 0.02em; }
.nav-links { display: flex; align-items: center; gap: 36px; font-size: 15px; }
.nav-link:hover, .nav-link[aria-current="page"] { text-decoration: underline; text-underline-offset: 6px; text-decoration-thickness: 1px; }
.icon-circle {
  display: flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border: 1px solid var(--ink); border-radius: 50%;
  transition: background .2s, color .2s;
}
.icon-circle:hover { background: var(--ink); color: var(--mist); }
.menu-toggle {
  display: none; width: 44px; height: 44px; background: none; border: 1px solid var(--ink);
  border-radius: 50%; color: var(--ink); cursor: pointer; align-items: center; justify-content: center;
}

/* Buttons */
.btn {
  display: inline-flex; align-items: center; min-height: 52px; padding: 0 28px;
  font-family: var(--sans); font-size: 15px; letter-spacing: 0.02em; border: 1px solid var(--ink);
  cursor: pointer; transition: background .2s, color .2s;
}
.btn-dark { background: var(--ink); color: var(--mist); }
.btn-dark:hover { background: #000; color: var(--mist); }
.btn-line { background: transparent; color: var(--ink); }
.btn-line:hover { background: var(--ink); color: var(--mist); }
.btn-light { background: var(--mist); color: var(--ink); border-color: var(--mist); }
.btn-light:hover { background: #fff; color: var(--ink); }

/* Hero */
.hero {
  display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 48px; align-items: center;
  padding-top: 96px; padding-bottom: 120px;
}
.hero-copy { display: flex; flex-direction: column; gap: 32px; }
.hero h1 { font-family: var(--serif); font-weight: 400; font-size: 76px; line-height: 1.02; letter-spacing: -0.015em; }
.hero .lede { font-size: 19px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 16px; padding-top: 8px; }
.glyphs { position: relative; height: 520px; }
.glyph { position: absolute; font-family: var(--serif); font-size: 440px; line-height: 1; color: var(--ink); animation: rise 1.1s cubic-bezier(.2,.7,.2,1) both; }
.glyph-y { left: 0; top: -20px; }
.glyph-k { left: 230px; top: 90px; mix-blend-mode: multiply; animation-delay: .18s; }
@keyframes rise { from { opacity: 0; transform: translateY(40px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .glyph { animation: none; } html { scroll-behavior: auto; } }

/* Platforms */
.platforms { border-top: 1px solid var(--hairline); border-bottom: 1px solid var(--hairline); background: var(--stone); }
.platforms-inner {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 24px 40px; padding-top: 32px; padding-bottom: 32px; font-size: 17px;
}
.platforms-label { font-weight: 500; }
.platform { display: flex; align-items: center; gap: 12px; }
.platform img { width: auto; }

/* Services */
.services { padding-top: 128px; padding-bottom: 144px; display: flex; flex-direction: column; gap: 64px; }
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 48px; align-items: end; }
.service-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--ink); }
.service { padding: 36px; display: flex; flex-direction: column; gap: 16px; border-left: 1px solid var(--hairline); }
.service:first-child { padding-left: 0; border-left: none; }
.service:last-child { padding-right: 0; }
.service h3 { font-family: var(--serif); font-weight: 400; font-size: 28px; line-height: 1.2; }
.service p { font-size: 16px; line-height: 1.7; color: var(--graphite); }

/* Dark sections */
.dark { background: var(--ink); color: var(--on-dark); }
.dark a { color: var(--on-dark); }
.dark a.btn-light, .dark a.btn-light:hover { color: var(--ink); }
.dark .lede { color: var(--on-dark-muted); }

/* Contact */
.contact-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 80px; padding-top: 128px; padding-bottom: 128px; }
.contact-intro { display: flex; flex-direction: column; gap: 28px; }
.contact-intro .lede { max-width: 440px; }
.linkedin-link { display: inline-flex; align-items: center; gap: 12px; font-size: 16px; min-height: 44px; }
.linkedin-link span { text-decoration: underline; text-underline-offset: 5px; text-decoration-thickness: 1px; }
.form { display: flex; flex-direction: column; gap: 28px; }
.form-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px; }
.field { display: flex; flex-direction: column; gap: 8px; }
.field label { font-size: 14px; color: var(--on-dark-muted); }
.field input, .field textarea {
  min-height: 44px; background: transparent; border: none; border-bottom: 1px solid #8A8984;
  color: var(--on-dark); font-family: var(--sans); font-size: 17px; padding: 6px 0; border-radius: 0;
}
/* Custom dropdown (see enhanceSelect in js/home.js) */
.dropdown { position: relative; }
.dropdown-button {
  display: block; width: 100%; min-height: 44px; text-align: left; cursor: pointer;
  background: transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8' fill='none' stroke='%23F5F5F4' stroke-width='1.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M1 1.5l5 5 5-5'/%3E%3C/svg%3E") no-repeat right 4px center;
  border: none; border-bottom: 1px solid #8A8984; border-radius: 0; padding: 6px 28px 6px 0;
  color: var(--on-dark); font-family: var(--sans); font-size: 17px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.dropdown-button:focus-visible { outline: none; border-bottom-color: var(--on-dark); }
.dropdown-button[aria-expanded="true"] { border-bottom-color: var(--on-dark); }
.dropdown-list {
  position: absolute; z-index: 5; right: 0; min-width: 100%; width: max-content; max-width: calc(100vw - 2 * var(--gutter)); top: 100%; margin: 4px 0 0; padding: 6px 0; list-style: none;
  background: var(--ink); border: 1px solid #6B6A66; box-shadow: 0 12px 32px rgba(0, 0, 0, .35);
}
.dropdown-list li { white-space: nowrap; padding: 10px 14px; font-size: 16px; color: var(--on-dark-muted); cursor: pointer; }
.dropdown-list li.active, .dropdown-list li:hover { background: #3A3936; color: var(--on-dark); }
.dropdown-list li[aria-selected="true"] { color: var(--on-dark); }
.field textarea { line-height: 1.6; resize: vertical; }
.field input:focus, .field textarea:focus { outline: none; border-bottom-color: var(--on-dark); }
.form-error { font-size: 15px; color: #F2C4B8; min-height: 1em; }
.form-error:empty { display: none; }
.form .btn { align-self: flex-start; }
.form .btn[disabled] { opacity: .6; cursor: wait; }
.form-success { display: flex; flex-direction: column; gap: 16px; justify-content: center; border-top: 1px solid #6B6A66; padding-top: 40px; }
.form-success h3 { font-family: var(--serif); font-weight: 400; font-size: 34px; }
.form-success p { font-size: 17px; line-height: 1.65; color: var(--on-dark-muted); }
.link-button { align-self: flex-start; min-height: 44px; padding: 0; background: none; border: none; color: var(--on-dark); font-family: var(--sans); font-size: 15px; text-decoration: underline; text-underline-offset: 5px; cursor: pointer; }
[hidden] { display: none !important; }

/* Footer */
.site-footer { border-top: 1px solid #45443F; color: var(--on-dark-muted); }
.footer-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; padding-top: 32px; padding-bottom: 32px; font-size: 14px; }
.footer-brand { font-family: var(--serif); font-size: 18px; color: var(--on-dark); }
.footer-inner a { min-height: 44px; display: inline-flex; align-items: center; }
.dark .icon-circle { border-color: var(--on-dark); }
.dark .icon-circle:hover { background: var(--on-dark); color: var(--ink); }

/* Work page */
.work-hero { padding-top: 112px; padding-bottom: 80px; }
.work-hero h1 { font-family: var(--serif); font-weight: 400; font-size: 88px; line-height: 1; letter-spacing: -0.015em; }
.work-hero .lede { font-size: 19px; max-width: 480px; }
.case-list { border-top: 1px solid var(--ink); margin-bottom: 144px; }
.case { display: grid; grid-template-columns: 360px minmax(0, 1fr); gap: 72px; padding: 64px 0; border-bottom: 1px solid var(--hairline); }
.case-head { display: flex; flex-direction: column; gap: 14px; }
.case-sector { font-size: 15px; font-weight: 500; }
.case-head h2 { font-family: var(--serif); font-weight: 400; font-size: 36px; line-height: 1.12; }
.case-client { font-size: 15px; line-height: 1.5; color: var(--graphite); }
.case-metric { margin-top: auto; padding-top: 28px; display: flex; align-items: baseline; gap: 14px; }
.case-metric strong { font-family: var(--serif); font-weight: 400; font-size: 44px; line-height: 1; }
.case-metric span { font-size: 15px; line-height: 1.4; color: var(--graphite); max-width: 180px; }
.case-row { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 32px; padding: 22px 0; border-top: 1px solid var(--hairline-soft); }
.case-row:first-child { border-top: none; padding-top: 6px; }
.case-row:last-child { padding-bottom: 0; }
.case-row h3 { font-size: 15px; font-weight: 500; line-height: 1.7; }
.case-row p { font-size: 16px; line-height: 1.7; color: var(--graphite); max-width: 640px; }
.case-row ul { margin: 0; padding-left: 20px; max-width: 640px; }
.case-row li { font-size: 16px; line-height: 1.7; color: var(--graphite); padding-left: 4px; }
.case-row li + li { margin-top: 6px; }
.case-row p.stack { font-size: 15px; color: var(--ink); }
.cta { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 48px; align-items: end; padding-top: 112px; padding-bottom: 112px; }
.cta-copy { display: flex; flex-direction: column; gap: 24px; align-items: flex-start; }

/* Responsive */
@media (max-width: 900px) {
  :root { --gutter: 24px; }
  .menu-toggle { display: flex; }
  .nav { flex-wrap: wrap; }
  .nav-links {
    display: none; width: 100%; flex-direction: column; align-items: flex-start; gap: 4px; padding: 8px 0 12px;
  }
  .nav-links.open { display: flex; }
  .nav-links .nav-link { min-height: 44px; display: flex; align-items: center; font-size: 18px; }
  .hero { grid-template-columns: minmax(0, 1fr); padding-top: 48px; padding-bottom: 80px; }
  .hero h1 { font-size: 48px; }
  .glyphs { height: 300px; order: -1; }
  .glyph { font-size: 260px; }
  .glyph-k { left: 150px; top: 60px; }
  .split, .service-grid, .contact-grid, .form-row, .case, .case-row, .cta { grid-template-columns: minmax(0, 1fr); }
  .service, .service:first-child, .service:last-child { padding: 28px 0; border-left: none; border-top: 1px solid var(--hairline); }
  .service:first-child { border-top: none; }
  .section-title { font-size: 40px; }
  .services { padding-top: 80px; padding-bottom: 96px; }
  .contact-grid { gap: 48px; padding-top: 80px; padding-bottom: 80px; }
  .work-hero h1 { font-size: 52px; }
  .case { gap: 28px; }
  .case-row { gap: 6px; }
}
