/* ==========================================================
   Tokens — from CONTENT.md §3.1 Color & Type
   ========================================================== */
:root {
  --color-surface: #F3F7F8;      /* cool parchment */
  --color-surface-tint: #BFE7F6; /* light blue */
  --color-accent: #50B1E4;       /* core blue */
  --color-primary: #237FAE;      /* dark blue */
  --color-text: #737373;         /* original gray */
  --color-text-muted: #A6A6A6;   /* medium gray */
  --color-divider: #D9D9D9;      /* pale gray */

  --font-heading: 'Space Grotesk', 'Helvetica Neue', Arial, sans-serif;
  --font-body: 'Manrope', 'Helvetica Neue', Arial, sans-serif;
  --font-mono: 'IBM Plex Mono', 'Courier New', monospace;

  --ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
  --reveal-distance: 24px;
  --reveal-duration: 650ms;
}

* { box-sizing: border-box; }

/* Smooth anchor-nav scrolling is handled in script.js (it must coordinate with the
   custom inertia scroll below) rather than via CSS scroll-behavior, which would fight
   the per-frame scrollTo() calls used there. */

body {
  margin: 0;
  background: var(--color-surface);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: var(--font-heading);
  color: var(--color-primary);
  letter-spacing: -0.02em;
  line-height: 1.05;
  margin: 0;
}

a { color: var(--color-primary); }

.section__inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 32px;
}

.eyebrow, .footer__label, .barker__hint {
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 12px;
  color: var(--color-text-muted);
}

.eyebrow { margin: 0 0 16px; }

/* ==========================================================
   Line-drawing graphic system (§5 Graphics Direction)
   ========================================================== */
.line-drawing { width: 100%; height: auto; overflow: visible; }
.ld-line {
  fill: none;
  stroke: var(--color-primary);
  stroke-width: 2.5;
  stroke-linecap: round;
}
.ld-line--thin { stroke-width: 1.5; }
.ld-node { fill: var(--color-primary); }
.ld-node--accent { fill: var(--color-accent); }
.ld-field { fill: var(--color-surface-tint); opacity: 0.55; }
.ld-frame {
  fill: none;
  stroke: var(--color-text-muted);
  stroke-width: 1.5;
  clip-path: polygon(0 0, 100% 0, 100% 85%, 85% 100%, 0 100%); /* cut corner */
}
.line-drawing--icon { width: 56px; height: 56px; }

/* ==========================================================
   Buttons
   ========================================================== */
.button {
  display: inline-block;
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 13px;
  text-decoration: none;
  padding: 14px 26px;
  border: 1.5px solid var(--color-primary);
  color: var(--color-primary);
  clip-path: polygon(0 0, 100% 0, 100% 100%, 14px 100%, 0 calc(100% - 14px));
  transition: background 180ms ease, color 180ms ease, transform 180ms var(--ease-bounce);
}
.button:hover { transform: translateY(-2px); }
.button--primary {
  background: var(--color-primary);
  color: var(--color-surface);
}
.button--primary:hover { background: var(--color-accent); border-color: var(--color-accent); }

/* ==========================================================
   Nav
   ========================================================== */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 32px;
  background: rgba(243, 247, 248, 0.82);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid transparent;
  transition: border-color 200ms ease;
}
.nav.is-scrolled { border-bottom-color: var(--color-divider); }

.nav__mark {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--color-primary);
}
.nav__mark-icon { width: 26px; height: 26px; color: var(--color-primary); }
.nav__mark-text {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 16px;
  letter-spacing: -0.01em;
}

