/* ChimiChurri Code — Shared Styles */

@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500;600;700&display=swap');

/* ——— Custom fonts (bundled) ——— */
/* Google Fonts used only as fallback for glyphs missing from the bundled files. */
@import url('https://fonts.googleapis.com/css2?family=Archivo+Black&family=Archivo:wght@400;500;600;700;800;900&family=Playfair+Display:ital,wght@0,400;0,500;1,400&family=Oswald:wght@400;500;600;700&display=swap');

/* size-adjust on CHANEY scales glyphs down ~25% so the many inline
   font-size values across the brand guide read at the intended weight
   without rewriting each of them. */
@font-face {
  font-family: 'CHANEY';
  src: url('fonts/CHANEY-Regular.otf') format('opentype');
  font-weight: 400; font-style: normal; font-display: swap;
  size-adjust: 75%;
}
@font-face {
  font-family: 'CHANEY';
  src: url('fonts/CHANEY-Extended.otf') format('opentype');
  font-weight: 700 900; font-style: normal; font-display: swap;
  size-adjust: 75%;
}
@font-face {
  font-family: 'At Aero';
  src: url('fonts/AtAero-Regular.otf') format('opentype');
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'At Aero';
  src: url('fonts/AtAero-Medium.otf') format('opentype');
  font-weight: 500; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'At Aero';
  src: url('fonts/AtAero-Semibold.otf') format('opentype');
  font-weight: 600; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'At Aero';
  src: url('fonts/AtAero-Bold.otf') format('opentype');
  font-weight: 700; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'At Aero';
  src: url('fonts/AtAero-RegularItalic.otf') format('opentype');
  font-weight: 400; font-style: italic; font-display: swap;
}
@font-face {
  font-family: 'Scilla Narrow';
  src: url('fonts/ScillaNarrow-Regular.otf') format('opentype');
  font-weight: 400 700; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Scilla Narrow';
  src: url('fonts/ScillaNarrow-RegularItalic.otf') format('opentype');
  font-weight: 400 700; font-style: italic; font-display: swap;
}
@font-face {
  font-family: 'Thunder';
  src: url('fonts/Thunder-VF.ttf') format('truetype-variations');
  font-weight: 100 900; font-style: normal; font-display: swap;
}

:root {
  /* Core */
  --charcoal: #1C1C1C;
  --charcoal-90: #2A2A2A;
  --charcoal-70: #3D3D3D;
  --charcoal-50: #5C5C5C;

  --ivory: #F2E6C9;
  --ivory-light: #F8F0DA;
  --ivory-soft: #FBF6E8;

  /* Brand accents — slightly rebalanced for harmony */
  --patagonia: #02B5B9;
  --patagonia-deep: #017F82;
  --patagonia-soft: #7DD8D2;

  --lemon: #F9D71C;
  --lemon-deep: #D9B800;

  --red: #A64132;
  --red-deep: #7F2F24;

  --slate: #4F5D6B;
  --slate-soft: #7A8896;

  --green: #5E7153;
  --gold: #C5A059;

  /* Type stacks — CHANEY/At Aero/Scilla/Thunder with Google Fonts fallbacks */
  --font-display: 'CHANEY', 'Archivo Black', 'Impact', sans-serif;
  --font-ui: 'At Aero', 'Archivo', 'Helvetica Neue', sans-serif;
  --font-editorial: 'Scilla Narrow', 'Playfair Display', Georgia, serif;
  --font-data: 'Thunder', 'Oswald', 'Helvetica Neue', sans-serif;
  --font-mono: 'JetBrains Mono', 'Courier New', monospace;

  --maxw: 1440px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  background: var(--charcoal);
  color: var(--ivory);
  font-family: var(--font-ui);
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "ss01", "ss02";
}

body { min-height: 100vh; }

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

.mono { font-family: var(--font-mono); }
/* CHANEY stylistic alternates (angled A/I/K/N/O/S/W/X/Y).
   Elements that pick up the display face inherit ss01. Opt out with .no-alt. */
