/* HelpMama stylesheet. Tokens and components ported from the HelpMama design system.
   Every value comes from the tokens below. The design system's .hm-wide class is a
   min-width: 900px media query here, so no script is needed for the wide layout. */

@import url("https://fonts.googleapis.com/css2?family=Quicksand:wght@600;700&family=Mulish:ital,wght@0,400;0,600;0,700;1,400&display=swap");

/* ---------- Colour tokens (palette taken from the logo) ---------- */
:root {
  --ground: #fdf7ed;        /* Page background (Cream). Everything sits on it. */
  --surface: #ffffff;       /* Cards, the buy card, the buy bar and form controls. */
  --ink: #3b332b;           /* Text and headings (Walnut). Also the footer background. */
  --muted: #6b5e53;         /* Captions and secondary text on ground and surface only. Never on a band. */
  --line: #e8ddcc;          /* Hairlines on ground and surface. */
  --ink-line: #3b332b40;    /* Hairlines inside a sage or peach band. */
  --sage: #dce0cb;          /* Wave bands, tags, hover fill on secondary buttons. */
  --sage-soft: #eef0e4;     /* Selected and hover fill for choice cards. */
  --sage-deep: #c2c9aa;     /* Pressed fill for secondary buttons. */
  --sage-strong: #88916a;   /* Link underlines, fact bullets, decorative shapes. Never text. */
  --peach: #f2d2c3;         /* Wave bands and the round hero shape. */
  --sand: #efe1ca;          /* Notices, hover fill for quiet and icon buttons. */
  --buy: #b05a3e;           /* Add to cart and Check out only. */
  --buy-hover: #9a4d34;
  --buy-active: #843f2a;
  --on-buy: #ffffff;
  --focus: #3b332b;         /* 3px solid ring, 2px offset, on every interactive element. */
  --control-border: #8c7e72;
  --disabled: #f0e8dc;
  --on-disabled: #8a7d72;
  --on-ink-muted: #d8ccbc;  /* Secondary text in the footer. */

  /* Type */
  --font-display: "Quicksand", "Nunito", system-ui, sans-serif;
  --font-body: "Mulish", system-ui, sans-serif;

  /* Spacing */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 22px;   /* Side gutter on phones. */
  --space-6: 30px;   /* Space above and below each section. */
  --space-7: 40px;   /* Space above the footer; side gutter on wide screens. */
  --space-8: 56px;   /* Gap between the two hero columns on wide screens. */

  /* Radii */
  --radius-sm: 6px;
  --radius-md: 14px;
  --radius-lg: 18px;
  --radius-xl: 26px;
  --radius-pill: 999px;

  --wave: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 360 20' preserveAspectRatio='none'%3E%3Cpath d='M0 0h360v9c-40 12-80 10-120 3S150 2 100 9 40 18 0 10z'/%3E%3C/svg%3E");
}

/* ---------- Base ---------- */
html { background: var(--ground); }
body { margin: 0; }
.hm, .hm *, .hm *::before, .hm *::after { box-sizing: border-box; }
.hm { font-family: var(--font-body); font-size: 16px; line-height: 1.5; color: var(--ink); background: var(--ground); -webkit-font-smoothing: antialiased; min-height: 100vh; }
.hm :where(h1, h2, h3, h4, p, figure, dl, dd, ul, ol, blockquote) { margin: 0; }
.hm img { display: block; max-width: 100%; }
.hm :focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.hm-skip { position: absolute; left: var(--space-3); top: -60px; z-index: 20; padding: 12px 16px; border-radius: var(--radius-pill); background: var(--surface); color: var(--ink); font-weight: 700; }
.hm-skip:focus { top: var(--space-3); }
.hm-vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Type ---------- */
.hm-display { font: 700 34px/1.06 var(--font-display); letter-spacing: -0.01em; text-wrap: balance; }
.hm-h2 { font: 700 26px/1.15 var(--font-display); text-wrap: balance; }
.hm-h3 { font: 700 21px/1.2 var(--font-display); text-wrap: balance; }
.hm-h4 { font: 700 17px/1.3 var(--font-display); }
.hm-lede { font-size: 17px; line-height: 1.55; color: var(--muted); }
.hm-small { font-size: 14px; line-height: 1.45; }
.hm-caption { font-size: 12.5px; line-height: 1.4; color: var(--muted); }
.hm-eyebrow { font-size: 13px; line-height: 1.4; color: var(--muted); }
.hm-muted { color: var(--muted); }
.hm-num { font-variant-numeric: tabular-nums lining-nums; }

