/* =====================================================================
   Clear Conversions — site-wide brand stylesheet
   Source of truth: docs/Clear_Conversions_Brand_Style_Guide_v1.0.html
   Layer order: this file first, then optional /components/*.css, then
   page-specific <style> blocks scoped with a body class (.page-xxx).
   ===================================================================== */

/* ---------------------------------------------------------
   Design tokens
---------------------------------------------------------- */
:root {
  /* Ink ladder (text + surfaces) */
  --ink: #1C1C1C;
  --graphite: #3A3633;
  --smoke: #5C5650;
  --taupe: #A89B85;

  /* Paper ladder (backgrounds) */
  --sand: #E8E0D0;
  --bone: #F5F1EB;
  --paper: #FAF7F2;
  --line: #D8CFBE;

  /* Accents (use sparingly) */
  --brass: #C9A961;
  --terracotta: #C24D2C;
  --terracotta-dark: #A33E20;

  /* Type */
  --sans: 'Cabinet Grotesk', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;

  /* Radii */
  --r-pill: 999px;
  --r-tag: 6px;
  --r-button: 999px;
  --r-input: 8px;
  --r-card: 12px;
  --r-large: 16px;

  /* Chamfer (signature cut-corner shape) */
  --chamfer: 36px;
  --chamfer-clip: polygon(0 0, calc(100% - var(--chamfer)) 0, 100% var(--chamfer), 100% 100%, 0 100%);
  --chamfer-sm: 18px;
  --chamfer-clip-sm: polygon(0 0, calc(100% - var(--chamfer-sm)) 0, 100% var(--chamfer-sm), 100% 100%, 0 100%);

  /* Layout */
  --max-w: 960px;
  --max-w-prose: 680px;
  --pad-x: 40px;
  --pad-x-mobile: 24px;
}

/* ---------------------------------------------------------
   Reset + base
---------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background: var(--bone);
  color: var(--ink);
  font-size: 19px;
  font-weight: 400;
  line-height: 1.7;
  letter-spacing: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

::selection { background: var(--ink); color: var(--bone); }

a { color: inherit; text-decoration: none; }
a:focus-visible {
  outline: 2px solid var(--terracotta);
  outline-offset: 3px;
  border-radius: 2px;
}

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

/* ---------------------------------------------------------
   Headlines (semantic-default scale)
   Use <h1>..<h4> directly; no class required.
---------------------------------------------------------- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--sans);
  color: var(--ink);
  margin: 0;
}

h1 {
  font-weight: 800;
  font-size: clamp(48px, 8vw, 96px);
  line-height: 0.98;
  letter-spacing: -0.04em;
  margin: 0 0 28px;
}

h2 {
  font-weight: 700;
  font-size: clamp(32px, 5vw, 44px);
  line-height: 1.05;
  letter-spacing: -0.03em;
  margin: 0 0 16px;
}

h3 {
  font-weight: 600;
  font-size: clamp(22px, 3vw, 28px);
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0 0 12px;
}

h4 {
  font-weight: 500;
  font-size: 20px;
  line-height: 1.3;
  letter-spacing: -0.01em;
  margin: 0 0 8px;
}

/* Hero headline accent (the terracotta highlight in the wordmark style). */
h1 .accent, h2 .accent, h3 .accent,
.accent { color: var(--terracotta); }

p { margin: 0 0 16px; line-height: 1.7; }
p:last-child { margin-bottom: 0; }

strong { font-weight: 600; }

/* Lede / intro paragraph */
.lede {
  font-size: clamp(17px, 2vw, 19px);
  font-weight: 400;
  line-height: 1.55;
  color: var(--ink);
  max-width: var(--max-w-prose);
  margin: 0 0 40px;
}

/* Small body (caption-adjacent, but sentence-case) */
.body-sm {
  font-size: 14px;
  line-height: 1.55;
  color: var(--smoke);
}

/* Eyebrow — the brand's third tier (small uppercase tracked caption) */
.eyebrow {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--smoke);
  display: block;
  margin: 0 0 16px;
}

/* ---------------------------------------------------------
   Layout container
---------------------------------------------------------- */
.wrap {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--pad-x);
  width: 100%;
}
.wrap-prose {
  max-width: var(--max-w-prose);
  margin: 0 auto;
  padding: 0 var(--pad-x);
  width: 100%;
}

