/* ============================================================
   Viti Design System — Shared Tokens & Components
   ============================================================
   Single source of truth. Imported by base.njk.
   Page-specific CSS lives in each layout template.
   ============================================================ */

/* TOKENS */
:root {
  --cream: #F6F1E7;
  --cream-2: #F1E9DA;
  --cream-3: #EFE6D4;
  --paper: #FCFAF4;
  --white: #FFFFFF;
  --ink: #182739;
  --ink-2: #1E3045;
  --ink-soft: #283A52;
  --slate: #5A6573;
  --slate-2: #818B98;
  --amber: #C8923D;
  --amber-deep: #AC7A2C;
  --gold-text: #9A6A12;
  --orange: #C8923D;
  --orange-2: #E0A33E;
  --orange-tint: #F6ECD9;
  --green: #2F7D54;
  --red: #C0392B;
  --line: #E7DDC9;
  --line-2: #DBCEB3;
  --shadow-sm: 0 1px 2px rgba(24,39,57,.04), 0 2px 6px rgba(24,39,57,.05);
  --shadow-md: 0 8px 22px rgba(24,39,57,.08), 0 2px 6px rgba(24,39,57,.05);
  --shadow-lg: 0 28px 70px rgba(24,39,57,.14), 0 8px 20px rgba(24,39,57,.07);
  --serif: 'Source Serif 4', Georgia, serif;
  --sans: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, monospace;
  --maxw: 1180px;
  --gut: clamp(20px, 5vw, 64px);
  --radius: 14px;
  --radius-lg: 20px;
  --spring: cubic-bezier(.22,1,.36,1);
  --ease: cubic-bezier(.16,1,.3,1);
}

