/* ==========================================================================
   QuarterZip Labs — marketing site
   Calm, editorial, confident. Cream paper, ink, a single clay accent, sand bands.
   Headlines: Source Serif 4 (refined editorial serif). Body/UI: Hanken Grotesk.
   ========================================================================== */
@import url('https://fonts.googleapis.com/css2?family=Source+Serif+4:opsz,wght@8..60,400;8..60,500;8..60,600;8..60,700&family=Hanken+Grotesk:wght@400;500;600;700&display=swap');

:root {
  /* The four-color palette */
  --paper:        #F7F4EF;   /* page background */
  --paper-raised: #FAF8F3;   /* raised cards on paper */
  --sand:         #EDE8DF;   /* secondary surface / bands */
  --sand-deep:    #E4DDD0;   /* nested surface inside sand */
  --ink:          #1A1A18;   /* primary text */
  --clay:         #CC785C;   /* the single accent */

  /* Ink tints (derived, warm) */
  --ink-70: #5B574F;         /* secondary text */
  --ink-50: #837E73;         /* muted text */
  --ink-30: #ADA89C;         /* faint */

  /* Clay tints */
  --clay-hover:   #B5634A;
  --clay-press:   #9E5440;
  --clay-tint:    #F3E4DC;   /* subtle clay wash */
  --clay-on:      #FBF6F2;   /* text on clay */

  /* Lines */
  --rule:         rgba(26, 26, 24, 0.12);
  --rule-soft:    rgba(26, 26, 24, 0.08);
  --rule-strong:  rgba(26, 26, 24, 0.20);
  --rule-on-ink:  rgba(247, 244, 239, 0.16);

  /* Fonts */
  --serif: 'Source Serif 4', Georgia, 'Times New Roman', serif;
  --sans:  'Hanken Grotesk', system-ui, -apple-system, 'Segoe UI', sans-serif;

  /* Rhythm */
  --maxw: 1120px;
  --maxw-text: 720px;
  --gutter: 24px;
  --radius: 10px;
  --radius-sm: 8px;
  --section-y: 80px;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---- Reset & base ---- */
* , *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 18px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
@media (max-width: 600px) { body { font-size: 17px; } }
@media (max-width: 600px) { :root { --section-y: 56px; } .section--tight { padding-block: 44px; } .hero { padding-top: 40px; padding-bottom: 44px; } }

h1, h2, h3, h4 { font-family: var(--serif); font-weight: 600; color: var(--ink); margin: 0; line-height: 1.08; letter-spacing: -0.01em; }
p { margin: 0; }
a { color: var(--clay); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
img, svg { max-width: 100%; display: block; }
::selection { background: var(--clay-tint); }
:focus-visible { outline: 2px solid var(--clay); outline-offset: 3px; border-radius: 3px; }

/* ---- Layout primitives ---- */
.container { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }
.measure { max-width: var(--maxw-text); }
.section { padding-block: var(--section-y); }
.section--tight { padding-block: 56px; }
.band { background: var(--sand); }
.band-soft { background: linear-gradient(var(--paper), var(--paper)); }
.rule { height: 1px; background: var(--rule); border: 0; margin: 0; }

/* ---- Typography helpers ---- */
.eyebrow {
  font-family: var(--sans); font-size: 13px; font-weight: 600;
  letter-spacing: 0.13em; text-transform: uppercase; color: var(--clay);
  display: inline-block;
}
.eyebrow--ink { color: var(--ink-50); }
.display { font-size: clamp(40px, 6.4vw, 76px); line-height: 1.02; letter-spacing: -0.02em; }
.h1 { font-size: clamp(34px, 5vw, 56px); line-height: 1.05; letter-spacing: -0.015em; }
.h2 { font-size: clamp(28px, 3.6vw, 42px); line-height: 1.08; letter-spacing: -0.012em; }
.h3 { font-size: clamp(22px, 2.4vw, 28px); line-height: 1.14; }
.h4 { font-size: 20px; line-height: 1.2; }
.lead { font-size: clamp(19px, 2.1vw, 23px); line-height: 1.5; color: var(--ink-70); }
.body { font-size: 18px; line-height: 1.65; color: var(--ink-70); }
.muted { color: var(--ink-50); }
.small { font-size: 14px; line-height: 1.5; }
.serif { font-family: var(--serif); }
.text-clay { color: var(--clay); }
.on-ink { color: var(--paper); }
.on-ink h1, .on-ink h2, .on-ink h3 { color: var(--paper); }

/* ---- Buttons ---- */
.btn {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--sans); font-weight: 600; font-size: 16px; line-height: 1;
  padding: 14px 22px; border-radius: var(--radius); border: 1px solid transparent;
  cursor: pointer; transition: background var(--ease) .18s, color var(--ease) .18s, border-color var(--ease) .18s, transform var(--ease) .12s;
  white-space: nowrap; text-decoration: none;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--clay); color: var(--clay-on); }
