/* chomply.ca — one stylesheet for the whole site.
   Colours and fonts come straight from the app's theme tokens.
   Change a colour here and it changes everywhere. */

/* ---------- Tokens ---------- */
:root {
  --paper: #FAF7F2;   /* page background */
  --cream: #F4EDDD;   /* receipt paper */
  --char: #26231F;    /* text */
  --stone: #6F6A61;   /* muted text, 5.03:1 on paper */
  --kelly: #2F7A4D;   /* the only accent */
  --card: #FFFFFF;
  --desk: #EAE6DE;    /* canvas behind the phone */
  --track: #E7E2DA;
  --line: rgba(38, 35, 31, 0.1);     /* hairlines */
  --rule: rgba(38, 35, 31, 0.3);     /* dashed receipt rules */
  --leader: rgba(38, 35, 31, 0.35);  /* dotted leaders */
  --grain: rgba(38, 35, 31, 0.032);  /* receipt paper texture */

  --font-sans: "Hanken Grotesk", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  --font-slab: "Zilla Slab", Georgia, "Times New Roman", serif;
  --font-mono: "IBM Plex Mono", ui-monospace, Menlo, Consolas, monospace;

  --s-1: 4px; --s-2: 8px; --s-3: 12px; --s-4: 16px;
  --s-5: 24px; --s-6: 32px; --s-7: 48px; --s-8: 64px;
  --radius: 12px;
  --ease: 180ms ease;
  --container: 1120px;
  --gutter: 20px;
}

/* ---------- Fonts (self-hosted, Latin subset) ---------- */
@font-face { font-family: "Hanken Grotesk"; font-weight: 400; font-style: normal; font-display: swap; src: url("/assets/fonts/HankenGrotesk-400.woff2") format("woff2"); }
@font-face { font-family: "Hanken Grotesk"; font-weight: 500; font-style: normal; font-display: swap; src: url("/assets/fonts/HankenGrotesk-500.woff2") format("woff2"); }
@font-face { font-family: "Hanken Grotesk"; font-weight: 600; font-style: normal; font-display: swap; src: url("/assets/fonts/HankenGrotesk-600.woff2") format("woff2"); }
@font-face { font-family: "Hanken Grotesk"; font-weight: 800; font-style: normal; font-display: swap; src: url("/assets/fonts/HankenGrotesk-800.woff2") format("woff2"); }
@font-face { font-family: "Zilla Slab"; font-weight: 700; font-style: normal; font-display: swap; src: url("/assets/fonts/ZillaSlab-700.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-weight: 500; font-style: normal; font-display: swap; src: url("/assets/fonts/IBMPlexMono-500.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-weight: 600; font-style: normal; font-display: swap; src: url("/assets/fonts/IBMPlexMono-600.woff2") format("woff2"); }

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

html {
  overflow-x: clip;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--char);
  font: 400 16px/1.5 var(--font-sans);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main { flex: 1; }

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

h1, h2, h3, p { margin: 0; }

a {
  color: var(--kelly);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: color var(--ease);
}
a:hover { color: color-mix(in srgb, var(--kelly), var(--char) 22%); }

:focus-visible {
  outline: 2px solid var(--kelly);
  outline-offset: 3px;
  border-radius: 4px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
  html { scroll-behavior: auto; }
}

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

@media (min-width: 768px) { :root { --gutter: 24px; } }

/* ---------- Skip link ---------- */
.skip-link {
  position: absolute;
  left: var(--s-4);
  top: -100px;
  z-index: 10;
  padding: var(--s-3) var(--s-4);
  background: var(--kelly);
  color: #fff;
  border-radius: 999px;
  font-weight: 600;
  text-decoration: none;
}
.skip-link:focus { top: var(--s-4); }

/* ---------- Header ---------- */
.site-header { border-bottom: 1px dashed var(--rule); }
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 64px;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  color: var(--char);
  text-decoration: none;
  font: 700 22px/1 var(--font-slab);
  letter-spacing: 0.02em;
}
.wordmark:hover { color: var(--kelly); }
.wordmark__mark { width: 24px; height: 34px; }

