/* ---------- Tokens ---------- */
:root {
  --ink: #0E0E0F;
  --milk: #F7F4EC;
  --gold: #C9A227;
  --green: #2F6B3A;
  --font-display: 'Anton', 'Impact', sans-serif;
  --font-body: 'DM Sans', system-ui, sans-serif;
  --gutter: clamp(1rem, 4vw, 3rem);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
a { color: inherit; text-decoration: none; }

/* ---------- Lenis (smooth scroll) required rules ---------- */
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }

/* ---------- Base ---------- */
body {
  background: var(--ink);
  color: var(--milk);
  font-family: var(--font-body);
  line-height: 1.5;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

#webgl {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
  display: block;
}

/* ---------- Nav ---------- */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem var(--gutter);
}
.nav__brand {
  font-family: var(--font-display);
  font-size: 1.5rem;
  letter-spacing: 0.18em;
}
.nav__cta {
  font-size: 0.78rem;
  font-weight: 500;
  padding: 0.6rem 1rem;
  border: 1px solid var(--gold);
  border-radius: 999px;
  transition: background 0.3s, color 0.3s;
}
.nav__cta:hover { background: var(--gold); color: var(--ink); }
.nav__cta-short { display: none; }
@media (max-width: 640px) {
  .nav__cta-full { display: none; }
  .nav__cta-short { display: inline; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: stretch;
  justify-content: center;
  padding: 6rem var(--gutter) 5.5rem;
}
.hero__title {
  position: relative;
  z-index: 0;
  width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.12em;
  font-family: var(--font-display);
  font-weight: 400;
  text-transform: uppercase;
  line-height: 1;
  font-size: min(8.2vw, 17vh, calc((92vw - 50vh) / 9));
}
.hero__title .line { display: flex; align-items: center; }
.hero__title .line__gap { flex: 0 0 50vh; }
.hero__title .word {
  flex: 1 1 0;
  min-width: 0;
  overflow: hidden;
  line-height: 1.1;
  padding: 0.02em 0 0.04em;
}
.hero__title .word--left { text-align: right; }
.hero__title .word--right { text-align: left; }
.hero__title .word-inner { display: inline-block; will-change: transform; }
.hero__title .accent { color: var(--gold); }

@media (max-aspect-ratio: 5/4) {
  .hero__title { justify-content: space-between; gap: 0; font-size: 13vw; }
  .hero__title .line { justify-content: center; }
  .hero__title .line__gap { display: none; }
  .hero__title .word { flex: none; }
  .hero__title .word--left,
  .hero__title .word--right { text-align: center; }
  .hero__title .word--right { margin-left: 0.25em; }
}

.hero__ui {
  position: absolute;
  left: var(--gutter);
  right: var(--gutter);
  bottom: 1.5rem;
  z-index: 2;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
}
.hero__tag {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
}
.hero__sub {
  max-width: 20rem;
  font-size: 0.9rem;
  color: rgba(247, 244, 236, 0.72);
}
.hero__scroll {
  font-size: 0.7rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: rgba(247, 244, 236, 0.55);
}

/* ---------- Footer ---------- */
.footer {
  position: relative;
  z-index: 2;
  padding: 2rem var(--gutter);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
  font-size: 0.8rem;
  color: rgba(247, 244, 236, 0.6);
  border-top: 1px solid rgba(247, 244, 236, 0.12);
}

/* ---------- Preloader ---------- */
html.is-loading, html.is-loading body { overflow: hidden; }

#preloader {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.preloader__milk {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 0;
  background: var(--milk);
  animation: fillMilk 0.9s cubic-bezier(0.65, 0, 0.35, 1) forwards;
}
.preloader__word {
  position: relative;
  font-family: var(--font-display);
  font-size: clamp(2rem, 8vw, 5rem);
  letter-spacing: 0.2em;
  color: var(--milk);
  mix-blend-mode: difference;
}
@keyframes fillMilk { to { height: 100%; } }

