/* ============================================================================
   DiabiPets — marketing site styles
   Every colour, radius, shadow, type step and spacing value below resolves to
   a token in tokens.css. No raw hex, no ad-hoc radii. (spec 002 §8)
   ============================================================================ */

/* ---------------------------------------------------------------- 0. Reset */
*,
*::before,
*::after { box-sizing: border-box; }

:where(body, h1, h2, h3, h4, p, figure, blockquote, ul, ol, dl, dd) { margin: 0; }
/* :where() keeps the reset at zero specificity, so a component can set its own
   padding without an attribute selector out-ranking its class. */
:where(ul[class], ol[class]) { list-style: none; padding: 0; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-height) + var(--space-4));
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-sans);
  font-size: var(--type-body-large);
  line-height: var(--lh-body-large);
  letter-spacing: var(--ls-body-large);
  color: var(--text-primary);
  background: var(--surface-page);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

a { color: inherit; text-decoration: none; }

button { font: inherit; color: inherit; }

/* -------------------------------------------------------- 1. Accessibility */
:focus-visible {
  outline: var(--focus-ring-width) solid var(--focus-ring-color);
  outline-offset: var(--focus-ring-offset);
  border-radius: var(--radius-chip);
}

.skip-link {
  position: absolute;
  left: var(--space-4);
  top: var(--space-2);
  z-index: var(--z-skip);
  transform: translateY(-200%);
  padding: var(--space-3) var(--space-5);
  background: var(--accent);
  color: var(--on-accent);
  border-radius: var(--radius-control);
  font-weight: var(--fw-medium);
  transition: transform var(--duration-base) var(--ease-out);
}
.skip-link:focus { transform: translateY(0); }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

/* ------------------------------------------------------------- 2. Iconography
   Material Symbols Rounded, matching the app's icon set. Icons are always
   decorative here — the adjacent text carries the meaning — so they are
   aria-hidden and boxed to 1em so a failed webfont can't disturb the layout. */
.icon {
  font-family: var(--font-icons);
  font-weight: var(--fw-regular);
  font-style: normal;
  font-size: var(--size-icon);
  line-height: 1;
  width: 1em;
  height: 1em;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  letter-spacing: normal;
  text-transform: none;
  white-space: nowrap;
  word-wrap: normal;
  direction: ltr;
  font-variation-settings: 'FILL' 1, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}

/* --------------------------------------------------------------- 3. Layout */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--space-gutter);
}
.container--wide { max-width: var(--container-wide); }

@media (min-width: 768px) {
  .container { padding-inline: var(--space-gutter-lg); }
}

.section { padding-block: var(--space-section-y); }
.section--tonal { background: var(--surface-alt); }
.section--surface { background: var(--surface-card); }

.section-head { max-width: var(--measure); }
.section-head--center { margin-inline: auto; text-align: center; }

.eyebrow {
  display: inline-block;
  margin-bottom: var(--space-3);
  font-size: var(--type-label-medium);
  line-height: var(--lh-label-medium);
  letter-spacing: 0.08em;
  font-weight: var(--fw-bold);
  text-transform: uppercase;
  color: var(--accent);
}

.section-title {
  font-size: var(--type-section);
  line-height: var(--lh-section);
  font-weight: var(--fw-bold);
  letter-spacing: -0.01em;
  color: var(--text-primary);
  text-wrap: balance;
}

.section-sub {
  margin-top: var(--space-4);
  color: var(--text-secondary);
  max-width: var(--measure);
}
.section-head--center .section-sub { margin-inline: auto; }

