/* ============================================================
   Florithic — v2
   One screen. No scrolling. Figtree throughout.

   The root system is the subject; the copy annotates it, and the
   product markers grow out of the roots themselves.
   ============================================================ */

/* ── Figtree — the whole type system ── */
@font-face {
  font-family: "Figtree";
  src: url("../assets/fonts/figtree-light.woff2") format("woff2");
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Figtree";
  src: url("../assets/fonts/figtree-regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Figtree";
  src: url("../assets/fonts/figtree-medium.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

:root {
  --font-sans: "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif;

  /* base — deep indigo / near-black */
  --bg:        #080810;

  /* text */
  --ink:       #ececf6;
  --ink-soft:  #a7a7c2;
  --ink-mute:  #6d6d8a;

  /* the "alive" signal — bioluminescent verdant */
  --signal:    #7fe6c0;
  --signal-dim:#4bb697;

  /* Tiva's identity — deep indigo. The other products' colours live in
     js/main.js (PRODUCTS), where the canvas draws their signals. */
  --tiva:      #7d7cf5;

  --pad: clamp(1.4rem, 5vw, 4rem);
  --ease: cubic-bezier(.22, .61, .36, 1);
}

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

html, body { height: 100%; overflow: hidden; }
html { -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
  font-weight: 300;
  letter-spacing: 0.004em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  position: relative;
}

/* radial vignette + faint atmospheric wash */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(120% 80% at 50% -10%, rgba(60, 60, 120, 0.20), transparent 60%),
    radial-gradient(90% 70% at 85% 110%, rgba(40, 90, 80, 0.14), transparent 55%);
  pointer-events: none;
  z-index: -3;
}

/* living root canvas */
#roots {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -2;
  pointer-events: none;
}

/* very subtle film grain to kill banding & add texture */
.grain {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

::selection { background: rgba(127, 230, 192, 0.22); color: #fff; }

a { color: inherit; text-decoration: none; }

/* ─────────────────  entrance  ───────────────── */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 1s var(--ease), transform 1s var(--ease);
  transition-delay: calc(var(--d, 0) * 120ms + 200ms);
}
.reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .brand__mark .node-seed { animation: none !important; }
  .eco-marker { transition: none; }
}

/* ─────────────────  NAV  ───────────────── */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.35rem var(--pad);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 500;
  font-size: 1.12rem;
  letter-spacing: 0.005em;
}
.brand__mark { color: var(--signal); flex: none; }
.brand__mark .node-seed { transform-origin: 12px 7.5px; animation: seedPulse 4.5s var(--ease) infinite; }
@keyframes seedPulse {
  0%, 100% { opacity: .85; }
  50% { opacity: .5; }
}
.nav__contact {
  font-size: 0.88rem;
  color: var(--ink-mute);
  transition: color .35s var(--ease);
}
.nav__contact:hover { color: var(--signal); }

/* ─────────────────  HERO — the single screen  ───────────────── */
.hero {
  position: relative;
  height: 100vh;
  height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;   /* copy settles toward the lower third */
  align-items: center;
  padding: 6rem var(--pad) clamp(5rem, 14vh, 8rem);
  text-align: center;
}
/* the root canopy fades into calm ground so the caption stays legible */
.hero::before {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 44%;
  background: linear-gradient(to top, var(--bg) 6%, rgba(8, 8, 16, 0.5) 42%, transparent);
  pointer-events: none;
}
.hero__inner {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.eyebrow {
  font-size: 0.72rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--signal-dim);
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.7rem;
}
.eyebrow::before {
  content: "";
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--signal);
  box-shadow: 0 0 10px var(--signal);
  flex: none;
}

.hero__title {
  font-weight: 400;
  font-size: clamp(1.05rem, 2.5vw, 1.9rem);
  line-height: 1.3;
  letter-spacing: -0.003em;
  margin: 1.05rem 0 0;
  white-space: nowrap;   /* one complete thought, on one line */
}
.hero__lede {
  color: var(--ink-soft);
  font-size: clamp(0.97rem, 1.15vw, 1.06rem);
  line-height: 1.62;
  max-width: 32rem;
  margin-top: 1rem;
  text-wrap: balance;
}
@media (max-width: 620px) {
  .hero__title { white-space: normal; font-size: clamp(1.35rem, 6vw, 1.65rem); max-width: 18ch; }
}

/* ─────────────────  PRODUCT MARKERS (roots → products)  ───────────────── */
/* An overlay pinned to the root anchors. Positions are set in JS. */
.eco-layer {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  display: none;
  will-change: transform;
}
/* Labels sit beside each product's signal; the canvas draws the signal itself. */
.eco-marker {
  position: absolute;
  transform: translate(-100%, -50%);
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding-right: 0.9rem;   /* clearance for the canvas signal at the anchor */
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity 1.2s var(--ease);
}
.eco-marker.is-grown { opacity: 1; }
.eco-layer[data-active="true"] .eco-marker { pointer-events: auto; }

.eco-note {
  font-size: 0.7rem;
  letter-spacing: 0.01em;
  color: var(--ink-mute);
  max-width: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-width 0.55s var(--ease), opacity 0.4s var(--ease);
}
.eco-label {
  font-weight: 500;
  font-size: 0.8rem;
  letter-spacing: 0.015em;
  color: var(--ink-soft);
  transition: color 0.4s var(--ease);
}

/* Tiva is established — full-strength, carrying its indigo identity. */
.eco-marker--tiva .eco-label { color: color-mix(in srgb, var(--tiva) 58%, var(--ink)); }

.eco-marker:hover .eco-note,
.eco-marker:focus-visible .eco-note { max-width: 11rem; opacity: 1; }
.eco-marker.is-grown:hover { opacity: 1; }
.eco-marker:hover .eco-label { color: var(--ink); }

/* ─────────────────  FOOTER  ───────────────── */
.footer {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 40;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.5rem;
  justify-content: space-between;
  padding: 1.35rem var(--pad);
  font-size: 0.8rem;
  color: var(--ink-mute);
}
@media (max-width: 620px) {
  .footer__tagline { display: none; }
}
