﻿/* ==========================================================================
   BENT CODES â€” Design System v2
   Palette: espresso brown Â· silver Â· cream white
   Type:    Playfair Display (serif) Â· Inter (sans)
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. TOKENS
   -------------------------------------------------------------------------- */
:root {
  /* --- Color: browns --- */
  --espresso: #1a1410;
  --coffee: #2a2118;
  --mocha: #3d3028;
  --walnut: #5a4a3a;
  --tan: #8a7a68;
  --silver: #b0b0b0;

  /* --- Color: lights --- */
  --cream: #faf6f0;
  --linen: #f5efe6;
  --sand: #ebe3d6;
  --parchment: #e0d6c8;
  --hairline: rgba(26, 20, 16, 0.12);
  --hairline-soft: rgba(26, 20, 16, 0.06);

  /* --- Gradients --- */
  --grad-silver: linear-gradient(100deg, #8a8a8a 0%, #c8c8c8 50%, #8a8a8a 100%);

  /* --- Type --- */
  --font-display: 'Playfair Display', Georgia, serif;
  --font-sans: 'Inter', 'Helvetica Neue', Arial, sans-serif;

  --text-xs: clamp(0.688rem, 0.66rem + 0.12vw, 0.75rem);
  --text-sm: clamp(0.813rem, 0.79rem + 0.12vw, 0.875rem);
  --text-base: clamp(1rem, 0.97rem + 0.14vw, 1.063rem);
  --text-lg: clamp(1.125rem, 1.06rem + 0.3vw, 1.313rem);
  --text-xl: clamp(1.5rem, 1.24rem + 1.1vw, 2.25rem);
  --text-2xl: clamp(2rem, 1.5rem + 2.2vw, 3.5rem);
  --text-3xl: clamp(2.6rem, 1.6rem + 4.2vw, 5.5rem);
  --text-hero: clamp(3rem, 1.2rem + 7.4vw, 9rem);

  --track-wide: 0.22em;
  --track-mid: 0.1em;

  /* --- Space --- */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;
  --space-32: 8rem;
  --section-y: clamp(4.5rem, 9vw, 10.5rem);
  --gutter: clamp(1.25rem, 4vw, 4rem);
  --measure: 62ch;

  /* --- Motion --- */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in: cubic-bezier(0.4, 0, 1, 1);
  --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);
  --t-fast: 180ms var(--ease-out);
  --t-mid: 420ms var(--ease-out);
  --t-slow: 900ms var(--ease-out);

  /* --- Elevation --- */
  --shadow-sm: 0 1px 3px rgba(26, 20, 16, 0.08);
  --shadow-md: 0 8px 30px -12px rgba(26, 20, 16, 0.15);
  --shadow-lg: 0 20px 50px -20px rgba(26, 20, 16, 0.2);

  --radius: 6px;
  --radius-sm: 4px;
  --radius-lg: 10px;
  --nav-h: 78px;
}

/* --------------------------------------------------------------------------
   2. RESET
   -------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  background: var(--cream);
  color: var(--espresso);
  font-family: var(--font-sans);
  font-size: var(--text-base);
  font-weight: 400;
  line-height: 1.65;
  letter-spacing: 0.004em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, svg, video { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
ul, ol { list-style: none; }
::selection { background: var(--espresso); color: var(--cream); }

:focus-visible {
  outline: 2px solid var(--walnut);
  outline-offset: 3px;
}

/* --------------------------------------------------------------------------
   3. TYPOGRAPHY
   -------------------------------------------------------------------------- */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
  text-wrap: balance;
}
h1 { font-size: var(--text-3xl); }
h2 { font-size: var(--text-2xl); }
h3 { font-size: var(--text-xl); }
h4 { font-size: var(--text-lg); font-family: var(--font-sans); font-weight: 600; letter-spacing: 0; line-height: 1.3; }