@media (max-width: 640px) {
  .wrap, .wrap-prose { padding: 0 var(--pad-x-mobile); }
}

main { flex: 1; padding: 72px 0 120px; }
@media (max-width: 640px) { main { padding: 48px 0 80px; } }

/* When the hero is the first child of main, the hero owns top spacing.
   Prevents 168px of stacked padding above the headline. */
main:has(> section.hero:first-child) { padding-top: 0; }

section { scroll-margin-top: 80px; margin-bottom: 48px; }

/* ---------------------------------------------------------
   Topbar (sticky site header)
---------------------------------------------------------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--bone);
  border-bottom: 0.5px solid var(--line);
  min-height: 64px;
}
.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 64px;
  width: 100%;
}
.topbar-brand {
  font-family: var(--sans);
  font-weight: 800;
  font-size: 22px;
  letter-spacing: -0.035em;
  color: var(--ink);
  line-height: 1;
  text-decoration: none;
}
.topbar-brand .period { color: var(--terracotta); }

.topbar-nav {
  display: flex;
  align-items: center;
  gap: 32px;
}
.topbar-nav a {
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -0.005em;
  color: var(--smoke);
  line-height: 1;
  transition: color 0.15s ease;
}
.topbar-nav a:hover { color: var(--ink); }
.topbar-nav a.active { color: var(--ink); font-weight: 600; }

/* Hamburger button (mobile only) */
.topbar-burger {
  display: none;
  width: 44px;
  height: 44px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  position: relative;
  margin-right: -8px;
}
.topbar-burger span {
  position: absolute;
  left: 10px;
  right: 10px;
  height: 1.5px;
  background: var(--ink);
  transition: transform 0.2s ease, opacity 0.2s ease, top 0.2s ease;
}
.topbar-burger span:nth-child(1) { top: 16px; }
.topbar-burger span:nth-child(2) { top: 22px; }
.topbar-burger span:nth-child(3) { top: 28px; }
.topbar-burger[aria-expanded="true"] span:nth-child(1) { top: 22px; transform: rotate(45deg); }
.topbar-burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.topbar-burger[aria-expanded="true"] span:nth-child(3) { top: 22px; transform: rotate(-45deg); }

/* Mobile menu panel (hidden on desktop) */
.topbar-mobile {
  display: none;
}

@media (max-width: 768px) {
  .topbar-nav { display: none; }
  .topbar-burger { display: block; }

  .topbar-mobile {
    display: block;
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--bone);
    border-bottom: 0.5px solid var(--line);
    padding: 16px var(--pad-x-mobile) 32px;
    transform: translateY(-110%);
    transition: transform 0.25s ease;
    z-index: 49;
    box-shadow: 0 12px 24px rgba(28, 28, 28, 0.04);
  }
  .topbar-mobile[data-open="true"] { transform: translateY(0); }
  .topbar-mobile-nav {
    display: flex;
    flex-direction: column;
  }
  .topbar-mobile-nav a {
    font-family: var(--sans);
    font-size: 22px;
    font-weight: 600;
    letter-spacing: -0.02em;
    color: var(--ink);
    padding: 18px 0;
    border-bottom: 0.5px solid var(--line);
    line-height: 1.2;
  }
  .topbar-mobile-nav a:last-child { border-bottom: none; }
  .topbar-mobile-nav a.active { color: var(--terracotta); }
  .topbar-mobile-nav .btn {
    margin-top: 20px;
    width: 100%;
  }
}

/* ---------------------------------------------------------
   Buttons
---------------------------------------------------------- */
.btn {
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1;
  border-radius: var(--r-button);
  cursor: pointer;
  transition: background 0.2s, color 0.2s, transform 0.15s, opacity 0.2s, border-color 0.2s;
  letter-spacing: -0.005em;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-decoration: none;
  border: none;
  white-space: nowrap;
}

.btn-primary {
  background: var(--terracotta);
  color: var(--bone);
  font-weight: 600;
  padding: 16px 28px;
}
.btn-primary:hover { background: var(--terracotta-dark); transform: translateY(-1px); }
.btn-primary:active { transform: translateY(0); }

