:root {
  --deep: #051c1a;
  --water: #0a2a27;
  --teal: #12403b;
  --line: rgba(220, 238, 228, .12);
  --text: #e6efe8;
  --muted: #a9bdb3;
  --leaf: #8fc77a;
  --leaf-ink: #0b2a1a;
  --coral: #e28a74;
  --radius: 18px;
  --serif: "Fraunces", Georgia, serif;
  --sans: "Inter", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--water);
  color: var(--text);
  font: 400 17px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; }
a { color: inherit; }

/* Fixed dark layer that fades in with scroll: "going deeper". */
.depth {
  position: fixed; inset: 0; z-index: -1;
  background: linear-gradient(180deg, #03110f, #020a09);
  opacity: 0;
  pointer-events: none;
}

/* NAV */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 20;
  display: flex; align-items: center; gap: 24px;
  padding: 14px clamp(16px, 4vw, 48px);
  transition: background-color .4s ease;
}
.nav.is-solid { background: rgba(5, 28, 26, .94); box-shadow: 0 1px 0 var(--line); }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; margin-right: auto; }
.brand img { width: 40px; height: 40px; border-radius: 50%; }
.brand span { font: 500 16px/1.1 var(--serif); }
.brand small { display: block; font: 500 10px/1.4 var(--sans); letter-spacing: .22em; text-transform: uppercase; color: var(--muted); }
.nav-links { display: flex; gap: 26px; }
.nav-links a { text-decoration: none; font-size: 15px; color: var(--muted); transition: color .2s; }
.nav-links a:hover { color: var(--text); }

/* BUTTONS */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 14px 24px; border-radius: 999px;
  background: var(--leaf); color: var(--leaf-ink);
  font: 600 15px/1 var(--sans); text-decoration: none;
  transition: transform .25s ease, background-color .25s ease;
}
.btn:hover { transform: translateY(-2px); background: #a2d38e; }
.btn-ghost { background: transparent; color: var(--text); box-shadow: inset 0 0 0 1px rgba(230, 239, 232, .4); }
.btn-ghost:hover { background: rgba(230, 239, 232, .08); }
.btn-small { padding: 10px 18px; font-size: 14px; }

/* HERO */
.hero {
  position: relative; min-height: 100svh; overflow: hidden;
  display: flex; align-items: flex-end;
  padding: 120px clamp(16px, 6vw, 88px) clamp(64px, 12vh, 120px);
}
.hero-media { position: absolute; inset: -6% 0 0; }
.hero-img { width: 100%; height: 100%; object-fit: cover; will-change: transform; }
.hero::after {
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(5, 28, 26, .55) 0%, rgba(5, 28, 26, .1) 30%, rgba(5, 28, 26, .35) 60%, var(--water) 100%),
    linear-gradient(90deg, rgba(5, 28, 26, .7) 0%, rgba(5, 28, 26, 0) 60%);
}
.hero-copy { position: relative; z-index: 3; max-width: 620px; }
h1, h2, h3 { font-family: var(--serif); font-weight: 400; margin: 0; }
h1 { font-size: clamp(40px, 5.6vw, 72px); line-height: 1.05; letter-spacing: -.01em; }
h2 { font-size: clamp(30px, 3.6vw, 46px); line-height: 1.12; max-width: 18ch; }
h3 { font-size: 21px; line-height: 1.3; font-weight: 500; }
.eyebrow { margin: 0 0 14px; font-size: 13px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--leaf); }
.lead { font-size: 18px; color: #cfddd5; max-width: 52ch; margin: 20px 0 0; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }

/* Light rays: soft beams that sway very slowly (transform + opacity only). */
.rays { position: absolute; inset: -20% 0 0; z-index: 2; pointer-events: none; }
.rays i {
  position: absolute; top: 0; width: 14vw; height: 120%;
  background: linear-gradient(180deg, rgba(210, 255, 236, .22), rgba(210, 255, 236, 0) 75%);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 50%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 50%, transparent);
  transform-origin: 50% 0;
  animation: sway 18s ease-in-out infinite alternate;
}
.rays i:nth-child(1) { left: 18%; --r: 14deg; animation-duration: 21s; }
.rays i:nth-child(2) { left: 40%; width: 8vw; --r: 10deg; animation-duration: 17s; animation-delay: -6s; }
.rays i:nth-child(3) { left: 58%; width: 18vw; --r: 16deg; animation-duration: 24s; animation-delay: -10s; }
.rays i:nth-child(4) { left: 78%; width: 6vw; --r: 12deg; animation-duration: 19s; animation-delay: -3s; }
@keyframes sway {
  0%   { transform: rotate(var(--r, 12deg)) translateX(0); opacity: .45; }
  50%  { opacity: .9; }
  100% { transform: rotate(calc(var(--r, 12deg) - 5deg)) translateX(3vw); opacity: .55; }
}