/* ---------- Eyebrows, buttons, pills ---------- */
.eyebrow {
  font: 500 12px/1.4 var(--font-mono);
  letter-spacing: 0.19em;
  text-transform: uppercase;
  color: var(--stone);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 22px;
  border-radius: 999px;
  background: var(--kelly);
  color: #fff;
  font: 600 16px/1 var(--font-sans);
  text-decoration: none;
  transition: background var(--ease), transform var(--ease);
}
.btn:hover { background: color-mix(in srgb, var(--kelly), var(--char) 22%); color: #fff; }
.btn:active { transform: translateY(1px); }
.btn svg { width: 18px; height: 18px; flex: none; }

.pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid var(--rule);
  border-radius: 999px;
  color: var(--stone);
  font: 500 13px/1 var(--font-mono);
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.pill svg { width: 16px; height: 16px; color: var(--kelly); flex: none; }

/* ---------- Hero ---------- */
.hero { padding-block: clamp(40px, 7vw, 88px) clamp(40px, 6vw, 72px); }
.hero__inner {
  display: grid;
  gap: var(--s-7);
  align-items: center;
}
.hero__copy { display: grid; gap: var(--s-5); }
.hero__title {
  font: 800 clamp(2.375rem, 1.4rem + 4.2vw, 4rem)/1.04 var(--font-sans);
  letter-spacing: -0.02em;
  max-inline-size: 15ch;
  text-wrap: balance;
}
.hero__sub {
  font-size: clamp(1.0625rem, 1rem + 0.4vw, 1.25rem);
  line-height: 1.55;
  color: var(--stone);
  max-inline-size: 46ch;
}
.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-3);
  align-items: center;
}

@media (min-width: 900px) {
  .hero { padding-block: 40px clamp(40px, 6vw, 72px); }
  .hero__inner { grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); gap: var(--s-8); }
  .hero__copy { padding-bottom: 48px; }
}

/* ---------- Phone mock ---------- */
.hero__visual { display: grid; gap: var(--s-3); justify-items: center; }

.stage {
  width: 100%;
  max-width: 440px;
  background: var(--desk);
  border-radius: 24px;
  padding: 36px 24px 0;
  overflow: hidden;
  display: flex;
  justify-content: center;
}

.phone {
  width: min(300px, 100%);
  margin-bottom: -40px;
  background: var(--char);
  border-radius: 44px;
  padding: 10px;
  box-shadow: 0 24px 48px -24px rgba(38, 35, 31, 0.45);
}
.phone__screen {
  position: relative;
  background: var(--paper);
  border-radius: 34px;
  padding: 56px 12px 48px;
  min-height: 560px;
}
.phone__screen::before {
  /* the island */
  content: "";
  position: absolute;
  top: 12px;
  left: 50%;
  width: 88px;
  height: 26px;
  transform: translateX(-50%);
  background: var(--char);
  border-radius: 999px;
}

.caption { text-align: center; }

