/*
 * Shelfie landing page. No inline styles or scripts (see security-headers.ts); the one script is
 * site-assets/local-price.js.
 * Colours are the light palette from design/tokens.json and tints of it (color-mix), nothing else
 * (src/design-tokens.test.ts checks every colour literal here). Light mode only.
 * Fonts are bundled woff2 copies from @fontsource-variable (licences beside them).
 */

/* Fonts: Fredoka for the wordmark and headings, Figtree for everything else. */
@font-face {
  font-family: 'Fredoka';
  font-style: normal;
  font-display: swap;
  font-weight: 300 700;
  src: url('fonts/fredoka-latin-ext-wght-normal.woff2') format('woff2-variations');
  unicode-range:
    U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329,
    U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F,
    U+A720-A7FF;
}
@font-face {
  font-family: 'Fredoka';
  font-style: normal;
  font-display: swap;
  font-weight: 300 700;
  src: url('fonts/fredoka-latin-wght-normal.woff2') format('woff2-variations');
  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;
}
@font-face {
  font-family: 'Figtree';
  font-style: normal;
  font-display: swap;
  font-weight: 300 900;
  src: url('fonts/figtree-latin-ext-wght-normal.woff2') format('woff2-variations');
  unicode-range:
    U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329,
    U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F,
    U+A720-A7FF;
}
@font-face {
  font-family: 'Figtree';
  font-style: normal;
  font-display: swap;
  font-weight: 300 900;
  src: url('fonts/figtree-latin-wght-normal.woff2') format('woff2-variations');
  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;
}

/* Palette (design/tokens.json, light) and the tints the page uses. */
:root {
  color-scheme: light;
  --bg: #eef4f1;
  --surface: #ffffff;
  --line: #dcdedf;
  --ink: #15262a;
  --muted: #566b6f;
  --accent: #0e6f6b;
  --edge: #7a8e91;
  --eu: #82b5a3;
  --eu-shade: #4e967d;
  --sprout: #4f9a62;
  --cream: #fff7e6;
  --wood: #cfa57c;
  --coral: #e0694f;
  --warn: #9a5200;
  --sprout-deep: #276b43;
  --danger: #b3261e;
  --eu-20: color-mix(in srgb, #82b5a3 20%, #fff);
  --wood-45: color-mix(in srgb, #cfa57c 45%, #fff);

  --hero-top: color-mix(in srgb, var(--bg) 50%, var(--surface));
  --hero-bottom: color-mix(in srgb, var(--bg) 92%, var(--eu));
  --shadow-soft: color-mix(in srgb, var(--ink) 6%, transparent);
  --shadow: color-mix(in srgb, var(--ink) 12%, transparent);
  --shadow-phone: color-mix(in srgb, var(--ink) 15%, transparent);

  --font-display: 'Fredoka', system-ui, sans-serif;
  --font-body: 'Figtree', system-ui, sans-serif;
  --wrap: 1120px;
  --gutter: 24px;
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

/* Visually hidden, still read by screen readers (the sign-up forms' labels). */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.55;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  height: auto;
}

a {
  color: var(--accent);
  text-underline-offset: 3px;
}
a:hover {
  color: var(--ink);
}

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}

h1,
h2,
h3,
.disp {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.01em;
}

.wrap {
  max-width: var(--wrap);
  margin: 0 auto;
}

.eyebrow {
  margin: 0 0 10px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--sprout-deep);
}

.section {
  padding: 72px var(--gutter);
}
.section--white {
  background: var(--surface);
  border-top: 1px solid var(--line);
}
.section--mint {
  background: var(--eu-20);
  border-top: 1px solid var(--line);
}
.section h2 {
  margin: 0 0 28px;
  font-size: 38px;
  line-height: 1.15;
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 24px;
  box-shadow: 0 1px 2px var(--shadow-soft);
}
.card h3 {
  margin: 12px 0 4px;
  font-size: 21px;
  font-weight: 500;
  line-height: 1.25;
}
.card p {
  margin: 0;
  color: var(--muted);
}

