/* REWINE – front page
   Brand: Playfair Display Bold (headlines), Lora (body)
   Palette: cream #F5F1EA, nutty brown, bottle green, warm taupe */

@font-face {
  font-family: "Playfair Display";
  src: url("assets/fonts/playfair-display-latin-wght-normal.woff2") format("woff2");
  font-weight: 400 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Lora";
  src: url("assets/fonts/lora-latin-wght-normal.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --cream: #F5F1EA;
  --field: #FBF8F2;
  --input: #FFFDF8;
  --brown: #3C2C1A;
  --brown-deep: #241A0E;
  --brown-ink: #3F2E19;
  --brown-muted: #6E5C45;
  --green: #435330;
  --green-deep: #36442A;
  --taupe: #AA9C88;
  --candlelight: #F3DDB0;
  --on-brown-muted: #CDBFA6;
  --on-green-muted: #D9DCC8;

  --display: "Playfair Display", "Times New Roman", serif;
  --body: "Lora", Georgia, serif;

  --gutter: clamp(20px, 5vw, 72px);
  --max: 1320px;
  --section-pad: clamp(88px, 11vw, 168px);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);

  color-scheme: light;
}

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

html {
  -webkit-text-size-adjust: 100%;
  scrollbar-color: var(--taupe) var(--cream);
}

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

body {
  margin: 0;
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--brown-ink);
  background: var(--cream);
  caret-color: var(--green);
  text-rendering: optimizeLegibility;
}

::selection { background: var(--green); color: var(--cream); }

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

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.22em;
}

:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 3px;
}

h1, h2, h3 {
  font-family: var(--display);
  font-weight: 700;
  text-wrap: balance;
  margin: 0;
}

p { margin: 0; text-wrap: pretty; }

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

.skip {
  position: absolute;
  left: var(--gutter);
  top: -100px;
  z-index: 20;
  padding: 0.6rem 1rem;
  background: var(--cream);
  color: var(--brown-ink);
  font-weight: 600;
}
.skip:focus { top: 16px; }

/* ---------- Buttons & links ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 1.6rem;
  border: 1px solid transparent;
  border-radius: 2px;
  font: 600 1rem/1 var(--body);
  letter-spacing: 0.02em;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.35s var(--ease-out), box-shadow 0.5s var(--ease-out), transform 0.5s var(--ease-out);
}

.btn--small { min-height: 42px; padding: 0 1.1rem; font-size: 0.9375rem; }

.btn--cream { background: var(--cream); color: var(--brown-ink); }
.btn--cream:hover {
  background: #FFF9EE;
  box-shadow: 0 12px 32px -14px rgba(255, 186, 96, 0.65);
  transform: translateY(-1px);
}

.btn--brown { background: var(--brown); color: var(--cream); }
.btn--brown:hover {
  background: var(--brown-deep);
  box-shadow: 0 14px 30px -16px rgba(36, 26, 14, 0.7);
  transform: translateY(-1px);
}

.btn:active { transform: translateY(0); }

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 500;
  text-decoration: underline;
  text-decoration-color: rgba(245, 241, 234, 0.4);
  transition: text-decoration-color 0.3s var(--ease-out);
}
.link-arrow svg { width: 20px; height: 12px; transition: transform 0.45s var(--ease-out); }
.link-arrow:hover { text-decoration-color: currentColor; }
.link-arrow:hover svg { transform: translateX(4px); }

/* ---------- Header ---------- */

.site-header {
  position: absolute;
  inset: 0 0 auto;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: clamp(1rem, 3vw, 2.5rem);
  padding: clamp(18px, 2.4vw, 32px) var(--gutter);
  color: var(--cream);
}

.brand { margin-right: auto; color: var(--cream); }
.brand__logo { width: clamp(118px, 10.5vw, 156px); height: auto; aspect-ratio: 1434 / 378; }

