/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
img, svg { display: block; max-width: 100%; }
ul { list-style: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
button:focus-visible { outline: 1px solid var(--accent); outline-offset: 3px; }

/* ── Custom Properties ── */
:root {
  --bg:        #18160f;          /* default (autumn) — warm dark earth */
  --bg-tint:   #18160f;          /* season-specific background tint */
  --fg:        #f0ede6;
  --fg-dim:    rgba(240, 237, 230, 0.5);
  --accent:    #c8722a;          /* autumn default */
  --border:    rgba(240, 237, 230, 0.12);
  --font-edit: 'Editorial New', Georgia, serif;
  --font-mono: 'Courier New', Courier, monospace;
  --nav-h:     56px;
  --pad-x:     clamp(1.25rem, 5vw, 4rem);
  --max-w:     1320px;
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
}

body {
  font-family: var(--font-edit);
  background: var(--bg-tint);
  color: var(--fg);
  overflow-x: hidden;
  transition: background 900ms cubic-bezier(0.16, 1, 0.3, 1),
              color 600ms ease;
}

/* ── Typography ── */
h1, h2, h3 { font-family: var(--font-edit); line-height: 1; font-weight: 400; }

a { color: inherit; text-decoration: none; }
a:hover { opacity: 0.7; }

::selection { background: var(--accent); color: var(--bg); }

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 3px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--accent); }

/* ── Loader ── */
#loader {
  position: fixed;
  inset: 0;
  background: var(--bg);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}
#loader.done {
  opacity: 0;
  transition: opacity 700ms ease;
  pointer-events: none;
}

.loader-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2.2rem;
}

/* ── Seedling SVG ── */
.loader-sprout {
  width: clamp(40px, 7vw, 64px);
  color: var(--accent);
  overflow: visible;
}

/* Initial hidden states (GSAP will animate from here) */
.sprout-seed {
  transform-box: fill-box;
  transform-origin: center;
  transform: scale(0);
}
.sprout-stem {
  /* full stem length = 58−8 = 50 units */
  stroke-dasharray: 50;
  stroke-dashoffset: 50;
}
.sprout-leaf {
  transform-box: fill-box;
  transform-origin: right center;   /* attach point is the right end of each leaf */
  transform: scale(0);
  opacity: 0;
}
.sprout-leaf--l { transform-origin: right center; }
.sprout-leaf--r { transform-origin: left center; }
.sprout-leaf--c { transform-origin: left bottom; }

/* ── Label ── */
.loader-label {
  font-family: var(--font-edit);
  font-size: clamp(0.85rem, 2vw, 1.1rem);
  font-weight: 300;
  font-style: italic;
  letter-spacing: 0.18em;
  color: var(--fg-dim);
  opacity: 0;
  transform: translateY(10px);
}

/* ── Utilities ── */
.u-upper { text-transform: uppercase; }
.u-mono  { font-family: var(--font-mono); }
.u-dim   { color: var(--fg-dim); }
.u-accent { color: var(--accent); }

/* ── Reduced motion ── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