.grid {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, var(--min, 240px)), 1fr));
}
.grid--280 {
  --min: 280px;
}
.grid--230 {
  --min: 230px;
  gap: 18px;
}
.grid--190 {
  --min: 190px;
  gap: 16px;
}
.grid--200 {
  --min: 200px;
}

/* Lists that are only a layout */
.plain-list,
.steps {
  margin: 0;
  padding: 0;
  list-style: none;
}

/* Pills */
.pills {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.pill-now {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  background: var(--eu-20);
  border: 1.5px solid var(--eu-shade);
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
}
.pill-now--green {
  color: var(--sprout-deep);
}
.pill-now svg {
  flex: none;
}

/* Chip with a little stock bar */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--cream);
  border: 1px solid var(--wood-45);
  color: var(--warn);
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 15px;
  font-weight: 600;
  box-shadow: 0 6px 14px var(--shadow);
}

/* SVG fills that are tints (presentation attributes take palette literals only). */
.track {
  fill: var(--wood-45);
}

/* Header */
/* A white bar at the top of the page; it scrolls away with the page (not sticky). */
.site-header {
  padding: 10px var(--gutter);
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 2px 8px var(--shadow-soft);
}
.site-header .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  color: var(--ink);
  text-decoration: none;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 26px;
  letter-spacing: -0.01em;
}
.brand:hover {
  color: var(--ink);
}
.main-nav ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0 22px;
}
.main-nav a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  min-width: 44px;
  color: var(--ink);
  font-size: 16px;
  font-weight: 500;
}
.main-nav a:hover {
  color: var(--accent);
}

/* Hero */
.hero {
  padding: 56px var(--gutter) 72px;
  /* Botanical leaves in the top-right corner, drawn behind the text. */
  background:
    url('leaves/leaves-top-right.svg') no-repeat top right / 320px 320px,
    linear-gradient(180deg, var(--hero-top), var(--hero-bottom));
}
.hero .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 48px;
  align-items: center;
}
.hero-copy {
  flex: 1 1 460px;
  min-width: 0;
}
.hero h1 {
  margin: 0 0 18px;
  font-size: clamp(40px, 5.4vw, 64px);
  line-height: 1.04;
}
.lead {
  margin: 0 0 28px;
  font-size: 20px;
  color: var(--muted);
  max-width: 560px;
}
.hero-copy .signup + .pills {
  margin-top: 28px;
}
.pills--center {
  justify-content: center;
}
/* The value pills sit 14px below the toothpaste chip (the column's gap is 16px). */
.hero-art .pills--center {
  margin-top: -2px;
}
.hero-art {
  flex: 1 1 340px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}
.hero-art img {
  width: 300px;
}

/* Sounds familiar? */
#fam-h {
  font-size: clamp(26px, 3.1vw, 38px);
}
.card--moment {
  text-align: left;
}
.moment-art {
  height: 52px;
  display: flex;
  align-items: flex-end;
  justify-content: flex-start;
  gap: 2px;
  margin-bottom: 14px;
}
.card--moment h3 {
  margin-top: 0;
  font-size: 22px;
}

/* How it works */
.step {
  display: flex;
  flex-direction: column;
  padding: 22px 20px;
  background: var(--bg);
  border-color: var(--bg);
}
.step-number {
  display: inline-flex;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--eu);
  color: var(--ink);
  align-items: center;
  justify-content: center;
  font-size: 22px;
}
.step h3 {
  margin: 14px 0 6px;
  font-size: 22px;
  font-weight: 600;
}
.step p {
  color: var(--muted);
}
.step p + p {
  margin-top: 10px;
}
.badge {
  display: inline-block;
  margin-right: 6px;
  padding: 1px 9px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--surface);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  vertical-align: 2px;
}
.badge.badge--inline {
  margin-right: 0;
}
.phone {
  margin: auto auto 0;
  padding-top: 18px;
  width: 100%;
  max-width: 250px;
}
.phone-frame {
  height: 400px;
  border: 7px solid var(--ink);
  border-radius: 30px;
  overflow: hidden;
  background: var(--surface);
  padding: 10px 8px 0;
  box-shadow: 0 10px 24px var(--shadow-phone);
}
.phone-frame--mist {
  background: var(--bg);
}
.phone-frame img {
  display: block;
  width: 100%;
  border-radius: 10px;
}

