/* ==========================================================================
   Highpine Supply Co. - 70s park-poster retro e-commerce
   ========================================================================== */

:root {
  /* Park-poster sunset palette */
  --cream: hsl(42, 45%, 93%);
  --cream-deep: hsl(42, 38%, 88%);
  --pine: hsl(160, 30%, 25%);
  --pine-deep: hsl(160, 32%, 18%);
  --sunset: hsl(22, 80%, 55%);
  --ember: hsl(22, 82%, 42%);     /* interactive orange - AA on white text */
  --golden: hsl(42, 85%, 60%);
  --dusk: hsl(20, 30%, 30%);
  --dusk-deep: hsl(20, 32%, 22%);
  --ink: hsl(20, 25%, 18%);

  --font-display: "Fraunces", "Cooper Black", serif;
  --font-sans: "Nunito Sans", "Segoe UI", system-ui, sans-serif;
  --font-hand: "Caveat", cursive;

  --radius: 18px;
  --radius-pill: 999px;
  --shadow-card: 0 2px 6px hsla(20, 30%, 20%, 0.08), 0 12px 28px hsla(20, 30%, 20%, 0.10);
  --shadow-lift: 0 6px 14px hsla(20, 30%, 20%, 0.14), 0 20px 44px hsla(20, 30%, 20%, 0.16);

  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- Reset & base ---------- */

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
}

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

h1, h2, h3, p, ul, figure, blockquote { margin: 0; }
ul { padding: 0; list-style: none; }

a { color: inherit; }

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
}

.container {
  width: min(1120px, 100% - 3rem);
  margin-inline: auto;
}

.display {
  font-family: var(--font-display);
  font-optical-sizing: auto;
  font-weight: 900;
  font-variation-settings: "SOFT" 100;
  line-height: 1.05;
  letter-spacing: 0.005em;
}

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

.skip-link {
  position: absolute;
  top: -100px;
  left: 1rem;
  z-index: 100;
  padding: 0.6rem 1.2rem;
  background: var(--pine);
  color: var(--cream);
  border-radius: 0 0 12px 12px;
  font-weight: 700;
  text-decoration: none;
}
.skip-link:focus { top: 0; }

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

::selection { background: var(--golden); color: var(--ink); }

/* ---------- Film grain (backgrounds only, never forms/photos) ---------- */

.grain { position: relative; isolation: isolate; }
.grain::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background-image: var(--grain);
  opacity: 0.045;
  pointer-events: none;
}
.grain > * { position: relative; z-index: 2; }

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.7rem 1.5rem;
  border-radius: var(--radius-pill);
  font-family: var(--font-sans);
  font-weight: 800;
  font-size: 1rem;
  letter-spacing: 0.01em;
  text-decoration: none;
  border: 2px solid transparent;
  transition: transform 160ms ease, box-shadow 160ms ease, background-color 160ms ease, color 160ms ease;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 6px 16px hsla(20, 30%, 20%, 0.22); }
.btn:active { transform: translateY(0); box-shadow: none; }

.btn--lg { padding: 0.9rem 1.9rem; font-size: 1.125rem; }
.btn--sm { padding: 0.45rem 1.05rem; font-size: 0.9rem; }

.btn--primary { background: var(--ember); color: #fff; }
.btn--primary:hover { background: hsl(22, 82%, 37%); }

.btn--pine { background: var(--pine); color: var(--cream); }
.btn--pine:hover { background: var(--pine-deep); }

.btn--outline {
  background: hsla(42, 45%, 93%, 0.12);
  color: var(--cream);
  border-color: var(--cream);
}
.btn--outline:hover { background: var(--cream); color: var(--pine); }

/* ==========================================================================
   1. Navbar
   ========================================================================== */

.navbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--cream);
  border-bottom: 2px solid var(--pine);
}

.navbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 0.6rem;
  flex-wrap: wrap;
}

.navbar__brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
}

.badge-logo { width: 52px; height: 52px; flex: none; }

.badge-logo__arc {
  font-family: var(--font-sans);
  font-weight: 800;
  font-size: 9.5px;
  letter-spacing: 1.1px;
  fill: var(--cream);
}
.badge-logo__arc--small { font-size: 7.5px; letter-spacing: 0.8px; fill: var(--golden); }
.badge-logo__arc--dusk { fill: var(--dusk); }
.badge-logo__arc--dusk.badge-logo__arc--small { fill: var(--sunset); }

