/* Grow Love — landing v2, direction "1c: Sun-bleached linen & moss".
   Two themes mirroring the app: light = linen/moss (Meadow kin, default),
   dark = Forest Night (deep green, cream text, GOLD accent #E1B46B).
   Toggle: [data-theme="dark"] on <html>, set before first paint (see index). */

:root {
  --bg: #f4f1e7;          /* sun-bleached linen */
  --bg-soft: #f7f5ea;
  --card: #fbf9f1;
  --ink: #3c4033;          /* moss-ink text */
  --accent: #6b7a52;       /* moss */
  --accent-deep: #5a6845;
  --on-accent: #f7f5ea;
  --muted: #7a7361;
  --muted-2: #8b8471;
  --line: #c9c2a6;         /* horizon */
  --border: #d5cfb8;
  --dash: #b3ab90;
  --date-ink: #5c5747;
  --glow-a: rgba(180,196,160,0.30);   /* moss glow */
  --glow-b: rgba(226,205,175,0.40);   /* warm sand */
  --mote: rgba(139,132,113,0.35);
  --shadow: rgba(60,64,51,0.12);
  --serif: 'Cormorant Garamond', Georgia, serif;
  --sans: 'Karla', -apple-system, sans-serif;
  --hand: 'Caveat', cursive;
}

/* Forest Night — palette lifted from the app's dark theme (JOURNAL «Бренд»):
   bg 1C2620, cream text F0E9D8, gold accent E1B46B. */
[data-theme="dark"] {
  --bg: #1c2620;
  --bg-soft: #202b24;
  --card: #232f28;
  --ink: #f0e9d8;
  --accent: #e1b46b;
  --accent-deep: #d3a55c;
  --on-accent: #1c2620;
  --muted: #b3ab97;
  --muted-2: #8f8a79;
  --line: #3a463c;
  --border: #3f4a40;
  --dash: #6a7466;
  --date-ink: #d9d2bf;
  --glow-a: rgba(225,180,107,0.10);   /* faint gold */
  --glow-b: rgba(95,184,174,0.06);    /* faint teal night air */
  --mote: rgba(240,233,216,0.30);
  --shadow: rgba(0,0,0,0.45);
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16.5px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  transition: background 0.35s ease, color 0.35s ease;
}

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

.wrap { max-width: 1180px; margin: 0 auto; padding: 0 24px; }

/* ---------- shared type ---------- */

h1, h2 { font-family: var(--serif); font-weight: 500; text-wrap: balance; }

h1 { font-size: clamp(40px, 5.2vw, 58px); line-height: 1.08; }
h1 em, h2 em { font-style: italic; color: var(--accent); }

h2 { font-size: clamp(30px, 3.6vw, 42px); line-height: 1.12; }

.eyebrow {
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted-2);
}

.section-head { max-width: 640px; margin: 0 0 44px; }
.section-head h2 { margin-bottom: 12px; }
.section-head p { color: var(--muted); font-size: 17px; }

.deco-leaf { height: 40px; width: auto; margin-bottom: 10px; }

/* ---------- header ---------- */

.site-header { padding: 26px 0 10px; }

.header-row { display: flex; align-items: center; justify-content: space-between; }
.header-right { display: flex; align-items: center; gap: 18px; }

.brand {
  display: inline-flex; align-items: center; gap: 12px;
  font-family: var(--serif); font-weight: 600; font-size: 24px;
  color: var(--ink); text-decoration: none;
}
.brand-icon { width: 36px; height: 36px; object-fit: contain; }

.chip {
  font-size: 12.5px; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--muted); font-weight: 600;
}

.theme-toggle {
  width: 40px; height: 40px; border-radius: 50%;
  border: 1px solid var(--border); background: var(--card);
  color: var(--accent); cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  transition: border-color 0.2s ease;
}
.theme-toggle:hover { border-color: var(--accent); }
.theme-toggle svg { width: 20px; height: 20px; }
.ic-moon { display: block; }
.ic-sun { display: none; }
[data-theme="dark"] .ic-moon { display: none; }
[data-theme="dark"] .ic-sun { display: block; }

/* ---------- hero ---------- */

.hero { position: relative; overflow: hidden; }

.hero-light {
  position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(ellipse 55% 40% at 85% 80%, var(--glow-a), transparent 70%),
    radial-gradient(ellipse 40% 30% at 8% 15%, var(--glow-b), transparent 70%);
}