.btn-secondary {
  background: transparent;
  color: var(--ink);
  border: 0.5px solid var(--ink);
  font-weight: 500;
  padding: 15px 26px;
}
.btn-secondary:hover { background: var(--ink); color: var(--bone); transform: translateY(-1px); }

.btn-tertiary {
  background: var(--ink);
  color: var(--bone);
  font-weight: 500;
  padding: 16px 28px;
}
.btn-tertiary:hover { opacity: 0.88; transform: translateY(-1px); }

/* Size modifiers */
.btn-sm { font-size: 14px; padding: 12px 22px; gap: 8px; }
.btn-sm.btn-secondary { padding: 11px 20px; }
.btn-lg { font-size: 19px; padding: 19px 34px; gap: 12px; }
.btn-lg.btn-secondary { padding: 18px 32px; }
.btn-xl { font-size: 22px; padding: 22px 40px; gap: 14px; font-weight: 700; }
.btn-xl.btn-secondary { padding: 21px 38px; font-weight: 600; }

.btn-caps { text-transform: uppercase; letter-spacing: 0.02em; font-weight: 600; }
.btn-caps.btn-lg { letter-spacing: 0.03em; }
.btn-caps.btn-xl { letter-spacing: 0.04em; }

.btn-arrow {
  display: inline-block;
  transform: translateX(0);
  transition: transform 0.2s;
}
.btn:hover .btn-arrow { transform: translateX(3px); }

/* ---------------------------------------------------------
   Cards / surfaces
---------------------------------------------------------- */
.section-card {
  background: var(--paper);
  border: 0.5px solid var(--sand);
  clip-path: var(--chamfer-clip);
  padding: 56px;
}
.section-card > *:last-child { margin-bottom: 0; }

.card {
  background: var(--paper);
  border: 0.5px solid var(--sand);
  clip-path: var(--chamfer-clip);
  padding: 44px;
}
.card-inset {
  background: var(--bone);
  border: 0.5px solid var(--line);
  clip-path: var(--chamfer-clip);
  padding: 44px;
}
.card-dark {
  background: var(--ink);
  color: var(--bone);
  clip-path: var(--chamfer-clip);
  padding: 44px;
}
.card-dark h1, .card-dark h2, .card-dark h3, .card-dark h4 { color: var(--bone); }
.card-dark .accent { color: var(--brass); }
.card-dark .body-sm { color: var(--taupe); }

@media (max-width: 640px) {
  .section-card { padding: 32px 24px; clip-path: var(--chamfer-clip-sm); }
  .card, .card-inset, .card-dark { padding: 32px 24px; clip-path: var(--chamfer-clip-sm); }
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
@media (max-width: 768px) {
  .card-grid { grid-template-columns: 1fr; }
}

/* ---------------------------------------------------------
   Forms
---------------------------------------------------------- */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px 32px;
}
.field { margin: 0; }
.field.full { grid-column: 1 / -1; }

.label {
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
  margin-bottom: 8px;
  display: block;
  letter-spacing: -0.005em;
}

.input, .select, .textarea {
  background: var(--bone);
  border: 0.5px solid var(--line);
  border-radius: var(--r-input);
  padding: 14px 16px;
  min-height: 52px;
  font-family: var(--sans);
  font-size: 17px;
  font-weight: 400;
  color: var(--ink);
  width: 100%;
  transition: border-color 0.2s;
  -webkit-appearance: none;
  appearance: none;
}
.input:focus, .select:focus, .textarea:focus {
  outline: none;
  border-color: var(--ink);
  border-width: 1px;
}
.input::placeholder, .textarea::placeholder { color: var(--smoke); opacity: 0.7; }
.textarea { resize: vertical; min-height: 140px; line-height: 1.5; }
.select {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'><path fill='none' stroke='%231C1C1C' stroke-width='1.5' d='M1 1.5 L6 6.5 L11 1.5'/></svg>");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
}

@media (max-width: 640px) {
  .form-grid { grid-template-columns: 1fr; gap: 20px; }
}