.navbar__brandname {
  font-family: var(--font-display);
  font-weight: 900;
  font-variation-settings: "SOFT" 100;
  font-size: 1.15rem;
  line-height: 0.95;
  color: var(--pine);
}
.navbar__brandname span {
  font-size: 0.72em;
  letter-spacing: 0.06em;
  color: var(--dusk);
}

.navbar__links {
  display: flex;
  gap: clamp(0.75rem, 2.5vw, 1.75rem);
  order: 3;
  width: 100%;
  justify-content: center;
  padding-bottom: 0.5rem;
  overflow-x: auto;
}

.navbar__links a {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--dusk);
  text-decoration: none;
  padding: 0.25rem 0.15rem;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
  transition: color 150ms ease, border-color 150ms ease;
}
.navbar__links a:hover { color: var(--ember); border-bottom-color: var(--ember); }

@media (min-width: 860px) {
  .navbar__links { order: 0; width: auto; padding-bottom: 0; }
}

/* Cart button - pine pill with stitched dashed inset */
.navbar__cart-wrap { position: relative; }

.cart-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 1.3rem;
  background: var(--pine);
  color: var(--cream);
  font-weight: 800;
  font-size: 0.95rem;
  border-radius: var(--radius-pill);
  transition: background-color 160ms ease, transform 160ms ease;
}
.cart-btn::before {
  content: "";
  position: absolute;
  inset: 4px;
  border: 1.5px dashed hsla(42, 45%, 93%, 0.65);
  border-radius: var(--radius-pill);
  pointer-events: none;
}
.cart-btn:hover { background: var(--pine-deep); transform: translateY(-1px); }

.cart-btn__count {
  display: inline-grid;
  place-items: center;
  min-width: 1.4em;
  height: 1.4em;
  padding-inline: 0.3em;
  background: var(--golden);
  color: var(--ink);
  font-size: 0.85em;
  font-weight: 900;
  border-radius: var(--radius-pill);
  transition: transform 180ms ease;
}
.cart-btn__count.is-bumping { transform: scale(1.35); }

/* Mini cart dropdown */
.mini-cart {
  position: absolute;
  right: 0;
  top: calc(100% + 12px);
  width: min(320px, 86vw);
  background: #fff;
  border: 2px solid var(--pine);
  border-radius: 14px;
  box-shadow: var(--shadow-lift);
  padding: 1rem 1.1rem 1.1rem;
  z-index: 60;
}
.mini-cart::before {
  content: "";
  position: absolute;
  top: -8px;
  right: 34px;
  width: 14px; height: 14px;
  background: #fff;
  border-top: 2px solid var(--pine);
  border-left: 2px solid var(--pine);
  transform: rotate(45deg);
}
.mini-cart__title {
  font-family: var(--font-display);
  font-weight: 900;
  font-variation-settings: "SOFT" 100;
  font-size: 1.15rem;
  color: var(--pine);
  margin-bottom: 0.5rem;
}
.mini-cart__list li {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.4rem 0;
  border-bottom: 1px dashed var(--cream-deep);
  font-size: 0.92rem;
}
.mini-cart__list li:last-child { border-bottom: 0; }
.mini-cart__qty { color: var(--dusk); font-weight: 700; }
.mini-cart__price { font-weight: 800; white-space: nowrap; }
.mini-cart__empty { font-size: 0.92rem; color: var(--dusk); }
.mini-cart__footer {
  display: flex;
  justify-content: space-between;
  padding-top: 0.6rem;
  margin-top: 0.35rem;
  border-top: 2px solid var(--cream-deep);
  font-weight: 700;
}
.mini-cart__checkout { width: 100%; margin-top: 0.75rem; }

/* ==========================================================================
   2. Hero
   ========================================================================== */

.hero {
  position: relative;
  overflow: hidden;
  color: var(--cream);
  text-align: center;
}

.hero__bands {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-rows: 30% 26% 22% 22%;
  z-index: 0;
}
.hero__band--golden { background: var(--golden); }
.hero__band--sunset { background: var(--sunset); }
.hero__band--dusk   { background: var(--dusk); }
.hero__band--pine   { background: var(--pine); }