/* Every cupboard */
.shelf-icon {
  display: block;
}

/* Greener home: three facts in a row; at 600px and below, two (the last one full width). */
.greener h2 {
  margin-bottom: 28px;
}
.facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.fact {
  padding: 16px 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 6px;
}
.fact-figure {
  font-size: clamp(22px, 5vw, 30px);
  line-height: 1.15;
  color: var(--accent);
}
.fact .fact-text {
  margin: 0;
  color: var(--ink);
}
.fact .source {
  margin: 4px 0 0;
  font-size: 13px;
  color: var(--muted);
}
.source a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}
@media (max-width: 600px) {
  .facts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .facts > :last-child {
    grid-column: 1 / -1;
  }
}

/* Privacy */
.privacy h2 {
  margin-bottom: 28px;
}
.card--privacy h3 {
  margin-top: 10px;
  margin-bottom: 6px;
}

/* Pricing */
.pricing {
  /* Botanical leaves in the bottom-left corner, drawn behind the table card. */
  background-image: url('leaves/leaves-bottom-left.svg');
  background-repeat: no-repeat;
  background-position: bottom left;
  background-size: 320px 320px;
}
.pricing .wrap {
  max-width: 860px;
}
.pricing h2 {
  margin-bottom: 20px;
}
.card--table {
  padding: 8px;
}
.plans {
  width: 100%;
  border-collapse: collapse;
  font-size: 17px;
}
.plans th,
.plans td {
  padding: 14px 16px;
  border-top: 1px solid var(--line);
  text-align: center;
}
.plans thead td {
  border-top: 0;
}
/* The jar sits in the table's empty corner cell. */
.plans .plans-jar {
  padding: 8px 16px;
  text-align: left;
  vertical-align: bottom;
}
.plans-jar img {
  display: block;
  width: 96px;
}
.plans thead th {
  padding: 16px;
  border-top: 0;
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 600;
}
.plans tbody th {
  text-align: left;
  font-weight: 500;
}
.plans .plus {
  background: var(--eu-20);
}
.plans thead .plus {
  border-radius: 14px 14px 0 0;
}
.plans tbody tr:last-child .plus {
  border-radius: 0 0 14px 14px;
}
.price {
  display: block;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 500;
  color: var(--muted);
}
.plus .price {
  font-weight: 600;
  color: var(--ink);
}
.local-price:not([hidden]) {
  display: block;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
}
.plans .no {
  color: var(--muted);
}

/* FAQ */
.faq .wrap {
  max-width: 760px;
}
.faq h2 {
  margin-bottom: 20px;
}
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.faq details {
  padding: 10px 22px;
}
.faq summary {
  cursor: pointer;
  min-height: 44px;
  display: flex;
  align-items: center;
  font-weight: 600;
  font-size: 17px;
  list-style: none;
}
.faq summary::-webkit-details-marker {
  display: none;
}
.faq details[open] summary {
  color: var(--accent);
}
.faq details p {
  margin: 0 0 12px;
}
.faq details a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

/* Closing */
.closing {
  position: relative;
  overflow: hidden;
  padding: 80px var(--gutter);
  background: var(--accent);
  color: var(--surface);
  text-align: center;
}
.closing-leaves {
  position: absolute;
  top: -40px;
  right: -40px;
  width: 220px;
  height: 220px;
}
.closing .wrap {
  position: relative;
  max-width: 820px;
}
.closing h2 {
  margin: 0 0 10px;
  font-size: clamp(34px, 4vw, 48px);
  line-height: 1.15;
}
.closing p {
  margin: 0 0 26px;
  font-size: 19px;
}
.closing .pills {
  justify-content: center;
}
.closing .pill-now {
  min-height: 36px;
  font-size: 15px;
  background: var(--surface);
  border-color: var(--surface);
  color: var(--accent);
}