.site-nav { display: flex; gap: clamp(1.25rem, 2.6vw, 2.25rem); }
.site-nav a {
  font-size: 0.9875rem;
  color: var(--on-brown-muted);
  text-decoration: none;
  transition: color 0.3s var(--ease-out);
}
.site-nav a:hover { color: var(--cream); text-decoration: underline; text-decoration-color: rgba(245, 241, 234, 0.45); }

.site-header :focus-visible,
.hero :focus-visible,
.collection :focus-visible,
.values :focus-visible,
.site-footer :focus-visible { outline-color: var(--cream); }

/* ---------- Hero: dusk in the forest ---------- */

.hero {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 100svh;
  padding-top: clamp(104px, 13vh, 150px);
  padding-bottom: clamp(64px, 12vh, 136px);
  overflow: hidden;
  color: var(--cream);
  background-color: var(--brown);
  background-image:
    radial-gradient(ellipse 55% 50% at 22% 64%, rgba(255, 186, 96, 0.09), rgba(255, 186, 96, 0) 70%),
    radial-gradient(ellipse 50% 60% at 0% 36%, rgba(20, 13, 6, 0.38), rgba(20, 13, 6, 0) 70%);
}

.hero ::selection { background: var(--candlelight); color: var(--brown-deep); }

/* the photograph, emerging out of the dark wall */
.hero__media {
  position: absolute;
  inset: 0 0 0 auto;
  z-index: -1;
  width: min(62vw, 1200px);
  overflow: hidden;
  /* the photograph dissolves into the wall's own colour, so no edge shows */
  -webkit-mask-image:
    linear-gradient(90deg, transparent 0%, rgba(0, 0, 0, 0.35) 14%, rgba(0, 0, 0, 0.8) 30%, #000 48%),
    linear-gradient(0deg, transparent 0%, rgba(0, 0, 0, 0.5) 12%, #000 32%);
  -webkit-mask-composite: source-in;
  mask-image:
    linear-gradient(90deg, transparent 0%, rgba(0, 0, 0, 0.35) 14%, rgba(0, 0, 0, 0.8) 30%, #000 48%),
    linear-gradient(0deg, transparent 0%, rgba(0, 0, 0, 0.5) 12%, #000 32%);
  mask-composite: intersect;
}

.hero__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 58%;
  filter: sepia(0.16) saturate(1.05) brightness(0.94) contrast(1.05);
  animation: settle 3.2s var(--ease-out) both;
}

/* low autumn light caught in the mist */
.hero__mist {
  position: absolute;
  inset: -8% -16%;
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(ellipse 34% 16% at 34% 34%, rgba(243, 221, 176, 0.2), rgba(243, 221, 176, 0) 70%),
    radial-gradient(ellipse 40% 12% at 70% 26%, rgba(245, 241, 234, 0.16), rgba(245, 241, 234, 0) 70%),
    radial-gradient(ellipse 30% 26% at 82% 38%, rgba(243, 221, 176, 0.22), rgba(243, 221, 176, 0) 70%);
  mix-blend-mode: screen;
  animation: drift 28s ease-in-out infinite alternate;
}

/* dusk settling at the edges, a darker brow under the header */
.hero__media::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(36, 26, 14, 0.72) 0%, rgba(36, 26, 14, 0.28) 14%, rgba(36, 26, 14, 0) 28%),
    radial-gradient(ellipse 85% 75% at 62% 56%, rgba(36, 26, 14, 0) 48%, rgba(36, 26, 14, 0.42) 100%);
}

.hero__copy {
  position: relative;
  width: 100%;
  max-width: calc(var(--max) + 2 * var(--gutter));
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.hero__title {
  max-width: 9.2em;
  font-size: clamp(2.75rem, min(6.4vw, 11vh), 6rem);
  line-height: 1.02;
  letter-spacing: -0.015em;
  color: var(--cream);
  text-shadow: 0 2px 40px rgba(36, 26, 14, 0.55);
}
.hero__title span { display: block; color: var(--candlelight); }

.hero__lead {
  max-width: 34ch;
  margin-top: 1.75rem;
  font-size: 1.125rem;
  line-height: 1.6;
  color: var(--on-brown-muted);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.5rem;
  margin-top: 2rem;
}

@keyframes settle {
  from {
    transform: scale(1.08);
    filter: sepia(0.3) saturate(0.8) brightness(0.45) contrast(1.05);
  }
}

@keyframes drift {
  from { transform: translate3d(-5%, 1%, 0); }
  to { transform: translate3d(5%, -1.5%, 0); }
}

/* ---------- Collection: the real candles ---------- */

.collection {
  position: relative;
  isolation: isolate;
  /* overlap the hero by a pixel: its height can land on a fraction, which leaves a hairline of cream */
  margin-top: -1px;
  padding: clamp(40px, 5vw, 72px) max(var(--gutter), calc((100vw - var(--max)) / 2)) var(--section-pad);
  color: var(--cream);
  background-color: var(--brown);
  background-image:
    radial-gradient(ellipse 70% 55% at 50% 70%, rgba(255, 186, 96, 0.11), rgba(255, 186, 96, 0) 70%),
    radial-gradient(ellipse 120% 80% at 50% 100%, rgba(20, 13, 6, 0.45), rgba(20, 13, 6, 0) 70%);
}

.collection ::selection { background: var(--candlelight); color: var(--brown-deep); }

.collection__head {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: clamp(16px, 2vw, 32px);
  align-items: end;
}
.collection__head .section-title { grid-column: 1 / 7; }

.collection__lead {
  grid-column: 8 / 13;
  max-width: 40ch;
  font-size: 1.125rem;
  line-height: 1.6;
  color: var(--on-brown-muted);
}

.collection__scroller {
  margin-top: clamp(48px, 6vw, 88px);
  outline-offset: 4px;
}

.collection__list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(16px, 2vw, 32px);
  align-items: start;
  margin: 0;
  padding: 0;
  list-style: none;
}

/* uneven heights, like bottles of different sizes standing together */
.piece { margin-top: var(--drop, 0); }
.piece:nth-child(2) { --drop: clamp(40px, 6.5vw, 104px); }
.piece:nth-child(3) { --drop: clamp(12px, 2vw, 32px); }
.piece:nth-child(4) { --drop: clamp(56px, 8.5vw, 136px); }

.piece__link {
  display: block;
  color: inherit;
  text-decoration: none;
}
.piece__link:focus-visible { outline-offset: 6px; }

.piece__frame {
  position: relative;
  display: block;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: var(--brown-deep);
  box-shadow: 0 40px 60px -36px rgba(10, 6, 2, 0.85);
  transition: box-shadow 0.9s var(--ease-out);
}

.piece__frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: sepia(0.14) brightness(0.9) contrast(1.04);
  transition: transform 1.4s var(--ease-out), filter 0.9s var(--ease-out);
}