.hero__sun {
  position: absolute;
  z-index: 1;
  width: clamp(140px, 19vw, 230px);
  top: clamp(1.25rem, 4vw, 3.5rem);
  left: 50%;
  transform: translateX(-50%);
  filter: drop-shadow(0 4px 14px hsla(20, 40%, 20%, 0.25));
}
.hero__sun-text {
  font-family: var(--font-sans);
  font-weight: 800;
  font-size: 12px;
  letter-spacing: 2px;
  fill: var(--dusk);
}
.hero__sun-text--small { font-size: 10px; letter-spacing: 1.2px; }

.hero__content {
  position: relative;
  z-index: 2;
  padding-top: clamp(11rem, 24vw, 17rem);
  padding-bottom: clamp(10rem, 20vw, 14rem);
}

.hero__eyebrow {
  display: inline-block;
  font-weight: 800;
  font-size: 0.82rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink);
  background: var(--cream);
  padding: 0.35rem 1rem;
  border-radius: var(--radius-pill);
  box-shadow: 0 2px 0 hsla(20, 40%, 20%, 0.18);
  margin-bottom: 1.25rem;
}

.hero h1 {
  font-size: clamp(2.8rem, 8vw, 5.5rem);
  margin-bottom: 1rem;
  text-shadow: 0 3px 0 hsla(20, 40%, 20%, 0.28);
}

.hero__sub {
  font-size: clamp(1.05rem, 2.2vw, 1.3rem);
  font-weight: 600;
  max-width: 34ch;
  margin-inline: auto;
  margin-bottom: 2rem;
  text-shadow: 0 1px 6px hsla(20, 40%, 20%, 0.45);
}

.hero__ctas {
  display: flex;
  gap: 0.9rem;
  justify-content: center;
  flex-wrap: wrap;
}

.hero__ridge {
  position: absolute;
  z-index: 1;
  left: 0; right: 0; bottom: -1px;
  width: 100%;
  height: clamp(110px, 16vw, 240px);
}

/* ==========================================================================
   3. Category badges
   ========================================================================== */

.categories {
  background: var(--cream);
  padding-block: clamp(2.5rem, 6vw, 4.5rem);
}

.categories__row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.75rem 1rem;
  justify-items: center;
}
@media (min-width: 760px) {
  .categories__row { grid-template-columns: repeat(5, 1fr); }
}

.cat-badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
  transition: transform 180ms ease;
}
.cat-badge svg {
  width: clamp(104px, 12vw, 136px);
  height: auto;
  filter: drop-shadow(0 3px 6px hsla(20, 30%, 20%, 0.18));
  transition: transform 180ms ease, filter 180ms ease;
}
.cat-badge:hover svg,
.cat-badge:focus-visible svg {
  transform: rotate(-5deg) translateY(-6px);
  filter: drop-shadow(0 10px 16px hsla(20, 30%, 20%, 0.28));
}
.cat-badge:nth-child(even):hover svg { transform: rotate(5deg) translateY(-6px); }

.cat-badge__arc {
  font-family: var(--font-sans);
  font-weight: 800;
  font-size: 11px;
  letter-spacing: 3px;
  fill: var(--cream);
}
.cat-badge__arc--dark { fill: var(--dusk); }
.cat-badge__arc--gold { fill: var(--golden); }

.cat-badge__label {
  font-weight: 800;
  font-size: 0.95rem;
  color: var(--pine);
  text-align: center;
}

/* ==========================================================================
   Section headings
   ========================================================================== */

.section-head {
  text-align: center;
  margin-bottom: clamp(2rem, 5vw, 3rem);
}
.section-head__title {
  font-size: clamp(1.9rem, 4.5vw, 3rem);
  color: var(--pine);
}
.section-head--cream .section-head__title { color: var(--cream); }
.section-head__squiggle {
  width: clamp(150px, 20vw, 220px);
  margin: 0.6rem auto 0;
}
.section-head__sub {
  max-width: 52ch;
  margin: 0.75rem auto 0;
  color: var(--cream-deep);
  font-weight: 600;
}

/* ==========================================================================
   4. Product grid
   ========================================================================== */

.lineup {
  background: var(--cream);
  padding-block: clamp(2rem, 5vw, 4rem) clamp(3.5rem, 7vw, 6rem);
}

.product-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.75rem;
}
@media (min-width: 640px)  { .product-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 980px)  { .product-grid { grid-template-columns: repeat(3, 1fr); } }

