/* The Lamp & Oil Co. — quiet luxury, mobile-first */
:root {
  --ink: #1b1612;
  --ink-soft: #5b5148;
  --paper: #f5f0e8;
  --sand: #e9e0d2;
  --line: #d8cdbb;
  --night: #14100d;
  --amber: #c98a3d;
  --gold: #c9ae78; /* champagne gold: the single holiday accent */
  --serif: "Cormorant Garamond", "Playfair Display", Didot, "Bodoni MT", Georgia, "Times New Roman", serif;
  --sans: "Helvetica Neue", Helvetica, Arial, system-ui, sans-serif;
  --gutter: 1.5rem;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }

h1, h2, h3 { font-family: var(--serif); font-weight: 500; line-height: 1.1; margin: 0; letter-spacing: -0.01em; }
h2 { font-size: clamp(2rem, 6vw, 3.25rem); }
h3 { font-size: 1.5rem; }
p { margin: 0; }

.wrap { width: min(100% - 2 * var(--gutter), 72rem); margin-inline: auto; }
.wrap.narrow { width: min(100% - 2 * var(--gutter), 44rem); }

.eyebrow {
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 1.25rem;
}
.lead { color: var(--ink-soft); max-width: 36rem; margin-top: 1.25rem; }

/* Header */
.site-header {
  position: absolute; inset: 0 0 auto 0; z-index: 10;
  display: flex; justify-content: space-between; align-items: center;
  padding: 1.25rem var(--gutter);
  color: #f5efe5;
}
.site-header nav { display: none; gap: 2rem; font-size: 0.78rem; letter-spacing: 0.16em; text-transform: uppercase; }
.site-header nav a { text-decoration: none; opacity: 0.85; }
.site-header nav a:hover { opacity: 1; }
.wordmark { font-family: var(--serif); font-size: 1.35rem; letter-spacing: 0.04em; text-decoration: none; }

/* Hero */
.hero {
  position: relative;
  min-height: 100vh; min-height: 100svh;
  display: grid; align-items: end;
  background: var(--night);
  color: #f5efe5;
  overflow: hidden;
}
.hero-media {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: 72% center; /* keep the jar in frame on narrow screens */
}
.hero-shade {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(20,16,13,0.35) 0%, rgba(20,16,13,0) 35%, rgba(20,16,13,0.75) 100%);
}
.hero-copy { position: relative; padding: 0 var(--gutter) 4.5rem; max-width: 48rem; }
.hero-title {
  font-size: clamp(3rem, 13vw, 7.5rem);
  font-weight: 400;
  opacity: 0;
  animation: fade-in 2.4s ease-out 0.4s forwards;
}
.hero-sub {
  margin-top: 1.25rem;
  font-size: 1rem; letter-spacing: 0.06em; opacity: 0;
  animation: fade-in 2s ease-out 1.6s forwards;
}
.link-arrow {
  display: inline-block; margin-top: 2rem;
  font-size: 0.75rem; letter-spacing: 0.2em; text-transform: uppercase; text-decoration: none;
  padding-bottom: 0.4rem; border-bottom: 1px solid rgba(245,239,229,0.6);
  opacity: 0; animation: fade-in 2s ease-out 2.2s forwards;
}
.link-arrow:hover { border-color: var(--gold); }
.hero-season {
  margin-top: 0.6rem;
  font-family: var(--serif); font-style: italic; font-size: 1.15rem;
  color: var(--gold); opacity: 0;
  animation: fade-in 2s ease-out 1.9s forwards;
}
@keyframes fade-in { to { opacity: 1; } }

.motion-toggle {
  position: absolute; right: var(--gutter); bottom: 1.5rem; z-index: 2;
  background: rgba(20,16,13,0.45); color: #f5efe5;
  border: 1px solid rgba(245,239,229,0.45);
  padding: 0.55rem 1.1rem; min-height: 2.75rem;
  font: inherit; font-size: 0.72rem; letter-spacing: 0.2em; text-transform: uppercase;
  cursor: pointer;
}
.motion-toggle:hover { border-color: var(--gold); }

/* Soft falling snow: CSS only, drawn on the hero's ::after, no extra page elements.
   The layer is taller than the hero and slides down by 600px (a whole number of every
   tile size below), so the loop is seamless. Off for reduced-motion (see bottom). */