/* dusk vignette that lifts when the candle is chosen */
.piece__frame::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(ellipse 90% 85% at 50% 58%, rgba(36, 26, 14, 0) 50%, rgba(36, 26, 14, 0.55) 100%);
  transition: opacity 0.9s var(--ease-out);
}

.piece__caption {
  display: flex;
  flex-direction: column;
  margin-top: 1.1rem;
}

.piece__name {
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.25rem;
  line-height: 1.2;
  color: var(--cream);
  text-decoration: underline;
  text-decoration-color: transparent;
  transition: text-decoration-color 0.4s var(--ease-out);
}

.piece__origin {
  margin-top: 0.2rem;
  font-size: 0.875rem;
  line-height: 1.4;
  color: var(--on-brown-muted);
}

.piece__link:hover .piece__frame,
.piece__link:focus-visible .piece__frame { box-shadow: 0 40px 70px -30px rgba(255, 186, 96, 0.4); }

.piece__link:hover .piece__frame img,
.piece__link:focus-visible .piece__frame img { transform: scale(1.045); filter: sepia(0.08) brightness(1) contrast(1.04); }

.piece__link:hover .piece__frame::after,
.piece__link:focus-visible .piece__frame::after { opacity: 0.45; }

.piece__link:hover .piece__name,
.piece__link:focus-visible .piece__name { text-decoration-color: rgba(243, 221, 176, 0.6); }