/* ------------------------------------------------------------- 4. Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  min-height: var(--size-touch-min);
  padding: var(--space-3) var(--space-6);
  border: none;
  border-radius: var(--radius-pill);
  font-size: var(--type-label-large);
  line-height: var(--lh-label-large);
  letter-spacing: var(--ls-label-large);
  font-weight: var(--fw-medium);
  cursor: pointer;
  transition: background-color var(--duration-base) var(--ease-out),
              color var(--duration-base) var(--ease-out),
              box-shadow var(--duration-base) var(--ease-out);
}
.btn--filled {
  background: var(--accent);
  color: var(--on-accent);
}
.btn--filled:hover { background: var(--accent-pressed); }

/* Store badges — official Apple / Google artwork, never recoloured or resized
   away from its own proportions. */
.store-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  align-items: center;
}
.store-row--center { justify-content: center; }

.store-badge {
  display: inline-flex;
  border-radius: var(--radius-chip);
  transition: opacity var(--duration-base) var(--ease-out);
}
.store-badge:hover { opacity: 0.86; }
.store-badge img { height: 52px; width: auto; }

@media (max-width: 480px) {
  .store-badge img { height: 46px; }
}

/* ------------------------------------------------------------------ 5. Nav */
.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: var(--z-nav);
  background: var(--surface-nav);
  backdrop-filter: blur(18px) saturate(1.4);
  -webkit-backdrop-filter: blur(18px) saturate(1.4);
  border-bottom: var(--border-hairline);
  transition: box-shadow var(--duration-base) var(--ease-out);
}
.nav.is-scrolled { box-shadow: var(--shadow-nav); }

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  min-height: var(--nav-height);
}

.nav__logo {
  display: inline-flex;
  align-items: center;
  min-height: var(--size-touch-min);
  gap: var(--space-3);
  font-size: var(--type-title-large);
  line-height: var(--lh-title-large);
  font-weight: var(--fw-bold);
  color: var(--text-primary);
}
.nav__logo img { border-radius: var(--radius-chip); }

.nav__links {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}
.nav__links a {
  display: inline-flex;
  align-items: center;
  min-height: var(--size-touch-min);
  padding-inline: var(--space-3);
  border-radius: var(--radius-control);
  font-size: var(--type-label-large);
  line-height: var(--lh-label-large);
  font-weight: var(--fw-medium);
  color: var(--text-secondary);
  transition: color var(--duration-base) var(--ease-out),
              background-color var(--duration-base) var(--ease-out);
}
.nav__links a:hover {
  color: var(--on-accent-container);
  background: var(--accent-container);
}
/* `.nav__links a` outranks `.btn--filled`, so the filled CTA has to restate
   its own colours or it inherits the muted link colour on a purple fill. */
.nav__links .btn--filled {
  margin-left: var(--space-2);
  background: var(--accent);
  color: var(--on-accent);
}
.nav__links .btn--filled:hover { background: var(--accent-pressed); color: var(--on-accent); }

.nav__toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: var(--size-touch-min);
  height: var(--size-touch-min);
  background: none;
  border: none;
  border-radius: var(--radius-control);
  cursor: pointer;
  color: var(--text-primary);
}
.nav__toggle:hover { background: var(--accent-container); }

.nav__scrim {
  position: fixed;
  inset: 0;
  z-index: var(--z-scrim);
  background: color-mix(in srgb, var(--m3-on-surface) 45%, transparent);
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--duration-base) var(--ease-out), visibility var(--duration-base);
}
.nav__scrim.is-open { opacity: 1; visibility: visible; }

@media (max-width: 959px) {
  .nav__toggle { display: inline-flex; }
  .nav__links {
    position: fixed;
    top: var(--nav-height);
    left: 0;
    right: 0;
    z-index: var(--z-menu);
    flex-direction: column;
    align-items: stretch;
    gap: var(--space-1);
    padding: var(--space-4) var(--space-gutter) var(--space-6);
    background: var(--surface-card);
    border-bottom: var(--border-strong);
    box-shadow: var(--shadow-card-hover);
    transform: translateY(-8px);
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--duration-base) var(--ease-out),
                transform var(--duration-base) var(--ease-out),
                visibility var(--duration-base);
  }
  .nav__links.is-open { opacity: 1; visibility: visible; transform: translateY(0); }
  .nav__links a { padding-inline: var(--space-4); }
  .nav__links .btn--filled { margin-left: 0; margin-top: var(--space-2); }
}