.product-card {
  background: #fff;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  border: 1px solid hsl(42, 30%, 84%);
  transition: transform 180ms ease, box-shadow 180ms ease;
  display: flex;
  flex-direction: column;
}
.product-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lift); }

.product-card__media { position: relative; }
.product-card__media svg { width: 100%; height: auto; }

.product-card__body {
  padding: 1.1rem 1.25rem 1.35rem;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  flex: 1;
}

.product-card__name {
  font-family: var(--font-display);
  font-weight: 900;
  font-variation-settings: "SOFT" 100;
  font-size: 1.25rem;
  color: var(--pine);
}

.product-card__meta {
  font-size: 0.85rem;
  color: hsl(20, 18%, 42%);
}

.product-card__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: auto;
  padding-top: 0.9rem;
}

.product-card__price {
  font-family: var(--font-sans);
  font-weight: 900;
  font-size: 1.3rem;
  color: var(--ink);
}

/* Retro starburst */
.starburst {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 86px;
  height: 86px;
  display: grid;
  place-items: center;
  background: var(--golden);
  color: var(--dusk-deep);
  clip-path: polygon(50% 0%, 59% 12%, 72% 5%, 75% 19%, 90% 18%, 86% 32%, 100% 38%, 89% 50%, 100% 62%, 86% 68%, 90% 82%, 75% 81%, 72% 95%, 59% 88%, 50% 100%, 41% 88%, 28% 95%, 25% 81%, 10% 82%, 14% 68%, 0% 62%, 11% 50%, 0% 38%, 14% 32%, 10% 18%, 25% 19%, 28% 5%, 41% 12%);
  transform: rotate(10deg);
  animation: starburst-wiggle 3.4s ease-in-out infinite;
}
.starburst span {
  font-size: 0.62rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-align: center;
  line-height: 1.25;
  transform: rotate(-2deg);
}
@keyframes starburst-wiggle {
  0%, 100% { transform: rotate(10deg) scale(1); }
  50% { transform: rotate(4deg) scale(1.04); }
}

/* ==========================================================================
   5. Story
   ========================================================================== */

.story {
  background: var(--pine);
  color: var(--cream);
  padding-block: clamp(3.5rem, 8vw, 6.5rem);
}

.story__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(2.5rem, 6vw, 4.5rem);
  align-items: center;
}
@media (min-width: 860px) {
  .story__grid { grid-template-columns: 5fr 6fr; }
}

.polaroid {
  justify-self: center;
  background: #fdfcf7;
  padding: 14px 14px 0;
  border-radius: 4px;
  box-shadow: 0 8px 20px hsla(160, 40%, 8%, 0.35), 0 24px 48px hsla(160, 40%, 8%, 0.3);
  transform: rotate(-3deg);
  max-width: 420px;
  transition: transform 200ms ease;
}
.polaroid:hover { transform: rotate(-1.2deg) scale(1.015); }

.polaroid__photo { border-radius: 2px; width: 100%; height: auto; }

.polaroid__caption {
  font-family: var(--font-hand);
  font-weight: 600;
  font-size: clamp(1.35rem, 2.5vw, 1.6rem);
  color: hsl(20, 25%, 30%);
  text-align: center;
  padding: 0.55rem 0 0.8rem;
  transform: rotate(-0.5deg);
}

.story__copy h2 {
  font-size: clamp(1.9rem, 4vw, 2.8rem);
  margin-bottom: 1.25rem;
}
.story__copy p {
  max-width: 56ch;
  color: hsl(42, 40%, 90%);
}

.story__divider {
  display: flex;
  gap: 0.7rem;
  justify-content: flex-start;
  align-items: center;
  margin-block: 1.25rem;
}
.story__divider span {
  width: 9px; height: 9px;
  background: var(--golden);
  transform: rotate(45deg);
}
.story__divider span:nth-child(2) { background: var(--sunset); width: 11px; height: 11px; }

.story__link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1.5rem;
  font-weight: 800;
  color: var(--golden);
  text-decoration: none;
  border-bottom: 2px dashed hsla(42, 85%, 60%, 0.55);
  padding-bottom: 2px;
  transition: gap 160ms ease, color 160ms ease;
}
.story__link:hover { gap: 0.8rem; color: var(--cream); border-bottom-color: var(--cream); }