/* the piece not made yet: a dashed outline waiting for a shape */
.piece__frame--idea {
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px dashed rgba(243, 221, 176, 0.42);
  background: radial-gradient(ellipse 70% 60% at 50% 50%, rgba(255, 186, 96, 0.08), rgba(255, 186, 96, 0) 75%);
  box-shadow: none;
  transition: border-color 0.6s var(--ease-out), background-color 0.6s var(--ease-out);
}
.piece__frame--idea::after { display: none; }

.idea {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35em;
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(1.25rem, 1.9vw, 1.75rem);
  line-height: 1.15;
  text-align: center;
  color: var(--cream);
}

/* the logo's line–dot–line rule before the open question */
.idea__own {
  display: flex;
  flex-direction: column;
  align-items: center;
  color: var(--candlelight);
}
.idea__own::before {
  content: "";
  display: block;
  width: 4.5rem;
  height: 7px;
  margin: 0.35em 0 0.6em;
  background:
    radial-gradient(circle at 50% 50%, currentColor 0 2.5px, transparent 3.5px),
    linear-gradient(currentColor, currentColor) left 50% / calc(50% - 9px) 1px no-repeat,
    linear-gradient(currentColor, currentColor) right 50% / calc(50% - 9px) 1px no-repeat;
  opacity: 0.7;
}

.piece__link:hover .piece__frame--idea,
.piece__link:focus-visible .piece__frame--idea {
  border-color: rgba(243, 221, 176, 0.8);
  background-color: rgba(255, 186, 96, 0.06);
  box-shadow: none;
}

@media (prefers-reduced-motion: reduce) {
  .hero__media img,
  .hero__mist { animation: none; }
  .piece__frame,
  .piece__frame--idea,
  .piece__frame img,
  .piece__frame::after,
  .btn,
  .link-arrow svg { transition: none; }
}

/* ---------- Story ---------- */

.section-title {
  font-size: clamp(2rem, 3.7vw, 3.25rem);
  line-height: 1.08;
  letter-spacing: -0.01em;
}

.story {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: clamp(16px, 2vw, 32px);
  align-items: center;
  max-width: calc(var(--max) + 2 * var(--gutter));
  margin: 0 auto;
  padding: var(--section-pad) var(--gutter);
  /* daylight falling on paper */
  background: radial-gradient(ellipse 50% 60% at 24% 50%, #FFF9EE, rgba(255, 249, 238, 0) 72%);
}

.story__photo {
  position: relative;
  grid-column: 1 / 6;
  margin: 0;
}

.story__frame {
  display: block;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  box-shadow: 0 34px 60px -34px rgba(60, 44, 26, 0.55);
}

.story__frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: sepia(0.1) contrast(1.03);
}

/* a print of the same glass at home, laid over the forest */
.story__inset {
  position: absolute;
  right: -22%;
  bottom: -9%;
  width: 46%;
  padding: 8px;
  background: var(--field);
  box-shadow: 0 34px 50px -26px rgba(60, 44, 26, 0.6);
}

.story__inset img {
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  filter: sepia(0.12) contrast(1.03);
}

@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .story__frame img {
      scale: 1.1;
      animation: story-drift linear both;
      animation-timeline: view();
    }
  }
}

@keyframes story-drift {
  from { translate: 0 -4.5%; }
  to { translate: 0 4.5%; }
}

.story__photo figcaption {
  max-width: 52%;
  margin-top: 0.9rem;
  font-size: 0.875rem;
  color: var(--brown-muted);
}

.story__text { grid-column: 7 / 13; }

