/* ===========================================================
   Minh Le — shared editorial stylesheet
   System: Newsreader display serif + Geist sans + Geist Mono
   Warm ivory ground, deep ink, accent driven by --accent CSS var
   =========================================================== */

@import url('https://fonts.googleapis.com/css2?family=Source+Serif+4:ital,opsz,wght@0,8..60,400;0,8..60,500;0,8..60,600;0,8..60,700;1,8..60,400;1,8..60,500;1,8..60,600&family=Geist:wght@300;400;500;600;700&family=Geist+Mono:wght@400;500&display=swap');

:root {
  /* Light blue ground + navy accent (matches the suit) */
  --bg: #f1f1f3;
  --bg-2: #e8e8eb;
  --ink: #16181D;
  --ink-soft: #3D424B;
  --ink-mute: #767B85;
  --rule: #dcdce0;
  --rule-soft: #e4e4e8;
  --paper: #ffffff;

  --accent: oklch(0.34 0.09 260);
  --accent-soft: oklch(0.92 0.03 260);
  --accent-ink: #fff;

  --serif: "Source Serif 4", "Source Serif Pro", Georgia, serif;
  --sans: "Geist", -apple-system, "Segoe UI", system-ui, sans-serif;
  --mono: "Geist Mono", ui-monospace, "JetBrains Mono", monospace;

  --measure: 64ch;
  --gutter: clamp(20px, 4vw, 56px);
  --maxw: 1280px;
}

* { box-sizing: border-box; }
html {
  scroll-padding-top: 84px;
  overflow-x: clip;
}
img, video {
  max-width: 100%;
  height: auto;
}
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}
html, body { margin: 0; padding: 0; }
section[id],
[id].section {
  scroll-margin-top: 84px;
}
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.55;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-feature-settings: "ss01", "cv11";
  overflow-x: clip;
}

/* subtle paper grain */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  background-image:
    radial-gradient(rgba(28,25,22,0.025) 1px, transparent 1px);
  background-size: 3px 3px;
  mix-blend-mode: multiply;
  opacity: 0.6;
}

a { color: inherit; text-decoration: none; }

::selection { background: var(--accent); color: #fff; }

/* ---------- typography ---------- */
h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 400;
  letter-spacing: -0.01em;
  margin: 0;
  text-wrap: balance;
}

.eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-mute);
  font-weight: 500;
}

.lede {
  font-family: var(--serif);
  font-size: clamp(20px, 1.6vw, 24px);
  line-height: 1.45;
  font-weight: 400;
  color: var(--ink);
  text-wrap: pretty;
}

p { text-wrap: pretty; }

/* ---------- shell ---------- */
.shell {
  position: relative;
  z-index: 2;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* ---------- top bar ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in oklab, var(--bg) 92%, transparent);
  backdrop-filter: saturate(140%) blur(8px);
  -webkit-backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid var(--rule-soft);
}
.topbar .shell {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 64px;
}
.nav-toggle {
  display: none;
  appearance: none;
  width: 44px;
  height: 44px;
  margin-left: auto;
  padding: 0;
  border: 1px solid var(--rule);
  border-radius: 50%;
  background: var(--paper);
  color: var(--ink);
  cursor: pointer;
  place-items: center;
  flex-shrink: 0;
  transition: border-color 0.2s ease, background 0.2s ease;
}
.nav-toggle:hover {
  border-color: var(--accent);
}
.nav-toggle span {
  display: block;
  width: 16px;
  height: 1.5px;
  background: currentColor;
  border-radius: 1px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.nav-toggle span + span { margin-top: 4px; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(5.5px) rotate(45deg);
}
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-5.5px) rotate(-45deg);
}
.brand {
  font-family: var(--serif);
  font-size: 17px;
  letter-spacing: 0.01em;
  display: flex;
  align-items: center;
  gap: 10px;
}
.brand .glyph {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--bg);
  display: grid; place-items: center;
  font-family: var(--serif);
  font-size: 13px;
  font-style: italic;
  font-weight: 500;
}
.brand .name { font-weight: 500; }
.brand .dot { color: var(--accent); }