/* ----------------------------------------------------------------- 6. Hero */
.hero {
  position: relative;
  padding-top: calc(var(--nav-height) + var(--space-12));
  padding-bottom: var(--space-section-y);
  background: linear-gradient(
    180deg,
    color-mix(in srgb, var(--accent-container) 60%, var(--surface-page)) 0%,
    var(--surface-page) 72%
  );
}

.hero__grid {
  display: grid;
  gap: var(--space-12);
  align-items: center;
}

.hero__title {
  font-size: var(--type-hero);
  line-height: var(--lh-hero);
  letter-spacing: var(--ls-hero);
  font-weight: var(--fw-black);
  text-wrap: balance;
}
.hero__title em { font-style: normal; color: var(--accent); }

.hero__lead {
  margin-top: var(--space-5);
  max-width: 46ch;
  font-size: var(--type-body-large);
  line-height: var(--lh-body-large);
  color: var(--text-secondary);
}

.hero__actions { margin-top: var(--space-8); }

.hero__note {
  margin-top: var(--space-4);
  font-size: var(--type-body-medium);
  line-height: var(--lh-body-medium);
  color: var(--text-secondary);
}

/* Device mock-up — the screenshots ship with the phone frame baked in, so the
   site adds depth only, never a second frame. */
.device-stack {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: 0;
}
.device {
  filter: drop-shadow(var(--shadow-device));
}
.device--front {
  width: clamp(190px, 46vw, 290px);
  position: relative;
  z-index: var(--z-raised);
}
.device--back {
  width: clamp(150px, 37vw, 232px);
  margin-right: calc(clamp(190px, 46vw, 290px) * -0.28);
  margin-bottom: clamp(var(--space-6), 4vw, var(--space-12));
  order: -1;
  opacity: 0.96;
}

/* On phones a single screen reads better than a stack, and saves a request. */
@media (max-width: 639px) {
  .device--back { display: none; }
  .device--front { width: min(240px, 68vw); }
}

@media (min-width: 960px) {
  .hero { padding-top: calc(var(--nav-height) + var(--space-16)); }
  .hero__grid {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
    gap: var(--space-16);
  }
}

/* ------------------------------------------------- 7. Cards & icon tiles
   The app's recipe: a tonal surface with a hairline border, plus the very
   soft site elevation. Category colour arrives through --hue / --hue-text so
   a card never hard-codes a value. */
.card {
  --hue: var(--accent);
  --hue-text: var(--on-accent-container);
  padding: var(--space-card);
  background: var(--surface-card);
  border: var(--border-hairline);
  border-radius: var(--radius-hero);
  box-shadow: var(--shadow-card);
  transition: box-shadow var(--duration-base) var(--ease-out);
}
.card__title {
  font-size: var(--type-title-large);
  line-height: var(--lh-title-large);
  font-weight: var(--fw-bold);
}
.card__body {
  margin-top: var(--space-2);
  font-size: var(--type-body-medium);
  line-height: var(--lh-body-medium);
  color: var(--text-secondary);
}

.icon-tile {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--size-icon-container);
  height: var(--size-icon-container);
  margin-bottom: var(--space-4);
  border-radius: var(--radius-circle);
  background: color-mix(in srgb, var(--hue) var(--tint-fill), transparent);
  color: var(--hue-text);
}