.btn--primary:hover { background: var(--clay-hover); color: var(--clay-on); }
.btn--secondary { background: transparent; color: var(--ink); border-color: var(--rule-strong); }
.btn--secondary:hover { border-color: var(--ink); background: rgba(26,26,24,0.03); }
.btn--ghost-ink { background: var(--paper); color: var(--ink); }
.btn--on-ink { background: var(--paper); color: var(--ink); }
.btn--on-ink:hover { background: #fff; color: var(--ink); }
.btn .arrow { transition: transform var(--ease) .18s; }
.btn:hover .arrow { transform: translateX(3px); }
.link-arrow { font-weight: 600; display: inline-flex; align-items: center; gap: 7px; color: var(--clay); }
.link-arrow .arrow { transition: transform var(--ease) .18s; }
.link-arrow:hover { text-decoration: none; }
.link-arrow:hover .arrow { transform: translateX(3px); }

/* ---- Cards & surfaces ---- */
.card {
  background: var(--paper-raised); border: 1px solid var(--rule);
  border-radius: var(--radius); padding: 28px;
}
.band .card { background: var(--paper-raised); }
.card-quiet { background: transparent; border: 1px solid var(--rule); border-radius: var(--radius); padding: 28px; }

/* ---- Nav ---- */
.nav {
  position: sticky; top: 0; z-index: 100;
  background: color-mix(in srgb, var(--paper) 86%, transparent);
  backdrop-filter: saturate(1.3) blur(10px);
  border-bottom: 1px solid var(--rule-soft);
}
.nav__inner { display: flex; align-items: center; justify-content: space-between; height: 66px; gap: 24px; }
.wordmark { display: inline-flex; align-items: center; gap: 9px; font-family: var(--serif); font-weight: 600; font-size: 22px; letter-spacing: -0.01em; color: var(--ink); text-decoration: none; white-space: nowrap; }
.wordmark__mark { flex: none; display: block; }
.wordmark__text { line-height: 1; }
.wordmark:hover { text-decoration: none; }
.wordmark .labs { color: var(--clay); font-weight: 500; }
.on-ink .wordmark { color: var(--paper); }
.nav__links { display: flex; align-items: center; gap: 26px; }
.nav__link { font-size: 15px; font-weight: 500; color: var(--ink-70); text-decoration: none; transition: color .15s var(--ease); white-space: nowrap; }
.nav__link:hover, .nav__link[aria-current="page"] { color: var(--ink); text-decoration: none; }
.nav__link[aria-current="page"] { color: var(--clay); }
.nav__right { display: flex; align-items: center; gap: 18px; }
.nav__pe { font-size: 14px; font-weight: 500; color: var(--ink-50); text-decoration: none; white-space: nowrap; }
.nav__pe:hover { color: var(--ink); text-decoration: none; }
.nav__burger { display: none; width: 42px; height: 42px; border: 1px solid var(--rule-strong); border-radius: var(--radius-sm); background: transparent; cursor: pointer; align-items: center; justify-content: center; }
.nav__burger span { display: block; width: 18px; height: 2px; background: var(--ink); position: relative; }
.nav__burger span::before, .nav__burger span::after { content: ""; position: absolute; left: 0; width: 18px; height: 2px; background: var(--ink); }
.nav__burger span::before { top: -6px; } .nav__burger span::after { top: 6px; }

@media (max-width: 940px) {
  .nav__links, .nav__pe { display: none; }
  .nav__burger { display: inline-flex; }
}
/* Phone: drop the redundant header CTA (it lives in the open menu) and give the burger room. */
@media (max-width: 720px) {
  .nav__right .btn--primary { display: none; }
  .nav__right { gap: 0; }
  .nav__burger { margin-left: 8px; }
}
.mobilemenu { display: none; flex-direction: column; padding: 8px var(--gutter) 22px; border-bottom: 1px solid var(--rule); background: var(--paper); position: sticky; top: 66px; z-index: 99; }
.mobilemenu.open { display: flex; }
.mobilemenu a { padding: 12px 0; font-size: 17px; font-weight: 500; color: var(--ink-70); border-bottom: 1px solid var(--rule-soft); text-decoration: none; }
.mobilemenu a:last-of-type { border-bottom: 0; }
.mobilemenu .btn { margin-top: 14px; justify-content: center; }

/* ---- Hero ---- */
.hero { padding-top: 60px; padding-bottom: 64px; }
.hero .eyebrow { margin-bottom: 22px; }
.hero h1 { max-width: 16ch; }
.hero__sub { margin-top: 26px; max-width: 60ch; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 36px; }

/* ---- Stat figures ---- */
.figs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 36px; }
@media (max-width: 820px) { .figs { grid-template-columns: 1fr; gap: 28px; } }
.fig__num { font-family: var(--serif); font-size: clamp(54px, 7vw, 84px); line-height: 1; letter-spacing: -0.03em; color: var(--ink); }
.fig__num .u { color: var(--clay); }
.fig__cap { margin-top: 14px; color: var(--ink-70); font-size: 17px; max-width: 28ch; }
.fig__rule { height: 2px; background: var(--rule); margin-bottom: 22px; }