/* drifting linen motes / fireflies — signature moment #1 */
.motes { position: absolute; inset: 0; pointer-events: none; }
.motes i {
  position: absolute; display: block; border-radius: 50%;
  background: var(--mote);
  animation: mote-drift 16s linear infinite;
}
[data-theme="dark"] .motes i { box-shadow: 0 0 6px 1px rgba(225,180,107,0.35); }
.motes i:nth-child(1) { width: 5px; height: 5px; left: 12%; top: 70%; animation-duration: 19s; }
.motes i:nth-child(2) { width: 3px; height: 3px; left: 28%; top: 40%; animation-duration: 15s; animation-delay: -4s; }
.motes i:nth-child(3) { width: 4px; height: 4px; left: 47%; top: 62%; animation-duration: 22s; animation-delay: -9s; }
.motes i:nth-child(4) { width: 3px; height: 3px; left: 63%; top: 30%; animation-duration: 17s; animation-delay: -2s; }
.motes i:nth-child(5) { width: 5px; height: 5px; left: 76%; top: 55%; animation-duration: 21s; animation-delay: -12s; }
.motes i:nth-child(6) { width: 3px; height: 3px; left: 86%; top: 24%; animation-duration: 14s; animation-delay: -6s; }
.motes i:nth-child(7) { width: 4px; height: 4px; left: 92%; top: 66%; animation-duration: 18s; animation-delay: -10s; }

@keyframes mote-drift {
  0%   { transform: translate(0, 0); opacity: 0; }
  10%  { opacity: 0.8; }
  90%  { opacity: 0.6; }
  100% { transform: translate(-60px, -140px); opacity: 0; }
}

.hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 420px;
  align-items: end;
  gap: 24px;
  padding-top: 34px;
}

.hero-copy { padding-bottom: 56px; display: flex; flex-direction: column; gap: 26px; }

/* --- monumental counter (1c centerpiece) --- */

.counter-row { display: flex; align-items: baseline; gap: 14px; }

.counter {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(88px, 12vw, 150px);
  line-height: 0.95;
  letter-spacing: -0.02em;
  color: var(--ink);
  /* the 1c mock fix: lining tabular figures — no old-style descenders,
     the "7" must never dip out of the box */
  font-variant-numeric: lining-nums tabular-nums;
  font-feature-settings: "lnum" 1, "tnum" 1;
}

.counter-unit {
  font-family: var(--serif); font-style: italic;
  font-size: clamp(22px, 2.6vw, 30px); color: var(--accent);
}

.counter-block .eyebrow { margin-bottom: 6px; }

.since-line { font-family: var(--serif); font-size: 17.5px; color: var(--muted); margin-top: 10px; }

/* --- date button + custom calendar (native picker looked alien) --- */

.date-edit { position: relative; display: inline-block; }

.date-btn {
  font-family: var(--serif); font-size: 17.5px; color: var(--date-ink);
  background: transparent; border: none;
  border-bottom: 1.5px dashed var(--dash);
  padding: 0 2px 2px;
  cursor: pointer;
  display: inline-flex; align-items: center; gap: 7px;
  font-variant-numeric: lining-nums;
  transition: color 0.2s ease, border-color 0.2s ease;
}
.date-btn svg { width: 15px; height: 15px; color: var(--accent); }
.date-btn:hover { color: var(--accent); border-bottom-color: var(--accent); }
.date-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 3px; }

.cal {
  position: absolute; z-index: 30;
  top: calc(100% + 12px); left: 50%; transform: translateX(-50%);
  width: 306px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 14px 40px var(--shadow);
  padding: 16px 16px 10px;
}
.cal::before {
  content: ''; position: absolute; top: -7px; left: 50%; margin-left: -7px;
  width: 12px; height: 12px; transform: rotate(45deg);
  background: var(--card);
  border-left: 1px solid var(--border); border-top: 1px solid var(--border);
}

.cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }

.cal-title { font-family: var(--serif); font-weight: 600; font-size: 19px; }

.cal-nav {
  width: 32px; height: 32px; border-radius: 50%;
  border: 1px solid var(--border); background: transparent;
  color: var(--accent); font-size: 20px; line-height: 1;
  cursor: pointer;
}
.cal-nav:hover { border-color: var(--accent); }
.cal-nav:disabled { opacity: 0.3; cursor: default; }

.cal-week {
  display: grid; grid-template-columns: repeat(7, 1fr);
  font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--muted-2); text-align: center; margin-bottom: 4px;
}

.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); }