.story__lead {
  max-width: 46ch;
  margin-top: 1.25rem;
  font-size: 1.1875rem;
  line-height: 1.6;
}

.steps {
  margin: 2.5rem 0 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid rgba(63, 46, 25, 0.2);
}

.step {
  display: grid;
  grid-template-columns: minmax(9.5rem, 0.8fr) 1.4fr;
  gap: 0.35rem 1.5rem;
  padding: 1.35rem 0;
  border-bottom: 1px solid rgba(63, 46, 25, 0.2);
}

.step__title {
  display: flex;
  align-items: baseline;
  gap: 0.7rem;
  font-size: 1.25rem;
  line-height: 1.3;
}

.step__title::before {
  content: "";
  flex: none;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--brown-ink);
  transform: translateY(-0.2em);
}

.step p { color: var(--brown-muted); }

/* ---------- Values (bottle green) ---------- */

.values {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: clamp(16px, 2vw, 32px);
  padding: var(--section-pad) max(var(--gutter), calc((100vw - var(--max)) / 2));
  background-color: var(--green);
  background-image: radial-gradient(ellipse 70% 90% at 0% 0%, rgba(84, 101, 63, 0.9), rgba(67, 83, 48, 0) 60%);
  color: var(--cream);
}

/* the misty forest, seen through bottle-green glass */
.values::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: url("assets/img/rewine-metsa-rungot.jpg") 50% 35% / cover no-repeat;
  mix-blend-mode: soft-light;
  opacity: 0.7;
  -webkit-mask-image: linear-gradient(180deg, #000 0%, rgba(0, 0, 0, 0.55) 55%, rgba(0, 0, 0, 0) 100%);
  mask-image: linear-gradient(180deg, #000 0%, rgba(0, 0, 0, 0.55) 55%, rgba(0, 0, 0, 0) 100%);
}

.values ::selection { background: var(--cream); color: var(--green-deep); }

.values__title {
  grid-column: 1 / 6;
  align-self: start;
  position: sticky;
  top: 12vh;
  max-width: 13ch;
}

.values__title::after {
  content: "";
  display: block;
  width: 9.5rem;
  height: 9px;
  margin-top: 2rem;
  background:
    radial-gradient(circle at 50% 50%, currentColor 0 3.5px, transparent 4.5px),
    linear-gradient(currentColor, currentColor) left 50% / calc(50% - 12px) 1px no-repeat,
    linear-gradient(currentColor, currentColor) right 50% / calc(50% - 12px) 1px no-repeat;
  opacity: 0.75;
}

.values__list {
  grid-column: 7 / 13;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2.5rem, 5vw, 4.5rem) clamp(1.5rem, 3vw, 3rem);
  margin: 0;
}

.value dt {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(1.75rem, 2.7vw, 2.5rem);
  line-height: 1.1;
}

.value dd {
  max-width: 30ch;
  margin: 0.75rem 0 0;
  color: var(--on-green-muted);
}

/* ---------- Evening at home ---------- */

.evening {
  position: relative;
  isolation: isolate;
  margin-top: -1px;
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: clamp(16px, 2vw, 32px);
  align-items: center;
  min-height: min(100svh, 980px);
  padding: var(--section-pad) max(var(--gutter), calc((100vw - var(--max)) / 2));
  overflow: hidden;
  color: var(--cream);
  background-color: var(--brown);
  /* candlelight spilling out of the photograph onto the wall */
  background-image: radial-gradient(ellipse 45% 55% at 46% 30%, rgba(255, 186, 96, 0.14), rgba(255, 186, 96, 0) 70%);
}

.evening ::selection { background: var(--candlelight); color: var(--brown-deep); }