/* ---------- Link ---------- */
.hm-link { color: var(--ink); font-weight: 700; text-decoration: underline; text-decoration-color: var(--sage-strong); text-decoration-thickness: 2px; text-underline-offset: 3px; border-radius: 4px; }
.hm-link:hover { text-decoration-color: var(--ink); }

/* ---------- Logo ---------- */
.hm-logo { display: inline-flex; align-items: center; text-decoration: none; border-radius: 8px; }
.hm-logo img { display: block; height: 40px; width: auto; }

/* ---------- Button ---------- */
.hm-btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 48px; padding: 0 24px; border: 0; border-radius: var(--radius-pill); font: 700 16px/1 var(--font-body); text-decoration: none; cursor: pointer; transition: background-color .15s ease, box-shadow .15s ease, transform .1s ease; }
.hm-btn.is-block { display: flex; width: 100%; }
.hm-btn.is-large { min-height: 56px; font-size: 17px; }
.hm-btn--buy { background: var(--buy); color: var(--on-buy); }
.hm-btn--buy:hover { background: var(--buy-hover); }
.hm-btn--buy:active { background: var(--buy-active); transform: translateY(1px); }
.hm-btn--secondary { background: var(--surface); color: var(--ink); box-shadow: inset 0 0 0 2px var(--ink); }
.hm-btn--secondary:hover { background: var(--sage); }
.hm-btn--secondary:active { background: var(--sage-deep); transform: translateY(1px); }
.hm-btn--quiet { background: transparent; color: var(--ink); text-decoration: underline; text-decoration-color: var(--sage-strong); text-decoration-thickness: 2px; text-underline-offset: 4px; padding: 0 8px; }
.hm-btn--quiet:hover { background: var(--sand); }
.hm-btn--quiet:active { background: var(--line); }
.hm-btn:disabled { background: var(--disabled); color: var(--on-disabled); box-shadow: none; cursor: not-allowed; transform: none; text-decoration: none; }
.hm-btn.is-loading { cursor: progress; }
.hm-btn .hm-spin { width: 18px; height: 18px; border-radius: 50%; border: 2.5px solid currentColor; border-right-color: transparent; animation: hm-spin .8s linear infinite; }
@keyframes hm-spin { to { transform: rotate(360deg); } }
.hm-btn svg { width: 20px; height: 20px; flex: none; }

/* ---------- Header ---------- */
.hm-header { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px var(--space-5); background: var(--ground); }
.hm-header nav { display: flex; align-items: center; gap: 4px; }
.hm-header .hm-navlinks { display: none; gap: 24px; margin-right: 16px; }
.hm-header .hm-navlinks a { color: var(--ink); text-decoration: none; font-weight: 600; font-size: 15px; padding: 6px 2px; border-radius: 4px; }
.hm-header .hm-navlinks a[aria-current="page"] { text-decoration: underline; text-decoration-color: var(--sage-strong); text-decoration-thickness: 2px; text-underline-offset: 6px; }
.hm-iconbtn { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; min-width: 44px; padding: 0 10px; border: 0; border-radius: var(--radius-pill); background: transparent; color: var(--ink); font: 700 15px/1 var(--font-body); cursor: pointer; text-decoration: none; justify-content: center; }
.hm-iconbtn:hover { background: var(--sand); }
.hm-iconbtn svg { width: 22px; height: 22px; }
.hm-count { display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px; background: var(--ink); color: var(--ground); font-size: 12px; font-variant-numeric: tabular-nums; }

/* Phone menu: the same three links, opened by the menu button */
.hm-menupanel { position: absolute; left: 0; right: 0; top: 100%; z-index: 10; padding: var(--space-2) var(--space-5) var(--space-4); background: var(--ground); border-bottom: 1px solid var(--line); }
.hm-menupanel[hidden] { display: none; }
.hm-menupanel ul { list-style: none; margin: 0; padding: 0; }
.hm-menupanel li + li { border-top: 1px solid var(--line); }
.hm-menupanel a { display: flex; align-items: center; min-height: 52px; color: var(--ink); font-weight: 700; text-decoration: none; border-radius: var(--radius-sm); }
.hm-menupanel a[aria-current="page"] { text-decoration: underline; text-decoration-color: var(--sage-strong); text-decoration-thickness: 2px; text-underline-offset: 6px; }

/* ---------- Tag ---------- */
.hm-tag { display: inline-flex; align-items: center; min-height: 26px; padding: 3px 12px; border-radius: var(--radius-pill); background: var(--sage); color: var(--ink); font-size: 12.5px; font-weight: 700; line-height: 1.3; }

