/* ClearBarrel — shared stylesheet
   Palette, typography, layout, navigation, footer, components, a11y */

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

:root {
  --bg: #ffffff;
  --surface: #faf8f4;        /* warm parchment, very subtle */
  --surface-cool: #f4f6f9;   /* cool wash */
  --ink: #1f2530;            /* near-black, cool */
  --ink-soft: #4b5563;
  --ink-muted: #6b7280;
  --rule: #e6e3dc;           /* warm hairline */
  --rule-strong: #d6d2c8;

  --blue: #6c91bf;
  --blue-deep: #3f6b9a;
  --green: #5f9b79;
  --green-deep: #3e7558;
  --amber: #d98b42;          /* decorative only */
  --amber-ink: #b8722f;      /* accessible on white */

  --shadow-sm: 0 1px 2px rgba(31, 37, 48, 0.05);
  --shadow-md: 0 8px 24px -12px rgba(31, 37, 48, 0.18);

  --max: 1200px;
  --max-narrow: 880px;
  --gutter: clamp(20px, 4vw, 48px);

  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 18px;
}

/* Reset / base */
*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Geist", ui-sans-serif, system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  font-weight: 400;
  font-size: 17px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  /* subtle craft grain */
  background-image:
    radial-gradient(circle at 18% 22%, rgba(108, 145, 191, 0.025), transparent 55%),
    radial-gradient(circle at 82% 78%, rgba(95, 155, 121, 0.022), transparent 60%);
  background-attachment: fixed;
}

/* Scroll-driven bubble layer (assets/bubbles.js).
   Fixed canvas in front of page content but behind nav. Multiply blend means
   it only darkens what's beneath — text remains crisp. pointer-events: none. */
.cb-bubbles {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: 1;
  pointer-events: none;
  mix-blend-mode: multiply;
  opacity: 0.72;
}
@media (prefers-reduced-motion: reduce) {
  .cb-bubbles { display: none; }
}

/* Lift content surfaces above the bubble layer so multiply only shows in
   negative space — cards, text panels and footer stay perfectly clean. */
.site-footer,
.step,
.card,
.pillar,
.series,
.channel,
.pnw__stat,
.wholesale__targets,
.ct-card,
.roadmap__item,
.placeholder-frame,
.product__specs,
.product__profile li,
.hero__chip,
.pullquote__mark,
.pullquote blockquote,
.mission__quote,
.mission__rule,
.field input,
.field select,
.field textarea,
.btn {
  position: relative;
  z-index: 2;
}

img { max-width: 100%; height: auto; display: block; }

a { color: inherit; }

/* Type scale */
h1, h2, h3, h4 {
  font-family: "Geist", sans-serif;
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin: 0 0 0.5em;
  text-wrap: balance;
  line-height: 1.08;
}

h1 {
  font-size: clamp(40px, 6vw, 76px);
  font-weight: 500;
  letter-spacing: -0.035em;
}

h2 {
  font-size: clamp(30px, 4vw, 48px);
  letter-spacing: -0.025em;
}

h3 {
  font-size: clamp(22px, 2.2vw, 28px);
  letter-spacing: -0.015em;
}

p { margin: 0 0 1em; text-wrap: pretty; max-width: 62ch; }

.mono,
.eyebrow,
code, kbd {
  font-family: "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace;
}

.eyebrow {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-muted);
  display: inline-block;
}
.eyebrow--accent {
  color: var(--amber-ink);
}

.lede {
  font-size: clamp(18px, 1.6vw, 22px);
  color: var(--ink-soft);
  line-height: 1.5;
  max-width: 60ch;
}

/* Skip link */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--ink);
  color: #fff;
  padding: 10px 16px;
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  z-index: 200;
  font-size: 14px;
  text-decoration: none;
}
.skip-link:focus { left: 16px; outline: 2px solid var(--amber); outline-offset: 2px; }

/* Focus */
:focus-visible {
  outline: 2px solid var(--amber-ink);
  outline-offset: 3px;
  border-radius: 3px;
}

/* Layout */
.container {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.container-narrow {
  max-width: var(--max-narrow);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

section { padding: clamp(64px, 9vw, 128px) 0; }

.rule {
  border: 0;
  border-top: 1px solid var(--rule);
  margin: 0;
}

/* Navigation */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: saturate(160%) blur(12px);
  -webkit-backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid var(--rule);
}

.site-nav__inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 14px var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--ink);
}

.brand__mark {
  width: 38px;
  height: 38px;
  object-fit: contain;
  flex-shrink: 0;
}

.brand__lockup {
  display: flex;
  flex-direction: column;
  line-height: 1;
}

.brand__name {
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.brand__sub {
  font-family: "Geist Mono", monospace;
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--green-deep);
  margin-top: 3px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  display: inline-block;
  padding: 8px 14px;
  font-size: 15px;
  font-weight: 500;
  color: var(--ink-soft);
  text-decoration: none;
  border-radius: 6px;
  transition: color .15s ease, background .15s ease;
  white-space: nowrap;
}

