/* buzzoffapp.com: hand-written CSS, no build step.
   Tokens mirror the app's constants/theme.ts (buzzoff-final). Contrast notes are
   WCAG ratios against --bg unless stated. Keep one-offs out: add a token or a
   component instead. */

/* ---------- Font (Inter, OFL, self-hosted; see /assets/fonts/OFL.txt) ---------- */
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url("/assets/fonts/inter-latin-var.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ---------- Tokens ---------- */
:root {
  /* Colour (theme.ts names in comments) */
  --bg: #faf7f2; /* BACKGROUND */
  --card: #eee7df; /* CARD_BG */
  --surface: #e0cda7; /* SURFACE: fills, chart grid */
  --border: #d6cec5; /* BORDER: decorative hairlines only */
  --text: #2b2b2b; /* TEXT_PRIMARY, 13.3:1 */
  --text-muted: #6d6d6d; /* TEXT_SECONDARY, 4.8:1 on --bg only */
  --text-muted-card: #4b4b4b; /* TEXT_500, 7.1:1 on --card */
  --orange: #e59f42; /* PRIMARY: fills only, text on it is --text (6.3:1) */
  --orange-tint: #fdeee3; /* CTA_100 */
  --orange-ink: #855b23; /* CTA_500: links, 5.6:1 (4.9:1 on --card) */
  --sage: #6baf92; /* ACCENT: icons, ticks, non-text */
  --sage-tint: #d4f9e7; /* ACCENT_100 */
  --sage-ink: #396150; /* ACCENT_500: sage text, 6.6:1 */
  --white: #ffffff;

  /* Spacing, 4 px scale */
  --s1: 4px;
  --s2: 8px;
  --s3: 12px;
  --s4: 16px;
  --s6: 24px;
  --s8: 32px;
  --s12: 48px;
  --s16: 64px;
  --gutter: var(--s4);

  /* Radii: nested radius = outer radius minus the padding between them */
  --r-sm: 8px;
  --r-md: 16px;
  --r-pill: 999px;

  /* One shadow */
  --shadow: 0 1px 2px rgb(43 43 43 / 0.06), 0 8px 24px rgb(43 43 43 / 0.06);

  /* Type scale (follows the app's 32/28/22/18/16/14 steps) */
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --fs-display: clamp(2.25rem, 1.6rem + 2.8vw, 3.5rem); /* 36 -> 56 */
  --fs-h1: clamp(2rem, 1.75rem + 1.1vw, 2.5rem); /* 32 -> 40 */
  --fs-h2: clamp(1.5rem, 1.32rem + 0.8vw, 1.875rem); /* 24 -> 30 */
  --fs-h3: 1.25rem; /* 20 */
  --fs-body: 1.0625rem; /* 17 */
  --fs-small: 0.9375rem; /* 15 */
  --fs-caption: 0.8125rem; /* 13 */
  --lh-tight: 1.15;
  --lh-body: 1.6;
  --track-heading: -0.02em;

  /* Widths */
  --w-text: 680px;
  --w-page: 1080px;
}

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

/* ---------- Base reset (close to Tailwind's Preflight, so the legal pages'
   utility classes in legal.css render as they did) ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  border: 0 solid var(--border);
}
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  -webkit-font-smoothing: antialiased;
}
h1,
h2,
h3,
h4,
h5,
h6,
p,
ul,
ol,
li,
figure,
blockquote,
dl,
dd {
  margin: 0;
}
h1,
h2,
h3,
h4,
h5,
h6 {
  font-size: inherit;
  font-weight: inherit;
}
ul,
ol {
  list-style: none;
  padding: 0;
}
img,
svg,
video {
  display: block;
  max-width: 100%;
  height: auto;
}
a {
  color: inherit;
  text-decoration: inherit;
}
strong,
b {
  font-weight: 600;
}
button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
  margin: 0;
}

/* Visible focus on everything interactive */
:focus-visible {
  outline: 3px solid var(--text);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ---------- Layout ---------- */
.container {
  width: 100%;
  max-width: calc(var(--w-page) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.container--text {
  max-width: calc(var(--w-text) + 2 * var(--gutter));
}
.section {
  padding-block: var(--s12);
}
@media (min-width: 768px) {
  .section {
    padding-block: var(--s16);
  }
}
.stack > * + * {
  margin-top: var(--s4);
}
.center {
  text-align: center;
}
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

/* ---------- Type ---------- */
.display,
.h1,
.h2,
.h3 {
  font-weight: 700;
  letter-spacing: var(--track-heading);
  line-height: var(--lh-tight);
  text-wrap: balance;
}
.display {
  font-size: var(--fs-display);
}
.h1 {
  font-size: var(--fs-h1);
}
.h2 {
  font-size: var(--fs-h2);
  font-weight: 600;
}
.h3 {
  font-size: var(--fs-h3);
  font-weight: 600;
  line-height: 1.3;
}
.lead {
  font-size: 1.125rem;
  color: var(--text-muted);
  max-width: 34em;
}
.muted {
  color: var(--text-muted);
}
.small {
  font-size: var(--fs-small);
}
.caption {
  font-size: var(--fs-caption);
  color: var(--text-muted);
}
.link,
.footer-links a,
.text-link {
  color: var(--orange-ink);
  text-decoration: underline;
  text-underline-offset: 0.15em;
}
.link:hover,
.text-link:hover {
  color: var(--text);
}

/* ---------- Skip link ---------- */
.skip-link {
  position: absolute;
  left: var(--s4);
  top: -100px;
  z-index: 100;
  background: var(--text);
  color: var(--white);
  padding: var(--s2) var(--s4);
  border-radius: var(--r-sm);
}
.skip-link:focus {
  top: var(--s2);
}

/* ---------- Header ---------- */
.site-header {
  border-bottom: 1px solid var(--border);
  background: var(--bg);
}
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s4);
  min-height: 64px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: var(--s2);
  font-weight: 600;
  font-size: 1.125rem;
  letter-spacing: var(--track-heading);
  padding-block: var(--s2);
}
.brand img {
  width: 32px;
  height: 32px;
  border-radius: 22%;
}
.site-nav {
  display: flex;
  align-items: center;
  gap: var(--s4);
  font-size: var(--fs-small);
}
.site-nav a:not(.btn) {
  padding-block: var(--s2);
}
.site-nav a:not(.btn):hover,
.site-nav a[aria-current="page"] {
  text-decoration: underline;
  text-underline-offset: 0.25em;
}

/* ---------- Buttons and the App Store badge ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s2);
  min-height: 44px;
  padding: var(--s2) var(--s4);
  border-radius: var(--r-pill);
  font-weight: 600;
  font-size: var(--fs-small);
  line-height: 1.2;
  transition: transform 0.15s ease, background-color 0.15s ease;
}
.btn--primary {
  background: var(--orange);
  color: var(--text);
}
.btn--primary:hover {
  background: #d99236;
}
.btn--dark {
  background: var(--text);
  color: var(--white);
}
.btn:active {
  transform: scale(0.98);
}
.badge-link {
  display: inline-block;
  border-radius: var(--r-sm);
  transition: transform 0.15s ease;
}
.badge-link:hover {
  transform: translateY(-1px);
}
.badge-link img {
  height: 48px;
  width: auto;
}
.badge-link--lg img {
  height: 56px;
}

/* ---------- Cards and callouts ---------- */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: var(--s6);
}
.card .muted,
.card .caption {
  color: var(--text-muted-card);
}
.card__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: var(--r-sm);
  margin-bottom: var(--s3);
}
.card__icon--orange {
  background: var(--orange-tint);
  color: var(--orange-ink);
}
.card__icon--sage {
  background: var(--sage-tint);
  color: var(--sage-ink);
}
.card h2,
.card h3 {
  margin-bottom: var(--s2);
}
.grid {
  display: grid;
  gap: var(--s4);
}
@media (min-width: 640px) {
  .grid--2 {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (min-width: 900px) {
  .grid--3 {
    grid-template-columns: repeat(3, 1fr);
  }
}
@media (min-width: 640px) and (max-width: 899px) {
  .grid--3 {
    grid-template-columns: repeat(2, 1fr);
  }
}
.callout {
  border-radius: var(--r-md);
  padding: var(--s4) var(--s6);
  background: var(--orange-tint);
}
.callout--sage {
  background: var(--sage-tint);
}

/* ---------- Page hero (simple pages) ---------- */
.page-hero {
  padding-block: var(--s12) var(--s8);
}
.page-hero .lead {
  margin-top: var(--s3);
}
.page-hero.center .lead {
  margin-inline: auto;
}

/* ---------- Section headings ---------- */
.section-head {
  max-width: 40rem;
  margin-bottom: var(--s8);
}
.section-head.center {
  margin-inline: auto;
}
.section-head .lead {
  margin-top: var(--s3);
}
.section-head.center .lead {
  margin-inline: auto;
}
.section--card {
  background: var(--card);
  border-block: 1px solid var(--border);
}
.section--card .muted,
.section--card .lead,
.section--card .caption {
  color: var(--text-muted-card);
}
.section--card .card {
  background: var(--bg);
}
.section--card .card .muted {
  color: var(--text-muted);
}

/* ---------- Hero ---------- */
.hero {
  padding-block: var(--s8) var(--s12);
  text-align: center;
}
.hero__grid {
  display: grid;
  gap: var(--s8);
  align-items: center;
}
.hero .display {
  max-width: 14em;
  margin-inline: auto;
}
.hero .lead {
  margin: var(--s4) auto var(--s6);
}
.hero__meta {
  margin-top: var(--s3);
}
.hero__media img {
  width: 100%;
  max-width: 560px;
  margin-inline: auto;
}
@media (min-width: 900px) {
  .hero {
    padding-block: var(--s12) var(--s16);
    text-align: left;
  }
  .hero__grid {
    grid-template-columns: 1fr 1fr;
    gap: var(--s12);
  }
  .hero .display,
  .hero .lead {
    margin-inline: 0;
  }
}

/* ---------- Mode cards ---------- */
.mode-card {
  display: flex;
  flex-direction: column;
  gap: var(--s3);
}
.mode-card .eyebrow {
  align-self: flex-start;
}
.mode-card .text-link {
  margin-top: auto;
  font-weight: 600;
}
.eyebrow {
  display: inline-block;
  font-size: var(--fs-caption);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: var(--s1) var(--s3);
  border-radius: var(--r-pill);
  background: var(--orange-tint);
  color: var(--orange-ink);
}
.eyebrow--sage {
  background: var(--sage-tint);
  color: var(--sage-ink);
}

/* ---------- Steps ---------- */
.steps {
  display: grid;
  gap: var(--s4);
  counter-reset: step;
}
@media (min-width: 640px) {
  .steps {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (min-width: 1000px) {
  .steps {
    grid-template-columns: repeat(4, 1fr);
  }
}
.step {
  counter-increment: step;
  position: relative;
  padding-top: var(--s12);
}
.step::before {
  content: counter(step);
  position: absolute;
  top: var(--s6);
  left: var(--s6);
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  margin-top: -8px;
  border-radius: 50%;
  background: var(--orange);
  color: var(--text);
  font-weight: 700;
  font-size: var(--fs-small);
}
.step h3 {
  margin-top: var(--s4);
}
/* Slot for a 2.0.5 screenshot later: <figure class="step__shot"> inside a .step */
.step__shot img {
  border-radius: var(--r-sm);
  margin-top: var(--s4);
}

/* ---------- Plan table ---------- */
.plan {
  display: grid;
  gap: var(--s8);
  align-items: center;
}
@media (min-width: 900px) {
  .plan {
    grid-template-columns: 5fr 6fr;
    gap: var(--s12);
  }
}
.plan-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 var(--s2);
  font-size: var(--fs-small);
}
.plan-table caption {
  text-align: left;
  font-weight: 600;
  margin-bottom: var(--s2);
}
.plan-table th,
.plan-table td {
  padding: var(--s3) var(--s4);
  background: var(--bg);
  border-block: 1px solid var(--border);
  text-align: left;
}
.plan-table th:first-child,
.plan-table td:first-child {
  border-left: 1px solid var(--border);
  border-radius: var(--r-sm) 0 0 var(--r-sm);
}
.plan-table th:last-child,
.plan-table td:last-child {
  border-right: 1px solid var(--border);
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
  text-align: right;
  white-space: nowrap;
}
.plan-table thead th {
  background: none;
  border: 0;
  padding-block: 0;
  font-size: var(--fs-caption);
  color: var(--text-muted-card);
  font-weight: 600;
}
.plan-table tbody th {
  font-weight: 600;
}
.plan-table .sub {
  display: block;
  font-weight: 400;
  color: var(--text-muted);
}

/* ---------- Mood faces strip ---------- */
.moods {
  display: flex;
  justify-content: center;
  gap: var(--s3);
  margin-bottom: var(--s6);
}
.moods img {
  width: 48px;
  height: 48px;
}
@media (min-width: 640px) {
  .moods {
    gap: var(--s6);
  }
  .moods img {
    width: 64px;
    height: 64px;
  }
}

/* ---------- Feature list and trust row ---------- */
.feature-list {
  display: grid;
  gap: var(--s3);
}
@media (min-width: 640px) {
  .feature-list {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--s3) var(--s8);
  }
}
.feature-list li {
  position: relative;
  padding-left: var(--s8);
}
.feature-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.15em;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--sage-tint)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23396150' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 12 4 4 8-8'/%3E%3C/svg%3E")
    center / 14px no-repeat;
}
.trust {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s2);
  margin-top: var(--s8);
}
.trust li {
  padding: var(--s2) var(--s4);
  border-radius: var(--r-pill);
  background: var(--bg);
  border: 1px solid var(--border);
  font-size: var(--fs-small);
  font-weight: 500;
}

