/* =========================================================
   Millow — Cinematic Nature Minimalism + Glassmorphism
   ========================================================= */

:root {
  --ink: #ffffff;
  --ink-soft: rgba(255, 255, 255, 0.82);
  --ink-mute: rgba(255, 255, 255, 0.62);
  --forest: #15200f;
  --forest-2: #1d2b14;
  --moss: #3f5a22;

  --glass-bg: rgba(255, 255, 255, 0.14);
  --glass-bg-strong: rgba(255, 255, 255, 0.2);
  --glass-border: rgba(255, 255, 255, 0.32);
  --glass-shadow: 0 20px 60px -20px rgba(10, 25, 40, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.45),
    inset 0 -1px 0 rgba(255, 255, 255, 0.06);
  --blur: 22px;

  --radius-pill: 999px;
  --radius-card: 28px;

  --font-sans: "DM Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-serif: "Instrument Serif", Georgia, serif;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--ink);
  background: #fff;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* film grain over everything */
body::after {
  content: "";
  position: fixed;
  inset: var(--frame-gap, 12px);
  border-radius: var(--frame-radius, 28px);
  pointer-events: none;
  z-index: 100;
  opacity: 0.06;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

a { color: inherit; text-decoration: none; }
em { font-family: var(--font-serif); font-style: italic; font-weight: 400; letter-spacing: -0.005em; }
h1, h2, h3, p { margin: 0; }

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

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

/* ---------- frame: the whole site sits inside a rounded window ---------- */
:root { --frame-gap: 12px; --frame-radius: 28px; }
.frame {
  position: fixed;
  inset: var(--frame-gap);
  border-radius: var(--frame-radius);
  overflow: hidden;
  isolation: isolate;
  background: var(--forest);
  transform: translateZ(0); /* keeps rounded corners clipping moving layers in Safari */
}

/* ---------- glass ---------- */
.glass {
  background: linear-gradient(135deg, rgba(255,255,255,.22), rgba(255,255,255,.08));
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
  -webkit-backdrop-filter: blur(var(--blur)) saturate(150%);
  backdrop-filter: blur(var(--blur)) saturate(150%);
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  border: 0; cursor: pointer; white-space: nowrap;
  font: 500 15px/1 var(--font-sans);
  padding: 16px 24px;
  border-radius: var(--radius-pill);
  transition: transform .4s var(--ease), box-shadow .4s var(--ease), background .3s;
}
.btn-light {
  background: #fff; color: #17210f;
  box-shadow: 0 8px 24px -8px rgba(0,0,0,.25), inset 0 -1px 0 rgba(0,0,0,.06);
}
.btn-light:hover { transform: translateY(-1px); box-shadow: 0 14px 30px -10px rgba(0,0,0,.35); }
.btn-light:active { transform: translateY(0) scale(.98); }
.btn .arrow { display: inline-block; transition: transform .4s var(--ease); }
.btn:hover .arrow { transform: translateX(3px); }
.btn-sm { padding: 15px 24px; font-size: 14px; }

/* =========================================================
   HERO
   ========================================================= */
.hero {
  position: relative;
  height: 100%;
  display: flex; flex-direction: column; align-items: center;
  overflow: hidden;
  isolation: isolate;
}

.scene { position: absolute; inset: 0; z-index: -1; }
.layer { position: absolute; inset: -4%; will-change: transform; }

.photo {
  inset: 0;
  background: url("assets/hills1.png") center 42% / cover no-repeat;
  filter: brightness(0.85);
}
.haze {
  inset: 0;
  background:
    radial-gradient(60% 45% at 50% 42%, rgba(10, 25, 40, .2), transparent 75%),
    linear-gradient(180deg, rgba(10, 25, 45, .28) 0%, rgba(10, 25, 45, .06) 46%, rgba(10, 30, 10, .22) 100%);
}
.pollen { inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 1; }

/* ---------- nav ---------- */
.nav {
  position: relative; z-index: 5;
  margin-top: 18px;
  width: min(950px, 100% - 32px);
  height: 60px;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px;
  padding: 5px 5px 5px 16px;
  border-radius: var(--radius-pill);
  animation: fade-down 1.2s var(--ease) both;
}
.brand { display: inline-flex; justify-self: start; }
.logo {
  width: 34px; height: 34px;
  display: block;
  filter: brightness(0) invert(1) drop-shadow(0 1px 6px rgba(10,30,50,.25));
  transition: transform .6s var(--ease);
}
.brand:hover .logo { transform: rotate(-6deg) scale(1.05); }
.nav > .btn { justify-self: end; }
.nav-links { list-style: none; display: flex; gap: 28px; margin: 0; padding: 0; }
.nav-links li:has(> a:empty) { display: none; }
.nav-links a { font-size: 15px; color: var(--ink-soft); transition: color .3s; }
.nav-links a:hover, .nav-links a[aria-current="page"] { color: #fff; }
/* ---------- hero content ---------- */
.hero-inner {
  position: relative; z-index: 2;
  flex: 1;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center;
  padding: 24px 16px 16vh;
  width: 100%;
}

.eyebrow {
  font-size: 12px; font-weight: 500;
  letter-spacing: .32em; text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 20px;
}

.headline {
  font-weight: 500;
  font-size: clamp(42px, 6.6vw, 92px);
  line-height: 1.02;
  letter-spacing: -.035em;
  text-shadow: 0 2px 30px rgba(10,30,50,.3);
}
.headline em { font-size: 1.08em; letter-spacing: -.01em; }

.sub {
  margin-top: 22px;
  font-size: clamp(17px, 1.6vw, 21px);
  line-height: 1.5;
  color: var(--ink-soft);
  max-width: 34ch;
  text-shadow: 0 1px 20px rgba(10,30,50,.4);
}

.tags {
  list-style: none; padding: 0; margin: 20px 0 0;
  display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 22px;
  font-size: 13px; color: var(--ink-soft);
  text-shadow: 0 1px 12px rgba(20,40,20,.45);
}
.tags li { position: relative; }
.tags li + li::before {
  content: ""; position: absolute; left: -13px; top: 50%;
  width: 3px; height: 3px; border-radius: 50%; background: currentColor; transform: translateY(-50%);
}

/* ---------- waitlist form ---------- */
.waitlist {
  margin-top: 30px;
  width: min(540px, 100%);
  display: flex; align-items: center; gap: 8px;
  padding: 7px 7px 7px 26px;
  border-radius: var(--radius-pill);
  transition: border-color .3s, box-shadow .3s;
}
.waitlist:focus-within { border-color: rgba(255,255,255,.7); box-shadow: var(--glass-shadow), 0 0 0 5px rgba(255,255,255,.12); }
.waitlist input {
  flex: 1; min-width: 0;
  background: transparent; border: 0; outline: 0;
  color: #fff; font: 400 16px var(--font-sans);
  padding: 12px 0;
}
.waitlist input::placeholder { color: rgba(255,255,255,.7); }
.waitlist.is-error { border-color: rgba(255,190,170,.9); animation: shake .45s; }
.waitlist.is-done input { pointer-events: none; }
@keyframes shake { 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }

.form-note { margin-top: 14px; font-size: 13px; color: var(--ink-mute); min-height: 1.3em; transition: color .3s; }
.form-note.ok { color: #fff; }

.hero-foot {
  position: absolute; bottom: 22px; left: 0; right: 0; z-index: 3;
  width: min(1120px, 100% - 64px); margin: 0 auto;
  display: flex; justify-content: space-between; gap: 8px 16px; flex-wrap: wrap;
  font-size: 14px; color: rgba(255,255,255,.85);
  text-shadow: 0 1px 10px rgba(0,20,0,.4);
  animation: fade-in 1.4s .9s var(--ease) both;
}
.hero-foot a { color: #fff; border-bottom: 1px solid rgba(255,255,255,.45); }

/* =========================================================
   PRODUCT — written like a letter
   ========================================================= */
.page-letter .nav {
  position: absolute; top: 0; left: 0; right: 0;
  margin: 18px auto 0;
}

.letter-bg {
  position: absolute; inset: -6%; z-index: -2;
  background:
    radial-gradient(70% 45% at 50% 66%, rgba(255,214,160,.55), transparent 70%),
    linear-gradient(180deg, #1b2740 0%, #34456a 30%, #7d7c8a 52%, #d9a878 66%, #f3cf9c 74%);
  transform: scale(calc(1.1 - var(--p, 0) * .06)) translateY(calc(var(--p, 0) * -2%));
  transition: transform .6s linear;
  will-change: transform;
}
.letter-hills {
  /* hill crest sits ~37% down the image */
  --hh: max(62vw, 62vh);
  position: absolute; left: 0; right: 0;
  height: var(--hh);
  bottom: min(calc(40% - var(--hh) * 0.63 + 6%), -2%); /* always runs past the bottom edge */
  background: url("assets/hills.webp") center top / cover no-repeat;
}
.letter-shade {
  position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(55% 70% at 50% 50%, rgba(12,16,10,.42), rgba(12,16,10,0) 100%),
    linear-gradient(180deg, rgba(10,14,22,.45) 0%, rgba(14,16,14,.42) 45%, rgba(10,16,8,.7) 100%);
}

.scroller {
  position: absolute; inset: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  scroll-behavior: smooth;
  -webkit-mask-image: linear-gradient(180deg, transparent 0, transparent 70px, #000 170px, #000 calc(100% - 70px), transparent 100%);
          mask-image: linear-gradient(180deg, transparent 0, transparent 70px, #000 170px, #000 calc(100% - 70px), transparent 100%);
  scrollbar-width: none;
}
.scroller::-webkit-scrollbar { display: none; }

.letter {
  width: min(640px, 100% - 40px);
  margin: 0 auto;
  padding: 26vh 0 22vh;
  font-family: "Newsreader", Georgia, serif;
  font-weight: 300;
  font-size: clamp(18px, 1.35vw, 21px);
  line-height: 1.8;
  color: rgba(255, 249, 238, .86);
  text-shadow: 0 1px 18px rgba(10, 14, 6, .35);
}
.letter ::selection { background: rgba(246,232,200,.35); color: #fff; }

.letter-head { text-align: center; margin-bottom: 16vh; }
.letter-head .eyebrow { font-family: var(--font-sans); margin-bottom: 26px; }
.letter-head h1 {
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: clamp(40px, 5.6vw, 76px);
  line-height: 1.04;
  letter-spacing: -.035em;
  color: #fff;
}
.letter-head h1 em { font-size: 1.08em; }
.letter-date {
  margin-top: 26px;
  font-family: var(--font-serif); font-style: italic;
  font-size: 20px; color: var(--ink-mute);
}

.letter p + p { margin-top: 1.25em; }
.letter p em { font-family: "Newsreader", Georgia, serif; font-style: italic; font-weight: 400; color: #fff; }

.salutation {
  font-family: var(--font-serif) !important; font-style: italic;
  font-size: 1.75em; line-height: 1.2;
  color: #fff;
  margin-bottom: .9em;
}
.salutation + p::first-letter {
  float: left;
  font-family: var(--font-serif);
  font-size: 4.1em; line-height: .82;
  padding: .06em .1em 0 0;
  color: #fff;
}

.letter h2 {
  margin: 2.6em 0 .9em;
  font-family: var(--font-serif);
  font-style: italic; font-weight: 400;
  font-size: 1.6em; line-height: 1.2;
  letter-spacing: -.005em;
  color: #fff;
}
.letter h2 span {
  font-family: var(--font-sans); font-style: normal;
  font-size: 12px; font-weight: 500; letter-spacing: .28em;
  color: var(--ink-mute);
  vertical-align: middle;
  margin-right: 14px;
}

.sign-off { margin-top: 3.4em; }
.signature {
  margin-top: .2em !important;
  font-family: var(--font-serif); font-style: italic;
  font-size: 3.4em; line-height: 1;
  color: #fff;
}
.postscript { margin-top: 3em !important; font-style: italic; color: var(--ink-soft); }
.postscript span { font-style: normal; font-family: var(--font-sans); font-size: 12px; font-weight: 500; letter-spacing: .2em; margin-right: 10px; color: var(--ink-mute); }
.letter-cta { margin-top: 3.2em !important; font-family: var(--font-sans); font-size: 16px; }
.letter-cta a { color: #fff; padding-bottom: 4px; border-bottom: 1px solid rgba(255,255,255,.5); transition: border-color .3s; }
.letter-cta a:hover { border-color: #fff; }
.letter-cta .arrow { display: inline-block; transition: transform .4s var(--ease); }
.letter-cta a:hover .arrow { transform: translateX(3px); }

.letter .reveal { filter: blur(4px); transform: translateY(16px); }
.letter .reveal.is-in { filter: none; transform: none; }

/* =========================================================
   Motion
   ========================================================= */
@keyframes fade-in { from { opacity: 0; } }
@keyframes fade-down { from { opacity: 0; transform: translateY(-14px); } }

.reveal {
  opacity: 0;
  transform: translateY(24px);
  filter: blur(6px);
  transition: opacity 1.2s var(--ease), transform 1.2s var(--ease), filter 1.2s var(--ease);
  transition-delay: var(--d, 0s);
}
.reveal.is-in { opacity: 1; transform: none; filter: none; }

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 640px) {
  :root { --frame-gap: 8px; --frame-radius: 22px; }
  .nav { gap: 12px; margin-top: 12px; width: calc(100% - 20px); }
  .nav-links { gap: 18px; }
  .nav-links a { font-size: 14px; }
  .btn-sm { padding: 9px 14px; font-size: 13px; }
  .hero-inner { padding-bottom: 20vh; }
  .waitlist { flex-direction: column; padding: 8px; border-radius: 26px; }
  .waitlist input { width: 100%; padding: 14px 16px; text-align: center; }
  .waitlist .btn { width: 100%; }
  .hero-foot { bottom: 14px; font-size: 12.5px; justify-content: center; width: calc(100% - 32px); }
  .logo { width: 30px; height: 30px; }
  .nav { padding-left: 14px; }
  .page-letter .nav { margin-top: 12px; }
  .letter { padding-top: 20vh; }
  .letter-head { margin-bottom: 12vh; }
}
@media (max-width: 480px) {
  .nav-links li:not(:first-child) { display: none; }
}
@media (max-width: 380px) {
  .brand { font-size: 16px; }
  .btn-sm .arrow { display: none; }
}
@media (max-height: 640px) {
  .headline { font-size: clamp(36px, 5.4vw, 64px); }
  .tags { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; filter: none; }
  html, .scroller { scroll-behavior: auto; }
  .letter .reveal { opacity: 1; transform: none; filter: none; }
}
