/* NanoGreens v6 — light editorial (Will’s brand greens/blues) */

:root {
  --bg: #f7faf7;
  --bg-elev: #eef6ee;
  --ink: #1a2418;
  --ink-dim: #3d4a3a;
  --muted: #6a7566;
  /* William Brown brand accents */
  --leaf: #b8dca5;
  --leaf-deep: #b8dca5;
  --leaf-hover: color-mix(in srgb, #b8dca5 78%, #3a5c32);
  --leaf-ink: color-mix(in srgb, #b8dca5 35%, #1a2418);
  --flash: #b8dca5;
  --sky: #defdfe;
  --sky-ink: color-mix(in srgb, #defdfe 28%, #1a4038);
  --indigo: #7a8fb0;
  --rule: 1px solid rgba(26, 36, 24, 0.12);
  --rule-strong: 1px solid rgba(26, 36, 24, 0.2);
  --shadow: 0 20px 50px rgba(26, 36, 24, 0.08);
  --hero-veil: linear-gradient(
    105deg,
    rgba(11, 12, 10, 0.88) 0%,
    rgba(11, 12, 10, 0.62) 40%,
    rgba(11, 12, 10, 0.22) 68%,
    rgba(11, 12, 10, 0.08) 100%
  );
  --noise: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.55'/%3E%3C/svg%3E");
  --font-display: "Shippori Mincho", "Noto Serif JP", "Iowan Old Style", serif;
  --font-sans: "IBM Plex Sans", "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, monospace;
  --max: 1120px;
  --pad: clamp(1.25rem, 4vw, 2.5rem);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  color-scheme: light;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.6;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  position: relative;
  isolation: isolate;
  background-color: var(--bg);
  background-image:
    radial-gradient(ellipse 90% 55% at 12% -8%, color-mix(in srgb, #b8dca5 55%, transparent), transparent 55%),
    radial-gradient(ellipse 70% 45% at 92% 18%, color-mix(in srgb, #defdfe 70%, transparent), transparent 50%),
    radial-gradient(ellipse 60% 40% at 70% 92%, color-mix(in srgb, #b8dca5 35%, transparent), transparent 55%),
    radial-gradient(ellipse 50% 35% at 8% 78%, color-mix(in srgb, #defdfe 45%, transparent), transparent 50%),
    linear-gradient(180deg, #fbfefb 0%, #f7faf7 42%, #f3f8f4 100%);
  background-attachment: fixed;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.12;
  background-image: var(--noise);
  background-repeat: repeat;
  background-size: 180px 180px;
  mix-blend-mode: multiply;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(ellipse 85% 70% at 50% 40%, transparent 50%, rgba(26, 36, 24, 0.04) 100%);
}

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

a {
  color: var(--sky-ink);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--leaf-ink);
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin: 0 0 0.6em;
}

p {
  margin: 0 0 1em;
}

p:last-child {
  margin-bottom: 0;
}

.container {
  width: min(100% - (var(--pad) * 2), var(--max));
  margin-inline: auto;
}

.skip {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--bg);
  color: var(--ink);
  padding: 0.75rem 1rem;
  z-index: 100;
}

.skip:focus {
  left: var(--pad);
  top: 0.75rem;
}

/* ——— Nav ——— */
.ng-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(16px) saturate(1.1);
  background:
    linear-gradient(180deg, rgba(251, 254, 251, 0.92), rgba(247, 250, 247, 0.86));
  border-bottom: var(--rule);
  box-shadow: inset 0 -1px 0 color-mix(in srgb, #b8dca5 35%, transparent);
}

.ng-nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 4.25rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--ink);
  text-decoration: none;
}

.brand:hover {
  color: var(--ink);
}

.brand-logo {
  display: block;
  height: clamp(2.15rem, 3.8vw, 2.75rem);
  width: auto;
  flex-shrink: 0;
}

.brand-mark {
  width: 2.1rem;
  height: 2.1rem;
  flex-shrink: 0;
}

.brand-name {
  font-family: var(--font-display);
  font-size: 1.35rem;
  letter-spacing: -0.03em;
  line-height: 1;
}

.brand-tag {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  line-height: 1.2;
}

.brand > .brand-tag {
  margin-top: 0.15rem;
}

.ng-nav-links {
  display: flex;
  align-items: center;
  gap: 1.35rem;
}

.ng-nav-links a {
  color: var(--ink-dim);
  text-decoration: none;
  font-size: 0.95rem;
}

.ng-nav-links a:hover,
.ng-nav-links a[aria-current="page"] {
  color: var(--ink);
}

.ng-nav-links a.nav-cta {
  color: #0c0e0b;
  background: var(--leaf-deep);
  padding: 0.55rem 0.95rem;
  border-radius: 2px;
  font-size: 0.82rem;
  font-weight: 600;
  white-space: nowrap;
}

.ng-nav-links a.nav-cta:hover {
  background: var(--leaf-hover);
  color: #0c0e0b;
}

.ng-nav-actions {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.nav-burger {
  appearance: none;
  border: var(--rule-strong);
  background: var(--bg-elev);
  color: var(--ink);
  width: 2.5rem;
  height: 2.5rem;
  display: none;
  place-items: center;
  cursor: pointer;
  border-radius: 2px;
  transition: background 0.2s var(--ease), border-color 0.2s var(--ease);
}

.nav-burger:hover {
  border-color: var(--leaf);
}

.nav-burger span {
  display: block;
  width: 1.05rem;
  height: 1.5px;
  background: currentColor;
  margin: 3px 0;
}

@media (max-width: 860px) {
  .nav-burger {
    display: inline-grid;
  }

  .ng-nav-links {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0.5rem var(--pad) 1rem;
    background: #fbfefb;
    border-bottom: var(--rule);
  }

  .ng-nav-links.is-open {
    display: flex;
  }

  .ng-nav-links a {
    padding: 0.85rem 0;
    border-bottom: var(--rule);
  }

  .ng-nav-links a.nav-cta {
    margin-top: 0.65rem;
    text-align: center;
    border-bottom: 0;
  }
}

/* ——— Buttons ——— */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.85rem 1.25rem;
  border-radius: 2px;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.2s var(--ease), background 0.2s var(--ease),
    color 0.2s var(--ease), border-color 0.2s var(--ease);
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: var(--leaf-deep);
  color: #0c0e0b;
}

.btn-primary:hover {
  background: var(--leaf-hover);
  color: #0c0e0b;
}

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: color-mix(in srgb, var(--ink) 28%, transparent);
}

.btn-ghost:hover {
  border-color: var(--leaf);
  color: var(--leaf);
  background: color-mix(in srgb, var(--leaf) 8%, transparent);
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}

/* ——— Hero ——— */
.hero {
  position: relative;
  min-height: min(92vh, 860px);
  display: grid;
  align-items: end;
  overflow: hidden;
  isolation: isolate;
}

.hero-media {
  position: absolute;
  inset: 0;
  z-index: -2;
}

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 40%;
  transform: scale(1.04);
  animation: hero-drift 18s var(--ease) infinite alternate;
}

@keyframes hero-drift {
  from {
    transform: scale(1.04) translate3d(0, 0, 0);
  }
  to {
    transform: scale(1.08) translate3d(-1.2%, -0.6%, 0);
  }
}

.hero-veil {
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--hero-veil);
}

.hero-inner {
  width: min(100% - (var(--pad) * 2), var(--max));
  margin: 0 auto;
  padding: clamp(5rem, 12vh, 8rem) 0 clamp(3rem, 8vh, 5rem);
  max-width: 38rem;
  animation: rise 0.9s var(--ease) both;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.hero-brand {
  font-family: var(--font-display);
  font-size: clamp(2.8rem, 7vw, 4.4rem);
  letter-spacing: -0.035em;
  line-height: 0.95;
  margin: 0 0 0.85rem;
  color: #f3f0e8;
}

.hero .btn-ghost {
  color: #f3f0e8;
  border-color: rgba(243, 240, 232, 0.35);
}

.hero .btn-ghost:hover {
  border-color: var(--leaf);
  color: var(--leaf);
}

.hero .btn-primary {
  background: var(--leaf-deep);
  color: #0b0c0a;
}

.hero-line {
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 2.4vw, 1.65rem);
  font-weight: 400;
  line-height: 1.35;
  color: #f3f0e8;
  margin: 0 0 0.85rem;
  max-width: 28ch;
}

.hero-support {
  color: #c5c7bc;
  font-size: 1.02rem;
  max-width: 36ch;
  margin-bottom: 1.5rem;
}

/* ——— Sections ——— */
.section {
  padding: clamp(3.5rem, 8vw, 6rem) 0;
  border-top: var(--rule);
  position: relative;
}

.section.accent-edge::before,
.section.band::after {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: linear-gradient(
    180deg,
    color-mix(in srgb, var(--leaf) 75%, transparent),
    color-mix(in srgb, var(--sky) 55%, transparent),
    color-mix(in srgb, var(--leaf) 40%, transparent)
  );
  pointer-events: none;
  z-index: 1;
}

.section-head {
  max-width: 38rem;
  margin-bottom: clamp(1.75rem, 4vw, 2.75rem);
  border-left: 2px solid color-mix(in srgb, var(--leaf) 55%, transparent);
  padding-left: 1rem;
}

.kicker {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--leaf-ink);
  margin: 0 0 0.85rem;
}

.section-head h2 {
  font-size: clamp(1.85rem, 3.5vw, 2.55rem);
  margin-bottom: 0.55rem;
}

.section-head p {
  color: var(--ink-dim);
  font-size: 1.05rem;
}

.prose {
  max-width: 42rem;
  color: var(--ink-dim);
  font-size: 1.05rem;
}

.prose strong {
  color: var(--ink);
  font-weight: 600;
}

.split {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: center;
}

@media (max-width: 860px) {
  .split {
    grid-template-columns: 1fr;
  }
}

.figure {
  margin: 0;
  position: relative;
  overflow: hidden;
  border-radius: 2px;
  background: var(--bg-elev);
  box-shadow: var(--shadow);
}

.figure img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.figure.portrait img {
  aspect-ratio: 3 / 4;
}

.figure.mark-panel {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(ellipse 70% 60% at 50% 40%, color-mix(in srgb, #b8dca5 55%, transparent), transparent 65%),
    radial-gradient(ellipse 50% 45% at 80% 85%, color-mix(in srgb, #defdfe 65%, transparent), transparent 60%),
    linear-gradient(160deg, #eef6ee 0%, #e4f0e6 55%, #def0e8 100%);
  display: grid;
  place-items: center;
  padding: clamp(1.5rem, 4vw, 2.5rem);
  min-height: 280px;
}

.figure.mark-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.28;
  background-image: var(--noise);
  background-size: 160px 160px;
  mix-blend-mode: soft-light;
}

.figure.mark-panel img {
  position: relative;
  z-index: 1;
  width: min(100%, 320px);
  aspect-ratio: auto;
  object-fit: contain;
}

.fact-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  background: color-mix(in srgb, var(--ink) 12%, transparent);
  border: var(--rule);
  margin-top: 0.5rem;
}

.fact {
  background:
    linear-gradient(180deg, #fbfefb, color-mix(in srgb, #defdfe 35%, #f7faf7));
  padding: 1.4rem 1.45rem 1.4rem 1.55rem;
  position: relative;
}

.fact::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.12;
  background-image: var(--noise);
  background-size: 140px 140px;
}

.fact dt {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--sky-ink);
  margin: 0 0 0.45rem;
}

.fact dd {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 2.4vw, 1.75rem);
  color: var(--ink);
  letter-spacing: -0.02em;
}

@media (max-width: 700px) {
  .fact-row {
    grid-template-columns: 1fr;
  }
}

.band {
  position: relative;
  border-block: var(--rule);
  background:
    radial-gradient(ellipse 80% 60% at 20% 0%, color-mix(in srgb, #b8dca5 45%, transparent), transparent 55%),
    radial-gradient(ellipse 60% 50% at 100% 100%, color-mix(in srgb, #defdfe 60%, transparent), transparent 50%),
    linear-gradient(180deg, #eef6ee, #e8f4ea);
}

.band::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.16;
  background-image: var(--noise);
  background-size: 170px 170px;
  mix-blend-mode: overlay;
}

.band > .container {
  position: relative;
  z-index: 1;
}

.cite {
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 2.6vw, 1.85rem);
  line-height: 1.4;
  color: var(--ink);
  max-width: 28rem;
  margin: 0;
}

.cite-attr {
  margin-top: 1.25rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ——— Forms ——— */
.form {
  display: grid;
  gap: 1rem;
  max-width: 34rem;
}

.field {
  display: grid;
  gap: 0.4rem;
}

.field label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.field input,
.field select,
.field textarea {
  appearance: none;
  width: 100%;
  border: var(--rule-strong);
  background: var(--bg);
  color: var(--ink);
  padding: 0.8rem 0.9rem;
  font: inherit;
  border-radius: 2px;
  transition: border-color 0.2s var(--ease);
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--leaf);
}

.field textarea {
  min-height: 8rem;
  resize: vertical;
}

.form-note {
  font-size: 0.88rem;
  color: var(--muted);
}

.form-status {
  display: none;
  padding: 0.9rem 1rem;
  border: var(--rule-strong);
  background: color-mix(in srgb, var(--leaf) 12%, var(--bg));
  color: var(--ink);
  font-size: 0.95rem;
}

.form-status.is-visible {
  display: block;
  animation: rise 0.45s var(--ease) both;
}

.form-status-error {
  background: color-mix(in srgb, #b44 10%, var(--bg));
  border-color: color-mix(in srgb, #b44 35%, var(--line));
}

/* ——— Page hero (inner) ——— */
.page-hero {
  padding: clamp(3rem, 8vw, 5rem) 0 clamp(2rem, 4vw, 3rem);
}

.page-hero h1 {
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  max-width: 16ch;
}

.page-hero p {
  max-width: 40rem;
  color: var(--ink-dim);
  font-size: 1.1rem;
}

/* ——— Species comparison (The Plant) ——— */
.species-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(1.25rem, 3vw, 2rem);
  align-items: stretch;
}

@media (max-width: 860px) {
  .species-grid {
    grid-template-columns: 1fr;
  }
}

.species-card {
  margin: 0;
  display: flex;
  flex-direction: column;
  border: var(--rule);
  background:
    linear-gradient(180deg, #fbfefb, color-mix(in srgb, #defdfe 30%, #f7faf7));
  box-shadow: var(--shadow);
  border-radius: 2px;
  overflow: hidden;
  position: relative;
}

.species-card::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.14;
  background-image: var(--noise);
  background-size: 160px 160px;
  mix-blend-mode: soft-light;
  z-index: 0;
}

.species-visual {
  position: relative;
  z-index: 1;
  background:
    radial-gradient(ellipse 70% 60% at 50% 40%, color-mix(in srgb, #b8dca5 50%, transparent), transparent 65%),
    radial-gradient(ellipse 45% 40% at 85% 80%, color-mix(in srgb, #defdfe 55%, transparent), transparent 55%),
    linear-gradient(160deg, #eef6ee 0%, #e4f0e8 100%);
  min-height: 220px;
  display: grid;
  place-items: center;
}

.species-visual img,
.species-visual svg {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  display: block;
}

.species-body {
  position: relative;
  z-index: 1;
  padding: clamp(1.25rem, 3vw, 1.75rem);
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  flex: 1;
}

.species-latin {
  font-family: var(--font-display);
  font-size: clamp(1.45rem, 2.6vw, 1.85rem);
  font-style: italic;
  letter-spacing: -0.02em;
  margin: 0;
  color: var(--ink);
}

.species-common {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin: -0.35rem 0 0;
}

.species-meta {
  display: grid;
  gap: 0.55rem;
  margin: 0.25rem 0 0;
  padding: 0;
  list-style: none;
}

.species-meta li {
  display: grid;
  grid-template-columns: 6.5rem 1fr;
  gap: 0.75rem;
  align-items: baseline;
  padding: 0.45rem 0;
  border-top: var(--rule);
  font-size: 0.95rem;
  color: var(--ink-dim);
}

.species-meta li:last-child {
  border-bottom: var(--rule);
}

.species-meta span {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--leaf);
}

.species-note {
  margin-top: 1.25rem;
  font-size: 0.88rem;
  color: var(--muted);
  max-width: 42rem;
}

.species-note code {
  font-family: var(--font-mono);
  font-size: 0.8em;
  color: var(--ink-dim);
}

/* ——— Footer ——— */
.ng-footer {
  border-top: var(--rule);
  padding: 2.5rem 0 2rem;
  margin-top: 1rem;
}

.ng-footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1.5rem;
  align-items: center;
}

.ng-footer-brand {
  display: flex;
  align-items: center;
  gap: 0.95rem;
}

.footer-seal {
  display: block;
  width: 4.75rem;
  height: 4.75rem;
  object-fit: contain;
  flex-shrink: 0;
}

.ng-footer .brand-name {
  font-size: 1.15rem;
}

.ng-footer-meta {
  color: var(--muted);
  font-size: 0.88rem;
}

.ng-footer-meta a {
  color: inherit;
  text-decoration: none;
}

.ng-footer-meta a:hover {
  color: var(--leaf);
}

/* ——— Reveal ——— */
.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

.reveal.is-in {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }

  .hero-media img {
    transform: none;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }

  body::before,
  .band::before,
  .figure.mark-panel::before,
  .fact::after {
    opacity: 0.08;
  }
}