.bubbles { position: absolute; inset: 0; z-index: 2; pointer-events: none; }
.bubble {
  position: absolute; bottom: -20px; border-radius: 50%;
  border: 1px solid rgba(230, 255, 245, .55);
  background: radial-gradient(circle at 35% 30%, rgba(255, 255, 255, .5), rgba(255, 255, 255, 0) 60%);
  animation: rise linear infinite;
  opacity: 0;
}
@keyframes rise {
  0%   { transform: translate3d(0, 0, 0); opacity: 0; }
  10%  { opacity: .8; }
  50%  { transform: translate3d(12px, -50vh, 0); }
  90%  { opacity: .6; }
  100% { transform: translate3d(-6px, -100vh, 0); opacity: 0; }
}
.is-paused .rays i, .is-paused .bubble, .is-paused .scroll-cue span { animation-play-state: paused; }

.scroll-cue { position: absolute; z-index: 3; left: 50%; bottom: 26px; width: 24px; height: 38px; margin-left: -12px; border-radius: 12px; box-shadow: inset 0 0 0 1px rgba(230, 239, 232, .45); }
.scroll-cue span { position: absolute; left: 50%; top: 8px; width: 4px; height: 8px; margin-left: -2px; border-radius: 2px; background: var(--text); animation: cue 2.4s ease-in-out infinite; }
@keyframes cue { 0% { transform: translateY(0); opacity: 1; } 70% { transform: translateY(12px); opacity: 0; } 100% { opacity: 0; } }

/* SECTIONS */
.section { position: relative; padding: clamp(80px, 12vw, 140px) 0; }
.wrap { width: min(1180px, 100% - 2 * clamp(16px, 5vw, 48px)); margin: 0 auto; }
.section-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; flex-wrap: wrap; }

.cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-top: 48px; }
.card {
  padding: 28px 24px 30px; border-radius: var(--radius);
  background: rgba(230, 239, 232, .04); box-shadow: inset 0 0 0 1px var(--line);
  transition: transform .35s ease, background-color .35s ease;
}
.card:hover { transform: translateY(-4px); background: rgba(230, 239, 232, .07); }
.card-num { display: block; font: 500 13px var(--sans); color: var(--leaf); margin-bottom: 40px; letter-spacing: .1em; }
.card p { color: var(--muted); margin: 10px 0 0; font-size: 15.5px; }

/* PLANTS */
.legend { display: flex; gap: 18px; color: var(--muted); font-size: 14px; }
.legend span { display: flex; align-items: center; gap: 8px; }
.dots { display: inline-flex; gap: 4px; }
.dots { width: 34px; height: 8px; background:
  radial-gradient(circle 4px at 4px 4px, var(--c1) 98%, transparent),
  radial-gradient(circle 4px at 17px 4px, var(--c2) 98%, transparent),
  radial-gradient(circle 4px at 30px 4px, var(--c3) 98%, transparent);
  --c1: var(--leaf); --c2: rgba(230,239,232,.2); --c3: rgba(230,239,232,.2);
}
.dots[data-level="2"] { --c2: var(--leaf); }
.dots[data-level="3"] { --c2: var(--leaf); --c3: var(--coral); }