/* Sign-up forms (hero and closing). Results show under the form: written by signup.js into
   the live region, or, without JavaScript, the [data-result] paragraph the function's redirect
   points at (#signup-<form>-<result>), shown with :target. */
.signup {
  max-width: 520px;
}
.closing .signup {
  margin: 24px auto 0;
  text-align: left;
}
.signup-form {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: flex-end;
}
.signup-field {
  flex: 1 1 260px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.signup-field label {
  font-size: 15px;
  font-weight: 600;
}
.signup-field input {
  width: 100%;
  min-height: 48px;
  padding: 0 16px;
  border: 2px solid var(--edge);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  font-family: inherit;
  font-size: 16px;
}
.closing .signup-field input {
  border-color: var(--eu);
}
.signup-field input[aria-invalid='true'] {
  border-color: var(--danger);
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 24px;
  border: 0;
  border-radius: 999px;
  background: var(--accent);
  color: var(--surface);
  font-family: inherit;
  font-size: 17px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 2px 0 var(--shadow);
}
.btn:hover {
  background: var(--ink);
}
.closing .btn {
  padding: 0 22px;
  background: var(--ink);
  font-size: 16px;
}
.btn[aria-disabled='true'] {
  cursor: progress;
}
.closing :focus-visible {
  outline-color: var(--surface);
}
/* The honeypot: out of sight and out of the tab order; people never fill it in. */
.signup-trap {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.signup .signup-notice {
  margin: 8px 0 0;
  font-size: 14px;
  color: var(--muted);
}
.closing .signup .signup-notice {
  color: var(--surface);
}
.signup-notice a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  min-width: 44px;
}
.closing .signup-notice a {
  color: var(--surface);
}
.signup .signup-status,
.signup .signup-result {
  margin: 8px 0 0;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-left: 6px solid var(--danger);
  border-radius: 12px;
  background: var(--surface);
  color: var(--ink);
  font-size: 15px;
  font-weight: 600;
  scroll-margin-top: 24px;
}
.signup .signup-status[data-result='ok'],
.signup .signup-result--ok {
  border-left-color: var(--sprout-deep);
}
/* An empty live region keeps no box but stays rendered, so screen readers hear its first message. */
.signup .signup-status:empty {
  margin: 0;
  padding: 0;
  border: 0;
}
.signup-result {
  display: none;
}
.signup-result:target {
  display: block;
}
/* The browser moves focus to the message it scrolled to, so screen readers start there; it is
   not a control, so it gets no focus ring. */
.signup-result:focus {
  outline: none;
}

/* Footer */
.site-footer {
  padding: 56px var(--gutter) 28px;
  background: var(--surface);
  border-top: 1px solid var(--line);
}
.footer-top {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 24px 40px;
  justify-content: space-between;
}
.brand--footer {
  font-size: 24px;
}
.footer-navs {
  display: flex;
  flex-wrap: wrap;
  gap: 24px 56px;
}
.footer-nav h2 {
  margin: 0 0 4px;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
.footer-nav ul {
  margin: 0;
  padding: 0;
  list-style: none;
}
.footer-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  min-width: 44px;
  color: var(--ink);
  font-size: 16px;
  text-decoration: none;
}
.footer-nav a:hover {
  color: var(--accent);
  text-decoration: underline;
}
.footer-bottom {
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  font-size: 14px;
  color: var(--muted);
}
.footer-bottom p {
  margin: 0;
}

/* Phones (390px and up) */
@media (max-width: 600px) {
  :root {
    --gutter: 16px;
  }
  .plans-jar img {
    width: 64px;
  }
  .section {
    padding-top: 56px;
    padding-bottom: 56px;
  }
  .section h2 {
    font-size: 32px;
  }
  .hero {
    padding-top: 32px;
  }
  .hero-art img {
    width: 240px;
  }
  .hero {
    background-size:
      200px 200px,
      auto;
  }
  .pricing {
    background-size: 200px 200px;
  }
  .plans {
    font-size: 15px;
  }
  .plans th,
  .plans td {
    padding: 12px 8px;
  }
  .plans thead th {
    padding: 12px 8px;
    font-size: 20px;
  }
}