/* mirror of the hero: the room sits left and dissolves to the right */
.evening__media {
  position: absolute;
  inset: 0 auto 0 0;
  z-index: -1;
  width: min(62vw, 1200px);
  margin: 0;
  -webkit-mask-image:
    linear-gradient(270deg, transparent 0%, rgba(0, 0, 0, 0.35) 14%, rgba(0, 0, 0, 0.8) 30%, #000 48%),
    linear-gradient(0deg, transparent 0%, #000 14%, #000 88%, transparent 100%);
  -webkit-mask-composite: source-in;
  mask-image:
    linear-gradient(270deg, transparent 0%, rgba(0, 0, 0, 0.35) 14%, rgba(0, 0, 0, 0.8) 30%, #000 48%),
    linear-gradient(0deg, transparent 0%, #000 14%, #000 88%, transparent 100%);
  mask-composite: intersect;
}

.evening__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 30%;
  filter: sepia(0.12) saturate(1.04) contrast(1.04);
}

.evening__copy { grid-column: 8 / 13; }

.evening__title span { display: block; color: var(--candlelight); }

.evening__copy p {
  max-width: 36ch;
  margin-top: 1.25rem;
  font-size: 1.125rem;
  line-height: 1.6;
  color: var(--on-brown-muted);
}

@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .evening__media img {
      scale: 1.08;
      animation: story-drift linear both;
      animation-timeline: view();
    }
  }
}

/* ---------- Order inquiry ---------- */

.order {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: clamp(16px, 2vw, 32px);
  padding: var(--section-pad) max(var(--gutter), calc((100vw - var(--max)) / 2));
  background:
    radial-gradient(ellipse 45% 55% at 70% 35%, #FFF9EE, rgba(255, 249, 238, 0) 72%),
    var(--cream);
}

.order__intro { grid-column: 1 / 5; }
.order__intro p { max-width: 36ch; margin-top: 1.25rem; font-size: 1.125rem; }

.order__intro .order__direct { color: var(--brown-muted); font-size: 1rem; }
.order__direct a { color: var(--green); font-weight: 600; text-decoration-color: rgba(67, 83, 48, 0.45); }
.order__direct a:hover { text-decoration-color: currentColor; }

.order__detail { max-width: 340px; margin: 2.75rem 0 0; }
.order__detail img {
  width: 100%;
  height: auto;
  aspect-ratio: 840 / 560;
  object-fit: cover;
  filter: sepia(0.1);
  box-shadow: 0 30px 50px -32px rgba(60, 44, 26, 0.55);
}

.order__form {
  grid-column: 6 / 13;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.4rem 1.25rem;
  padding: clamp(24px, 3.4vw, 48px);
  background: var(--field);
  border: 1px solid rgba(63, 46, 25, 0.14);
  box-shadow: 0 30px 60px -40px rgba(60, 44, 26, 0.45);
}

.field { grid-column: 1 / -1; display: flex; flex-direction: column; gap: 0.45rem; min-width: 0; }
.field--half { grid-column: span 1; }

.field label,
.choices legend {
  font-weight: 600;
  font-size: 0.9375rem;
  line-height: 1.3;
}

.optional { font-weight: 400; color: var(--brown-muted); }

.field input,
.field textarea {
  width: 100%;
  min-height: 52px;
  padding: 0.8rem 1rem;
  border: 1px solid rgba(63, 46, 25, 0.38);
  border-radius: 2px;
  background: var(--input);
  color: var(--brown-ink);
  font: inherit;
  line-height: 1.4;
  transition: border-color 0.25s var(--ease-out), box-shadow 0.25s var(--ease-out);
}

.field textarea { resize: vertical; min-height: 120px; }

.field input::placeholder,
.field textarea::placeholder { color: #76664F; }

.field input:hover,
.field textarea:hover { border-color: rgba(63, 46, 25, 0.6); }

.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(67, 83, 48, 0.25);
}

.field input:user-invalid,
.field textarea:user-invalid { border-color: #9A3B23; box-shadow: 0 0 0 3px rgba(154, 59, 35, 0.15); }

.field__error {
  display: none;
  font-size: 0.875rem;
  color: #8E3520;
}
.field:has(input:user-invalid) .field__error { display: block; }

.order__thanks {
  display: none;
  grid-column: 6 / 13;
  align-self: start;
  padding: clamp(28px, 4vw, 56px);
  background: var(--brown);
  color: var(--cream);
}
.order__thanks:target { display: block; }
.order:has(.order__thanks:target) .order__form { display: none; }
.order__thanks:focus { outline: none; }
.order__thanks-mark { width: 120px; height: auto; aspect-ratio: 1434 / 378; margin-bottom: 1.75rem; }
.order__thanks h3 { font-size: clamp(1.6rem, 2.6vw, 2.25rem); line-height: 1.15; }
.order__thanks p { max-width: 40ch; margin: 0.9rem 0 1.5rem; color: var(--on-brown-muted); }
.order__thanks :focus-visible { outline-color: var(--cream); }

.choices { margin: 0; padding: 0; border: 0; }
.choices legend { padding: 0; margin-bottom: 0.7rem; }

.choices__options { display: flex; flex-wrap: wrap; gap: 0.55rem; }

.chip { position: relative; cursor: pointer; }
.chip input {
  position: absolute;
  opacity: 0;
  inset: 0;
  margin: 0;
  cursor: pointer;
}
.chip span {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 44px;
  padding: 0 1rem;
  border: 1px solid rgba(63, 46, 25, 0.38);
  border-radius: 2px;
  background: var(--input);
  font-size: 0.9375rem;
  transition: background-color 0.25s var(--ease-out), color 0.25s var(--ease-out), border-color 0.25s var(--ease-out);
}
.chip span::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  border: 1px solid currentColor;
  opacity: 0.6;
}
.chip:hover span { border-color: rgba(63, 46, 25, 0.65); }
.chip input:checked + span {
  background: var(--green);
  border-color: var(--green);
  color: var(--cream);
}
.chip input:checked + span::before { background: currentColor; opacity: 1; }
.chip input:focus-visible + span { outline: 2px solid var(--green); outline-offset: 2px; }

.order__submit {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.25rem;
  margin-top: 0.4rem;
}

.order__note { font-size: 0.9375rem; color: var(--brown-muted); }

/* ---------- Footer ---------- */

.site-footer {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 1.5rem clamp(1.5rem, 4vw, 4rem);
  padding: clamp(48px, 6vw, 80px) max(var(--gutter), calc((100vw - var(--max)) / 2));
  background: var(--brown);
  color: var(--cream);
}

.site-footer ::selection { background: var(--candlelight); color: var(--brown-deep); }

.site-footer__logo { width: 132px; height: auto; aspect-ratio: 1434 / 378; }

.site-footer__essence { max-width: 34ch; color: var(--on-brown-muted); font-size: 0.9375rem; }

.site-footer__nav { display: flex; flex-wrap: wrap; gap: 0.5rem 1.6rem; font-size: 0.9375rem; }
.site-footer__nav a { text-decoration: none; color: var(--on-brown-muted); }
.site-footer__nav a:hover { color: var(--cream); text-decoration: underline; }

.site-footer__copy {
  grid-column: 1 / -1;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(245, 241, 234, 0.16);
  font-size: 0.8125rem;
  color: var(--on-brown-muted);
}

/* ---------- Laptop ---------- */

@media (max-width: 1360px) {
  .hero__media { width: 64vw; }
}

/* ---------- Tablet ---------- */

@media (max-width: 1080px) {
  /* the photograph sits on top, the copy rises out of its fade */
  .hero {
    min-height: auto;
    padding-top: 0;
    padding-bottom: clamp(56px, 9vw, 88px);
  }
  .hero__media {
    position: relative;
    inset: auto;
    width: 100%;
    height: min(76svh, 820px);
    margin-bottom: calc(-1 * clamp(120px, 17vw, 180px));
  }
  .hero__media {
    -webkit-mask-image: linear-gradient(0deg, transparent 0%, rgba(0, 0, 0, 0.4) 16%, #000 48%);
    mask-image: linear-gradient(0deg, transparent 0%, rgba(0, 0, 0, 0.4) 16%, #000 48%);
  }
  .hero__media img { object-position: 50% 62%; }
  .hero__media::after {
    background:
      linear-gradient(180deg, rgba(36, 26, 14, 0.72) 0%, rgba(36, 26, 14, 0) 26%),
      radial-gradient(ellipse 95% 80% at 50% 50%, rgba(36, 26, 14, 0) 50%, rgba(36, 26, 14, 0.42) 100%);
  }
  .hero__title { font-size: clamp(3.5rem, 9vw, 5rem); }

  .collection__head .section-title,
  .collection__lead { grid-column: 1 / -1; }
  .collection__lead { margin-top: 1.25rem; }

  /* the candles become a row you can swipe */
  .collection__scroller {
    margin-inline: calc(-1 * var(--gutter));
    padding: 0 var(--gutter) 8px;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: var(--gutter);
    scrollbar-width: none;
  }
  .collection__scroller::-webkit-scrollbar { display: none; }
  .collection__list {
    grid-template-columns: none;
    grid-auto-flow: column;
    grid-auto-columns: min(38vw, 340px);
    width: max-content;
  }
  .piece { scroll-snap-align: start; }

  .story__photo { grid-column: 1 / -1; }
  .story__frame { aspect-ratio: 5 / 4; }
  .story__text { grid-column: 1 / -1; margin-top: clamp(4.5rem, 10vw, 6.5rem); }

  .story__inset { right: -2%; width: 40%; }

  .evening { display: flex; flex-direction: column; min-height: auto; padding-top: 0; }
  .evening__media {
    position: relative;
    inset: auto;
    width: calc(100% + 2 * var(--gutter));
    height: min(80svh, 860px);
    margin: 0 calc(-1 * var(--gutter)) calc(-1 * clamp(110px, 16vw, 170px));
    -webkit-mask-image: linear-gradient(0deg, transparent 0%, rgba(0, 0, 0, 0.4) 16%, #000 48%);
    mask-image: linear-gradient(0deg, transparent 0%, rgba(0, 0, 0, 0.4) 16%, #000 48%);
  }
  .evening__media img { object-position: 55% 40%; }
  .evening__copy { align-self: stretch; }

  .values__title { grid-column: 1 / -1; position: static; max-width: 18ch; }
  .values__list { grid-column: 1 / -1; margin-top: 3rem; }
  .order__thanks { grid-column: 1 / -1; margin-top: 2.5rem; }

  .order__intro { grid-column: 1 / -1; }
  .order__form { grid-column: 1 / -1; margin-top: 2.5rem; }
}

/* ---------- Phone ---------- */

@media (max-width: 720px) {
  .site-nav { display: none; }

  .hero__media { height: 68svh; margin-bottom: -132px; }
  .hero__title { font-size: clamp(2.6rem, 11.5vw, 3.5rem); line-height: 1.04; }
  .hero__lead { margin-top: 1.25rem; font-size: 1.0625rem; }
  .hero__actions { margin-top: 1.5rem; }

  .collection__list { grid-auto-columns: 70vw; gap: 16px; }
  .piece:nth-child(2) { --drop: 40px; }
  .piece:nth-child(3) { --drop: 12px; }
  .piece:nth-child(4) { --drop: 52px; }

  .order__detail { display: none; }

  .story__frame { aspect-ratio: 4 / 5; }
  .story__inset { right: 0; bottom: -7%; width: 42%; padding: 6px; }
  .evening__media { height: 72svh; margin-bottom: -110px; }
  .story__text { margin-top: 4.25rem; }
  .step { grid-template-columns: 1fr; }
  .values__list { grid-template-columns: 1fr; gap: 2rem; }

  .order__form { grid-template-columns: 1fr; padding: 22px; margin-top: 2rem; }
  .field--half { grid-column: 1 / -1; }
  .order__submit .btn { width: 100%; }

  .site-footer { grid-template-columns: 1fr; }
}
