/* ============================================================
   Food-waste caddy holder — landing page
   Design system: recycled-paper green ground, forest ink text,
   recycling-green accent, clay secondary. System sans for display,
   system mono for technical/spec labels. Layer-line motif as the
   structural device (echoes 3D-print layers).
   ============================================================ */

:root {
  /* Palette */
  --ground: #EEF1EA;
  --text: #18241C;
  --text-soft: #4A5A50;
  --accent: #2F7D4F;
  --accent-2: #C9722E;
  --line: #C7CFC2;

  /* Type */
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;

  /* Spacing scale */
  --s1: 0.5rem;
  --s2: 1rem;
  --s3: 1.5rem;
  --s4: 2.5rem;
  --s5: 4rem;

  --maxw: 40rem;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--ground);
  color: var(--text);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: var(--accent); }

/* Layer-line motif: a thin repeating hairline pattern used on dividers. */
.site-head,
.features,
.buy,
.site-foot {
  position: relative;
}

.site-head,
.features,
.buy {
  border-top: 1px solid var(--line);
}

/* --- Header ------------------------------------------------ */
.site-head {
  border-top: none;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--s2);
  max-width: var(--maxw);
  margin: 0 auto;
  padding: var(--s3) var(--s3) var(--s2);
}

.brand {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.wordmark {
  font-weight: 800;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
  color: var(--text);
  text-decoration: none;
}

.wordmark__dot { color: var(--accent); }

.brand__tagline {
  margin: 0;
  font-size: 0.8125rem;
  color: var(--text-soft);
  letter-spacing: 0;
}

.tag {
  margin: 0;
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  color: var(--text-soft);
}

/* --- Layout shell ------------------------------------------ */
main { display: block; }

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

.hero,
.features,
.proof,
.buy {
  padding: var(--s4) var(--s3);
}

/* --- Hero -------------------------------------------------- */
.eyebrow {
  margin: 0 0 var(--s2);
  font-family: var(--mono);
  font-size: 0.8125rem;
  letter-spacing: 0.06em;
  text-transform: lowercase;
  color: var(--accent);
}

.hero__title {
  margin: 0 0 var(--s3);
  font-size: clamp(2.5rem, 9vw, 4rem);
  line-height: 0.98;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.hero__lede {
  margin: 0 0 var(--s4);
  font-size: 1.1875rem;
  color: var(--text-soft);
  max-width: 30rem;
}

/* --- Product photo ----------------------------------------- */
.photo,
img.photo {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--line);
  border-radius: 2px;
}

.spec {
  margin: var(--s2) 0 0;
  font-family: var(--mono);
  font-size: 0.8125rem;
  letter-spacing: 0.03em;
  color: var(--text-soft);
}

/* --- Photo gallery (CSS scroll-snap; swipeable, no JS required) --- */
.gallery {
  margin: 0;
}

.gallery__track {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: var(--s2);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none; /* Firefox */
  overscroll-behavior-x: contain;
}

.gallery__track::-webkit-scrollbar {
  display: none; /* Safari/Chrome */
}

.gallery__slide {
  flex: 0 0 100%;
  scroll-snap-align: center;
}

.gallery__slide .photo {
  aspect-ratio: 3 / 4;
  height: auto;
  object-fit: cover;
}

.gallery__dots {
  display: flex;
  justify-content: center;
  gap: var(--s1);
  margin-top: var(--s2);
}

.gallery__dot {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: var(--line);
  transition:
    background 0.2s ease,
    transform 0.2s ease;
}

.gallery__dot.is-active {
  background: var(--accent);
  transform: scale(1.25);
}

/* --- Features ---------------------------------------------- */
.features__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--s2);
}

.feature {
  position: relative;
  padding-left: 1.75rem;
  font-size: 1.0625rem;
}

.feature::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 0.7rem;
  height: 0.7rem;
  background: var(--accent);
  border-radius: 2px;
}

/* --- Buy --------------------------------------------------- */
.price {
  margin: 0 0 var(--s3);
  display: flex;
  align-items: baseline;
  gap: var(--s1);
}

.price__amount {
  font-size: 2.5rem;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.price__unit {
  font-family: var(--mono);
  font-size: 0.875rem;
  color: var(--text-soft);
}

.buy__action {
  margin-bottom: var(--s3);
  min-height: 2.75rem;
}

.pickup {
  margin: 0;
  font-size: 0.9375rem;
  color: var(--text-soft);
  max-width: 28rem;
}

/* --- Footer ------------------------------------------------ */
.site-foot {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: var(--s4) var(--s3) var(--s5);
  font-family: var(--mono);
  font-size: 0.8125rem;
  letter-spacing: 0.03em;
  color: var(--text-soft);
}

.site-foot p { margin: 0; }

/* --- Focus / accessibility --------------------------------- */
a:focus-visible,
stripe-buy-button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

/* --- Motion ------------------------------------------------ */
.product {
  animation: rise 0.6s ease-out both;
}

@keyframes rise {
  from { opacity: 0; transform: translateY(0.75rem); }
  to   { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  .product { animation: none; }
}