.filters { display: flex; flex-wrap: wrap; gap: 8px; margin: 34px 0 26px; }
.chip {
  font: 500 14px var(--sans); color: var(--muted); cursor: pointer;
  padding: 9px 16px; border-radius: 999px; border: 0;
  background: transparent; box-shadow: inset 0 0 0 1px var(--line);
  transition: background-color .25s, color .25s;
}
.chip:hover { color: var(--text); }
.chip.is-on { background: var(--text); color: var(--deep); }

.plants { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.plant { border-radius: var(--radius); overflow: hidden; background: rgba(230, 239, 232, .04); box-shadow: inset 0 0 0 1px var(--line); transition: opacity .4s ease, transform .4s ease; }
.plant.is-hidden { display: none; }
.plant-photo { aspect-ratio: 1; overflow: hidden; }
.plant-photo img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s ease; }
.plant:hover .plant-photo img { transform: scale(1.05); }
.plant-body { padding: 16px 18px 18px; }
.plant-body h3 { font-size: 18px; }
.plant-meta { display: flex; justify-content: space-between; align-items: center; margin-top: 10px; font-size: 13.5px; color: var(--muted); }
.plant-meta a { color: var(--leaf); text-decoration: none; font-weight: 600; }
.plant-meta a:hover { text-decoration: underline; }
.note { font-size: 13px; color: var(--muted); margin: 22px 0 0; opacity: .85; }

/* FERTILIZERS */
.split { display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(32px, 6vw, 80px); align-items: center; }
.split-media { margin: 0; border-radius: var(--radius); overflow: hidden; }
.split-media img { width: 100%; aspect-ratio: 4 / 3.4; object-fit: cover; }
.products { list-style: none; padding: 0; margin: 30px 0 0; }
.products li { padding: 18px 0; border-top: 1px solid var(--line); }
.products li:last-child { border-bottom: 1px solid var(--line); }
.products p { margin: 4px 0 0; color: var(--muted); font-size: 15.5px; }
.split-copy .btn { margin-top: 26px; }

/* GALLERY */
.mosaic { display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: 220px; gap: 14px; margin-top: 44px; }
.mosaic figure { margin: 0; border-radius: var(--radius); overflow: hidden; }
.mosaic img { width: 100%; height: 100%; object-fit: cover; transition: transform 1s ease; }
.mosaic figure:hover img { transform: scale(1.04); }
.m-wide { grid-column: span 4; grid-row: span 2; }

/* VISIT */
.visit { display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(32px, 6vw, 80px); align-items: start; }
.visit .btn { margin-top: 28px; }
.info { margin: 0; display: grid; gap: 0; }
.info div { padding: 18px 0; border-top: 1px solid var(--line); }
.info div:last-child { border-bottom: 1px solid var(--line); }
.info dt { font-size: 12.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.info dd { margin: 4px 0 0; font-size: 17px; }
.info a { text-decoration: none; }

.footer { padding: 40px clamp(16px, 5vw, 48px) 90px; text-align: center; color: var(--muted); border-top: 1px solid var(--line); }
.footer p { margin: 4px 0; }
.small { font-size: 13px; }

.wa-float {
  position: fixed; right: 20px; bottom: 20px; z-index: 30;
  width: 54px; height: 54px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--leaf); color: var(--leaf-ink);
  box-shadow: 0 8px 24px rgba(0, 0, 0, .35);
  transition: transform .25s ease;
}
.wa-float:hover { transform: translateY(-3px); }

/* Reveal on scroll: gentle rise. */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .9s ease, transform .9s cubic-bezier(.2, .7, .2, 1); }
.reveal.in { opacity: 1; transform: none; }

