/* Spruce design tokens — the CMS Colours and Fonts tabs map onto these custom properties.
   Deep evergreen for the brand, a fresh lime for highlights, warm cream paper. */
:root {
  --color-primary: #1e4a36;
  --color-primary-dark: #163a2a;
  --color-accent: #d6f26b;
  --color-accent-dark: #c2e04f;
  --color-secondary: #14291f;
  --color-secondary-light: #24402f;
  --color-surface: #e9e7dc;
  --color-surface-soft: #f4f2ea;
  --color-paper: #fbfaf5;
  --color-default: #3c4a42;
  --color-muted: #6d7a72;
  --color-line: #e2dfd2;
  --color-white: #ffffff;
  --font-default: 'Outfit', system-ui, sans-serif;
  --font-primary: 'Outfit', system-ui, sans-serif;
  --font-heading: 'Outfit', system-ui, sans-serif;
  --font-display: 'Instrument Serif', Georgia, serif;
  --radius: 24px;
  --radius-sm: 16px;
  --section-max-width: 80rem;
  --header-h: 84px;
  --section-pad-y: 104px;
  --base-size: 16px;
  --ease: cubic-bezier(.2, .75, .25, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { font-size: var(--base-size); scroll-behavior: smooth; }
body { font-family: var(--font-default); color: var(--color-default); line-height: 1.65; background: var(--color-surface-soft); -webkit-font-smoothing: antialiased; }
h1, h2, h3, h4, h5 { font-family: var(--font-heading); color: var(--color-secondary); font-weight: 600; line-height: 1.08; letter-spacing: -.035em; }
a { color: inherit; text-decoration: none; transition: color .25s ease; }
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; }
::selection { background: var(--color-accent); color: var(--color-secondary); }

.container { max-width: var(--section-max-width); margin: 0 auto; padding: 0 24px; }
section { padding: var(--section-pad-y) 0; position: relative; }
section, footer { overflow-x: clip; }
section.soft { background: var(--color-surface); }
section.paper { background: var(--color-paper); }
section.lime { background: color-mix(in srgb, var(--color-accent) 45%, var(--color-surface-soft)); }
section.dark { background: var(--color-primary); color: color-mix(in srgb, #fff 80%, transparent); }
section.dark h2, section.dark h3 { color: #fff; }

/* the accent words in a headline: serif italic ("Come home to *spotless*") */
.hl { font-family: var(--font-display); font-style: italic; font-weight: 400; letter-spacing: -.01em; color: inherit; }
/* the serif display face, for big numbers and quotes */
.display { font-family: var(--font-display); font-weight: 400; letter-spacing: -.01em; }

/* ── Buttons: rounded pills; the main one deep green with a lime arrow knob ── */
.btn {
  display: inline-flex; align-items: center; gap: .8rem; padding: .45rem .45rem .45rem 1.4rem; border-radius: 999px; border: 0; cursor: pointer;
  background: var(--color-primary); color: #fff; font-weight: 600; font-size: .95rem; line-height: 1; white-space: nowrap;
  transition: background .3s ease, color .3s ease, transform .3s var(--ease), box-shadow .3s ease;
}
.btn .knob { width: 38px; height: 38px; flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--color-accent); color: var(--color-secondary);
  transition: transform .35s var(--ease); }
.btn .knob svg { width: 17px; height: 17px; }
.btn:hover { transform: translateY(-2px); box-shadow: 0 16px 30px -14px color-mix(in srgb, var(--color-primary) 70%, transparent); }
.btn:hover .knob { transform: rotate(45deg); }
.btn.light { background: #fff; color: var(--color-secondary); box-shadow: 0 10px 30px -16px rgba(0, 0, 0, .35); }
.btn.accent { background: var(--color-accent); color: var(--color-secondary); padding: 1rem 1.7rem; justify-content: center; }
.btn.accent:hover { background: var(--color-accent-dark); box-shadow: 0 16px 30px -14px color-mix(in srgb, var(--color-accent) 90%, transparent); }
.btn.plain { padding: 1rem 1.7rem; justify-content: center; }
.btn.ghost { background: transparent; color: var(--color-secondary); box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--color-secondary) 25%, transparent); padding: .95rem 1.6rem; justify-content: center; }
.btn.ghost:hover { box-shadow: inset 0 0 0 1.5px var(--color-secondary); }
section.dark .btn.ghost { color: #fff; box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .35); }
.btn[disabled] { opacity: .6; pointer-events: none; }
/* "See how it works" — a round play/arrow button with a label */
.arrow-link { display: inline-flex; align-items: center; gap: .7rem; font-weight: 600; color: var(--color-secondary); }
.arrow-link .ring { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; box-shadow: inset 0 0 0 1.5px var(--color-secondary); transition: background .3s ease, color .3s ease; }
.arrow-link .ring svg { width: 16px; height: 16px; }
.arrow-link:hover .ring { background: var(--color-secondary); color: #fff; }
.arrow-link svg { width: 28px; height: 18px; transition: transform .3s var(--ease); }
.arrow-link:hover > svg { transform: translateX(5px); }

/* ── Section heads: a dot label, a headline with serif-italic words ── */
.chip { display: inline-flex; align-items: center; gap: .55rem; font-size: .72rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--color-secondary); }
.chip::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--color-primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--color-accent) 70%, transparent); }
section.dark .chip { color: #fff; }
section.dark .chip::before { background: var(--color-accent); box-shadow: none; }
/* the small "NEW" pill */
.tag-new { display: inline-flex; align-items: center; gap: .6rem; padding: .3rem .9rem .3rem .35rem; border-radius: 999px; background: #fff; font-size: .82rem; font-weight: 500; color: var(--color-secondary); box-shadow: 0 6px 20px -14px rgba(0, 0, 0, .4); }
.tag-new b { padding: .15rem .55rem; border-radius: 999px; background: var(--color-accent); font-size: .66rem; letter-spacing: .08em; text-transform: uppercase; }
/* ── Section heads: outlined chip, headline with an accent word ── */
.chip { display: inline-flex; align-items: center; gap: .5rem; padding: .32rem .95rem; border-radius: 999px; border: 1.5px solid var(--color-line);
  font-size: .72rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--color-secondary); background: #fff; }
section.dark .chip { background: transparent; border-color: rgba(255, 255, 255, .25); color: #fff; }
.section-head { max-width: 760px; margin-bottom: 52px; }
.section-head h2 { font-size: clamp(2.1rem, 4vw, 3.3rem); margin-top: .9rem; }
.section-head p { margin-top: 1rem; font-size: 1.06rem; max-width: 60ch; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.section-head.center p { margin-left: auto; margin-right: auto; }
.section-head.split { max-width: none; display: grid; grid-template-columns: 1.1fr 1fr; gap: 40px; align-items: end; }
.section-head.split p { margin-top: 0; }

/* ── Forms ── */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 16px; }
.form-grid .full { grid-column: 1 / -1; }
.form-grid label { display: block; font-weight: 500; font-size: .82rem; color: var(--color-secondary); margin-bottom: .35rem; }
.form-grid input, .form-grid select, .form-grid textarea {
  width: 100%; background: var(--color-surface-soft); border: 1.5px solid transparent; border-radius: 12px; padding: .8rem 1rem; color: var(--color-secondary);
  transition: border-color .25s ease, box-shadow .25s ease;
}
.form-grid input:focus, .form-grid select:focus, .form-grid textarea:focus { outline: none; background: #fff; border-color: var(--color-primary); box-shadow: 0 0 0 4px color-mix(in srgb, var(--color-accent) 45%, transparent); }
.form-grid ::placeholder { color: color-mix(in srgb, var(--color-muted) 75%, #fff); }
.field-err { color: #c0362c; font-size: .82rem; margin-top: .35rem; }
.form-note { font-size: .82rem; color: var(--color-muted); }
.form-ok { display: flex; gap: 12px; align-items: flex-start; padding: 16px 18px; border-radius: var(--radius-sm); background: color-mix(in srgb, #2e9e62 12%, #fff); color: #1d6b41; }
.form-ok svg { width: 22px; height: 22px; flex: none; margin-top: 2px; }
.form-bad { padding: 12px 16px; border-radius: 12px; background: #fdecea; color: #a12e24; font-size: .9rem; }

/* a tick list, the tick drawn in CSS so it follows the theme colours */
.tick-list { list-style: none; display: grid; gap: .65rem; }
.tick-list li { position: relative; padding-left: 1.9rem; }
.tick-list li::before { content: ''; position: absolute; left: 0; top: .2em; width: 1.2rem; height: 1.2rem; border-radius: 50%; background: var(--color-accent); }
.tick-list li::after { content: ''; position: absolute; left: .42rem; top: .45em; width: .32rem; height: .56rem; border: solid var(--color-secondary); border-width: 0 2px 2px 0; transform: rotate(45deg); }

/* rating stars */
.stars { display: inline-flex; gap: 2px; color: #f5b400; }
.stars svg { width: 15px; height: 15px; }

/* ── Header: logo · pill menu · quote button ── */
.logo { display: inline-flex; align-items: center; gap: .55rem; font: 700 1.45rem var(--font-heading); color: var(--color-secondary); letter-spacing: -.03em; }
.logo img { max-height: 44px; width: auto; }
.logo .mark { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; color: #fff; background: var(--color-primary); }
.logo .mark svg { width: 21px; height: 21px; color: var(--color-accent); }
.logo .wordmark { display: inline-flex; flex-direction: column; justify-content: center; line-height: 1.05; min-width: 0; }
.logo .wl { display: block; }
.logo .sub { display: block; margin-top: .3em; font-size: .5em; font-weight: 500; letter-spacing: .01em; color: var(--color-muted); }
.logo { min-width: 0; }
.logo img { max-width: min(46vw, 240px); object-fit: contain; }

/* ══ Motion: section-enter animations (plugins/motion.client.ts) ══
   Hidden states apply only while html.hg-motion is set and the section has not
   entered the frame yet; --i staggers siblings, --d adds a fixed delay. */
.hg-motion [data-anim] {
  transition:
    opacity .8s var(--ease) calc(var(--i, 0) * 90ms + var(--d, 0ms)),
    transform 1s var(--ease) calc(var(--i, 0) * 90ms + var(--d, 0ms)),
    filter .9s var(--ease) calc(var(--i, 0) * 90ms + var(--d, 0ms)),
    clip-path 1.1s var(--ease) calc(var(--i, 0) * 90ms + var(--d, 0ms));
}
.hg-motion section:not(.hg-inview) [data-anim], .hg-motion footer:not(.hg-inview) [data-anim] { opacity: 0; }
.hg-motion section:not(.hg-inview) [data-anim="up"], .hg-motion footer:not(.hg-inview) [data-anim="up"] { transform: translateY(42px); }
.hg-motion section:not(.hg-inview) [data-anim="down"] { transform: translateY(-34px); }
.hg-motion section:not(.hg-inview) [data-anim="left"] { transform: translateX(60px); }
.hg-motion section:not(.hg-inview) [data-anim="right"] { transform: translateX(-60px); }
.hg-motion section:not(.hg-inview) [data-anim="zoom"] { transform: scale(.88); }
.hg-motion section:not(.hg-inview) [data-anim="blur"] { filter: blur(14px); transform: scale(1.04); }
.hg-motion section:not(.hg-inview) [data-anim="pop"] { transform: translateY(18px) scale(.8); }
/* headings rise out of a mask */
.hg-motion section:not(.hg-inview) [data-anim="rise"] { clip-path: inset(0 0 100% 0); transform: translateY(40%); }
.hg-motion section.hg-inview [data-anim="rise"] { clip-path: inset(-10% -5% -20% -5%); }
/* photos unveil with a wipe while settling from a slight zoom */
.hg-motion section:not(.hg-inview) [data-anim="clip"] { opacity: 1; clip-path: inset(0 0 100% 0 round var(--radius)); }
.hg-motion section.hg-inview [data-anim="clip"] { clip-path: inset(0 0 0 0 round var(--radius)); }
.hg-motion [data-anim="clip"] img { transition: transform 1.6s var(--ease) calc(var(--i, 0) * 90ms + var(--d, 0ms)); }
.hg-motion section:not(.hg-inview) [data-anim="clip"] img { transform: scale(1.18); }
/* lines draw from left to right */
.hg-motion section:not(.hg-inview) [data-anim="draw"] { opacity: 1; transform: scaleX(0); transform-origin: left; }
.hg-motion [data-anim="draw"] { transition-duration: 1.4s; }

/* gentle idle float for the hero's chat bubbles (on a child, so it never fights the entrance) */
@keyframes hg-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
.float { animation: hg-float 6s ease-in-out infinite; }
.float.slow { animation-duration: 8s; animation-delay: -2s; }
.float.late { animation-delay: -4s; }

@keyframes tl-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
.float { animation: tl-float 6s ease-in-out infinite; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .float { animation: none; }
}
@media (max-width: 900px) {
  .section-head.split { grid-template-columns: 1fr; gap: 14px; }
}
@media (max-width: 640px) {
  :root { --section-pad-y: 72px; --radius: 22px; }
  .form-grid { grid-template-columns: 1fr; }
  .section-head { margin-bottom: 36px; }
}

/* ══ Shop (products from the CMS store) ══ */
.btn.small { padding: .6rem 1.15rem; font-size: .8rem; }
.head-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 30px; flex-wrap: wrap; }
.head-row .section-head { margin-bottom: 0; }
.p-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.p-card { position: relative; display: flex; flex-direction: column; }
.p-card .pic { position: relative; aspect-ratio: 1; border-radius: var(--radius); overflow: hidden; background: #fff; }
.p-card .pic img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.p-card:hover .pic img { transform: scale(1.06); }
.p-card .off { position: absolute; top: 12px; left: 12px; background: var(--color-accent); color: var(--color-secondary); font-size: .72rem; font-weight: 500; padding: .25rem .65rem; border-radius: 999px; }
.p-card .soldout { position: absolute; bottom: 12px; left: 12px; background: #fff; color: #b03a2e; font-size: .7rem; font-weight: 600; padding: .25rem .65rem; border-radius: 999px; }
.p-card .acts { position: absolute; top: 12px; right: 12px; display: grid; gap: 8px; }
.p-card .act { width: 34px; height: 34px; border-radius: 50%; border: 0; background: #fff; color: var(--color-secondary); display: grid; place-items: center; cursor: pointer; box-shadow: 0 4px 14px rgba(0, 0, 0, .08); transition: background .25s ease, color .25s ease, transform .3s ease, opacity .3s ease; }
.p-card .act svg { width: 16px; height: 16px; }
.p-card .act:hover, .p-card .act.on { background: var(--color-primary); color: #fff; }
.p-card .act.on svg { fill: currentColor; }
.p-card .act.reveal { opacity: 0; transform: translateX(8px); }
.p-card:hover .act.reveal, .p-card .act.reveal:focus-visible { opacity: 1; transform: none; }
.p-card .meta { display: flex; justify-content: space-between; align-items: center; margin-top: 14px; font-size: .75rem; color: var(--color-muted); }
.p-card .rating { display: inline-flex; align-items: center; gap: 4px; color: var(--color-secondary); font-weight: 500; }
.p-card .rating svg { width: 13px; height: 13px; color: #f5b400; fill: currentColor; }
.p-card h3 { font-family: var(--font-default); font-size: 1rem; font-weight: 600; letter-spacing: -.01em; margin: 4px 0 6px; }
.p-card h3 a:hover { color: var(--color-primary); }
.p-card .price { display: flex; gap: .55rem; align-items: baseline; font-size: .92rem; }
.p-card .price b { color: var(--color-primary); font-weight: 700; }
.p-card .price s { color: var(--color-muted); font-size: .82rem; }
.p-card .desc { color: var(--color-muted); font-size: .82rem; margin: 6px 0 8px; }
.p-card .buy { margin-top: auto; align-self: flex-start; background: none; border: 0; font-size: .82rem; font-weight: 500; color: var(--color-secondary); display: inline-flex; align-items: center; gap: .35rem; cursor: pointer; padding: 4px 0; }
.p-card .buy:hover { color: var(--color-primary); }
.p-card .buy svg { width: 14px; height: 14px; }
.p-card.row { flex-direction: row; gap: 18px; background: #fff; border-radius: var(--radius); padding: 14px; border: 1px solid var(--color-line); }
.p-card.row .pic { width: 46%; flex-shrink: 0; }
.p-card.row .body { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.p-card.row .meta { margin-top: 2px; }
@media (max-width: 1020px) { .p-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 760px) { .p-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; } }
@media (max-width: 420px) { .p-card.row { flex-direction: column; } .p-card.row .pic { width: 100%; } }

.empty-note { text-align: center; color: var(--color-muted); padding: 34px 20px; border: 1px dashed var(--color-line); border-radius: var(--radius); }
.empty-note b { color: var(--color-secondary); display: block; margin-bottom: 4px; }

/* ── Filter chips ── */
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chips button { border: 0; background: #fff; padding: .45rem 1rem; border-radius: 999px; font-size: .85rem; color: var(--color-default); cursor: pointer; transition: background .25s ease, color .25s ease; }
.chips button:hover { color: var(--color-primary); }
.chips button.on { background: var(--color-primary); color: #fff; }

/* ── Forms ── */
.field { display: grid; gap: 6px; }
.field label { font-size: .82rem; font-weight: 500; color: var(--color-secondary); }
.field input, .field textarea, .field select { width: 100%; padding: .8rem 1rem; border: 1.5px solid transparent; border-radius: 12px; font: inherit; background: var(--color-surface-soft); }
.field input:focus, .field textarea:focus, .field select:focus { outline: none; background: #fff; border-color: var(--color-primary); box-shadow: 0 0 0 4px color-mix(in srgb, var(--color-accent) 45%, transparent); }

/* spam trap (FormHoneypot) — off-screen, never seen */
.hp-trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