.topnav {
  display: flex;
  gap: 28px;
  align-items: center;
}
.topnav a {
  font-size: 13px;
  color: var(--ink-soft);
  position: relative;
  padding: 4px 0;
}
.topnav a:hover { color: var(--ink); }
.topnav a.active { color: var(--ink); }
.topnav a.active::after {
  content: "";
  position: absolute;
  left: 0; right: 0;
  bottom: -2px;
  height: 1px;
  background: var(--accent);
}
.topnav .cta {
  font-family: var(--sans);
  font-size: 13px;
  padding: 8px 14px;
  border: 1px solid var(--ink);
  border-radius: 999px;
  background: var(--ink);
  color: var(--bg);
  transition: transform .15s ease, background .15s ease;
}
.topnav .cta:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  transform: translateY(-1px);
}

/* ---------- footer ---------- */
.foot {
  border-top: 1px solid var(--rule-soft);
  margin-top: 96px;
  padding: 32px 0 40px;
}
.foot .shell.foot-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.foot h4 {
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--ink-mute);
  margin-bottom: 16px;
}
.foot a:hover { color: var(--accent); }
.foot ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.foot ul a { font-size: 14px; color: var(--ink-soft); }
.foot ul.foot-contact {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 12px;
}
.foot-contact a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border: 1px solid var(--rule);
  border-radius: 50%;
  color: var(--ink-soft);
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}
.foot-contact a:hover {
  color: var(--accent);
  border-color: var(--accent);
  background: color-mix(in oklab, var(--accent) 6%, transparent);
}
.foot-contact svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}
.foot-contact .visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.foot .meta {
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--ink-mute);
  margin: 0;
}

/* ---------- buttons / pills ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 22px;
  border-radius: 999px;
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.01em;
  transition: transform .15s ease, background .15s ease, color .15s ease, border-color .15s ease;
  cursor: pointer;
  border: 1px solid transparent;
}
.btn-primary {
  background: var(--ink);
  color: var(--bg);
}
.btn-primary:hover { background: var(--accent); transform: translateY(-1px); }
.btn-ghost {
  border-color: var(--ink);
  color: var(--ink);
  background: transparent;
}
.btn-ghost:hover { background: var(--ink); color: var(--bg); }
.btn .arrow { width: 14px; height: 14px; display: inline-block; transition: transform .2s ease; }
.btn:hover .arrow { transform: translateX(3px); }

/* ---------- section primitives ---------- */
.section {
  padding: 96px 0;
  border-top: 1px solid var(--rule-soft);
}
.section:first-of-type { border-top: 0; }
.section-head {
  margin-bottom: 56px;
}
.section-head h2 {
  font-size: clamp(34px, 4vw, 56px);
  line-height: 1.05;
  font-weight: 400;
  letter-spacing: -0.015em;
  max-width: 32ch;
}
.section-head h2 em {
  font-style: italic;
  color: var(--accent);
  font-weight: 400;
}

/* ---------- shared accent rule ---------- */
.rule {
  height: 1px;
  background: var(--rule);
  border: 0;
  margin: 0;
}

/* ---------- chips ---------- */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--ink-soft);
  border: 1px solid var(--rule);
  border-radius: 999px;
  background: var(--paper);
}
.chip .dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .section {
    padding: 72px 0;
  }
  .section-head { grid-template-columns: 1fr; gap: 16px; margin-bottom: 36px; }
  .foot .shell.foot-bar {
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
  }
  .nav-toggle { display: grid; }
  .topnav {
    display: none;
    position: absolute;
    top: calc(100% + 1px);
    left: calc(-1 * var(--gutter));
    right: calc(-1 * var(--gutter));
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 12px var(--gutter) 16px;
    background: color-mix(in oklab, var(--bg) 97%, transparent);
    backdrop-filter: saturate(140%) blur(10px);
    -webkit-backdrop-filter: saturate(140%) blur(10px);
    border-bottom: 1px solid var(--rule-soft);
    box-shadow: 0 12px 32px rgba(8, 12, 20, 0.08);
  }
  .topnav.is-open { display: flex; }
  .topnav a.non-cta {
    display: block;
    padding: 12px 0;
    border-bottom: 1px solid var(--rule-soft);
    font-size: 14px;
  }
  .topnav a.non-cta:last-of-type { border-bottom: 0; }
  .topnav .cta {
    margin-top: 12px;
    justify-content: center;
    text-align: center;
  }
}

@media (max-width: 600px) {
  .section {
    padding: 56px 0;
  }
  .foot {
    margin-top: 64px;
    padding: 28px 0 32px;
  }
  .topbar .shell { height: 56px; }
  html { scroll-padding-top: 76px; }
  section[id],
  [id].section {
    scroll-margin-top: 76px;
  }
}