/* ---------- Price ---------- */
.hm-price { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 12px; font-variant-numeric: tabular-nums lining-nums; }
.hm-price b { font: 700 32px/1.1 var(--font-display); }
.hm-price s { color: var(--muted); font-size: 17px; }
.hm-price.is-small b { font-size: 22px; }

/* ---------- Facts ---------- */
.hm-facts { list-style: none; padding: 0; display: grid; gap: 4px; font-size: 14px; color: var(--muted); }
.hm-facts li { display: flex; gap: 8px; align-items: baseline; }
.hm-facts li::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--sage-strong); flex: none; transform: translateY(-2px); }

/* ---------- Buy card ---------- */
.hm-buycard { background: var(--surface); border-radius: var(--radius-xl); padding: 24px 20px; display: grid; gap: 10px; }
.hm-buycard .hm-ship { font-size: 14px; color: var(--muted); margin-top: -4px; }
.hm-buycard form { margin: 6px 0 4px; }

/* ---------- Pebble photo ---------- */
.hm-pebble { margin: 0; position: relative; }
.hm-pebble img { width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; background: var(--sand); }
.hm-pebble--pebble img { border-radius: 58% 42% 52% 48% / 50% 56% 44% 50%; }
.hm-pebble--round img { border-radius: var(--radius-lg); }
.hm-pebble--arch img { border-radius: 999px 999px var(--radius-lg) var(--radius-lg); aspect-ratio: 4 / 5; }
.hm-pebble figcaption { font-size: 12.5px; line-height: 1.4; padding-top: 8px; color: var(--muted); }
.hm-band .hm-pebble figcaption { color: var(--ink); }

/* ---------- Wave band ---------- */
.hm-band { position: relative; padding: calc(var(--space-6) + 20px) var(--space-5); }
.hm-band--sage { background: var(--sage); }
.hm-band--peach { background: var(--peach); }
.hm-band::before, .hm-band::after { content: ""; position: absolute; left: 0; right: 0; height: 20px; background: var(--ground); -webkit-mask: var(--wave) center / 100% 100% no-repeat; mask: var(--wave) center / 100% 100% no-repeat; }
.hm-band::before { top: -1px; }
.hm-band::after { bottom: -1px; transform: scale(-1, -1); }
.hm-band > * + * { margin-top: 16px; }

/* ---------- Accordion ---------- */
.hm-acc { border-top: 1px solid var(--line); }
.hm-acc details { border-bottom: 1px solid var(--line); }
.hm-acc summary { list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 16px; min-height: 52px; padding: 12px 0; font-weight: 700; cursor: pointer; border-radius: var(--radius-sm); }
.hm-acc summary::-webkit-details-marker { display: none; }
.hm-acc summary::after { content: ""; width: 12px; height: 12px; flex: none; background: linear-gradient(var(--ink), var(--ink)) center / 12px 2px no-repeat, linear-gradient(var(--ink), var(--ink)) center / 2px 12px no-repeat; transition: transform .15s ease; }
.hm-acc details[open] summary::after { background: linear-gradient(var(--ink), var(--ink)) center / 12px 2px no-repeat; }
.hm-acc summary:hover { text-decoration: underline; text-decoration-color: var(--sage-strong); text-decoration-thickness: 2px; text-underline-offset: 4px; }
.hm-acc .hm-acc-body { padding: 0 0 16px; color: var(--muted); font-size: 15px; }

/* ---------- Review ---------- */
.hm-review { margin: 0; background: var(--surface); border-radius: var(--radius-lg); padding: 16px 18px; display: grid; gap: 6px; }
.hm-review p { font-size: 16px; }
.hm-review footer { font-size: 13px; color: var(--muted); }
.hm-reviews-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.hm-reviews-head b { font: 700 26px/1 var(--font-display); }