/* ---------- FAQ (details/summary) ---------- */
.faq {
  display: grid;
  gap: var(--s3);
}
.faq details {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
}
.faq summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--s4);
  padding: var(--s4) var(--s6);
  min-height: 56px;
  font-weight: 600;
}
.faq summary::-webkit-details-marker {
  display: none;
}
.faq summary::after {
  content: "";
  flex: none;
  width: 12px;
  height: 12px;
  border-right: 2px solid var(--text);
  border-bottom: 2px solid var(--text);
  transform: rotate(45deg) translate(-2px, -2px);
  transition: transform 0.15s ease;
}
.faq details[open] summary::after {
  transform: rotate(225deg) translate(-2px, -2px);
}
.faq summary:focus-visible {
  border-radius: var(--r-md);
}
.faq .answer {
  padding: 0 var(--s6) var(--s6);
  color: var(--text-muted-card);
}
.faq .answer > * + * {
  margin-top: var(--s3);
}
.faq .answer a {
  color: var(--orange-ink);
  text-decoration: underline;
  text-underline-offset: 0.15em;
}
.faq-group + .faq-group {
  margin-top: var(--s12);
}
.faq-group h2 {
  margin-bottom: var(--s4);
}

/* ---------- CTA band ---------- */
.cta-band {
  display: grid;
  gap: var(--s6);
  align-items: center;
  justify-items: center;
  text-align: center;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: var(--s8) var(--s6) 0;
  overflow: hidden;
}
.cta-band img.mascot {
  width: 180px;
  height: auto;
  margin-bottom: -4px;
}
@media (min-width: 768px) {
  .cta-band {
    grid-template-columns: 1fr auto;
    justify-items: start;
    text-align: left;
    padding: var(--s8) var(--s12) 0;
  }
  .cta-band__text {
    padding-bottom: var(--s8);
  }
  .cta-band img.mascot {
    width: 220px;
  }
}
.cta-band .lead {
  margin: var(--s3) 0 var(--s6);
}
.cta-band .lead,
.cta-band .caption {
  color: var(--text-muted-card);
}