.display,
h1, h2, h3, h4, h5, h6,
[style*="font-display"] {
  font-feature-settings: "ss01";
}
.display { font-family: var(--font-display); letter-spacing: 0.01em; }
.no-alt { font-feature-settings: normal !important; }
.editorial { font-family: var(--font-editorial); }
.data { font-family: var(--font-data); letter-spacing: 0.02em; }

/* ——— Shell / nav (mobile-first, mirrors DS SiteHeader behaviour) ——— */
.shell {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 24px 20px 96px;
}
@media (min-width: 768px) {
  .shell { padding: 32px 32px 120px; }
}
@media (min-width: 1024px) {
  .shell { padding: 32px 48px 120px; }
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 20px;
  background: rgba(28,28,28,0.94);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(242, 230, 201, 0.12);
}
@media (min-width: 1024px) {
  .topbar {
    padding: 16px 32px;
    gap: 24px;
  }
}

.topbar .brand { flex-shrink: 0; }

.brand {
  display: flex; align-items: center; gap: 12px;
  font-family: var(--font-display);
  font-size: 16px;
  letter-spacing: 0.04em;
}
@media (min-width: 768px) {
  .brand { font-size: 18px; }
}

.brand-mark { width: 28px; height: 28px; }

/* Hamburger toggle — visible <1024px, hidden at lg+ in favour of inline nav. */
.topbar-toggle {
  appearance: none;
  background: transparent;
  border: 1px solid rgba(242, 230, 201, 0.18);
  color: var(--ivory);
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  cursor: pointer;
  margin-left: auto;
}
.topbar-toggle:focus-visible { outline: 2px solid var(--patagonia); outline-offset: 2px; }
.topbar-toggle-bars,
.topbar-toggle-bars::before,
.topbar-toggle-bars::after {
  content: "";
  display: block;
  width: 18px;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
  position: relative;
  transition: transform 200ms ease, top 200ms ease, opacity 150ms ease;
}
.topbar-toggle-bars::before { position: absolute; left: 0; top: -6px; }
.topbar-toggle-bars::after  { position: absolute; left: 0; top:  6px; }

body.brand-menu-open .topbar-toggle-bars { background: transparent; }
body.brand-menu-open .topbar-toggle-bars::before { top: 0; transform: rotate(45deg); }
body.brand-menu-open .topbar-toggle-bars::after  { top: 0; transform: rotate(-45deg); }

@media (min-width: 1024px) {
  .topbar-toggle { display: none; }
}

/* Nav: off-canvas drawer below md, inline horizontal at lg+. */
.nav {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 16px 20px 24px;
  background: rgba(28,28,28,0.98);
  border-bottom: 1px solid rgba(242, 230, 201, 0.12);
  font-family: var(--font-mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  transform: translateY(-8px);
  opacity: 0;
  pointer-events: none;
  transition: transform 180ms ease, opacity 180ms ease;
}
.nav[data-state="open"] {
  transform: none;
  opacity: 1;
  pointer-events: auto;
}
.nav a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 4px 8px;
  color: var(--ivory);
  opacity: 0.75;
  border-bottom: 1px solid transparent;
  transition: opacity 120ms ease, color 120ms ease;
}
.nav a:hover { opacity: 1; }
.nav a.active { opacity: 1; color: var(--patagonia); border-bottom-color: var(--patagonia); }

@media (min-width: 1024px) {
  .nav {
    position: static;
    flex: 1;
    flex-direction: row;
    justify-content: center;
    gap: 20px;
    padding: 0;
    background: transparent;
    border-bottom: 0;
    transform: none;
    opacity: 1;
    pointer-events: auto;
    transition: none;
    overflow-x: auto;
    scrollbar-width: none;
    font-size: 10px;
    letter-spacing: 0.1em;
    white-space: nowrap;
  }
  .nav::-webkit-scrollbar { display: none; }
  .nav a {
    min-height: 0;
    padding-bottom: 4px;
  }
}

.topbar-meta {
  display: none;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  opacity: 0.5;
  flex-shrink: 0;
  white-space: nowrap;
}
@media (min-width: 1280px) {
  .topbar-meta { display: block; }
}

/* Section headers */
.page-intro {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  padding: 72px 0 64px;
  border-bottom: 1px solid rgba(242,230,201,0.1);
  margin-bottom: 72px;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--patagonia);
  margin-bottom: 18px;
}