/* ---------- Delivery table ---------- */
.hm-table { width: 100%; border-collapse: collapse; font-size: 14px; font-variant-numeric: tabular-nums lining-nums; }
.hm-table th, .hm-table td { text-align: left; padding: 10px 8px 10px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.hm-table th { font-size: 12.5px; color: var(--muted); font-weight: 700; }

/* ---------- Quantity stepper ---------- */
.hm-qty { display: inline-flex; align-items: center; border-radius: var(--radius-pill); box-shadow: inset 0 0 0 1.5px var(--control-border); background: var(--surface); }
.hm-qty button { width: 44px; height: 44px; border: 0; background: transparent; border-radius: 50%; color: var(--ink); font: 700 20px/1 var(--font-body); cursor: pointer; }
.hm-qty button:hover { background: var(--sand); }
.hm-qty button:disabled { color: var(--on-disabled); cursor: not-allowed; background: transparent; }
.hm-qty input { width: 32px; padding: 0; border: 0; background: transparent; color: var(--ink); text-align: center; font: 700 16px/1 var(--font-body); font-variant-numeric: tabular-nums; -moz-appearance: textfield; appearance: textfield; }
.hm-qty input::-webkit-outer-spin-button, .hm-qty input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

/* ---------- Choice (radio card) ---------- */
.hm-fieldset { margin: 0; padding: 0; border: 0; min-width: 0; }
.hm-fieldset legend { padding: 0; margin-bottom: 14px; }
.hm-choice { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: var(--radius-md); background: var(--surface); box-shadow: inset 0 0 0 1.5px var(--control-border); cursor: pointer; }
.hm-choice + .hm-choice { margin-top: 8px; }
.hm-choice input { appearance: none; -webkit-appearance: none; width: 22px; height: 22px; margin: 0; border-radius: 50%; box-shadow: inset 0 0 0 2px var(--control-border); flex: none; display: grid; place-items: center; }
.hm-choice input::after { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--ink); transform: scale(0); transition: transform .12s ease; }
.hm-choice input:checked { box-shadow: inset 0 0 0 2px var(--ink); }
.hm-choice input:checked::after { transform: scale(1); }
.hm-choice:has(input:checked) { box-shadow: inset 0 0 0 2px var(--ink); background: var(--sage-soft); }
.hm-choice:hover { background: var(--sage-soft); }
.hm-choice .hm-choice-text { flex: 1; display: grid; }
.hm-choice .hm-choice-text small { color: var(--muted); font-size: 13px; }
.hm-choice b { font-variant-numeric: tabular-nums; }

/* ---------- Steps ---------- */
.hm-steps { list-style: none; padding: 0; display: grid; gap: 16px; counter-reset: hmstep; }
.hm-step { display: grid; grid-template-columns: 44px 1fr; gap: 12px; align-items: start; }
.hm-step::before { counter-increment: hmstep; content: counter(hmstep); font: 700 40px/1 var(--font-display); }
.hm-step h2, .hm-step h3 { font: 700 17px/1.3 var(--font-display); }
.hm-step p { font-size: 15px; color: var(--ink); margin-top: 2px; }

/* ---------- Notice ---------- */
.hm-notice { display: grid; gap: 4px; padding: 14px 16px; border-radius: var(--radius-md); background: var(--sand); font-size: 15px; }
.hm-notice[hidden] { display: none; }
.hm-notice strong { font-family: var(--font-display); font-size: 16px; }

/* ---------- Cart line ---------- */
.hm-cartline { display: grid; grid-template-columns: 84px 1fr; gap: 14px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.hm-cartline img { width: 84px; height: 84px; object-fit: cover; border-radius: var(--radius-md); }
.hm-cartline h2 { font: 700 16px/1.3 var(--font-display); }
.hm-cartline .hm-cartline-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 10px; }

/* ---------- Summary rows ---------- */
.hm-sum { display: grid; gap: 8px; font-variant-numeric: tabular-nums lining-nums; }
.hm-sum div { display: flex; justify-content: space-between; gap: 12px; }
.hm-sum .is-total { border-top: 1px solid var(--line); padding-top: 12px; font-weight: 700; font-size: 18px; }

/* ---------- Sticky buy bar (phones only) ---------- */
.hm-buybar { position: sticky; bottom: 0; z-index: 5; display: flex; align-items: center; gap: 14px; padding: 10px var(--space-5); background: var(--surface); border-top: 1px solid var(--line); }
.hm-buybar .hm-buybar-price { display: grid; line-height: 1.1; font-variant-numeric: tabular-nums; }
.hm-buybar .hm-buybar-price b { font: 700 22px/1.1 var(--font-display); }
.hm-buybar .hm-buybar-price s { font-size: 13px; color: var(--muted); }
.hm-buybar form { flex: 1; }

/* ---------- Footer ---------- */
.hm-footer { background: var(--ink); color: var(--ground); padding: var(--space-7) var(--space-5) var(--space-6); display: grid; gap: 24px; }
.hm-footer a { color: var(--ground); }
.hm-footer h2 { font: 700 14px/1.3 var(--font-display); color: var(--on-ink-muted); margin-bottom: 8px; }
.hm-footer ul { list-style: none; padding: 0; display: grid; gap: 6px; font-size: 15px; }
.hm-footer .hm-footer-tagline { color: var(--on-ink-muted); font-size: 15px; }
.hm-footer .hm-footer-cols p { font-size: 15px; }
.hm-footer .hm-footer-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.hm-footer .hm-fine { font-size: 13px; color: var(--on-ink-muted); display: grid; gap: 4px; }
.hm-footer :focus-visible { outline-color: var(--ground); }