/* ---------------------------------------------------------
   Hero (homepage / landing pages)
---------------------------------------------------------- */
.hero {
  /* Longhand on purpose: when combined with .wrap on the same element,
     shorthand padding would zero out .wrap's horizontal padding. */
  padding-top: 96px;
  padding-bottom: 80px;
}
.hero-eyebrow { margin-bottom: 28px; }
.hero h1 { margin: 0 0 28px; }
.hero-sub {
  font-size: clamp(17px, 2vw, 19px);
  font-weight: 400;
  line-height: 1.55;
  color: var(--ink);
  max-width: 620px;
  margin: 0 0 36px;
}
.hero-ctas {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin: 0 0 48px;
}
.hero-trust {
  padding-top: 28px;
  border-top: 0.5px solid var(--line);
  font-size: 13px;
  color: var(--smoke);
  line-height: 1.5;
}
.hero-trust strong { color: var(--ink); font-weight: 600; }
.hero-trust-items {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  margin-top: 12px;
}
.hero-trust-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.hero-trust-item .check {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  color: var(--brass);
}

@media (max-width: 640px) {
  .hero { padding-top: 48px; padding-bottom: 56px; }
}

/* ---------------------------------------------------------
   Editorial list (rule list with brass square marker)
---------------------------------------------------------- */
.rule-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.rule-list li {
  position: relative;
  padding: 22px 0 22px 28px;
  border-top: 0.5px solid var(--line);
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
}
.rule-list li:first-child { border-top: none; padding-top: 0; }
.rule-list li strong {
  display: block;
  font-weight: 600;
  margin-bottom: 6px;
  font-size: 18px;
  letter-spacing: -0.005em;
}
.rule-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 30px;
  width: 8px;
  height: 8px;
  background: var(--brass);
}
.rule-list li:first-child::before { top: 8px; }

/* ---------------------------------------------------------
   Footer (injected by /assets/js/components/footer.js)
---------------------------------------------------------- */
.cc-foot {
  background: var(--bone);
  border-top: 0.5px solid var(--line);
  padding: 56px 24px 64px;
  text-align: center;
  color: var(--ink);
}
.cc-foot-inner { max-width: 640px; margin: 0 auto; }
.cc-foot-brand {
  font-weight: 800;
  font-size: 22px;
  line-height: 1;
  letter-spacing: -0.035em;
  margin: 0 0 28px;
}
.cc-foot-brand .cc-foot-dot { color: var(--terracotta); }
.cc-foot-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 28px;
  margin: 0 0 24px;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.cc-foot-links a {
  color: var(--smoke);
  transition: color 0.15s ease;
}
.cc-foot-links a:hover { color: var(--ink); }
.cc-foot-copy {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--smoke);
  margin: 0;
}
@media (max-width: 640px) {
  .cc-foot { padding: 48px 16px 56px; }
  .cc-foot-brand { font-size: 20px; margin-bottom: 24px; }
  .cc-foot-links { gap: 20px; margin-bottom: 20px; }
}