/* ---------- Ticket (the receipt) ---------- */
.ticket {
  --bite: 7px;
  --pitch: 16px;
  --band: 11px;
  position: relative;
  background:
    repeating-linear-gradient(0deg, var(--grain) 0 1px, transparent 1px 4px),
    var(--cream);
  color: var(--char);
  padding: 24px 18px 22px;
  font: 500 11.5px/1.35 var(--font-mono);
  -webkit-mask:
    radial-gradient(circle at calc(var(--pitch) / 2) 0, transparent var(--bite), #000 calc(var(--bite) + 0.5px)) 0 0 / var(--pitch) var(--band) round no-repeat,
    radial-gradient(circle at calc(var(--pitch) / 2) 100%, transparent var(--bite), #000 calc(var(--bite) + 0.5px)) 0 100% / var(--pitch) var(--band) round no-repeat,
    linear-gradient(#000, #000) 0 var(--band) / 100% calc(100% - var(--band) * 2) no-repeat;
  mask:
    radial-gradient(circle at calc(var(--pitch) / 2) 0, transparent var(--bite), #000 calc(var(--bite) + 0.5px)) 0 0 / var(--pitch) var(--band) round no-repeat,
    radial-gradient(circle at calc(var(--pitch) / 2) 100%, transparent var(--bite), #000 calc(var(--bite) + 0.5px)) 0 100% / var(--pitch) var(--band) round no-repeat,
    linear-gradient(#000, #000) 0 var(--band) / 100% calc(100% - var(--band) * 2) no-repeat;
}

.ticket__head { text-align: center; display: grid; gap: 4px; }
.ticket__wordmark { font: 700 20px/1.1 var(--font-slab); letter-spacing: 0.02em; }
.ticket__eyebrow { font: 600 8.5px/1.4 var(--font-mono); letter-spacing: 0.19em; text-transform: uppercase; color: var(--stone); }
.ticket__meta { margin-top: 10px; font: 500 9.5px/1.5 var(--font-sans); letter-spacing: 0.08em; text-align: center; text-transform: uppercase; }
.ticket__meta span { color: var(--stone); }

.ticket__rule { border: 0; border-top: 1px dashed var(--rule); margin: 14px 0; }
.ticket__rule--accent { border-top-color: color-mix(in srgb, var(--kelly), transparent 50%); }

.ticket__section { font: 600 9px/1.4 var(--font-mono); letter-spacing: 0.14em; margin-bottom: 10px; }

.ticket__row { display: flex; align-items: baseline; font-weight: 600; }
.ticket__leader { flex: 1; border-bottom: 1.5px dotted var(--leader); margin: 0 6px 3px; min-width: 14px; }
.ticket__sub { font: 500 9px/1.3 var(--font-mono); color: var(--stone); margin: 2px 0 10px; }

.ticket__total { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 2px 8px; font-weight: 600; }
.ticket__total span { white-space: nowrap; }
.ticket__total + .ticket__total { margin-top: 6px; }
.ticket__total small { font: 500 9px/1.3 var(--font-mono); color: var(--stone); }

.ticket__macros {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  text-align: center;
  gap: 4px;
  margin-top: 4px;
}
.ticket__macros strong { display: block; font: 600 13px/1.2 var(--font-mono); }
.ticket__macros span { font: 500 8px/1.3 var(--font-mono); letter-spacing: 0.14em; color: var(--stone); }

.barcode { width: 100%; height: 34px; color: var(--char); margin-top: 6px; }
.ticket__thanks { text-align: center; font: 600 8.5px/1.4 var(--font-mono); letter-spacing: 0.14em; margin-top: 10px; }

/* ---------- Features ---------- */
.section-head { display: grid; gap: var(--s-2); margin-bottom: var(--s-6); }
.section-title {
  font: 800 clamp(1.625rem, 1.2rem + 1.6vw, 2.25rem)/1.1 var(--font-sans);
  letter-spacing: -0.015em;
  max-inline-size: 24ch;
  text-wrap: balance;
}

/* ---------- A day with Chomply (steps + mocks) ---------- */
.steps { padding-block: clamp(32px, 5vw, 56px) clamp(24px, 4vw, 40px); }
.step-grid {
  display: grid;
  gap: var(--s-4);
  grid-template-columns: 1fr;
  list-style: none;
  padding: 0;
  margin: 0;
  counter-reset: step;
}
@media (min-width: 900px) { .step-grid { grid-template-columns: repeat(3, 1fr); gap: var(--s-5); } }

.step {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: var(--s-5);
  display: grid;
  gap: var(--s-3);
  align-content: start;
  grid-template-rows: auto auto auto 1fr;
}
.step__num { font: 600 11px/1 var(--font-mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--kelly); }
.step h3 { font: 600 1.125rem/1.3 var(--font-sans); }
.step p { color: var(--stone); font-size: 0.975rem; }

.mock {
  align-self: end;
  width: 100%;
  max-width: 440px; /* in single-column layouts the mock should still look phone-sized */
  margin-top: var(--s-2);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px;
  display: grid;
  gap: 10px;
  font: 500 11.5px/1.35 var(--font-mono);
  color: var(--char);
}
.mock__label { font: 600 8.5px/1.4 var(--font-mono); letter-spacing: 0.19em; text-transform: uppercase; color: var(--stone); }
.mock__input {
  display: flex;
  align-items: center;
  gap: 2px;
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: 999px;
  padding: 9px 14px;
  font: 500 13px/1.3 var(--font-sans);
}
.mock__caret { display: inline-block; width: 1.5px; height: 1em; background: var(--kelly); margin-left: 1px; }
.mock__rows { padding-top: 4px; border-top: 1px dashed var(--rule); }
.mock__rows .ticket__row { font-weight: 600; }

.fit {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  column-gap: 10px;
  row-gap: 3px;
  padding: 9px 0;
  border-top: 1px dashed var(--rule);
}
.fit:first-of-type { border-top: 0; padding-top: 2px; }
.fit__name { font: 600 13px/1.3 var(--font-sans); }
.fit__meta { grid-column: 1 / -1; font: 500 10px/1.4 var(--font-mono); color: var(--stone); white-space: nowrap; }
.fitpill {
  flex: none;
  font: 600 9.5px/1 var(--font-mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 6px 9px;
  border-radius: 999px;
  white-space: nowrap;
}
.fitpill--great { background: color-mix(in srgb, var(--kelly) 9%, var(--card)); border: 1px solid color-mix(in srgb, var(--kelly) 24%, transparent); color: var(--kelly); }
.fitpill--stretch { background: var(--track); border: 1px solid var(--line); color: var(--char); }

.chat { display: grid; gap: 8px; }
.bubble {
  max-width: 90%;
  padding: 9px 12px;
  border-radius: 14px;
  font: 500 12.5px/1.45 var(--font-sans);
}
.bubble--me { justify-self: end; background: var(--char); color: #fff; border-bottom-right-radius: 4px; }
.bubble--coach { justify-self: start; background: var(--cream); color: var(--char); border-bottom-left-radius: 4px; }

/* ---------- Features ---------- */
.features { padding-block: clamp(24px, 4vw, 40px) clamp(48px, 7vw, 88px); }

.feature-grid {
  display: grid;
  gap: var(--s-4);
  grid-template-columns: 1fr;
  list-style: none;
  padding: 0;
  margin: 0;
}
@media (min-width: 640px) { .feature-grid { grid-template-columns: repeat(2, 1fr); gap: var(--s-5); } }
@media (min-width: 960px) { .feature-grid { grid-template-columns: repeat(3, 1fr); } }

.feature {
  background: var(--card);
  border: 1px solid var(--line);
  border-top: 3px solid var(--kelly);
  border-radius: var(--radius);
  padding: var(--s-5);
  display: grid;
  gap: var(--s-3);
  align-content: start;
}
.feature__title { display: flex; align-items: baseline; gap: 8px; }
.feature__title .ticket__leader { margin-bottom: 4px; }
.feature__index { font: 500 11px/1 var(--font-mono); letter-spacing: 0.14em; color: var(--stone); }
.feature__icon {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  background: var(--cream);
  color: var(--kelly);
  border-radius: 10px;
}
.feature__icon svg { width: 24px; height: 24px; }
.feature h3 { font: 600 1.125rem/1.3 var(--font-sans); flex: none; }
.feature p { color: var(--stone); font-size: 0.975rem; }

/* ---------- About ---------- */
.about { padding-block: 0 clamp(48px, 7vw, 96px); }
.about__inner {
  background: var(--cream);
  border: 1px dashed var(--rule);
  border-radius: 16px;
  padding: clamp(32px, 5vw, 56px) var(--s-5);
  text-align: center;
  display: grid;
  gap: var(--s-4);
  justify-items: center;
}
.about__leaf { width: 40px; height: 40px; color: var(--kelly); }
.about h2 { font: 800 clamp(1.5rem, 1.2rem + 1.4vw, 2rem)/1.15 var(--font-sans); letter-spacing: -0.015em; }
.about p { max-inline-size: 52ch; color: var(--stone); font-size: 1.0625rem; }
.about a { color: var(--char); text-decoration-color: var(--kelly); text-decoration-thickness: 2px; }
.about a:hover { color: var(--kelly); }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px dashed var(--rule);
  padding-block: var(--s-6) var(--s-7);
  font-size: 0.95rem;
}
.site-footer__inner {
  display: grid;
  gap: var(--s-5);
}
.footer__brand { display: grid; gap: var(--s-2); }
.footer__brand .wordmark { font-size: 20px; }
.footer__brand p { color: var(--stone); max-inline-size: 36ch; }

.footer__col { display: grid; gap: var(--s-2); align-content: start; }
.footer__links, .footer__social {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-1) var(--s-4);
}
.footer__links a, .footer__social a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  text-decoration: none;
}
.footer__links a:hover, .footer__social a:hover { text-decoration: underline; }
.footer__social svg { width: 18px; height: 18px; }

.footer__legal {
  font: 500 13px/1.5 var(--font-mono);
  letter-spacing: 0.02em;
  color: var(--stone);
  border-top: 1px solid var(--line);
  padding-top: var(--s-4);
}

@media (min-width: 768px) {
  .site-footer__inner {
    grid-template-columns: 1.4fr 1fr 1fr;
    align-items: start;
  }
  .footer__legal { grid-column: 1 / -1; }
  .footer__links, .footer__social { flex-direction: column; gap: 0; }
}

/* ---------- Simple pages (privacy, terms, support) ---------- */
.prose-wrap { padding-block: clamp(48px, 8vw, 88px) clamp(56px, 9vw, 112px); }
.prose {
  max-width: 62ch;
  display: grid;
  gap: var(--s-4);
}
.prose .eyebrow { margin-bottom: var(--s-1); }
.page-title {
  font: 800 clamp(2rem, 1.4rem + 2.4vw, 2.75rem)/1.1 var(--font-sans);
  letter-spacing: -0.02em;
  margin-bottom: var(--s-2);
}
.prose p { font-size: 1.0625rem; line-height: 1.6; }
.prose .btn { justify-self: start; margin-top: var(--s-2); }

/* ---------- 404 ---------- */
.notfound {
  display: grid;
  place-items: center;
  padding-block: clamp(48px, 8vw, 96px);
}
.notfound .ticket {
  width: 100%;
  max-width: 460px;
  padding: 44px 28px 40px;
  text-align: center;
  font: 400 1.0625rem/1.5 var(--font-sans);
  display: grid;
  gap: var(--s-4);
  justify-items: center;
}
.notfound .ticket__eyebrow { font-size: 11px; }
.notfound .page-title { margin: 0; font-size: clamp(1.75rem, 1.3rem + 2vw, 2.25rem); }
.notfound p { color: var(--char); }
.notfound .btn { margin-top: var(--s-2); }