.nav-links a:hover { color: var(--amber-ink); }
.nav-links a[aria-current="page"] { color: var(--ink); }
.nav-links a[aria-current="page"]::after {
  content: "";
  display: block;
  height: 2px;
  width: 18px;
  background: var(--amber);
  margin: 4px auto 0;
  border-radius: 2px;
}

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--rule-strong);
  border-radius: 8px;
  padding: 8px 10px;
  cursor: pointer;
  color: var(--ink);
}
.nav-toggle svg { display: block; }

@media (max-width: 760px) {
  .nav-toggle { display: inline-flex; }
  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border-bottom: 1px solid var(--rule);
    flex-direction: column;
    align-items: stretch;
    padding: 8px var(--gutter) 16px;
    gap: 0;
    display: none;
  }
  .nav-links[data-open="true"] { display: flex; }
  .nav-links a {
    padding: 14px 4px;
    border-bottom: 1px solid var(--rule);
    font-size: 17px;
  }
  .nav-links li:last-child a { border-bottom: 0; }
  .nav-links a[aria-current="page"]::after { display: none; }
  .nav-links a[aria-current="page"] { color: var(--amber-ink); }
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 22px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -0.005em;
  border-radius: var(--radius);
  border: 1px solid transparent;
  text-decoration: none;
  cursor: pointer;
  transition: transform .12s ease, background .15s ease, border-color .15s ease, color .15s ease, box-shadow .15s ease;
  white-space: nowrap;
  line-height: 1;
}

.btn:active { transform: translateY(1px); }

.btn--primary {
  background: var(--ink);
  color: #fff;
}
.btn--primary:hover { background: var(--amber-ink); }

.btn--ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--rule-strong);
}
.btn--ghost:hover { border-color: var(--ink); }

.btn--amber {
  background: var(--amber-ink);
  color: #fff;
}
.btn--amber:hover { background: #9b6027; }

/* Filled accent CTA — amber, primary call-to-action moments */
.btn--accent {
  background: var(--amber-ink);
  color: #fff;
  box-shadow: 0 8px 18px -10px rgba(184, 114, 47, 0.6);
}
.btn--accent:hover { background: #9b6027; }

.btn__arrow { transition: transform .15s ease; }
.btn:hover .btn__arrow { transform: translateX(3px); }

/* Footer */
.site-footer {
  border-top: 1px solid var(--rule);
  padding: 56px 0 40px;
  margin-top: 40px;
  background: var(--surface);
}

.site-footer__grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 40px;
}

@media (max-width: 760px) {
  .site-footer__grid { grid-template-columns: 1fr; gap: 32px; }
}

.site-footer h4 {
  font-size: 12px;
  font-family: "Geist Mono", monospace;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-weight: 500;
  color: var(--ink-muted);
  margin-bottom: 16px;
}

.site-footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.site-footer a {
  color: var(--ink-soft);
  text-decoration: none;
  font-size: 15px;
}
.site-footer a:hover { color: var(--amber-ink); }

.site-footer__signoff {
  font-size: 14px;
  color: var(--ink-muted);
}

.site-footer__bottom {
  border-top: 1px solid var(--rule);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
  font-family: "Geist Mono", monospace;
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--ink-muted);
  text-transform: uppercase;
}
.site-footer__bottom span:first-child::before {
  content: "";
  display: inline-block;
  width: 8px; height: 8px;
  background: var(--amber);
  border-radius: 999px;
  margin-right: 10px;
  vertical-align: middle;
}

/* Reusable bits */
.section-head {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 56px;
  max-width: 720px;
}

.kicker-row {
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--ink-muted);
  font-family: "Geist Mono", monospace;
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.kicker-row::before {
  content: "";
  width: 32px;
  height: 2px;
  background: var(--amber);
  border-radius: 2px;
}

/* Color chips/dots */
.dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 999px;
  vertical-align: middle;
}
.dot--blue { background: var(--blue); }
.dot--green { background: var(--green); }
.dot--amber { background: var(--amber); }

/* Form */
.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.field label {
  font-family: "Geist Mono", monospace;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-muted);
  font-weight: 500;
}

.field input,
.field select,
.field textarea {
  font-family: inherit;
  font-size: 16px;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--rule-strong);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  transition: border-color .15s ease, box-shadow .15s ease;
  width: 100%;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--blue-deep);
  box-shadow: 0 0 0 3px rgba(108, 145, 191, 0.25);
}

.field textarea { resize: vertical; min-height: 140px; font-family: inherit; }

/* Visually hidden */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0; overflow: hidden;
  clip: rect(0,0,0,0); border: 0;
}

/* Surface variants for sections */
.surface-warm { background: var(--surface); }
.surface-cool { background: var(--surface-cool); }
.surface-blue { background: rgba(108, 145, 191, 0.08); }
.surface-green { background: rgba(95, 155, 121, 0.07); }

/* Card */
.card {
  background: #fff;
  border: 1px solid var(--rule);
  border-radius: var(--radius-lg);
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