/* PHONE */
@media (max-width: 960px) {
  .nav-links { display: none; }
  .cards, .plants { grid-template-columns: repeat(2, 1fr); }
  .split, .visit { grid-template-columns: 1fr; }
  .mosaic { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 160px; }
  .m-wide { grid-column: span 2; }
}
@media (max-width: 560px) {
  body { font-size: 16px; }
  .cards { grid-template-columns: 1fr; }
  .card-num { margin-bottom: 18px; }
  .plants { gap: 12px; }
  .plant-body { padding: 12px 12px 14px; }
  .plant-body h3 { font-size: 16px; }
  .plant-meta { flex-direction: column; align-items: flex-start; gap: 6px; }
  .legend { display: none; }
  .rays i { width: 26vw; }
  .brand span { font-size: 15px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .rays i, .bubble, .scroll-cue span { animation: none; }
  .bubble { display: none; }
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ---------- v2: richer motion ---------- */

/* TANK BUILD SCENE: tall section, sticky stage, layers switch on per step. */
.build { position: relative; height: 420vh; }
.build-sticky { position: sticky; top: 0; height: 100vh; height: 100svh; display: flex; align-items: center; overflow: hidden; padding-top: 64px; box-sizing: border-box; }
.build-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 28px clamp(32px, 5vw, 72px); align-items: center; }
.build-head { grid-column: 1 / -1; }
.tank { margin: 0; }
.tank-svg { width: 100%; height: auto; overflow: visible; }
.t-layer, .t-plant { transform-box: fill-box; transform-origin: 50% 100%; transition: opacity 1s ease, transform 1.2s cubic-bezier(.2, .7, .2, 1); }
.t-guides { opacity: 0; }
.t-sand, .t-stones { opacity: 0; transform: translateY(24px); }
.t-water { opacity: 0; transform: scaleY(0); }
.t-plant { opacity: 0; transform: scaleY(.1); transition-delay: var(--d, 0s); }
.t-lamp, .t-rays { opacity: 0; }
.t-fish { opacity: 0; transform: translateX(-140px); }
.build.s1 .t-guides { opacity: 1; }
.build.s2 .t-guides { opacity: 0; }
.build.s2 .t-sand, .build.s2 .t-stones { opacity: 1; transform: none; }
.build.s3 .t-water { opacity: 1; transform: none; }
.build.s3 .t-plant { opacity: 1; transform: none; }
.build.s4 .t-lamp { opacity: 1; }
.build.s4 .t-rays { opacity: 1; }
.build.s4 .t-fish { opacity: 1; transform: none; transition-duration: 1.4s, 2.4s; }
.t-swim { animation: swim 9s ease-in-out infinite alternate; animation-play-state: paused; }
.build.s4.in-view .t-swim { animation-play-state: running; }
@keyframes swim { 0% { transform: translate(0, 0); } 50% { transform: translate(60px, -8px); } 100% { transform: translate(110px, 6px); } }

.build-steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.bstep { display: flex; gap: 18px; padding: 18px 20px; border-radius: var(--radius); opacity: .38; transition: opacity .6s ease, background-color .6s ease; }
.bstep.is-on { opacity: 1; background: rgba(230, 239, 232, .05); }
.bstep > span { flex: none; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font: 500 17px var(--serif); color: var(--leaf); box-shadow: inset 0 0 0 1px rgba(143, 199, 122, .5); }
.bstep p { margin: 6px 0 0; color: var(--muted); font-size: 15.5px; }

/* HERO FISH */
.school { position: absolute; inset: 0; z-index: 2; pointer-events: none; }
.fish { position: absolute; left: 0; top: 0; width: 34px; height: 14px; will-change: transform; }
.fish svg { display: block; width: 100%; height: 100%; overflow: visible; }

/* SWAYING PLANTS at section edges */
.section > .wrap { position: relative; z-index: 1; }
.weeds { position: absolute; bottom: 0; width: 200px; height: 170px; pointer-events: none; opacity: .45; z-index: 0; }
.weeds .blade { position: absolute; bottom: 0; width: 30px; height: 100%; overflow: visible; }
.weeds-left { left: 0; }
.weeds-right { right: 0; transform: scaleX(-1); }
.blade { transform-origin: 50% 100%; animation: blade 8s ease-in-out infinite alternate; animation-play-state: paused; }
.weeds.on .blade { animation-play-state: running; }
@keyframes blade { from { transform: rotate(-3.5deg); } to { transform: rotate(4deg); } }

/* PLANT QUICK LOOK */
.plant-open { display: block; width: 100%; padding: 0; border: 0; background: none; cursor: pointer; color: inherit; text-align: left; font: inherit; }
.plant-open:focus-visible { outline: 2px solid var(--leaf); outline-offset: 2px; border-radius: var(--radius); }
.plant-hint { position: absolute; right: 10px; bottom: 10px; padding: 5px 10px; border-radius: 999px; font-size: 12px; background: rgba(5, 28, 26, .78); color: var(--text); opacity: 0; transform: translateY(6px); transition: opacity .3s, transform .3s; }
.plant-photo { position: relative; }
.plant:hover .plant-hint { opacity: 1; transform: none; }
.quick { border: 0; padding: 0; background: transparent; color: var(--text); width: min(880px, 100% - 32px); max-width: none; max-height: calc(100% - 32px); }
.quick::backdrop { background: rgba(2, 10, 9, .75); }
.quick-inner { position: relative; display: grid; grid-template-columns: 1fr 1fr; background: #0c2c28; border-radius: 22px; overflow: hidden; box-shadow: 0 30px 80px rgba(0, 0, 0, .5), inset 0 0 0 1px var(--line); opacity: 0; transform: translateY(18px) scale(.98); transition: opacity .45s ease, transform .55s cubic-bezier(.2, .7, .2, 1); }
.quick.show .quick-inner { opacity: 1; transform: none; }
.quick-photo img { width: 100%; height: 100%; aspect-ratio: 1; object-fit: cover; }
.quick-body { padding: 34px 30px 28px; }
.quick-body h3 { font-size: 30px; }
.quick-facts { margin: 20px 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.quick-facts div { padding: 12px; border-radius: 12px; background: rgba(230, 239, 232, .05); }
.quick-facts dt { font-size: 11.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.quick-facts dd { margin: 4px 0 0; font-size: 15px; }
.quick-body > p { color: #cfddd5; }
.quick-body .btn { margin-top: 8px; }
.quick-close { position: absolute; top: 12px; right: 12px; z-index: 2; width: 40px; height: 40px; border-radius: 50%; border: 0; cursor: pointer; font-size: 24px; line-height: 1; color: var(--text); background: rgba(5, 28, 26, .7); }
.quick-close:hover { background: rgba(5, 28, 26, .95); }

@media (max-width: 960px) {
  .build-grid { grid-template-columns: 1fr; gap: 18px; }
  .build-head h2 { font-size: 28px; }
  .build-head .eyebrow { margin-bottom: 8px; }
  /* Phone: one step at a time, cross-fading in the same spot. */
  .build-steps { display: grid; }
  .bstep { grid-area: 1 / 1; opacity: 0; }
  .bstep.is-on { opacity: 1; }
  .weeds { width: 130px; height: 110px; opacity: .35; }
  .quick-inner { grid-template-columns: 1fr; }
  .quick-photo img { aspect-ratio: 16 / 10; }
  .quick-body { padding: 22px 20px 20px; }
  .quick-body h3 { font-size: 24px; }
}

@media (prefers-reduced-motion: reduce) {
  .school, .weeds { display: none; }
  .t-swim { animation: none; }
  .t-layer, .t-plant, .bstep, .quick-inner { transition: none; }
}

/* Short laptop screens: keep the whole tank scene inside the window. */
@media (max-height: 760px) and (min-width: 961px) {
  .build-head .eyebrow { display: none; }
  .build-head h2 { font-size: 30px; max-width: none; }
  .tank-svg { max-height: calc(100vh - 230px); }
  .bstep { padding: 12px 16px; }
  .bstep p { font-size: 14.5px; }
}
