:root {
  --beige: #d6c8b2;        /* photo backdrop */
  --cream: #efe8db;        /* page background */
  --cream-deep: #e4d9c6;
  --ink: #17150f;          /* label black */
  --ink-soft: rgba(23, 21, 15, 0.68);
  --olive: #5f6b3c;        /* label olive green */
  --olive-line: #a6b06e;   /* thin label rule */
  --stone: #c8bda9;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scrollbar-width: none; }
html::-webkit-scrollbar { display: none; }

body {
  background: var(--cream);
  color: var(--ink);
  font-family: "Inter", system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
}

h1, h2, h3 { font-family: "Cormorant Garamond", Georgia, serif; font-weight: 500; line-height: 1.05; }
em { font-style: italic; font-weight: 400; color: var(--olive); }

/* ---------- Preloader ---------- */
.preloader {
  position: fixed; inset: 0; z-index: 100;
  background: var(--ink);
  color: var(--cream);
  display: flex; flex-direction: column;
  justify-content: space-between;
  padding: 6vh 6vw;
  transition: transform 0.9s cubic-bezier(0.76, 0, 0.24, 1);
}
.preloader.done { transform: translateY(-100%); }
.preloader-logo { width: min(320px, 60vw); align-self: flex-start; }
.preloader-words { display: flex; flex-direction: column; gap: 6px; }
.pl-word {
  font-family: "Cormorant Garamond", serif; font-style: italic;
  font-size: clamp(1.4rem, 3vw, 2.4rem);
  color: var(--olive-line);
  opacity: 0; animation: plword 0.7s forwards;
}
.pl-word:nth-child(2) { animation-delay: 0.35s; }
.pl-word:nth-child(3) { animation-delay: 0.7s; }
@keyframes plword { to { opacity: 1; } }
.preloader-num {
  align-self: flex-end;
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(4rem, 12vw, 10rem);
  line-height: 1;
}

/* ---------- Nav ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  display: flex; justify-content: space-between; align-items: center;
  padding: 18px 6vw;
  background: linear-gradient(180deg, rgba(239,232,219,0.94), rgba(239,232,219,0));
}
.nav-brand img {
  height: 30px; display: block;
  filter: brightness(0);           /* white logo → label black on cream */
}
.nav-links { display: flex; gap: 28px; }
.nav-links a {
  color: var(--ink-soft); text-decoration: none;
  font-size: 13px; letter-spacing: 0.06em; font-weight: 500;
  transition: color 0.25s;
}
.nav-links a:hover { color: var(--olive); }

.ship-banner {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 49;
  text-align: center; padding: 8px;
  background: var(--ink); color: var(--cream);
  font-size: 11px; letter-spacing: 0.22em; text-transform: uppercase;
}