@media (prefers-reduced-motion: reduce) {
  .preloader__milk { animation-duration: 0.01s; }
}

/* ---------- Spill ---------- */
.spill { position: relative; height: 320vh; }

.flood {
  position: fixed;
  left: 0; right: 0; top: 0;
  height: calc(100vh + 160px);
  z-index: 5;
  overflow: hidden;
  pointer-events: none;
  transform: translateY(110vh);
  will-change: transform;
}
.flood__wave {
  display: block;
  width: 200%;
  height: 120px;
  animation: floodWave 5s linear infinite paused;
}
.flood__body {
  height: calc(100% - 116px);
  margin-top: -4px;
  position: relative;
  background: var(--milk);
}
@keyframes floodWave { to { transform: translateX(-50%); } }

body.is-light { background: var(--milk); color: var(--ink); }

.nav { color: var(--milk); transition: color 0.3s; }
body.nav-dark .nav { color: var(--ink); }

.footer { background: var(--ink); }
.flood.is-active .flood__wave { animation-play-state: running; }

/* ---------- Promise ---------- */
:root { --gold-deep: #A27F12; }

.promise { position: relative; z-index: 2; padding: 14vh var(--gutter) 12vh; color: var(--ink); }
.promise__inner { max-width: 72rem; margin: 0 auto; }
.promise__eyebrow {
  font-size: 0.75rem; font-weight: 700; letter-spacing: 0.22em;
  text-transform: uppercase; color: var(--gold-deep);
}
.promise__title {
  font-family: var(--font-display); font-weight: 400; text-transform: uppercase;
  font-size: clamp(2.6rem, 8vw, 7.5rem); line-height: 0.95; margin: 1rem 0 5rem;
}
.promise__title span { color: var(--gold-deep); }

.promise__row {
  position: relative; display: grid; grid-template-columns: 4rem 1fr;
  gap: 0.4rem 1.5rem; padding: 2rem 0; transition: padding-left 0.4s;
}
.promise__rule {
  position: absolute; top: 0; left: 0; right: 0; height: 1px;
  background: var(--ink); transform-origin: left;
}
.promise__num { font-family: var(--font-display); font-size: clamp(1.8rem, 4vw, 3rem); color: var(--gold-deep); }
.promise__name {
  font-family: var(--font-display); font-weight: 400; text-transform: uppercase;
  font-size: clamp(1.7rem, 4vw, 3.2rem); line-height: 1; transition: color 0.3s;
}
.promise__text { grid-column: 2; color: rgba(14, 14, 15, 0.72); max-width: 34rem; }
.promise__row:hover { padding-left: 1rem; }
.promise__row:hover .promise__name { color: var(--green); }
.promise__note { margin-top: 4rem; font-size: 0.85rem; color: rgba(14, 14, 15, 0.55); }

@media (min-width: 900px) {
  .promise__row { grid-template-columns: 6rem 1fr 1fr; align-items: baseline; }
  .promise__text { grid-column: 3; }
}

/* ---------- Notify ---------- */
[hidden] { display: none !important; }

.notify {
  position: relative; z-index: 2; background: var(--ink); color: var(--milk);
  padding: 16vh var(--gutter);
}
.notify__inner { max-width: 44rem; margin: 0 auto; }
.notify__eyebrow {
  font-size: 0.75rem; font-weight: 700; letter-spacing: 0.22em;
  text-transform: uppercase; color: var(--gold);
}
.notify__title {
  font-family: var(--font-display); font-weight: 400; text-transform: uppercase;
  font-size: clamp(3rem, 10vw, 8rem); line-height: 0.92; margin: 1rem 0 1.5rem;
}
.notify__title span { color: var(--gold); }
.notify__sub { color: rgba(247, 244, 236, 0.72); max-width: 34rem; margin-bottom: 3rem; }

.field { display: block; margin-bottom: 1.4rem; }
.field__label {
  display: block; font-size: 0.72rem; letter-spacing: 0.2em;
  text-transform: uppercase; color: var(--gold); margin-bottom: 0.3rem;
}
.field__input {
  width: 100%; background: transparent; border: 0;
  border-bottom: 1px solid rgba(247, 244, 236, 0.35);
  color: var(--milk); font: inherit; font-size: 1.25rem;
  padding: 0.6rem 0; outline: none; transition: border-color 0.3s;
}
.field__input:focus { border-bottom-color: var(--gold); }
.field__input.is-invalid { border-bottom-color: #e5604d; }
textarea.field__input { resize: vertical; min-height: 5.5rem; }
.field__error { display: block; min-height: 1.2em; margin-top: 0.35rem; font-size: 0.8rem; color: #e5604d; }

.form__honey { position: absolute; left: -9999px; opacity: 0; }
.form__submit {
  margin-top: 0.5rem; padding: 1rem 2.4rem; font: inherit; font-weight: 700;
  letter-spacing: 0.08em; background: var(--gold); color: var(--ink);
  border: 0; border-radius: 999px; cursor: pointer;
  transition: transform 0.25s, background 0.25s;
}
.form__submit:hover { transform: translateY(-2px); background: #d9b13a; }
.form__submit:disabled { opacity: 0.6; cursor: wait; transform: none; }
.form__status { margin-top: 1rem; min-height: 1.4em; font-size: 0.9rem; color: #e5604d; }

.notify__done-title {
  font-family: var(--font-display); font-weight: 400; text-transform: uppercase;
  font-size: clamp(2.2rem, 6vw, 4rem); margin-bottom: 0.75rem;
}
.notify__done-name { color: var(--gold); }

/* ---------- Process ---------- */
.process {
  position: relative;
  height: 100vh;
  background: #111112;
  color: var(--milk);
  overflow: hidden;
}
.process__stage { position: relative; height: 100%; padding: 6rem var(--gutter) 3rem; }
.process__stage::after {
  content: ''; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: linear-gradient(90deg, rgba(17, 17, 18, 0.92) 0%, rgba(17, 17, 18, 0.6) 26%, rgba(17, 17, 18, 0) 50%),
              linear-gradient(0deg, rgba(17, 17, 18, 0.7) 0%, rgba(17, 17, 18, 0) 30%);
}
/* The one shared canvas moves in here while the farm scene is on screen */
#webgl.in-stage { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; }
@media (max-aspect-ratio: 5/4) {
  #webgl.in-stage { height: 62%; }
  .process__stage::after {
    background: linear-gradient(0deg, rgba(17, 17, 18, 0.95) 0%, rgba(17, 17, 18, 0.7) 28%, rgba(17, 17, 18, 0) 48%);
  }
}
.process__eyebrow {
  position: relative; z-index: 2;
  font-size: 0.75rem; font-weight: 700; letter-spacing: 0.22em;
  text-transform: uppercase; color: var(--gold);
}
.process__steps {
  z-index: 2;
  position: absolute; left: var(--gutter); right: var(--gutter); bottom: 12vh;
  max-width: 30rem;
}
.process__step { position: absolute; left: 0; bottom: 0; opacity: 0; visibility: hidden; }
.process__num { font-family: var(--font-display); font-size: 1.4rem; color: var(--gold); }
.process__name {
  font-family: var(--font-display); font-weight: 400; text-transform: uppercase;
  font-size: clamp(2.6rem, 6.2vw, 5.2rem); line-height: 0.95; margin: 0.2rem 0 0.8rem;
  text-shadow: 0 2px 28px rgba(0, 0, 0, 0.65);
}
.process__text { color: rgba(247, 244, 236, 0.72); max-width: 24rem; }

.process__rail {
  z-index: 2;
  position: absolute; left: var(--gutter); right: var(--gutter); bottom: 5vh;
  height: 2px; background: rgba(247, 244, 236, 0.18);
}
.process__rail-fill {
  display: block; height: 100%; background: var(--gold);
  transform: scaleX(0); transform-origin: left;
}