/* ---------- Page scaffolding ---------- */
.hm-section { padding: var(--space-6) var(--space-5); }
.hm-section > * + * { margin-top: 14px; }
.hm-stack > * + * { margin-top: 12px; }
.hm-pagehead { padding: var(--space-6) var(--space-5) var(--space-4); }
.hm-pagehead > * + * { margin-top: 10px; }
.hm-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.hm-shape { position: absolute; z-index: 0; pointer-events: none; }
.hm-shape--sun { width: 68px; height: 68px; border-radius: 50%; background: var(--peach); }
.hm-shape--arch { width: 52px; height: 84px; border-radius: 26px 26px 0 0; background: var(--sage); }
.hm-rel { position: relative; overflow: hidden; }
.hm-rel > :not(.hm-shape) { position: relative; z-index: 1; }

/* Home hero: on phones text, photo, then the buy card inset from the edge */
.hm-hero > * + * { margin-top: 14px; }
.hm-hero .hm-shape--sun { right: -24px; top: 10px; }
.hm-hero .hm-shape--arch { left: -20px; bottom: 360px; }
.hm-hero > .hm-hero-buy { margin: 22px calc(var(--space-3) - var(--space-5)) 0; }

/* Home details, reviews, delivery: stacked on phones */
.hm-home-info { display: flex; flex-direction: column; }

/* Inner pages */
.hm-pagehead.hm-rel .hm-shape--sun { right: -20px; top: 6px; }

@media (prefers-reduced-motion: reduce) {
  .hm-btn .hm-spin { animation-duration: 2.4s; }
  .hm-btn, .hm-acc summary::after, .hm-choice input::after { transition: none; }
}

/* ---------- Wide layout, from 900px ---------- */
@media (min-width: 900px) {
  .hm-display { font-size: 52px; }
  .hm-header { padding: 18px var(--space-7); }
  .hm-header .hm-navlinks { display: flex; }
  .hm-header .hm-menu, .hm-menupanel { display: none; }

  .hm-band, .hm-section { padding-left: max(40px, calc((100% - 1040px) / 2)); padding-right: max(40px, calc((100% - 1040px) / 2)); }
  .hm-grid4 { grid-template-columns: repeat(4, 1fr); gap: 16px; }
  .hm-band .hm-stack { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
  .hm-band .hm-stack > * + * { margin-top: 0; }

  .hm-hero { display: grid; grid-template-columns: 1.05fr 1fr; grid-template-areas: "text photo" "buy photo"; column-gap: var(--space-8); align-items: center; align-content: center; max-width: 1120px; margin: 0 auto; padding: 48px var(--space-7); }
  .hm-hero > * + * { margin-top: 0; }
  .hm-hero-text { grid-area: text; align-self: end; }
  .hm-hero > .hm-pebble { grid-area: photo; }
  .hm-hero > .hm-hero-buy { grid-area: buy; align-self: start; max-width: 420px; margin: 28px 0 0; }
  .hm-hero .hm-shape--sun { right: 20px; top: 20px; width: 120px; height: 120px; }
  .hm-hero .hm-shape--arch { display: none; }

  /* Details beside delivery, then the reviews band full width */
  .hm-home-info { display: grid; grid-template-columns: minmax(40px, 1fr) minmax(0, 496px) minmax(0, 496px) minmax(40px, 1fr); column-gap: 48px; }
  .hm-home-info > .hm-section { padding-left: 0; padding-right: 0; }
  .hm-home-details { grid-column: 2; grid-row: 1; }
  .hm-home-delivery { grid-column: 3; grid-row: 1; }
  .hm-home-info > .hm-band { grid-column: 1 / -1; grid-row: 2; }

  /* Inner pages read in a 720px column */
  .hm-inner .hm-pagehead, .hm-inner .hm-section, .hm-inner .hm-band { padding-left: max(40px, calc((100% - 720px) / 2)); padding-right: max(40px, calc((100% - 720px) / 2)); }
  .hm-inner .hm-pebble--arch { max-width: 420px; margin-left: auto; margin-right: auto; }

  .hm-footer { grid-template-columns: 1.2fr 2fr; padding-left: var(--space-7); padding-right: var(--space-7); }
  .hm-footer .hm-footer-cols { grid-template-columns: repeat(3, 1fr); }
  .hm-buybar { display: none; }
}
