/* ============================================================
   wrk. Design System
   Warm premium-tech. Light, warm base. Graphite text + pointed
   dark sections. Gold (#C8A982) is the single conversion accent.
   Fonts are self-hosted via assets/styles/fonts.css (no external CDN).
   ============================================================ */

:root {
  /* --- Brand core (exact) --- */
  --graphite: #222222;
  --cream:    #E8D7C1;
  --gold:     #C8A982;
  --white:    #FFFFFF;

  /* --- Derived warm surfaces --- */
  --bg:         #FBF8F3;   /* warm near-white page base */
  --bg-cream:   #F4EBDD;   /* soft cream section */
  --bg-cream-2: #F8F1E7;
  --card:       #FFFFFF;
  --card-warm:  #FAF4EC;

  /* --- Ink (warm grays) --- */
  --ink:    #222222;
  --ink-2:  #5B5247;   /* secondary copy */
  --ink-3:  #8C8273;   /* captions / muted */
  --on-dark:    #F3EBDF;
  --on-dark-2:  #B7AE9F;

  /* --- Gold variants --- */
  --gold-deep: #B8975F;
  --gold-08: rgba(200,169,130,0.08);
  --gold-12: rgba(200,169,130,0.12);
  --gold-18: rgba(200,169,130,0.18);
  --gold-35: rgba(200,169,130,0.35);

  /* --- Lines --- */
  --line:      rgba(34,34,34,0.09);
  --line-soft: rgba(34,34,34,0.06);
  --line-gold: rgba(200,169,130,0.40);
  --line-dark: rgba(243,235,223,0.12);

  /* --- Warm shadows --- */
  --sh-sm: 0 1px 2px rgba(74,56,32,0.05), 0 2px 6px rgba(74,56,32,0.05);
  --sh-md: 0 6px 22px rgba(74,56,32,0.09), 0 2px 6px rgba(74,56,32,0.05);
  --sh-lg: 0 24px 60px rgba(74,56,32,0.14), 0 6px 18px rgba(74,56,32,0.07);
  --sh-gold: 0 10px 30px rgba(200,169,130,0.35);

  /* --- Radii --- */
  --r-sm:  12px;
  --r-md:  18px;
  --r-lg:  24px;
  --r-xl:  30px;
  --r-pill: 999px;

  /* --- Type --- */
  --font-display: 'Space Grotesk', sans-serif;
  --font-body: 'Hanken Grotesk', system-ui, sans-serif;

  /* --- Layout --- */
  --maxw: 1240px;
  --gutter: 24px;
  --nav-h: 76px;
}

/* ============================================================
   Reset / base
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--ink);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.04;
  letter-spacing: -0.02em;
  margin: 0;
  color: var(--ink);
  text-wrap: balance;
}
p { margin: 0; text-wrap: pretty; }

/* ============================================================
   Typographic scale
   ============================================================ */
.display {
  font-size: clamp(2.7rem, 5.6vw, 4.6rem);
  line-height: 1.08;
  letter-spacing: -0.035em;
  font-weight: 600;
}
.h1 { font-size: clamp(2.3rem, 4.4vw, 3.5rem); letter-spacing: -0.03em; }
.h2 { font-size: clamp(1.9rem, 3.2vw, 2.85rem); letter-spacing: -0.025em; }
.h3 { font-size: clamp(1.35rem, 1.7vw, 1.6rem); letter-spacing: -0.015em; }
.lead {
  font-size: clamp(1.08rem, 1.45vw, 1.32rem);
  line-height: 1.5;
  color: var(--ink-2);
  font-weight: 400;
}
.eyebrow {
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold-deep);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.eyebrow::before {
  content: "";
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 0 4px var(--gold-18);
}
.muted { color: var(--ink-3); }
.num {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.04em;
  font-feature-settings: "tnum" 1;
}

/* ============================================================
   Layout helpers
   ============================================================ */
.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }
.wrap-wide { max-width: 1340px; }
.section { padding-block: clamp(64px, 8vw, 120px); position: relative; }
.section-tight { padding-block: clamp(48px, 5vw, 80px); }
.stack-sm > * + * { margin-top: 12px; }
.stack > * + * { margin-top: 20px; }
.center { text-align: center; }
.sec-head { max-width: 720px; }
.sec-head.center { margin-inline: auto; }
.sec-head .h2 { margin-top: 16px; }
.sec-head .lead { margin-top: 18px; }

/* Section surfaces */
.bg-white { background: var(--white); }
.bg-base  { background: var(--bg); }
.bg-cream {
  background:
    radial-gradient(1200px 600px at 80% -10%, var(--gold-08), transparent 60%),
    linear-gradient(180deg, var(--white) 0%, var(--bg-cream) 100%);
}
.bg-cream-soft {
  background: linear-gradient(180deg, var(--bg) 0%, var(--bg-cream-2) 100%);
}
.bg-dark {
  background:
    radial-gradient(900px 500px at 15% 0%, rgba(200,169,130,0.16), transparent 55%),
    radial-gradient(700px 500px at 100% 100%, rgba(200,169,130,0.10), transparent 55%),
    var(--graphite);
  color: var(--on-dark);
}
.bg-dark h1, .bg-dark h2, .bg-dark h3, .bg-dark h4 { color: var(--white); }
.bg-dark .lead { color: var(--on-dark-2); }
.bg-dark .muted { color: var(--on-dark-2); }