/* ---------- Sticky "Get the app" bar (mobile only, shown by site.js) ---------- */
.sticky-cta {
  position: fixed;
  left: var(--s2);
  right: var(--s2);
  bottom: calc(var(--s2) + env(safe-area-inset-bottom));
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s3);
  padding: var(--s2) var(--s2) var(--s2) var(--s4);
  border-radius: var(--r-pill);
  background: var(--text);
  color: var(--white);
  box-shadow: var(--shadow);
  font-size: var(--fs-small);
  transform: translateY(150%);
  transition: transform 0.2s ease;
}
.sticky-cta.is-visible {
  transform: none;
}
.sticky-cta strong {
  font-weight: 600;
}
.sticky-cta .btn {
  min-height: 40px;
  white-space: nowrap;
  flex: none;
}
.sticky-cta span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sticky-cta :focus-visible {
  outline-color: var(--white);
}
@media (min-width: 768px) {
  .sticky-cta {
    display: none;
  }
}

.page-body {
  padding-bottom: var(--s12);
}

/* ---------- Contact ---------- */
.contact-email {
  font-size: 1.125rem;
  word-break: break-word;
}
.checklist {
  display: grid;
  gap: var(--s2);
  margin-block: var(--s4);
  text-align: left;
}
.checklist li {
  position: relative;
  padding-left: var(--s6);
}
.checklist li::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 0.6em;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--sage);
}