/* ---------------------------------------------------------
   Lightbox (injected by /assets/js/components/lightbox.js)
---------------------------------------------------------- */
.cc-lightbox {
  border: 0.5px solid var(--line);
  clip-path: polygon(0 0, calc(100% - 24px) 0, 100% 24px, 100% 100%, 0 100%);
  padding: 48px 40px 40px;
  max-width: 460px;
  width: calc(100% - 2rem);
  background: var(--bone);
  box-shadow: 0 24px 64px rgba(28, 28, 28, 0.18);
  color: var(--ink);
}
.cc-lightbox::backdrop {
  background: rgba(28, 28, 28, 0.6);
  backdrop-filter: blur(3px);
}
.cc-lightbox-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  background: transparent;
  border: none;
  color: var(--smoke);
  font-size: 1.5rem;
  line-height: 1;
  border-radius: var(--r-button);
  cursor: pointer;
  transition: background-color 0.15s, color 0.15s;
}
.cc-lightbox-close:hover { background: var(--paper); color: var(--ink); }
.cc-lightbox-title {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.1;
  margin: 0 0 12px;
}
.cc-lightbox-sub {
  font-size: 16px;
  line-height: 1.5;
  color: var(--smoke);
  margin: 0 0 28px;
}
.cc-lightbox-form { display: flex; flex-direction: column; gap: 8px; }
.cc-lightbox-form-label {
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 4px;
  letter-spacing: -0.005em;
}
.cc-lightbox-form-input {
  padding: 14px 16px;
  font-size: 17px;
  border: 0.5px solid var(--line);
  border-radius: var(--r-input);
  font-family: var(--sans);
  transition: border-color 0.2s;
  min-height: 52px;
  color: var(--ink);
  background: var(--paper);
  width: 100%;
  -webkit-appearance: none;
  appearance: none;
}
.cc-lightbox-form-input:focus {
  outline: none;
  border-color: var(--ink);
  border-width: 1px;
}
.cc-lightbox-form-input::placeholder { color: var(--smoke); opacity: 0.7; }
.cc-lightbox-form-input[aria-invalid="true"] { border-color: var(--terracotta); }
.cc-lightbox-form-submit {
  padding: 16px 28px;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.005em;
  border: none;
  border-radius: var(--r-button);
  background: var(--terracotta);
  color: var(--bone);
  cursor: pointer;
  transition: background-color 0.2s, transform 0.15s;
  min-height: 52px;
  font-family: var(--sans);
  margin-top: 12px;
}
.cc-lightbox-form-submit:hover { background: var(--terracotta-dark); transform: translateY(-1px); }
.cc-lightbox-form-submit:active { transform: translateY(0); }
.cc-lightbox-form-submit:disabled {
  background: var(--taupe);
  cursor: not-allowed;
  transform: none;
}
.cc-lightbox-form-error {
  font-size: 13px;
  color: var(--terracotta);
  margin: 8px 0 0;
  min-height: 1.1rem;
}
@media (prefers-reduced-motion: no-preference) {
  .cc-lightbox[open] { animation: cc-lightbox-in 0.2s ease-out; }
}
@keyframes cc-lightbox-in {
  from { opacity: 0; transform: translateY(-8px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* ---------------------------------------------------------
   Longform prose (privacy, terms, blog posts)
   Apply via <main class="longform">. Drops headline scale to
   legal-doc proportions and gives ul/ol a brand bullet.
---------------------------------------------------------- */
.longform { font-size: 17px; line-height: 1.7; color: var(--ink); }
.longform h2 {
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink);
  margin: 48px 0 14px;
  padding-bottom: 12px;
  border-bottom: 0.5px solid var(--line);
  line-height: 1.4;
}
.longform h2:first-child { margin-top: 0; }
.longform h3 {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.005em;
  margin: 24px 0 8px;
  line-height: 1.3;
}
.longform p {
  font-size: 17px;
  line-height: 1.7;
  margin: 0 0 14px;
  color: var(--ink);
}
.longform p:last-child { margin-bottom: 0; }
.longform ul, .longform ol {
  list-style: none;
  padding: 0;
  margin: 8px 0 18px;
}
.longform ul li, .longform ol li {
  font-size: 17px;
  line-height: 1.7;
  padding: 4px 0 4px 22px;
  position: relative;
  color: var(--ink);
}
.longform ul li::before {
  content: "";
  position: absolute;
  left: 6px;
  top: 0.95em;
  width: 8px;
  height: 1px;
  background: var(--brass);
}
.longform ol { counter-reset: list; }
.longform ol li { counter-increment: list; }
.longform ol li::before {
  content: counter(list) ".";
  position: absolute;
  left: 0;
  top: 4px;
  color: var(--smoke);
  font-weight: 500;
  font-size: 14px;
}
.longform strong { font-weight: 700; color: var(--ink); }
.longform a {
  color: var(--terracotta);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.longform a:hover { color: var(--terracotta-dark); }
.longform .legal-caps {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.04em;
  margin-top: 18px;
}
.longform .legal-contact {
  background: var(--paper);
  border-left: 3px solid var(--terracotta);
  padding: 20px 24px;
  margin: 16px 0;
}
.longform .legal-contact p { font-size: 14px; margin-bottom: 4px; }
.longform .legal-contact p:last-child { margin-bottom: 0; }

/* ---------------------------------------------------------
   Utility helpers
---------------------------------------------------------- */
.text-center { text-align: center; }
.mt-48 { margin-top: 48px; }