/* subtle grain overlay */
.grain::after {
  content: "";
  position: absolute; inset: 0;
  pointer-events: none;
  opacity: 0.5;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
}
.bg-dark.grain::after { mix-blend-mode: screen; opacity: 0.35; }

/* ============================================================
   Buttons / CTA
   ============================================================ */
.btn {
  --bg: var(--gold);
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1rem;
  letter-spacing: -0.01em;
  padding: 14px 24px;
  border-radius: var(--r-pill);
  border: 1px solid transparent;
  transition: transform .18s cubic-bezier(.2,.7,.3,1), box-shadow .25s, background .2s, color .2s;
  white-space: nowrap;
  line-height: 1;
}
.btn svg { width: 17px; height: 17px; transition: transform .2s; }
.btn:hover svg { transform: translateX(3px); }
.btn-primary {
  background: var(--gold);
  color: var(--graphite);
  box-shadow: var(--sh-gold);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 16px 38px rgba(200,169,130,0.45); }
.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: rgba(34,34,34,0.18);
}
.btn-ghost:hover { background: rgba(34,34,34,0.04); border-color: rgba(34,34,34,0.3); transform: translateY(-2px); }
.btn-dark { background: var(--graphite); color: var(--white); }
.btn-dark:hover { transform: translateY(-2px); box-shadow: var(--sh-md); }
.bg-dark .btn-ghost { color: var(--on-dark); border-color: var(--line-dark); }
.bg-dark .btn-ghost:hover { background: rgba(243,235,223,0.07); border-color: rgba(243,235,223,0.3); }
.btn-sm { padding: 11px 18px; font-size: 0.92rem; }
.btn-lg { padding: 17px 30px; font-size: 1.06rem; }

/* text link with gold underline */
.tlink {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 0.98rem;
  color: var(--ink);
  display: inline-flex; align-items: center; gap: 8px;
  padding-bottom: 3px;
  background: linear-gradient(var(--gold), var(--gold)) left bottom / 0% 2px no-repeat;
  transition: background-size .3s, gap .2s;
}
.tlink svg { width: 15px; height: 15px; }
.tlink:hover { background-size: 100% 2px; gap: 12px; }
.tlink.on-gold { color: var(--gold-deep); background-image: linear-gradient(var(--gold), var(--gold)); background-size: 24px 2px; }
.tlink.on-gold:hover { background-size: 100% 2px; }

/* ============================================================
   Cards
   ============================================================ */
.card {
  background: var(--card);
  border: 1px solid var(--line-soft);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-sm);
  transition: transform .25s cubic-bezier(.2,.7,.3,1), box-shadow .3s, border-color .3s;
}
.card-hover:hover { transform: translateY(-4px); box-shadow: var(--sh-lg); border-color: var(--line-gold); }
.card-pad { padding: 28px; }
.card-warm { background: var(--card-warm); }
.bg-dark .card {
  background: rgba(255,255,255,0.035);
  border-color: var(--line-dark);
  box-shadow: none;
}
.bg-dark .card-hover:hover { background: rgba(255,255,255,0.06); border-color: var(--line-gold); transform: translateY(-4px); }

/* pill / tag */
.tag {
  display: inline-flex; align-items: center; gap: 7px;
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  padding: 6px 12px;
  border-radius: var(--r-pill);
  background: var(--gold-12);
  color: var(--gold-deep);
  border: 1px solid var(--line-gold);
}
.tag-quiet { background: rgba(34,34,34,0.05); color: var(--ink-2); border-color: var(--line); }
.bg-dark .tag-quiet { background: rgba(255,255,255,0.06); color: var(--on-dark-2); border-color: var(--line-dark); }

/* direction marker glyphs (custom, simple geometry) */
.glyph {
  width: 46px; height: 46px;
  border-radius: 13px;
  display: grid; place-items: center;
  background: var(--gold-12);
  border: 1px solid var(--line-gold);
  flex: none;
}
.glyph svg { width: 22px; height: 22px; }
.glyph svg [stroke] { stroke: var(--gold-deep); }
.glyph svg [fill].g { fill: var(--gold-deep); }

/* ============================================================
   Header / nav
   ============================================================ */