.page-title {
  font-family: var(--font-display);
  font-size: clamp(56px, 8vw, 110px);
  line-height: 0.92;
  letter-spacing: 0.005em;
  color: var(--ivory);
}
.page-title .accent { color: var(--lemon); }

.page-kicker {
  font-family: var(--font-editorial);
  font-style: italic;
  font-size: 20px;
  line-height: 1.4;
  color: var(--ivory);
  opacity: 0.75;
  max-width: 48ch;
  align-self: end;
}

.section-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  opacity: 0.5;
  margin-bottom: 20px;
  display: flex; align-items: center; gap: 12px;
}
.section-label::before {
  content: '';
  width: 24px; height: 1px;
  background: var(--patagonia);
}

.h2 {
  font-family: var(--font-display);
  font-size: 44px;
  line-height: 1;
  margin-bottom: 10px;
}
.h3 {
  font-family: var(--font-ui);
  font-weight: 700;
  font-size: 18px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.block {
  margin-bottom: 96px;
}

.card {
  background: var(--charcoal-90);
  border: 1px solid rgba(242,230,201,0.08);
  border-radius: 2px;
  padding: 24px;
}

.caption {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.55;
  line-height: 1.5;
}

/* Grid helpers */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }

/* Placeholder image — subtly striped SVG */
.placeholder {
  background-image:
    repeating-linear-gradient(
      135deg,
      rgba(242,230,201,0.04) 0,
      rgba(242,230,201,0.04) 2px,
      transparent 2px,
      transparent 12px
    );
  background-color: var(--charcoal-70);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-mono);
  font-size: 11px;
  color: rgba(242,230,201,0.5);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* Light page variant */
.light { background: var(--ivory); color: var(--charcoal); }
.light .topbar { background: rgba(242,230,201,0.92); border-bottom-color: rgba(28,28,28,0.12); }
.light .nav a { color: var(--charcoal); }
.light .card { background: var(--ivory-light); border-color: rgba(28,28,28,0.08); }

/* Footer (mobile-first, mirrors DS SiteFooter rich variant). */
.brand-footer {
  margin-top: 120px;
  padding: 56px 0 32px;
  border-top: 1px solid rgba(242, 230, 201, 0.1);
}
.brand-footer .brand-footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(28px, 5vw, 56px);
  padding-bottom: 32px;
}
.brand-footer .brand--footer {
  margin-bottom: 12px;
}
.brand-footer .brand-footer-blurb {
  font-family: var(--font-editorial);
  font-style: italic;
  font-size: 16px;
  line-height: 1.5;
  max-width: 36ch;
  opacity: 0.8;
}
.brand-footer .brand-footer-title {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  opacity: 0.55;
  margin: 0 0 12px;
  font-weight: 500;
}
.brand-footer .brand-footer-col ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 8px;
}
.brand-footer .brand-footer-col a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.85;
  transition: opacity 120ms ease, color 120ms ease;
}
.brand-footer .brand-footer-col a:hover { opacity: 1; color: var(--patagonia); }

.brand-footer .brand-footer-bar {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-top: 24px;
  border-top: 1px solid rgba(242, 230, 201, 0.1);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  opacity: 0.55;
}

@media (min-width: 768px) {
  .brand-footer .brand-footer-grid {
    grid-template-columns: 1fr 1fr;
  }
  .brand-footer .brand-footer-col--brand { grid-column: 1 / -1; }
  .brand-footer .brand-footer-col a { min-height: 0; }
  .brand-footer .brand-footer-bar {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }
}
@media (min-width: 1024px) {
  .brand-footer .brand-footer-grid {
    grid-template-columns: 1.6fr repeat(2, minmax(0, 1fr));
  }
  .brand-footer .brand-footer-col--brand { grid-column: auto; }
}

/* Back-compat: keep the old class working in case any page still ships it. */
.page-footer {
  margin-top: 120px;
  padding: 32px 0 12px;
  border-top: 1px solid rgba(242, 230, 201, 0.1);
  display: flex; justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  opacity: 0.5;
}

/* Scrollbar */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(242,230,201,0.15); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: rgba(242,230,201,0.3); }