.nav__links { display: flex; gap: 28px; }
.nav__links a {
  font-family: var(--font-mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  text-decoration: none;
  color: var(--color-text);
}
.nav__links a:hover { color: var(--color-primary); }

@media (max-width: 640px) {
  .nav__links { display: none; }
}

/* ==========================================================
   Sections — base + scroll-reveal bounce (§3.3)
   ========================================================== */
.section { padding: 120px 0; position: relative; }
.section + .section { border-top: 1px solid var(--color-divider); }

[data-reveal] {
  opacity: 0;
  transform: translateY(var(--reveal-distance));
  transition: opacity var(--reveal-duration) var(--ease-bounce),
              transform var(--reveal-duration) var(--ease-bounce);
}
[data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}
@media (prefers-reduced-motion: reduce) {
  [data-reveal] {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ==========================================================
   Hero
   ========================================================== */
.hero { padding-top: 180px; }
.hero__inner {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 48px;
  align-items: center;
}
.hero__headline { font-size: clamp(40px, 5.2vw, 64px); font-weight: 700; margin-bottom: 20px; }
.hero__sub { max-width: 46ch; margin: 0 0 32px; font-size: 18px; }

@media (max-width: 880px) {
  .hero__inner { grid-template-columns: 1fr; }
  .hero__graphic { order: -1; max-width: 320px; margin: 0 auto; }
}

/* ==========================================================
   Statement
   ========================================================== */
.statement__inner { max-width: 880px; }
.statement__text {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: clamp(26px, 3.4vw, 40px);
  color: var(--color-primary);
  letter-spacing: -0.01em;
  line-height: 1.25;
  margin: 0;
}

/* ==========================================================
   Section headline/sub (shared)
   ========================================================== */
.section__headline { font-size: clamp(30px, 4vw, 44px); font-weight: 700; margin-bottom: 16px; }
.section__sub { max-width: 56ch; margin: 0 0 56px; font-size: 17px; }

/* ==========================================================
   Features
   ========================================================== */
.features__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}
.feature-card {
  background: var(--color-surface);
  border: 1px solid var(--color-divider);
  padding: 28px;
  clip-path: polygon(0 0, 100% 0, 100% 100%, 20px 100%, 0 calc(100% - 20px));
}
.feature-card h3 {
  font-size: 19px;
  margin: 18px 0 8px;
}
.feature-card p { margin: 0; font-size: 15px; }

@media (max-width: 880px) {
  .features__grid { grid-template-columns: 1fr; }
}

/* ==========================================================
   Customers / Barker (§4 customers behavior spec)
   ========================================================== */
.customers { background: var(--color-surface-tint); }
.customers__graphic { max-width: 480px; margin: 0 auto 8px; }
.barker {
  position: relative;
  border-top: 1.5px solid var(--color-primary);
  border-bottom: 1.5px solid var(--color-primary);
  padding: 40px 0;
}
.barker__viewport {
  min-height: 3.2em;
  display: flex;
  align-items: center;
}
.barker__line {
  margin: 0;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: clamp(20px, 2.6vw, 30px);
  color: var(--color-primary);
  letter-spacing: -0.01em;
  transition: opacity 400ms ease, transform 400ms ease;
}
.barker__line.is-hidden { opacity: 0; transform: translateY(6px); }

.barker--static .barker__viewport { display: block; min-height: 0; }
.barker--static .barker__line { display: block; margin-bottom: 14px; font-size: 20px; }

.barker__hint { margin-top: 16px; }

/* ==========================================================
   Team
   ========================================================== */
.team__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 32px;
}
.person-card__photo {
  width: 80px; height: 80px;
  margin-bottom: 16px;
  color: var(--color-primary);
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid var(--color-primary);
}
.person-card__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.person-card__name {
  font-family: var(--font-heading);
  font-weight: 600;
  color: var(--color-primary);
  margin: 0;
}
.person-card__title {
  font-family: var(--font-mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-text-muted);
  margin: 4px 0 0;
}

@media (max-width: 880px) {
  .team__grid { grid-template-columns: repeat(2, 1fr); }
}

/* ==========================================================
   CTA
   ========================================================== */
.cta { background: var(--color-primary); }
.cta__inner { text-align: center; max-width: 720px; }
.cta__accent { width: 40px; height: 40px; margin: 0 auto 28px; }
.cta__headline {
  color: var(--color-surface);
  font-size: clamp(30px, 4vw, 46px);
  font-weight: 700;
  margin-bottom: 16px;
}
.cta__sub { color: var(--color-surface-tint); margin: 0 0 32px; }
.cta .button--primary {
  background: var(--color-accent);
  border-color: var(--color-accent);
  color: var(--color-primary);
}
.cta .button--primary:hover { background: var(--color-surface); border-color: var(--color-surface); }

/* ==========================================================
   Footer
   ========================================================== */
.footer { padding: 64px 0 32px; }
.footer__inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 32px;
  padding-bottom: 40px;
  border-bottom: 1px solid var(--color-divider);
}
.footer__col { display: flex; flex-direction: column; gap: 10px; }
.footer__brand { flex-direction: row; align-items: center; gap: 8px; }
.footer__col a { font-size: 14px; text-decoration: none; color: var(--color-text); }
.footer__col a:hover { color: var(--color-primary); }
.social-link { display: inline-flex; align-items: center; gap: 6px; }
.social-link svg { width: 16px; height: 16px; flex-shrink: 0; }
.footer__label { margin: 0 0 4px; }
.footer__legal { padding-top: 24px; font-size: 13px; color: var(--color-text-muted); }
.footer__legal a { color: var(--color-text-muted); text-decoration: underline; text-underline-offset: 2px; }
.footer__legal a:hover { color: var(--color-primary); }
.footer__legal .divider { margin: 0 8px; }

/* ==========================================================
   Legal pages (Terms, Privacy, Sub-Processors)
   ========================================================== */
.legal-header { padding: 150px 0 40px; }
.legal-header .back-link {
  font-family: var(--font-mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  text-decoration: none;
  color: var(--color-text-muted);
  display: inline-block;
  margin-bottom: 24px;
}
.legal-header .back-link:hover { color: var(--color-primary); }
.legal-header h1 { font-size: clamp(32px, 4.5vw, 48px); margin-bottom: 10px; }
.legal-updated {
  font-family: var(--font-mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-text-muted);
}

.legal { padding: 0 0 100px; }
.legal .section__inner { max-width: 760px; }
.legal p { margin: 0 0 16px; }
.legal h2 {
  font-size: 24px;
  margin: 48px 0 12px;
  padding-top: 24px;
  border-top: 1px solid var(--color-divider);
}
.legal h2:first-of-type { margin-top: 0; padding-top: 0; border-top: none; }
.legal h3 {
  font-family: var(--font-heading);
  font-size: 16px;
  color: var(--color-primary);
  margin: 28px 0 8px;
}
.legal ul { margin: 0 0 16px; padding-left: 22px; }
.legal li { margin-bottom: 8px; }
.legal a { color: var(--color-primary); text-decoration: underline; text-decoration-color: var(--color-divider); text-underline-offset: 2px; }
.legal a:hover { text-decoration-color: var(--color-primary); }
.legal .table-scroll { overflow-x: auto; margin: 0 0 24px; }
.legal table { width: 100%; min-width: 480px; border-collapse: collapse; font-size: 14px; }
.legal th, .legal td { border: 1px solid var(--color-divider); padding: 10px 12px; text-align: left; vertical-align: top; }
.legal th {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-text-muted);
  background: var(--color-surface-tint);
}
.legal .compliance-tag { font-family: var(--font-mono); font-size: 12px; color: var(--color-primary); display: block; }
.legal address { font-style: normal; }
.legal h4 {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-text-muted);
  margin: 20px 0 6px;
}