.card-grid {
  display: grid;
  gap: var(--space-6);
  margin-top: var(--space-12);
  grid-template-columns: 1fr;
}
@media (min-width: 600px) {
  .card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 960px) {
  .card-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
/* Two-up: keep the cards from stretching to the full container width. */
.card-grid--2 { max-width: 860px; margin-inline: auto; }

/* Fill variant — for a count that does not divide into the column track (the
   feature grid runs to eight). Flex so a short last row centres instead of
   leaving a hole in the third column. */
.card-grid--fill {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
}
/* Basis and cap are the same track width, so the row count is exactly the
   column count — a px basis lets a fourth card squeeze in and shrinks the
   text column to about 28 characters. */
.card-grid--fill > .card { flex: 1 1 100%; }
@media (min-width: 600px) {
  .card-grid--fill > .card {
    flex-basis: calc((100% - var(--space-6)) / 2);
    max-width: calc((100% - var(--space-6)) / 2);
  }
}
@media (min-width: 960px) {
  .card-grid--fill > .card {
    flex-basis: calc((100% - 2 * var(--space-6)) / 3);
    max-width: calc((100% - 2 * var(--space-6)) / 3);
  }
}

/* Category hues, straight from the app's feature palette */
.card--glucose  { --hue: var(--feature-glucose);  --hue-text: var(--feature-glucose-text); }
.card--ketone   { --hue: var(--feature-ketone);   --hue-text: var(--feature-ketone-text); }
.card--insulin  { --hue: var(--feature-insulin);  --hue-text: var(--feature-insulin-text); }
.card--meal     { --hue: var(--feature-meal);     --hue-text: var(--feature-meal-text); }
.card--curve    { --hue: var(--feature-curve);    --hue-text: var(--feature-curve-text); }
.card--weight   { --hue: var(--feature-weight);   --hue-text: var(--feature-weight-text); }
.card--symptom  { --hue: var(--feature-symptom);  --hue-text: var(--feature-symptom-text); }
.card--reminder { --hue: var(--accent);           --hue-text: var(--on-accent-container); }

/* ---------------------------------------------------- 8. FR-003 Trust band
   Only facts that can be checked by installing the app. No ratings, no
   download counts, no testimonials. */
/* Three facts, stated plainly. No box: the sections below are already made of
   cards, and boxing three short lines right under the hero turned the band into
   a stretched lozenge. Air and a centred icon do the work instead. */
.trust {
  background: var(--surface-page);
}
.trust__list {
  display: grid;
  gap: var(--space-8);
  padding-block: var(--space-8);
  border-top: 1px solid var(--divider);
  border-bottom: 1px solid var(--divider);
}
.trust__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: var(--space-3);
}
.trust__item .icon-tile { margin-bottom: 0; }
.trust__label {
  display: block;
  font-size: var(--type-title-large);
  line-height: var(--lh-title-large);
  font-weight: var(--fw-bold);
  color: var(--text-primary);
}
.trust__note {
  display: block;
  margin-top: var(--space-1);
  max-width: 30ch;
  margin-inline: auto;
  font-size: var(--type-body-medium);
  line-height: var(--lh-body-medium);
  color: var(--text-secondary);
}

.trust__item--platform { --hue: var(--accent);           --hue-text: var(--on-accent-container); }
.trust__item--offline  { --hue: var(--feature-insulin);  --hue-text: var(--feature-insulin-text); }
.trust__item--logging  { --hue: var(--feature-glucose);  --hue-text: var(--feature-glucose-text); }

@media (min-width: 720px) {
  .trust__list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--space-6);
  }
}

/* ----------------------------------------------- 9. FR-004 Problem/solution
   Uses the glucose status tints so the contrast between the two states reads
   the same way it does inside the app. */