/* ==========================================================================
   6. Wall of Patches
   ========================================================================== */

.patch-wall {
  background: var(--pine-deep);
  padding-block: clamp(3.5rem, 8vw, 6rem);
}

.corkboard {
  position: relative;
  background:
    radial-gradient(circle at 18% 28%, hsla(28, 40%, 40%, 0.35) 0 3px, transparent 4px),
    radial-gradient(circle at 62% 12%, hsla(28, 45%, 32%, 0.3) 0 2px, transparent 3px),
    radial-gradient(circle at 84% 58%, hsla(28, 40%, 38%, 0.32) 0 3px, transparent 4px),
    radial-gradient(circle at 34% 76%, hsla(28, 45%, 30%, 0.3) 0 2px, transparent 3px),
    radial-gradient(circle at 8% 64%, hsla(28, 40%, 42%, 0.28) 0 2px, transparent 3px),
    radial-gradient(circle at 52% 46%, hsla(28, 45%, 34%, 0.26) 0 3px, transparent 4px),
    radial-gradient(circle at 92% 22%, hsla(28, 42%, 36%, 0.3) 0 2px, transparent 3px),
    radial-gradient(circle at 72% 86%, hsla(28, 42%, 36%, 0.28) 0 3px, transparent 4px),
    linear-gradient(135deg, hsl(28, 38%, 52%), hsl(26, 40%, 45%));
  background-size: 190px 170px, 230px 210px, 260px 240px, 210px 190px, 180px 200px, 240px 220px, 200px 180px, 250px 230px, 100%;
  border: 10px solid hsl(24, 32%, 30%);
  border-radius: 10px;
  box-shadow:
    inset 0 0 0 2px hsla(24, 40%, 20%, 0.4),
    inset 0 6px 24px hsla(24, 50%, 15%, 0.35),
    0 16px 40px hsla(160, 40%, 6%, 0.45);
  padding: clamp(1.5rem, 4vw, 3rem);
}
.corkboard::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: var(--grain);
  opacity: 0.06;
  pointer-events: none;
  border-radius: 2px;
}

.patch-scatter {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: clamp(0.75rem, 2.5vw, 2rem) clamp(1rem, 3vw, 2.5rem);
}
.patch-scatter li { transform: rotate(var(--rot, 0deg)); }
.patch-scatter li:nth-child(odd)  { margin-top: clamp(0.4rem, 2vw, 1.6rem); }
.patch-scatter li:nth-child(3n)   { margin-bottom: clamp(0.4rem, 2vw, 1.4rem); }

.patch {
  display: block;
  padding: 0;
  border-radius: 16px;
  filter: drop-shadow(0 3px 4px hsla(24, 50%, 12%, 0.4));
  transition: transform 190ms ease, filter 190ms ease;
}
.patch svg { width: clamp(96px, 12vw, 138px); height: auto; }
.patch:hover, .patch:focus-visible {
  transform: scale(1.12) rotate(calc(var(--rot, 0deg) * -0.6));
  filter: drop-shadow(0 14px 18px hsla(24, 50%, 10%, 0.55));
  z-index: 2;
  position: relative;
}
.patch:active { transform: scale(1.04); }

.patch__text {
  font-family: var(--font-sans);
  font-weight: 900;
  font-size: 11px;
  letter-spacing: 1.6px;
  fill: var(--cream);
}
.patch__text--dark { fill: var(--dusk-deep); }
.patch__text--pine { fill: var(--pine); }
.patch__text--big { font-size: 22px; letter-spacing: 2.5px; }
.patch__text--sm { font-size: 9.5px; letter-spacing: 1px; }

/* ==========================================================================
   7. Reviews - postcards
   ========================================================================== */

.reviews {
  background: var(--cream);
  padding-block: clamp(3.5rem, 8vw, 6rem);
}

.postcards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.75rem;
}
@media (min-width: 900px) {
  .postcards { grid-template-columns: repeat(3, 1fr); }
}