.cal-grid button {
  height: 36px; border: none; background: transparent; border-radius: 50%;
  font-family: var(--sans); font-size: 14px; color: var(--ink);
  cursor: pointer;
  font-variant-numeric: lining-nums tabular-nums;
}
.cal-grid button:hover { background: var(--bg-soft); }
.cal-grid button.is-out { color: var(--muted-2); opacity: 0.45; }
.cal-grid button.is-sel { background: var(--accent); color: var(--on-accent); font-weight: 700; }
.cal-grid button:disabled { color: var(--muted-2); opacity: 0.25; cursor: default; background: transparent; }

.cal-foot { text-align: center; padding: 8px 0 2px; }
.cal-hint { font-family: var(--hand); font-size: 16px; color: var(--muted-2); }

.hero .sub { color: var(--muted); max-width: 46ch; font-size: 17px; }

/* --- waitlist form --- */

.notify { max-width: 460px; }

.notify-form { display: flex; gap: 12px; }

.notify-form input[type="email"] {
  flex: 1; min-width: 0;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 14px 16px;
  font-family: var(--sans); font-size: 15px; color: var(--ink);
}
.notify-form input[type="email"]::placeholder { color: var(--muted-2); }
.notify-form input[type="email"]:focus { outline: none; border-color: var(--accent); }

.btn {
  background: var(--accent); color: var(--on-accent);
  border: none; border-radius: 8px;
  padding: 15px 26px;
  font-family: var(--sans); font-weight: 600; font-size: 15px;
  white-space: nowrap; cursor: pointer;
  transition: background 0.2s ease, transform 0.15s ease;
}
.btn:hover { background: var(--accent-deep); }
.btn:active { transform: scale(0.98); }
.btn:disabled { opacity: 0.55; cursor: default; }

.notify-msg { min-height: 1.4em; margin-top: 10px; font-size: 14.5px; color: var(--muted); }
.notify-msg.is-ok { color: var(--accent); }
.notify-msg.is-err { color: #a05545; }
[data-theme="dark"] .notify-msg.is-err { color: #d98b76; }

/* honeypot — off-screen, never display:none (some bots skip hidden fields) */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* --- hero art: crown sways, trunk stays (app's TreeView §1.15 on the web) --- */

.hero-art { position: relative; display: flex; justify-content: center; align-items: flex-end; }

.sway { position: relative; width: 100%; max-width: 420px; margin-bottom: -6px; }
.sway img { width: 100%; height: auto; }

.sway-trunk { clip-path: inset(50% 0 0 0); }
.sway-crown {
  position: absolute; inset: 0;
  clip-path: inset(0 0 46% 0);           /* 4% overlap hides the seam */
  transform-origin: 50% 52%;              /* pivot ON the split line */
  animation: crown-sway 3.6s ease-in-out infinite alternate;
}

@keyframes crown-sway {
  from { transform: rotate(-1.4deg); }
  to   { transform: rotate(1.4deg); }
}

/* birch-style whole-tree sway for the scrubber stage art */
.windsway {
  transform-origin: 50% 100%;
  animation: wind-sway 5s ease-in-out infinite alternate;
}
@keyframes wind-sway {
  from { transform: rotate(-1.1deg); }
  to   { transform: rotate(1.1deg); }
}

.horizon {
  border-top: 1.5px solid var(--line);
  display: flex; justify-content: space-between; gap: 12px;
  padding: 14px 4px 26px;
  font-family: var(--hand); font-size: 17px; color: var(--muted-2);
}

/* ---------- how it grows ---------- */

.grows { padding: 84px 0 30px; }

.scrub {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 34px 34px 28px;
  margin-bottom: 54px;
  display: grid;
  grid-template-columns: minmax(200px, 300px) 1fr;
  grid-template-areas: "stage meta" "stage slider" "stage hint";
  column-gap: 40px;
  align-items: center;
}

.scrub-stage { grid-area: stage; display: flex; align-items: flex-end; justify-content: center; min-height: 300px; }
.scrub-stage img { max-height: 300px; width: auto; max-width: 100%; transition: opacity 0.25s ease; }

.scrub-meta { grid-area: meta; display: flex; align-items: baseline; gap: 18px; flex-wrap: wrap; padding-bottom: 8px; }

.scrub-day {
  font-family: var(--serif); font-size: 54px; font-weight: 500; line-height: 1;
  font-variant-numeric: lining-nums tabular-nums;
  font-feature-settings: "lnum" 1, "tnum" 1;
}
.scrub-day em { font-style: italic; font-size: 24px; color: var(--accent); }

.scrub-name { font-family: var(--hand); font-size: 24px; color: var(--muted-2); }

#scrub {
  grid-area: slider;
  width: 100%; margin: 14px 0 6px;
  appearance: none; -webkit-appearance: none;
  height: 4px; border-radius: 2px;
  background: linear-gradient(to right, var(--accent) 0%, var(--accent) var(--fill, 90%), var(--border) var(--fill, 90%));
  outline: none;
}
#scrub::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 26px; height: 26px; border-radius: 50%;
  background: var(--card); border: 2px solid var(--accent);
  cursor: grab; box-shadow: 0 1px 4px var(--shadow);
}
#scrub::-moz-range-thumb {
  width: 24px; height: 24px; border-radius: 50%;
  background: var(--card); border: 2px solid var(--accent); cursor: grab;
}