.hero::after {
  content: ""; position: absolute; inset: -600px 0 0 0; z-index: 1;
  pointer-events: none;
  background-image:
    radial-gradient(circle at 40px 60px,   rgba(255,255,255,0.75) 0 2.5px, transparent 3.5px),
    radial-gradient(circle at 210px 150px, rgba(255,255,255,0.65) 0 2px,   transparent 3px),
    radial-gradient(circle at 120px 260px, rgba(255,255,255,0.7)  0 2.5px, transparent 3.5px),
    radial-gradient(circle at 30px 40px,   rgba(255,255,255,0.45) 0 1.5px, transparent 2.5px),
    radial-gradient(circle at 140px 110px, rgba(255,255,255,0.4)  0 1.5px, transparent 2.5px),
    radial-gradient(circle at 50px 30px,   rgba(255,255,255,0.3)  0 1px,   transparent 2px),
    radial-gradient(circle at 20px 80px,   rgba(255,255,255,0.3)  0 1px,   transparent 2px);
  background-size: 300px 300px, 300px 300px, 300px 300px, 200px 200px, 200px 200px, 100px 100px, 100px 100px;
  background-position: 0 0, 90px 0, 160px 0, 0 0, 70px 0, 0 0, 50px 0;
  animation: snow-fall 30s linear infinite;
  will-change: transform;
}
@keyframes snow-fall { to { transform: translate3d(0, 600px, 0); } }
/* Performance: once the hero has scrolled off-screen the snow stops and releases its layer (set by index.html) */
.hero.is-offscreen::after { animation-play-state: paused; will-change: auto; }
/* Phones: fewer flakes (the 4 larger layers only; extra sizes/positions in the lists are ignored) */
@media (max-width: 47.99rem) {
  .hero::after {
    background-image:
      radial-gradient(circle at 40px 60px,   rgba(255,255,255,0.75) 0 2.5px, transparent 3.5px),
      radial-gradient(circle at 210px 150px, rgba(255,255,255,0.65) 0 2px,   transparent 3px),
      radial-gradient(circle at 120px 260px, rgba(255,255,255,0.7)  0 2.5px, transparent 3.5px),
      radial-gradient(circle at 30px 40px,   rgba(255,255,255,0.45) 0 1.5px, transparent 2.5px);
  }
}
.hero-copy { z-index: 2; }

/* Holiday garland divider: a thin gold line with small beads, centered at the top of a section */
.scents, .craft, .every-day { position: relative; }
.scents::before, .craft::before, .every-day::before {
  content: ""; position: absolute; top: 2.5rem; left: 50%;
  width: 8rem; height: 6px; transform: translateX(-50%);
  background:
    radial-gradient(circle, var(--gold) 1.5px, transparent 2px) 0 50% / 16px 6px repeat-x,
    linear-gradient(var(--gold), var(--gold)) 0 50% / 100% 1px no-repeat;
  opacity: 0.85;
}

/* Sections */
.section { padding: 5.5rem 0; }

.scent-grid { display: grid; gap: 3.5rem; margin-top: 3.5rem; }
.scent img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; background: var(--sand); }
.scent-no { margin-top: 1.5rem; font-size: 0.72rem; letter-spacing: 0.22em; text-transform: uppercase; color: var(--ink-soft); }
.scent h3 { margin: 0.35rem 0 0.6rem; font-size: 2rem; }
.scent p:last-child { color: var(--ink-soft); max-width: 24rem; }

/* Christmas collection colors. Scoped to .christmas-collection only; no shared variables are changed.
   Contrast on the green: headings/names about 7.4:1, body text about 6.9:1 (both pass WCAG AAA). */
.christmas-collection {
  --xmas-green: #172e22;
  --xmas-gold: #d4af6e;
  --xmas-gold-body: #c9a96a;
  background: var(--xmas-green);
  color: var(--xmas-gold-body);
}
.christmas-collection h2,
.christmas-collection h3 { color: var(--xmas-gold); }
.christmas-collection .eyebrow,
.christmas-collection .lead,
.christmas-collection .scent-no,
.christmas-collection .scent p:last-child { color: var(--xmas-gold-body); }
.christmas-collection .text-link { color: var(--xmas-gold); border-bottom-color: var(--xmas-gold); }
.christmas-collection .text-link:hover { color: #e2c78f; border-bottom-color: #e2c78f; }
.christmas-collection a { color: var(--xmas-gold); }

.ingredients { background: var(--sand); }
.ingredient-list { margin: 3rem 0 0; }
.ingredient-list > div { padding: 1.75rem 0; border-top: 1px solid var(--line); }
.ingredient-list > div:last-child { border-bottom: 1px solid var(--line); }
.ingredient-list dt { font-family: var(--serif); font-size: 1.6rem; }
.ingredient-list dd { margin: 0.4rem 0 0; color: var(--ink-soft); }

.craft { background: var(--night); color: #f1ebe0; }
.craft .eyebrow { color: #b9ae9e; }
.steps { list-style: none; margin: 3rem 0 0; padding: 0; display: grid; gap: 2.25rem; }
.steps li { border-top: 1px solid rgba(241,235,224,0.22); padding-top: 1.25rem; }
.steps span { font-size: 0.72rem; letter-spacing: 0.22em; color: var(--amber); }
.steps h3 { margin: 0.5rem 0; }
.steps p { color: #c9bfb0; font-size: 0.95rem; }

/* Footer */
.site-footer { background: var(--paper); border-top: 1px solid var(--gold); padding: 3rem 0; }
.footer-inner { display: grid; gap: 0.75rem; }
.footer-inner p { color: var(--ink-soft); }
.small { font-size: 0.8rem; }

/* Larger screens */
@media (min-width: 48rem) {
  :root { --gutter: 3rem; }
  .site-header nav { display: flex; }
  .hero-media { object-position: center; }
  .hero-copy { padding-bottom: 6rem; }
  .section { padding: 8rem 0; }
  .scent-grid { grid-template-columns: repeat(3, 1fr); gap: 2.5rem; }
  .steps { grid-template-columns: repeat(4, 1fr); gap: 2rem; }
  .footer-inner { grid-template-columns: 1fr auto; align-items: center; }
  .footer-inner .small { grid-column: 1 / -1; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-title, .hero-sub, .hero-season, .link-arrow { animation: none; opacity: 1; }
  .hero::after { display: none; }
}