.compare {
  display: grid;
  gap: var(--space-6);
  margin-top: var(--space-12);
}
@media (min-width: 860px) {
  .compare { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.compare__card {
  padding: var(--space-8);
  border-radius: var(--radius-hero);
  background: color-mix(in srgb, var(--hue) var(--tint-fill), var(--surface-card));
  border: 1px solid color-mix(in srgb, var(--hue) var(--tint-border), transparent);
}
.compare__card--before { --hue: var(--status-warning); --hue-text: var(--status-warning-text); }
.compare__card--after  { --hue: var(--status-normal);  --hue-text: var(--status-normal-text); }

.compare__card .icon-tile { background: color-mix(in srgb, var(--hue) 22%, transparent); }
.compare__list {
  margin-top: var(--space-5);
  display: grid;
  gap: var(--space-3);
}
.compare__list li {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  font-size: var(--type-body-medium);
  line-height: var(--lh-body-medium);
  color: var(--text-secondary);
}
.compare__list .icon {
  font-size: 20px;
  margin-top: 1px;
  color: var(--hue-text);
}

/* ------------------------------------------------- 10. FR-005 Screenshots
   The pattern's signature section: real screens, one line of copy each.
   A snap rail on phones, a plain grid once there is room. */
.showcase__rail {
  margin-top: var(--space-12);
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: min(62vw, 260px);
  gap: var(--space-6);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-block-end: var(--space-4);
  padding-inline: var(--space-gutter);
  margin-inline: calc(-1 * var(--space-gutter));
  scrollbar-width: thin;
  overscroll-behavior-x: contain;
}
.showcase__item {
  scroll-snap-align: center;
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}
/* Store panels: opaque pastel artwork, so they read as cards rather than as a
   phone floating on the page. Rounded and lifted instead of drop-shadowed. */
.showcase__item img {
  border-radius: var(--radius-hero);
  box-shadow: var(--shadow-card-hover);
}
.showcase__caption {
  font-size: var(--type-body-medium);
  line-height: var(--lh-body-medium);
  color: var(--text-secondary);
}
.showcase__caption strong {
  display: block;
  font-size: var(--type-title-medium);
  line-height: var(--lh-title-medium);
  font-weight: var(--fw-bold);
  color: var(--text-primary);
}
.showcase__hint {
  margin-top: var(--space-4);
  font-size: var(--type-body-small);
  color: var(--text-muted);
}

@media (min-width: 900px) {
  .showcase__rail {
    grid-auto-flow: row;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    grid-auto-columns: auto;
    overflow: visible;
    padding-inline: 0;
    margin-inline: 0;
  }
  .showcase__hint { display: none; }
}

/* --------------------------------------------------- 11. FR-007 Vet visit */
.vet { background: var(--accent-container); }
.vet .eyebrow,
.vet .section-title { color: var(--on-accent-container); }
.vet .section-sub { color: color-mix(in srgb, var(--on-accent-container) 82%, transparent); }

/* -------------------------------------------------- 12. FR-008 How it works */
.steps {
  display: grid;
  gap: var(--space-12);
  margin-top: var(--space-12);
  counter-reset: step;
}
@media (min-width: 860px) {
  .steps { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-8); }
}

.step { text-align: center; }
.step img {
  width: min(200px, 62vw);
  margin-inline: auto;
  margin-bottom: var(--space-6);
  filter: drop-shadow(var(--shadow-device));
}
.step__number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--space-8);
  height: var(--space-8);
  margin-bottom: var(--space-3);
  border-radius: var(--radius-circle);
  background: var(--accent);
  color: var(--on-accent);
  font-size: var(--type-label-large);
  font-weight: var(--fw-bold);
}
.step__title {
  font-size: var(--type-title-large);
  line-height: var(--lh-title-large);
  font-weight: var(--fw-bold);
}
.step__body {
  margin-top: var(--space-2);
  margin-inline: auto;
  max-width: 34ch;
  font-size: var(--type-body-medium);
  line-height: var(--lh-body-medium);
  color: var(--text-secondary);
}

/* --------------------------------------------- 13. FR-009 Glucose ranges
   A reference table, not advice. Status names match the app exactly —
   "Very low" and "Very high", never "critical". */