/* ---- Small card grid ---- */
.minigrid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
@media (max-width: 860px) { .minigrid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .minigrid { grid-template-columns: 1fr; } }
.mini { padding: 22px; border: 1px solid var(--rule); border-radius: var(--radius); background: var(--paper-raised); }
.mini h4 { font-family: var(--serif); font-size: 19px; margin-bottom: 7px; }
.mini p { font-size: 15px; color: var(--ink-70); line-height: 1.5; }
.mini .mark { width: 22px; height: 2px; background: var(--clay); margin-bottom: 16px; }

/* ---- Pull-quote ---- */
.pull { font-family: var(--serif); font-size: clamp(28px, 4vw, 44px); line-height: 1.18; letter-spacing: -0.01em; color: var(--ink); max-width: 18ch; }
.pull--wide { max-width: 24ch; }

/* ---- Tiles (functions) ---- */
.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
@media (max-width: 860px) { .tiles { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .tiles { grid-template-columns: 1fr; } }
.tile { padding: 20px 22px; border: 1px solid var(--rule); border-radius: var(--radius); background: var(--paper-raised); font-weight: 600; font-size: 16px; color: var(--ink); display: flex; align-items: center; gap: 12px; }
.tile .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--clay); flex: none; }

/* ---- Two/three-column contrast ---- */
.contrast { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.contrast--2 { grid-template-columns: 1fr 1fr; }
@media (max-width: 820px) { .contrast, .contrast--2 { grid-template-columns: 1fr; } }
.contrast__col { padding: 30px; border: 1px solid var(--rule); border-radius: var(--radius); background: var(--paper-raised); }
.contrast__col h4 { font-family: var(--sans); font-size: 13px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-50); margin-bottom: 16px; }
.contrast__col.is-ours { background: var(--ink); border-color: var(--ink); }
.contrast__col.is-ours h4 { color: var(--clay); }
.contrast__col.is-ours .ci { color: rgba(247,244,239,0.82); }
.ci { display: flex; gap: 11px; font-size: 16px; color: var(--ink-70); line-height: 1.45; padding: 9px 0; border-top: 1px solid var(--rule-soft); }
.contrast__col.is-ours .ci { border-color: var(--rule-on-ink); }
.ci:first-of-type { border-top: 0; }
.ci .m { color: var(--ink-30); flex: none; }
.contrast__col.is-ours .ci .m { color: var(--clay); }

/* ---- Reveal motion: transform-only rise on load. Content is ALWAYS visible
   (never gated on opacity or JS), so no section can ever render blank — it just
   gets a subtle settle when animations run. Honors reduced-motion. ---- */
@media (prefers-reduced-motion: no-preference) {
  .reveal { animation: qz-rise 0.6s var(--ease) both; }
  @keyframes qz-rise { from { transform: translateY(14px); } to { transform: none; } }
}

/* ---- CTA band ---- */
.ctaband { background: var(--ink); color: var(--paper); border-radius: 16px; padding: 64px 56px; }
.ctaband h2 { color: var(--paper); max-width: 18ch; }
.ctaband p { color: rgba(247,244,239,0.74); margin-top: 16px; max-width: 56ch; font-size: 18px; }
.ctaband .btn { margin-top: 28px; }
@media (max-width: 600px) { .ctaband { padding: 44px 28px; } }

/* ---- Footer ---- */
.footer { border-top: 1px solid var(--rule); padding-block: 60px 40px; }
.footer__top { display: grid; grid-template-columns: 1.8fr 1fr 1fr; gap: 36px; }
@media (max-width: 820px) {
  .footer__top { grid-template-columns: 1fr 1fr; gap: 32px 24px; }
  .footer__brand { grid-column: 1 / -1; }
}
.footer__brand p { color: var(--ink-70); font-size: 15px; line-height: 1.5; margin-top: 14px; max-width: 30ch; }
.footer__col h5 { font-family: var(--sans); font-size: 12px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-50); margin: 0 0 14px; }
.footer__col a { display: block; font-size: 15px; color: var(--ink-70); margin-bottom: 10px; text-decoration: none; }
.footer__col a:hover { color: var(--ink); text-decoration: none; }
.footer__note { color: var(--ink-50); font-size: 14px; margin-top: 36px; padding-top: 22px; border-top: 1px solid var(--rule-soft); }
.footer__base { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: 14px; color: var(--ink-50); font-size: 14px; }

/* ---- helpers ---- */
.stack-sm > * + * { margin-top: 12px; }
.mt-s { margin-top: 16px; } .mt-m { margin-top: 28px; } .mt-l { margin-top: 44px; }
.center { text-align: center; }
.maxw-head { max-width: 22ch; }