/* ---------- CTA pill ---------- */
.cta {
  display: inline-flex; align-items: center;
  padding: 12px 26px; border-radius: 999px;
  background: var(--ink); color: var(--cream);
  text-decoration: none; font-size: 13px; font-weight: 500;
  letter-spacing: 0.04em; border: 1px solid var(--ink);
  transition: background 0.3s, color 0.3s;
  cursor: pointer;
}
.cta:hover { background: var(--olive); border-color: var(--olive); color: #fff; }

/* ---------- Hero ---------- */
.hero {
  min-height: 100vh;
  display: flex; flex-direction: column; justify-content: center;
  padding: 18vh 6vw 10vh;
  gap: 8vh;
  background:
    radial-gradient(90% 70% at 80% 20%, rgba(166,176,110,0.14), transparent 60%),
    var(--cream);
}
.hero-title {
  font-size: clamp(3rem, 10vw, 9rem);
  letter-spacing: -0.01em;
  max-width: 14ch;
}
.hero-foot { display: flex; align-items: flex-end; gap: 6vw; flex-wrap: wrap; }
.scroll-hint {
  font-size: 11px; letter-spacing: 0.5em; color: var(--ink-soft);
  writing-mode: vertical-rl;
  animation: bob 2s ease-in-out infinite;
}
@keyframes bob { 0%,100% { transform: translateY(0); } 50% { transform: translateY(8px); } }
.hero-intro { max-width: 42ch; color: var(--ink-soft); }

/* ---------- Split-word reveal ---------- */
.split-words .w { display: inline-block; overflow: hidden; vertical-align: bottom; }
.split-words .w > span {
  display: inline-block;
  transform: translateY(110%);
  transition: transform 0.9s cubic-bezier(0.22, 1, 0.36, 1);
  transition-delay: calc(var(--wi) * 70ms);
}
.split-words.in .w > span { transform: translateY(0); }

/* ---------- Generic reveal ---------- */
.reveal { opacity: 0; transform: translateY(30px); transition: opacity 0.8s, transform 0.8s; }
.reveal.in { opacity: 1; transform: none; }

/* ---------- Cinematic scrub sections ---------- */
.cinematic { position: relative; height: 460vh; }
.sticky {
  position: sticky; top: 0; height: 100vh; width: 100%;
  overflow: hidden; background: var(--beige);
}
.cinematic canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.scrub-overlay { position: absolute; inset: 0; z-index: 5; pointer-events: none; }
.reveal-line {
  position: absolute; left: 6vw; bottom: 14vh;
  max-width: 16ch;
  font-size: clamp(2rem, 5.5vw, 4.6rem);
  color: var(--ink);
  opacity: 0;
  will-change: opacity, transform;
  /* cream halo so dark text stays legible when the mobile crop puts it over the bottle */
  text-shadow:
    0 0 10px rgba(239, 232, 219, 0.95),
    0 0 28px rgba(239, 232, 219, 0.9),
    0 0 56px rgba(239, 232, 219, 0.75);
}
#pour .reveal-line { left: auto; right: 6vw; text-align: right; }
#pour .reveal-line.flip-left { left: 6vw; right: auto; text-align: left; }

/* ---------- Editorial numbered rows ---------- */
.editorial { padding: 18vh 6vw; display: flex; flex-direction: column; gap: 12vh; }
.ed-row { display: flex; gap: 5vw; align-items: baseline; max-width: 920px; }
.ed-row:nth-child(even) { align-self: flex-end; }
.ed-num {
  font-family: "Cormorant Garamond", serif; font-style: italic;
  color: var(--olive); font-size: 16px; letter-spacing: 0.12em;
  white-space: nowrap;
}
.ed-body h3 { font-size: clamp(1.8rem, 3.4vw, 2.8rem); margin-bottom: 12px; }
.ed-body p { color: var(--ink-soft); font-size: 1.02rem; max-width: 52ch; }

/* ---------- USDA Organic ---------- */
.organic {
  display: flex; align-items: center; justify-content: center;
  gap: 6vw; flex-wrap: wrap;
  padding: 14vh 6vw;
  background: var(--cream-deep);
}
.organic-badge { width: min(220px, 40vw); flex-shrink: 0; }
.organic-copy { max-width: 520px; }
.organic-copy h2 { font-size: clamp(2.2rem, 5.5vw, 4.5rem); margin-bottom: 18px; }
.organic-copy p { color: var(--ink-soft); }

.section-title { font-size: clamp(2.4rem, 6.5vw, 5.5rem); margin-bottom: 8vh; }

/* ---------- Stats ---------- */
.stats {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 40px; padding: 16vh 6vw; text-align: center;
  background: var(--ink); color: var(--cream);
}
.stat-num {
  display: block; font-family: "Cormorant Garamond", serif;
  font-size: clamp(3rem, 7vw, 5.5rem); line-height: 1;
  color: var(--olive-line);
}
.stat-label { font-size: 12px; letter-spacing: 0.25em; text-transform: uppercase; opacity: 0.7; }

/* ---------- Shop ---------- */
.shop { padding: 16vh 6vw; }
.products {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 48px; max-width: 1100px; margin: 0 auto;
}
.product {
  background: #f7f2e7; border: 1px solid rgba(23,21,15,0.1);
  border-radius: 18px; padding: 0 36px 42px; overflow: hidden;
}
.product-photo { margin: 0 -36px 26px; background: var(--beige); }
.product-photo img { width: 100%; display: block; }
.product-tag {
  font-size: 11px; letter-spacing: 0.25em; text-transform: uppercase;
  color: var(--olive); margin-bottom: 16px;
}
.product h3 { font-size: 2.1rem; margin-bottom: 12px; }
.product p { color: var(--ink-soft); font-size: 0.98rem; margin-bottom: 26px; }
.product-buy { display: flex; align-items: center; gap: 18px; }
.price { font-family: "Cormorant Garamond", serif; font-size: 1.9rem; }
.mini-badge { width: 44px; height: 44px; }
.product-buy .cta { margin-left: auto; }

/* ---------- About Our Olive Oil ---------- */
.about-oil { padding: 16vh 6vw; background: var(--cream-deep); }
.about-oil-inner {
  max-width: 1100px; margin: 0 auto;
  display: grid; grid-template-columns: minmax(260px, 1fr) minmax(300px, 1.3fr);
  gap: 6vh 6vw; align-items: start;
}
.about-oil h2 { font-size: clamp(2.4rem, 6vw, 5rem); position: sticky; top: 16vh; }
.about-oil-copy { display: flex; flex-direction: column; gap: 24px; }
.about-oil-copy p { color: var(--ink-soft); font-size: 1.05rem; max-width: 58ch; }

/* ---------- Story ---------- */
.story {
  padding: 16vh 6vw; max-width: 1100px; margin: 0 auto;
  display: flex; flex-direction: column; align-items: center; gap: 4vh;
  text-align: center;
}
.story h2 { font-size: clamp(2.4rem, 6.5vw, 5.5rem); }
.story p { color: var(--ink-soft); font-size: 1.1rem; max-width: 62ch; }
.story blockquote {
  font-family: "Cormorant Garamond", serif; font-style: italic;
  font-size: clamp(1.3rem, 2.6vw, 2rem); line-height: 1.4;
  max-width: 34ch;
  border-top: 2px solid var(--olive-line); padding-top: 28px;
}
.story cite { display: block; font-size: 0.9rem; margin-top: 14px; color: var(--ink-soft); font-style: normal; }
.story-lead { font-size: 1.15rem; }
.story-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 6vh 5vw; margin: 2vh 0 4vh;
}
.story-block h3 { font-size: 1.55rem; margin-bottom: 10px; }
.story-block p { color: var(--ink-soft); font-size: 0.98rem; }