.scrub-hint { grid-area: hint; font-family: var(--hand); font-size: 17px; color: var(--muted-2); }

.stage-track {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 18px;
  align-items: end;
  border-top: 1.5px solid var(--line);
  padding-top: 26px;
}

.stage { text-align: center; }
.stage img { margin: 0 auto 10px; max-height: 120px; width: auto; }
.stage .tick { font-family: var(--hand); font-size: 16px; color: var(--muted-2); display: block; }
.stage h3 { font-family: var(--serif); font-weight: 600; font-size: 19px; }

/* ---------- features ---------- */

#features { padding: 84px 0 40px; }

.feature-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 26px;
}

.feature {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 26px 24px 24px;
}

.feature img { height: 84px; width: auto; margin-bottom: 14px; }

.feature h3 { font-family: var(--serif); font-weight: 600; font-size: 21px; margin-bottom: 8px; }
.feature p { font-size: 15px; color: var(--muted); line-height: 1.55; }

/* ---------- screenshots ---------- */

#screens { padding: 60px 0 30px; }

.shots-track {
  display: flex; gap: 20px;
  overflow-x: auto;
  padding: 6px 4px 22px;
  scroll-snap-type: x mandatory;
}
.shots-track::-webkit-scrollbar { height: 8px; }
.shots-track::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }

.shot { flex: 0 0 auto; scroll-snap-align: start; }
.shot img {
  height: 480px; width: auto;
  border-radius: 22px;
  border: 1px solid var(--border);
  box-shadow: 0 10px 30px var(--shadow);
}

/* ---------- coming soon ---------- */

.coming { padding: 40px 0 60px; text-align: center; }
.coming .eyebrow { margin-bottom: 14px; }

.teaser {
  display: flex; justify-content: center; flex-wrap: wrap; gap: 14px;
  font-family: var(--serif); font-size: clamp(20px, 2.6vw, 27px); color: var(--ink);
}
.teaser .dot { color: var(--accent); }

/* ---------- closing waitlist ---------- */

.closing {
  border-top: 1.5px solid var(--line);
  padding: 84px 0 90px;
  text-align: center;
  background: radial-gradient(ellipse 50% 60% at 50% 100%, var(--glow-a), transparent 75%);
}

.closing h2 { margin-bottom: 12px; }
.closing-sub { color: var(--muted); max-width: 52ch; margin: 0 auto 30px; }

.notify-center { margin: 0 auto; }

/* ---------- footer ---------- */

.site-footer { border-top: 1.5px solid var(--line); padding: 30px 0 44px; }

.footer-row { display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap; }

.footer-links { display: flex; gap: 26px; }
.footer-links a { color: var(--muted); text-decoration: none; font-size: 15px; }
.footer-links a:hover { color: var(--accent); }

.footer-note { color: var(--muted-2); font-size: 14.5px; }

/* ---------- reveals ---------- */

.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ---------- responsive ---------- */

@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-art { order: -1; padding-top: 8px; }
  .sway { max-width: 300px; }
  .hero-copy { padding-bottom: 40px; }
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
  .stage-track { grid-template-columns: repeat(3, 1fr); row-gap: 30px; }
  .scrub { grid-template-columns: 1fr; grid-template-areas: "stage" "meta" "slider" "hint"; row-gap: 8px; }
  .scrub-stage { min-height: 220px; }
  .scrub-stage img { max-height: 220px; }
  .shot img { height: 380px; }
}

@media (max-width: 560px) {
  body { font-size: 16px; }
  .feature-grid { grid-template-columns: 1fr; }
  .stage-track { grid-template-columns: repeat(3, 1fr); }
  .hide-s { display: none; }
  .notify-form { flex-direction: column; }
  .btn { width: 100%; }
  .shot img { height: 320px; }
  .horizon { font-size: 15px; }
  .cal { left: 0; transform: none; }
  .cal::before { left: 40px; }
}

/* ---------- reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .motes i { animation: none; opacity: 0; }
  .sway-crown, .windsway { animation: none; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .scrub-stage img { transition: none; }
}