.site-header {
  position: sticky; top: 0; z-index: 100;
  height: var(--nav-h);
  display: flex; align-items: center;
  background: rgba(251,248,243,0.78);
  backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s, background .3s, transform .35s, box-shadow .3s;
}
.site-header.scrolled { border-bottom-color: var(--line); box-shadow: 0 1px 0 rgba(255,255,255,0.6); background: rgba(251,248,243,0.9); }
.site-header.hide { transform: translateY(-100%); }
.nav {
  width: 100%; max-width: 1340px; margin-inline: auto;
  padding-inline: var(--gutter);
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 18px;
}
.brand {
  display: inline-flex; align-items: baseline; gap: 1px;
  font-family: var(--font-display); font-weight: 700; font-size: 1.5rem;
  letter-spacing: -0.04em; color: var(--graphite);
}
.brand .dot { color: var(--gold); }
.nav-center { display: flex; justify-content: center; }
.nav-menu { display: flex; align-items: center; gap: 4px; list-style: none; margin: 0; padding: 0; }
.nav-link {
  font-family: var(--font-display); font-weight: 500; font-size: 0.96rem;
  color: var(--ink-2);
  padding: 9px 14px; border-radius: var(--r-pill);
  display: inline-flex; align-items: center; gap: 6px;
  transition: color .2s, background .2s;
}
.nav-link:hover, .nav-link[aria-expanded="true"] { color: var(--ink); background: rgba(34,34,34,0.05); }
.nav-link .chev { width: 12px; height: 12px; transition: transform .25s; opacity: .7; }
.nav-link[aria-expanded="true"] .chev { transform: rotate(180deg); }
.nav-right { display: flex; justify-content: flex-end; align-items: center; gap: 10px; }

/* mega menu */
.mega-wrap { position: relative; }
.mega {
  position: fixed; left: 50%; transform: translateX(-50%) translateY(8px);
  top: calc(var(--nav-h) - 6px);
  width: min(960px, calc(100vw - 40px));
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-lg);
  padding: 22px;
  opacity: 0; visibility: hidden; pointer-events: none;
  transition: opacity .22s, transform .22s, visibility .22s;
  z-index: 120;
}
.mega.open { opacity: 1; visibility: visible; pointer-events: auto; transform: translateX(-50%) translateY(0); }
.mega-grid { display: grid; grid-template-columns: 1.1fr 1.1fr 1fr; gap: 14px; }
.mega-col h4 { font-size: 0.74rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-3); font-family: var(--font-display); font-weight: 600; margin-bottom: 10px; }
.mega-item {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 11px; border-radius: var(--r-md);
  transition: background .18s;
}
.mega-item:hover { background: var(--bg-cream-2); }
.mega-item .mi-mark { width: 34px; height: 34px; border-radius: 10px; background: var(--gold-12); border: 1px solid var(--line-gold); display: grid; place-items: center; flex: none; }
.mega-item .mi-mark svg { width: 17px; height: 17px; }
.mega-item .mi-mark svg [stroke] { stroke: var(--gold-deep); }
.mi-t { font-family: var(--font-display); font-weight: 500; font-size: 0.96rem; color: var(--ink); display: block; }
.mi-d { font-size: 0.82rem; color: var(--ink-3); margin-top: 2px; }
.mega-feature {
  background:
    radial-gradient(300px 200px at 100% 0, var(--gold-12), transparent 70%),
    var(--graphite);
  color: var(--on-dark);
  border-radius: var(--r-md);
  padding: 18px;
  display: flex; flex-direction: column; justify-content: space-between;
}
.mega-feature .tag { background: rgba(200,169,130,0.18); }

/* mobile nav */
.burger { display: none; width: 44px; height: 44px; border: 1px solid var(--line); background: var(--white); border-radius: 12px; align-items: center; justify-content: center; }
.burger span { position: relative; width: 18px; height: 1.6px; background: var(--ink); display: block; transition: .25s; }
.burger span::before, .burger span::after { content: ""; position: absolute; left: 0; width: 18px; height: 1.6px; background: var(--ink); transition: .25s; }
.burger span::before { top: -6px; } .burger span::after { top: 6px; }
.mobile-panel { display: none; }

/* ============================================================
   Footer
   ============================================================ */
.site-footer { background: var(--graphite); color: var(--on-dark-2); padding-block: 64px 32px; position: relative; }
.site-footer h4 { color: var(--white); font-size: 0.78rem; letter-spacing: 0.12em; text-transform: uppercase; font-family: var(--font-display); font-weight: 600; margin-bottom: 16px; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 40px; }
.footer-link { display: block; color: var(--on-dark-2); padding: 5px 0; font-size: 0.95rem; transition: color .2s; }
.footer-link:hover { color: var(--gold); }
.footer-bottom { margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--line-dark); display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: 0.86rem; color: var(--on-dark-2); }

/* ============================================================
   Reveal-on-scroll
   ============================================================ */
@media (prefers-reduced-motion: no-preference) {
  .reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s cubic-bezier(.2,.7,.3,1), transform .7s cubic-bezier(.2,.7,.3,1); }
  .reveal.in { opacity: 1; transform: none; }
  .reveal.d1 { transition-delay: .08s; }
  .reveal.d2 { transition-delay: .16s; }
  .reveal.d3 { transition-delay: .24s; }
  .reveal.d4 { transition-delay: .32s; }
}

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 1024px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
}
@media (max-width: 900px) {
  :root { --nav-h: 66px; }
  .nav { grid-template-columns: auto 1fr; }
  .nav-center { display: none; }
  .nav-right .btn:not(.cta-keep) { display: none; }
  .burger { display: inline-flex; }
}
@media (max-width: 600px) {
  body { font-size: 16px; }
  .card-pad { padding: 22px; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 24px; }
}