/* RESETS */
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; overflow-x: hidden; }
body {
  font-family: var(--sans);
  color: var(--slate);
  background: var(--cream);
  line-height: 1.55;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%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.4'/%3E%3C/svg%3E");
  opacity: .022;
  mix-blend-mode: multiply;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

/* TYPOGRAPHY */
h1, h2, h3, h4 { font-family: var(--serif); color: var(--ink); font-weight: 600; line-height: 1.08; letter-spacing: -.012em; }
h1 { font-size: clamp(2.35rem, 5.1vw, 3.75rem); font-weight: 700; letter-spacing: -.022em; line-height: 1.04; }
h2 { font-size: clamp(1.85rem, 3.4vw, 2.7rem); letter-spacing: -.018em; line-height: 1.07; }
h3 { font-size: clamp(1.18rem, 1.9vw, 1.42rem); }
p { max-width: 62ch; }
strong { color: var(--ink-soft); font-weight: 600; }

/* EYEBROW + LEAD */
.eyebrow { font-family: var(--mono); font-size: .72rem; font-weight: 500; letter-spacing: .18em; text-transform: uppercase; color: var(--ink-soft); display: inline-flex; align-items: center; gap: .6em; max-width: 100%; flex-wrap: wrap; overflow-wrap: break-word; }
.eyebrow::before { content: ""; width: 24px; height: 1px; background: var(--slate-2); opacity: .7; }
.eyebrow.center { justify-content: center; }
.eyebrow.center::before { display: none; }
.lead { font-size: clamp(1.02rem, 1.4vw, 1.18rem); color: var(--slate); max-width: 60ch; }

/* LAYOUT */
.wrap { max-width: var(--maxw); margin: 0 auto; padding-inline: var(--gut); position: relative; z-index: 1; overflow-x: clip; }
section { position: relative; z-index: 1; }
.band { padding-block: clamp(54px, 6vw, 96px); }
.band--cream2 { background: var(--cream-2); }
.band--ink { background: var(--ink); color: #D9DEE6; }
.band--ink h2, .band--ink h3, .band--ink h4 { color: #fff; }
.band--ink p { color: #D9DEE6; }
.band--ink .eyebrow { color: #D9DEE6; }
.band--ink .eyebrow::before { background: rgba(255,255,255,.4); }
.band--ink a:not(.btn) { color: var(--orange-2); text-decoration-color: rgba(224,163,62,.3); }
.band--ink a:not(.btn):hover { color: #fff; }
.band--scan { padding-block: clamp(36px, 4vw, 56px); }
.band--paper { background: var(--paper); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

.sec-head { margin-bottom: clamp(20px, 2.5vw, 36px); }
.sec-head.center { text-align: center; }
.sec-head.center p { margin-inline: auto; }
.sec-head h2 { margin-bottom: 10px; }

/* BUTTONS */
.btn { display: inline-flex; align-items: center; gap: .55em; font-family: var(--sans); font-weight: 600; font-size: .97rem; padding: .85em 1.5em; border-radius: 999px; cursor: pointer; border: 1px solid transparent; transition: transform .2s var(--spring), box-shadow .2s ease, background .2s ease, color .2s ease; white-space: nowrap; }
.btn svg { width: 16px; height: 16px; }
.btn-primary { background: var(--ink); color: var(--cream); box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: #0E1A29; transform: translateY(-2px); box-shadow: var(--shadow-md); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line-2); }
.btn-ghost:hover { border-color: var(--ink); transform: translateY(-2px); }
.btn-ink { background: #fff; color: var(--ink); }
.btn-ink:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }

/* NAV */
header.nav { position: sticky; top: 0; z-index: 50; background: rgba(246,241,231,.78); backdrop-filter: saturate(140%) blur(14px); -webkit-backdrop-filter: saturate(140%) blur(14px); border-bottom: 1px solid transparent; transition: border-color .3s, background .3s; }
header.nav.scrolled { border-bottom-color: var(--line); background: rgba(246,241,231,.93); }
.nav-inner { max-width: var(--maxw); margin: 0 auto; padding: 13px var(--gut); display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--serif); font-weight: 700; font-size: 1.35rem; color: var(--ink); letter-spacing: .01em; }
.brand .mark { width: 26px; height: 26px; flex: none; }
.nav-links { display: flex; align-items: center; gap: 28px; }
.nav-links a:not(.btn) { font-size: .92rem; font-weight: 500; color: var(--ink-soft); transition: color .15s; position: relative; }
.nav-links a:not(.btn)::after { content: ""; position: absolute; left: 0; bottom: -6px; height: 1.5px; width: 0; background: var(--ink); transition: width .25s var(--ease); }
.nav-links a:not(.btn):hover { color: var(--ink); }
.nav-links a:not(.btn):hover::after { width: 100%; }
.nav-cta { margin-left: 6px; }
.hamburger { display: none; background: none; border: 0; cursor: pointer; padding: 8px; color: var(--ink); }
.hamburger svg { width: 24px; height: 24px; }
.mobile-menu { display: none; flex-direction: column; gap: 4px; padding: 8px var(--gut) 22px; border-bottom: 1px solid var(--line); background: var(--cream); }
.mobile-menu a:not(.btn) { padding: 11px 4px; font-weight: 500; color: var(--ink-soft); border-bottom: 1px solid var(--line); }
.mobile-menu a.btn { margin-top: 12px; border: none; justify-content: center; }

/* FOOTER */
footer.site-foot { background: var(--ink); color: #9BA5B1; padding-block: clamp(42px, 5.5vw, 68px); margin-top: auto; }
.foot-grid { display: flex; justify-content: space-between; align-items: flex-start; gap: 30px; flex-wrap: wrap; }
.foot-brand { display: flex; align-items: center; gap: 10px; font-family: var(--serif); font-weight: 700; font-size: 1.4rem; color: #fff; margin-bottom: 12px; }
.foot-brand .mark { width: 26px; height: 26px; }
.foot-tag { font-family: var(--serif); font-style: italic; color: #C7CEDA; font-size: 1rem; max-width: 36ch; }
.foot-nav { display: flex; gap: 26px; flex-wrap: wrap; }
.foot-nav a { font-size: .9rem; color: #A9B2BD; transition: color .15s; }
.foot-nav a:hover { color: #fff; }
.foot-bottom { margin-top: 34px; padding-top: 22px; border-top: 1px solid rgba(255,255,255,.1); display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-family: var(--mono); font-size: .72rem; letter-spacing: .04em; color: #7E8896; }

/* SCROLL PROGRESS */
.scroll-progress { position: fixed; top: 0; left: 0; right: 0; height: 2px; z-index: 200; pointer-events: none; }
.scroll-progress-bar { height: 100%; width: 0%; background: var(--ink); transition: width .08s linear; }

/* RESPONSIVE — shared breakpoints */
@media (max-width: 960px) {
  .nav-links { display: none; }
  .hamburger { display: block; }
}
@media (max-width: 680px) {
  body { font-size: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
  html { scroll-behavior: auto; }
}