p { text-wrap: pretty; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  font-family: var(--font-sans);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: var(--track-wide);
  text-transform: uppercase;
  color: var(--walnut);
}
.eyebrow::before {
  content: '';
  width: clamp(24px, 4vw, 56px);
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--walnut));
}
.eyebrow--plain::before { display: none; }

.lede {
  font-size: var(--text-lg);
  line-height: 1.55;
  color: var(--walnut);
  max-width: 52ch;
  font-weight: 400;
}
.body-muted { color: var(--walnut); max-width: var(--measure); }
.meta {
  font-size: var(--text-xs);
  letter-spacing: var(--track-mid);
  text-transform: uppercase;
  color: var(--tan);
  font-weight: 600;
}

/* --------------------------------------------------------------------------
   4. LAYOUT
   -------------------------------------------------------------------------- */
.container {
  width: 100%;
  max-width: 1440px;
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.section { padding-block: var(--section-y); position: relative; }
.section--edge { border-top: 1px solid var(--hairline); }
.hairline {
  height: 1px;
  width: 100%;
  background: var(--hairline);
  border: 0;
}

@media (max-width: 900px) {
  .split, .section-head, .grid-12 { grid-template-columns: minmax(0, 1fr); }
}

/* --------------------------------------------------------------------------
   5. BUTTONS
   -------------------------------------------------------------------------- */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
  padding: 1.05rem 2.1rem;
  font-size: var(--text-sm);
  font-weight: 600;
  letter-spacing: var(--track-mid);
  text-transform: uppercase;
  border-radius: var(--radius);
  overflow: hidden;
  isolation: isolate;
  transition: color var(--t-fast), transform var(--t-fast), box-shadow var(--t-mid), border-color var(--t-fast), background var(--t-fast);
}
.btn svg { width: 15px; height: 15px; transition: transform 320ms var(--ease-out); }
.btn:hover svg { transform: translateX(4px); }
.btn:active { transform: translateY(1px) scale(0.995); }

.btn--primary {
  color: var(--cream);
  background: var(--espresso);
  box-shadow: var(--shadow-md);
}
.btn--primary:hover { background: var(--coffee); box-shadow: var(--shadow-lg); }

.btn--ghost {
  color: var(--espresso);
  border: 1px solid var(--hairline);
  background: transparent;
}
.btn--ghost:hover { border-color: var(--espresso); background: rgba(26, 20, 16, 0.04); }

.btn--xs { padding: 0.45rem 0.9rem; font-size: var(--text-xs); }

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-sm);
  font-weight: 600;
  letter-spacing: var(--track-mid);
  text-transform: uppercase;
  color: var(--espresso);
}
.link-arrow svg { width: 13px; transition: transform 320ms var(--ease-out); }
.link-arrow:hover svg { transform: translateX(4px); }

/* --------------------------------------------------------------------------
   6. UTILITY
   -------------------------------------------------------------------------- */
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; top: 8px; left: 8px;
  z-index: 200;
  padding: 10px 16px;
  background: var(--espresso);
  color: var(--cream);
  font-size: var(--text-xs);
  letter-spacing: var(--track-mid);
  text-transform: uppercase;
  border-radius: var(--radius);
  transform: translateY(-200%);
  transition: transform var(--t-fast);
}
.skip-link:focus { transform: translateY(0); }

.stack-4 { display: flex; flex-direction: column; gap: var(--space-4); }
.stack-6 { display: flex; flex-direction: column; gap: var(--space-6); }
.stack-8 { display: flex; flex-direction: column; gap: var(--space-8); }
.row { display: flex; align-items: center; gap: var(--space-4); flex-wrap: wrap; }

/* Scroll reveals */
.reveal { opacity: 1; }
@media (prefers-reduced-motion: no-preference) {
  .reveal { opacity: 0; transition: opacity 700ms var(--ease-out), transform 700ms var(--ease-out); transform: translateY(12px); }
  .reveal.is-in { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

