/* ═══════════════════════════════════════════════════════════════
   Oak & Wire — Public Site (ow.home)
   Forked from ow.core/styles/shared.css with marketing-spread styles.
   Light + dark via light-dark(); falls back to light for older browsers.
   ═══════════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Instrument+Serif:ital@0;1&family=Outfit:wght@300;400;500;600&family=JetBrains+Mono:wght@400;500&display=swap');

/* ───── TOKENS ───── */
:root {
  color-scheme: light dark;

  --oak:           light-dark(#b5541e, #d4743a);
  --oak-deep:      light-dark(#8c3a10, #c46a30);
  --oak-wash:      light-dark(rgba(181,84,30,0.05), rgba(212,116,58,0.08));
  --oak-tint:      light-dark(#f5e6db, #3a2618);
  --wire:          light-dark(#4a5e73, #7a99b5);
  --wire-deep:     light-dark(#2d3d4f, #5a7a96);

  --linen:         light-dark(#faf7f3, #1c1917);
  --cream:         light-dark(#f4efe8, #151210);
  --parchment:     light-dark(#ede7dd, #1f1c18);
  --border-light:  light-dark(#eae4dc, #2e2a25);
  --border:        light-dark(#ddd5cb, #3a3530);

  --ink:           light-dark(#1a1714, #e8e2da);
  --ink-2:         light-dark(#3d3630, #c8c0b6);
  --ink-3:         light-dark(#7a7067, #8a8078);
  --ink-4:         light-dark(#b0a89e, #605850);
  --white:         light-dark(#ffffff, #221f1c);

  --surface-dark:  #1a1714;
  --on-dark:       #f4efe8;

  --serif: 'Instrument Serif', Georgia, serif;
  --sans:  'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --mono:  'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;
}

/* Older-browser fallback — pin to light if light-dark() unsupported */
@supports not (color: light-dark(white, black)) {
  :root {
    --oak: #b5541e; --oak-deep: #8c3a10;
    --oak-wash: rgba(181,84,30,0.05); --oak-tint: #f5e6db;
    --wire: #4a5e73; --wire-deep: #2d3d4f;
    --linen: #faf7f3; --cream: #f4efe8; --parchment: #ede7dd;
    --border-light: #eae4dc; --border: #ddd5cb;
    --ink: #1a1714; --ink-2: #3d3630; --ink-3: #7a7067; --ink-4: #b0a89e;
    --white: #ffffff;
  }
}

/* ───── RESET ───── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; height: auto; }

/* ───── GRAIN ───── */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.025;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 256px;
}

/* ───── UTILITIES ───── */
.wrap {
  width: 100%;
  max-width: 960px;
  margin: 0 auto;
  padding: 0 40px;
}
.serif { font-family: var(--serif); }
.mono {
  font-family: var(--mono);
  font-weight: 500;
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-4);
}
.eyebrow {
  font-family: var(--mono);
  font-weight: 500;
  font-size: 11px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--oak);
  display: inline-flex;
  align-items: center;
  gap: 14px;
}
.eyebrow::before {
  content: '';
  width: 22px;
  height: 1px;
  background: var(--oak);
}

/* ───── NAV ───── */
.nav {
  padding: 22px 0 20px;
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--cream);
  border-bottom: 1px solid var(--border-light);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}
.nav-brand {
  font-family: var(--mono);
  font-weight: 500;
  font-size: 11px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--ink-2);
  display: inline-flex;
  align-items: center;
  gap: 12px;
}
.nav-brand::before {
  content: '';
  width: 18px;
  height: 1px;
  background: var(--oak);
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
}
.nav-link {
  font-family: var(--mono);
  font-weight: 500;
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-3);
  padding: 8px 16px;
  border-radius: 999px;
  transition: color 0.18s ease, background 0.18s ease;
  position: relative;
}
.nav-link:hover { color: var(--ink); }
.nav-link.active {
  color: var(--oak);
}
.nav-link.active::after {
  content: '';
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 2px;
  height: 1px;
  background: var(--oak);
}

/* ───── PAGE FRAME ───── */
.page {
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* ───── HERO ───── */
.hero {
  padding: 120px 0 100px;
  position: relative;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 56px;
}
.hero-eyebrow { margin-bottom: 36px; }
.hero h1 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(52px, 8vw, 96px);
  line-height: 1.0;
  letter-spacing: -0.022em;
  color: var(--ink);
  max-width: 18ch;
}
.hero h1 em {
  font-style: italic;
  color: var(--oak);
}
.hero-rule {
  width: 64px;
  height: 1px;
  background: var(--oak);
  margin: 56px 0 32px;
}
.hero-lede {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(22px, 2.4vw, 26px);
  line-height: 1.5;
  color: var(--ink-2);
  max-width: 46ch;
}

/* Variation — smaller hero for inner pages */
.hero.hero-inner { padding: 96px 0 72px; }
.hero.hero-inner h1 {
  font-size: clamp(44px, 6.4vw, 72px);
}

/* ───── BODY SECTION ───── */
.section {
  padding: 56px 0 96px;
}
.section + .section { padding-top: 0; }

.blocks {
  display: grid;
  grid-template-columns: 1fr;
  gap: 72px;
  max-width: 720px;
}
.block-num {
  font-family: var(--serif);
  font-style: italic;
  font-size: 22px;
  color: var(--oak);
  letter-spacing: -0.01em;
  margin-bottom: 6px;
  display: block;
}
.block h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(34px, 4.4vw, 44px);
  line-height: 1.05;
  letter-spacing: -0.015em;
  color: var(--ink);
  margin-bottom: 18px;
}
.block h2 em {
  font-style: italic;
  color: var(--oak);
}
.block p {
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink-2);
  max-width: 56ch;
}

/* ───── CLOSING STATEMENT ───── */
.closing {
  padding: 24px 0 120px;
}
.closing-rule {
  width: 64px;
  height: 1px;
  background: var(--oak);
  margin-bottom: 40px;
}
.closing p {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(26px, 3.2vw, 38px);
  line-height: 1.35;
  color: var(--ink);
  max-width: 28ch;
}
.closing p em {
  font-style: italic;
  color: var(--oak);
}

/* ───── CONTACT PAGE ───── */
.contact-card {
  margin-top: 64px;
  display: grid;
  gap: 28px;
  max-width: 560px;
}
.contact-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.contact-label {
  font-family: var(--mono);
  font-weight: 500;
  font-size: 10px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.contact-value {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(28px, 3.4vw, 38px);
  line-height: 1.2;
  color: var(--ink);
  letter-spacing: -0.01em;
}
.contact-value a {
  color: var(--ink);
  border-bottom: 1px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
}
.contact-value a:hover {
  color: var(--oak);
  border-bottom-color: var(--oak);
}
.contact-area {
  margin-top: 16px;
  font-family: var(--mono);
  font-weight: 500;
  font-size: 11px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--ink-3);
  line-height: 1.8;
}

/* ───── FOOTER ───── */
.footer {
  margin-top: auto;
  padding: 64px 0 48px;
}
.footer-rule {
  width: 100%;
  height: 1px;
  background: var(--border);
  margin-bottom: 32px;
  position: relative;
}
.footer-rule::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  width: 48px;
  height: 1px;
  background: var(--oak);
}
.footer-inner {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.footer-meta {
  font-family: var(--mono);
  font-weight: 500;
  font-size: 10px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--ink-4);
}
.footer-meta strong {
  color: var(--ink-3);
  font-weight: 500;
}
.footer-sep {
  color: var(--ink-4);
  margin: 0 8px;
  opacity: 0.6;
}

/* ───── ANIMATIONS ───── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: no-preference) {
  .anim-stage > * {
    opacity: 0;
    animation: fadeUp 0.9s ease-out forwards;
  }
  .anim-stage > *:nth-child(1) { animation-delay: 0.05s; }
  .anim-stage > *:nth-child(2) { animation-delay: 0.25s; }
  .anim-stage > *:nth-child(3) { animation-delay: 0.45s; }
  .anim-stage > *:nth-child(4) { animation-delay: 0.65s; }
  .anim-stage > *:nth-child(5) { animation-delay: 0.85s; }
}

/* ───── RESPONSIVE ───── */
@media (max-width: 720px) {
  .wrap { padding: 0 24px; }
  .nav { padding: 22px 0 18px; }
  .nav-brand { font-size: 10px; letter-spacing: 0.22em; }
  .nav-brand::before { width: 14px; }
  .nav-link { padding: 6px 10px; font-size: 10px; letter-spacing: 0.18em; }
  .nav-link.active::after { left: 10px; right: 10px; }

  .hero { padding: 72px 0 64px; }
  .hero-rule { margin: 40px 0 24px; }

  .section { padding: 40px 0 64px; }
  .blocks { gap: 56px; }

  .closing { padding: 16px 0 80px; }
  .closing-rule { margin-bottom: 28px; }

  .contact-card { margin-top: 48px; gap: 24px; }
  .footer { padding: 48px 0 32px; }
  .footer-inner { gap: 12px; }
}

@media (max-width: 420px) {
  .wrap { padding: 0 20px; }
  .nav-inner { gap: 12px; }
  .nav-brand-place { display: none; }
  .nav-link { padding: 6px 8px; }
}

/* ───── PRINT (defensive) ───── */
@media print {
  body::after { display: none; }
  .nav, .footer { display: none; }
}