/* ---------- 404 ---------- */
.not-found {
  padding-block: var(--s16);
}
.not-found img {
  margin-inline: auto;
  margin-bottom: var(--s6);
}
.not-found .actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--s3);
  margin-top: var(--s6);
}

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--border);
  padding-block: var(--s12) var(--s8);
}
.footer-cta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--s3);
  text-align: center;
  padding-bottom: var(--s8);
  border-bottom: 1px solid var(--border);
}
.footer-cta img.face {
  width: 56px;
  height: 56px;
}
.footer-tagline {
  font-weight: 600;
  font-size: 1.125rem;
  letter-spacing: var(--track-heading);
  text-wrap: balance;
}
.nowrap {
  white-space: nowrap;
}
.footer-links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--s6);
  padding-block: var(--s8);
  font-size: var(--fs-small);
}
@media (min-width: 768px) {
  .footer-links {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}
.footer-heading {
  font-weight: 600;
  margin-bottom: var(--s2);
}
.footer-links ul {
  display: grid;
  gap: var(--s1);
}
.footer-links a {
  display: inline-block;
  padding-block: var(--s1);
  color: var(--text);
  text-decoration: none;
}
.footer-links a:hover {
  text-decoration: underline;
}
.footer-note {
  font-size: var(--fs-caption);
  color: var(--text-muted);
  text-align: center;
}

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