.ranges {
  display: grid;
  gap: var(--space-6);
  margin-top: var(--space-12);
}
@media (min-width: 860px) {
  .ranges { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.range-card__head {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  margin-bottom: var(--space-6);
}
.range-card__head img {
  width: var(--size-icon-container);
  height: var(--size-icon-container);
  object-fit: contain;
}
.range-card__head h3 {
  font-size: var(--type-title-large);
  line-height: var(--lh-title-large);
  font-weight: var(--fw-bold);
}

.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }

.range-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--type-body-medium);
  font-variant-numeric: tabular-nums;
}
.range-table th {
  text-align: left;
  padding: 0 var(--space-2) var(--space-3) 0;
  font-size: var(--type-label-medium);
  line-height: var(--lh-label-medium);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: var(--fw-bold);
  color: var(--text-secondary);
  white-space: nowrap;
}
.range-table td {
  padding: var(--space-3) var(--space-2) var(--space-3) 0;
  border-top: 1px solid var(--divider);
  color: var(--text-secondary);
  white-space: nowrap;
}
.range-table th:last-child,
.range-table td:last-child { padding-right: 0; }

.status-chip {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-pill);
  font-size: var(--type-label-medium);
  line-height: var(--lh-label-medium);
  font-weight: var(--fw-bold);
  background: color-mix(in srgb, var(--hue) var(--tint-fill), var(--surface-card));
  color: var(--hue-text);
}
/* A dot as well as a colour, so the status never depends on hue alone. */
.status-chip::before {
  content: '';
  width: var(--space-2);
  height: var(--space-2);
  border-radius: var(--radius-circle);
  background: var(--hue);
}
.status-chip--very    { --hue: var(--status-very);    --hue-text: var(--status-very-text); }
.status-chip--warning { --hue: var(--status-warning); --hue-text: var(--status-warning-text); }
.status-chip--normal  { --hue: var(--status-normal);  --hue-text: var(--status-normal-text); }

.ranges-disclaimer {
  max-width: var(--measure);
  margin: var(--space-8) auto 0;
  text-align: center;
  font-size: var(--type-body-medium);
  line-height: var(--lh-body-medium);
  color: var(--text-secondary);
}

/* --------------------------------------------------------- 14. FR-010 FAQ */
.faq-list {
  max-width: 820px;
  margin: var(--space-12) auto 0;
  display: grid;
  gap: var(--space-3);
}
.faq-item {
  background: var(--surface-card);
  border: var(--border-hairline);
  border-radius: var(--radius-control);
  transition: border-color var(--duration-base) var(--ease-out);
}
.faq-item[open] { border-color: color-mix(in srgb, var(--accent) 40%, transparent); }
.faq-item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  min-height: var(--size-touch-min);
  padding: var(--space-4) var(--space-5);
  border-radius: var(--radius-control);
  cursor: pointer;
  list-style: none;
  font-size: var(--type-title-medium);
  line-height: var(--lh-title-medium);
  font-weight: var(--fw-medium);
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: '';
  flex: none;
  width: 10px;
  height: 10px;
  margin-top: -4px;
  border-right: 2px solid var(--text-secondary);
  border-bottom: 2px solid var(--text-secondary);
  transform: rotate(45deg);
  transition: transform var(--duration-base) var(--ease-out);
}
.faq-item[open] summary::after {
  margin-top: 4px;
  transform: rotate(-135deg);
  border-color: var(--accent);
}
.faq-item__answer {
  padding: 0 var(--space-5) var(--space-5);
  font-size: var(--type-body-medium);
  line-height: var(--lh-body-medium);
  color: var(--text-secondary);
}

/* --------------------------------------------------- 15. FR-011 Final CTA */
.cta-band {
  background: var(--accent-container);
  text-align: center;
}
.cta-band__title {
  font-size: var(--type-section);
  line-height: var(--lh-section);
  font-weight: var(--fw-bold);
  color: var(--on-accent-container);
  text-wrap: balance;
}
.cta-band__body {
  margin: var(--space-4) auto 0;
  max-width: 52ch;
  color: color-mix(in srgb, var(--on-accent-container) 84%, transparent);
}
.cta-band .store-row { margin-top: var(--space-8); }