.postcard {
  display: grid;
  grid-template-columns: 1fr auto 96px;
  gap: 0.9rem;
  background: #fdfbf4;
  border: 1px solid hsl(42, 30%, 80%);
  border-radius: 6px;
  box-shadow: var(--shadow-card);
  padding: 1.25rem 1.1rem;
  transform: rotate(var(--tilt, 0deg));
  transition: transform 190ms ease, box-shadow 190ms ease;
  position: relative;
  overflow: hidden;
}
.postcard::before {
  /* postcard edge stripes */
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 6px;
  background: repeating-linear-gradient(
    -45deg,
    var(--sunset) 0 12px,
    #fdfbf4 12px 24px,
    var(--pine) 24px 36px,
    #fdfbf4 36px 48px
  );
}
.postcard:hover { transform: rotate(0deg) translateY(-4px); box-shadow: var(--shadow-lift); }

.postcard__left blockquote p {
  font-size: 0.95rem;
  line-height: 1.55;
  color: var(--ink);
}
.postcard__signee {
  margin-top: 0.75rem;
  font-family: var(--font-hand);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--dusk);
}

.postcard__divider {
  width: 1.5px;
  background: hsl(42, 25%, 78%);
}

.postcard__right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.6rem;
}

.postcard__stamp {
  width: 44px;
  padding: 3px;
  background: #fff;
  /* perforated stamp edge */
  background-image: radial-gradient(circle at 3px 3px, transparent 2.5px, #fff 2.5px);
  box-shadow: 0 1px 3px hsla(20, 30%, 20%, 0.25);
  transform: rotate(4deg);
}
.postcard__stamp svg { width: 100%; height: auto; }

.postcard__postmark {
  width: 58px;
  height: 58px;
  border: 2px solid hsla(20, 30%, 30%, 0.5);
  border-radius: 50%;
  display: grid;
  place-items: center;
  transform: rotate(-8deg);
  margin-right: 8px;
  position: relative;
}
.postcard__postmark::after {
  content: "";
  position: absolute;
  left: -26px;
  top: 50%;
  width: 24px;
  border-top: 2px solid hsla(20, 30%, 30%, 0.35);
  box-shadow: 0 5px 0 hsla(20, 30%, 30%, 0.3), 0 -5px 0 hsla(20, 30%, 30%, 0.3);
}
.postcard__postmark span {
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: hsla(20, 30%, 30%, 0.75);
  text-align: center;
  line-height: 1.2;
}

.postcard__lines {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  margin-top: auto;
  padding-bottom: 4px;
}
.postcard__lines span {
  display: block;
  border-bottom: 1.5px solid hsl(42, 25%, 76%);
}

/* ==========================================================================
   8. Newsletter
   ========================================================================== */

.newsletter {
  background:
    linear-gradient(
      to bottom,
      var(--golden) 0 34%,
      var(--sunset) 34% 62%,
      var(--dusk) 62% 84%,
      var(--pine) 84% 100%
    );
  color: var(--ink);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.newsletter__ridge {
  position: absolute;
  left: 0; right: 0; bottom: -1px;
  width: 100%;
  height: 64px;
  z-index: 0;
}

.newsletter__inner {
  position: relative;
  z-index: 2;
  padding-block: clamp(3.5rem, 7vw, 5.5rem) clamp(5rem, 9vw, 7rem);
}

.newsletter h2 {
  font-size: clamp(1.9rem, 4.5vw, 3rem);
  color: var(--dusk-deep);
  margin-bottom: 0.5rem;
}
.newsletter__sub {
  font-weight: 700;
  color: var(--dusk-deep);
  margin-bottom: 1.75rem;
}

.newsletter__form {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  flex-wrap: wrap;
  max-width: 560px;
  margin-inline: auto;
}

.newsletter__input {
  flex: 1 1 260px;
  padding: 0.85rem 1.25rem;
  font: inherit;
  font-weight: 600;
  color: var(--ink);
  background: #fff;
  border: 2px solid var(--dusk);
  border-radius: var(--radius-pill);
  min-width: 0;
}
.newsletter__input::placeholder { color: hsl(20, 15%, 48%); }
.newsletter__input:focus-visible { outline-offset: 1px; }
.newsletter__input[aria-invalid="true"] { border-color: hsl(4, 72%, 42%); }

.newsletter__note {
  margin-top: 1.1rem;
  font-size: 0.88rem;
  font-weight: 700;
  color: hsl(42, 42%, 88%);
  min-height: 1.4em;
}
.newsletter__note.is-success { color: var(--golden); }
.newsletter__note.is-error { color: hsl(28, 95%, 78%); }

/* ==========================================================================
   9. Footer
   ========================================================================== */

.footer {
  background: var(--dusk);
  color: var(--cream);
  padding-block: clamp(3rem, 6vw, 4.5rem) 2rem;
  text-align: center;
}

.footer__badge { display: flex; justify-content: center; margin-bottom: 2.25rem; }
.badge-logo--footer { width: 96px; height: 96px; }

.footer__cols {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  max-width: 760px;
  margin-inline: auto;
  text-align: center;
  margin-bottom: 2.5rem;
}
@media (min-width: 640px) {
  .footer__cols { grid-template-columns: repeat(3, 1fr); }
}

.footer__cols h3 {
  font-family: var(--font-display);
  font-weight: 900;
  font-variation-settings: "SOFT" 100;
  font-size: 1.15rem;
  color: var(--golden);
  margin-bottom: 0.75rem;
}
.footer__cols li { margin-bottom: 0.45rem; }
.footer__cols a {
  color: hsl(42, 35%, 86%);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 600;
  transition: color 150ms ease;
}
.footer__cols a:hover { color: var(--golden); text-decoration: underline; }

.footer__payments {
  display: flex;
  gap: 0.6rem;
  justify-content: center;
  margin-bottom: 1.75rem;
}
.footer__payments svg {
  width: 46px;
  height: 30px;
  border-radius: 4px;
  box-shadow: 0 1px 3px hsla(20, 40%, 10%, 0.4);
}

.footer__care {
  font-size: 0.95rem;
  font-weight: 600;
  color: hsl(42, 35%, 86%);
  margin-bottom: 0.5rem;
}
.footer__legal {
  font-size: 0.8rem;
  color: hsl(20, 18%, 62%);
}

/* ==========================================================================
   Receipt toast
   ========================================================================== */

.toast-stack {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 90;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  align-items: flex-end;
}

.receipt-toast {
  width: 240px;
  background: #fdfdfa;
  color: hsl(20, 20%, 22%);
  font-family: "Courier New", ui-monospace, monospace;
  font-size: 0.8rem;
  line-height: 1.5;
  padding: 0.9rem 1rem 1.4rem;
  box-shadow: 0 10px 30px hsla(20, 30%, 15%, 0.3);
  /* torn receipt bottom */
  clip-path: polygon(
    0 0, 100% 0, 100% calc(100% - 8px),
    95% 100%, 90% calc(100% - 8px), 85% 100%, 80% calc(100% - 8px),
    75% 100%, 70% calc(100% - 8px), 65% 100%, 60% calc(100% - 8px),
    55% 100%, 50% calc(100% - 8px), 45% 100%, 40% calc(100% - 8px),
    35% 100%, 30% calc(100% - 8px), 25% 100%, 20% calc(100% - 8px),
    15% 100%, 10% calc(100% - 8px), 5% 100%, 0 calc(100% - 8px)
  );
  animation: receipt-in 240ms ease-out;
}
.receipt-toast.is-leaving { animation: receipt-out 220ms ease-in forwards; }

.receipt-toast__head {
  text-align: center;
  font-weight: 700;
  letter-spacing: 0.12em;
  border-bottom: 1.5px dashed hsl(42, 20%, 72%);
  padding-bottom: 0.4rem;
  margin-bottom: 0.5rem;
}
.receipt-toast__row {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
}
.receipt-toast__row span:first-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.receipt-toast__foot {
  border-top: 1.5px dashed hsl(42, 20%, 72%);
  margin-top: 0.5rem;
  padding-top: 0.4rem;
  text-align: center;
  letter-spacing: 0.08em;
  color: hsl(160, 30%, 30%);
  font-weight: 700;
}

@keyframes receipt-in {
  from { opacity: 0; transform: translateY(16px) rotate(2deg); }
  to   { opacity: 1; transform: translateY(0) rotate(0deg); }
}
@keyframes receipt-out {
  to { opacity: 0; transform: translateY(10px); }
}

/* ==========================================================================
   Scroll reveal (JS adds .reveal; disabled under reduced motion)
   ========================================================================== */

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 480ms ease, transform 480ms ease;
}
.reveal.is-visible { opacity: 1; transform: none; }

/* ==========================================================================
   Reduced motion
   ========================================================================== */

@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;
  }
  .reveal { opacity: 1; transform: none; }
  .starburst { animation: none; }
}