/* ---------- Contact ---------- */
.contact { padding: 16vh 6vw; background: var(--cream-deep); }
.contact-inner {
  max-width: 1100px; margin: 0 auto;
  display: grid; grid-template-columns: minmax(280px, 1fr) minmax(300px, 1.1fr);
  gap: 6vh 6vw; align-items: start;
}
.contact h2 { font-size: clamp(2.4rem, 6vw, 5rem); margin-bottom: 3vh; }
.contact-intro p { color: var(--ink-soft); margin-bottom: 16px; max-width: 48ch; }
.contact-intro a { color: var(--olive); }
.contact-form { display: flex; flex-direction: column; gap: 14px; }
.contact-form input, .contact-form textarea {
  padding: 14px 20px; border-radius: 16px;
  border: 1px solid rgba(23,21,15,0.3);
  background: transparent; color: var(--ink);
  font-family: inherit; font-size: 14px; outline: none; resize: vertical;
}
.contact-form input:focus, .contact-form textarea:focus { border-color: var(--olive); }
.contact-form .cta { align-self: flex-start; }

/* ---------- Newsletter ---------- */
.newsletter {
  padding: 16vh 6vw; text-align: center;
  background: var(--cream-deep);
  display: flex; flex-direction: column; align-items: center; gap: 20px;
}
.newsletter h2 { font-size: clamp(2rem, 5.5vw, 4.5rem); }
.newsletter p { color: var(--ink-soft); }
.nl-form { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }
.nl-form input {
  padding: 12px 22px; border-radius: 999px;
  border: 1px solid rgba(23,21,15,0.3);
  background: transparent; color: var(--ink);
  font-family: inherit; font-size: 14px; min-width: 280px; outline: none;
}
.nl-form input:focus { border-color: var(--olive); }

/* ---------- Footer ---------- */
.footer {
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 18px;
  padding: 46px 6vw 64px;
  font-size: 12px; letter-spacing: 0.06em;
  background: var(--ink); color: rgba(239,232,219,0.7);
}
.footer-logo { height: 26px; }
.footer-badge { width: 52px; height: 52px; }
.footer-link { color: rgba(239,232,219,0.7); text-decoration: none; transition: color 0.25s; }
.footer-link:hover { color: var(--olive-line); }

/* ---------- Tablet ---------- */
@media (max-width: 760px) {
  .about-oil-inner, .contact-inner { grid-template-columns: 1fr; }
  .about-oil h2 { position: static; }
}

/* ---------- Mobile ---------- */
@media (max-width: 640px) {
  .nav-links { display: none; }
  .nav-brand img { height: 24px; }
  .hero { padding-top: 14vh; }
  .hero-foot { flex-direction: column; align-items: flex-start; }
  .scroll-hint { writing-mode: horizontal-tb; }
  .reveal-line { bottom: 18vh; max-width: 90vw; }
  .ed-row:nth-child(even) { align-self: flex-start; }
  .product { padding: 0 24px 32px; }
  .product-photo { margin: 0 -24px 22px; }
}