/* ------------------------------------------- 16. FR-013 Reviews (deferred)
   Markup and styles exist so the section can be switched on the day there
   are real ratings to show. Until then it stays hidden — DiabiPets does not
   publish invented reviews. Remove the `hidden` attribute in index.html to
   enable, and fill in real numbers. */
.reviews[hidden] { display: none; }
.review-card__rating {
  display: flex;
  align-items: baseline;
  gap: var(--space-2);
  margin-bottom: var(--space-3);
}
.review-card__score {
  font-size: var(--type-headline-small);
  line-height: var(--lh-headline-small);
  font-weight: var(--fw-black);
  color: var(--text-primary);
}
.review-card__source {
  font-size: var(--type-label-medium);
  color: var(--text-secondary);
}
.review-card__quote {
  font-size: var(--type-body-medium);
  line-height: var(--lh-body-medium);
  color: var(--text-secondary);
}
.review-card__author {
  margin-top: var(--space-4);
  font-size: var(--type-label-medium);
  font-weight: var(--fw-medium);
  color: var(--text-primary);
}

/* --------------------------------------------------------- 17. Sticky CTA */
.sticky-cta {
  position: fixed;
  inset: auto 0 0 0;
  z-index: var(--z-sticky-cta);
  display: none;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-4) calc(var(--space-2) + env(safe-area-inset-bottom));
  background: color-mix(in srgb, var(--surface-page) 94%, transparent);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: var(--border-strong);
  box-shadow: var(--shadow-sticky);
  transform: translateY(110%);
  transition: transform var(--duration-slow) var(--ease-out);
}
.sticky-cta.is-visible { transform: translateY(0); }
.sticky-cta a {
  flex: 1 1 0;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: var(--size-touch-min);
}
.sticky-cta img { height: 42px; width: auto; }

@media (max-width: 767px) {
  .sticky-cta { display: flex; }
  body { padding-bottom: calc(58px + env(safe-area-inset-bottom)); }
}

/* -------------------------------------------------------------- 8. Footer */
.footer {
  background: var(--surface-footer);
  color: var(--text-on-dark-muted);
  padding-block: var(--space-12) var(--space-8);
}
.footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-6);
}
.footer__logo {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  color: var(--text-on-dark);
  font-size: var(--type-title-medium);
  line-height: var(--lh-title-medium);
  font-weight: var(--fw-bold);
}
.footer__logo img { border-radius: var(--radius-chip); }
.footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}
.footer__links a {
  display: inline-flex;
  align-items: center;
  min-height: var(--size-touch-min);
  padding-inline: var(--space-3);
  border-radius: var(--radius-control);
  font-size: var(--type-body-medium);
  color: var(--text-on-dark-muted);
  transition: color var(--duration-base) var(--ease-out);
}
.footer__links a:hover { color: var(--text-on-dark); }
.footer__legal {
  margin-top: var(--space-8);
  padding-top: var(--space-6);
  border-top: 1px solid var(--divider-on-dark);
  font-size: var(--type-body-small);
  line-height: var(--lh-body-small);
  color: var(--text-on-dark-muted);
}
.footer__legal p + p { margin-top: var(--space-2); }

@media (max-width: 640px) {
  .footer__inner { flex-direction: column; align-items: flex-start; }
}

/* -------------------------------------------------------------- 9. Motion
   One idea, applied once: sections rise a few pixels as they enter. Anything
   more would fight the app's restrained motion language. */
.js .reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity var(--duration-reveal) var(--ease-out),
              transform var(--duration-reveal) var(--ease-out);
}
.js .reveal.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .js .reveal { opacity: 1; transform: none; }
}
