/* =========================================================
   Te Kāhui Rongoā — website styles
   Clean, sharp, editorial light look. Green accent, dark-green bands sparingly.
   Hairline borders over soft shadows; tight, confident typography; lots of air.
   All design tokens live in :root. Provisional brand hex, confirm from brand files.
   ========================================================= */

:root {
  /* ---- brand palette (real hex from the TKR logo suite; Tākawa still provisional) ---- */
  --ngahere:      #1C3213;   /* deep forest green: headings, dark bands, footer */
  --koromiko:     #598D3F;   /* accent green: buttons, links, accents */
  --koromiko-dark:#47732F;   /* hover / active */
  --takawa:       #E08A3C;   /* orange, sparingly (provisional, no brand hex yet) */
  --bone:         #FDFAE0;   /* brand cream */
  --white:        #FFFFFF;
  --ink:          #1F2A16;   /* body text on light (warm near-black green) */
  --ink-soft:     #5E6A52;   /* muted meta text */
  --line:         #E8E4D3;   /* hairline borders */
  --line-strong:  #D8D2BE;
  --bone-tint:    #F1F5EC;   /* faint green wash */

  /* ---- type ---- */
  --font: "Montserrat", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --display: "Space Grotesk", "Montserrat", system-ui, sans-serif;  /* headings */
  --measure: 60ch;

  /* ---- rhythm ---- */
  --maxw: 1140px;
  --gutter: clamp(1.25rem, 5vw, 3rem);
  --section-y: clamp(4rem, 9vw, 7.5rem);
  --radius: 0;      /* square corners throughout */
  --radius-sm: 0;
  --shadow-hover: 0 10px 30px rgba(23,61,48,.09);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--white);
  line-height: 1.65;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

h1, h2, h3, h4 {
  font-family: var(--display);
  color: var(--ngahere);
  line-height: 1.1;
  font-weight: 700;
  letter-spacing: -0.01em;
}

:focus-visible { outline: 2px solid var(--koromiko); outline-offset: 2px; }

/* ---------- layout helpers ---------- */
.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter); }
.section { padding: var(--section-y) 0; }
.section--bone { background: var(--bone); }
.narrow { max-width: var(--measure); }
.center { text-align: center; }
.center .narrow { margin-left: auto; margin-right: auto; }

.grid { display: grid; gap: clamp(1rem, 2vw, 1.5rem); }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 290px), 1fr)); }
.grid-5 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 170px), 1fr)); }

/* ---------- kicker + heading (te reo over English) ---------- */
.eyebrow {
  display: flex;
  align-items: center;
  gap: .7rem;
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .22em;
  color: var(--koromiko);
  margin-bottom: .9rem;
}
.eyebrow::before { content: ""; width: 26px; height: 2px; background: currentColor; flex: none; }
.center .eyebrow, .section-head.center .eyebrow { justify-content: center; }

/* ---------- bilingual heading: te reo at rest, English on hover ---------- */
/* <h2 class="section-head"><span class="bi"><span class="bi-mi">Te reo</span><span class="bi-en">English</span></span></h2> */
.bi {
  display: inline-grid;
  color: inherit;
  transition: color .22s ease;
}
.bi > .bi-mi, .bi > .bi-en { grid-area: 1 / 1; transition: opacity .22s ease; }
.bi > .bi-en { opacity: 0; }
.bi:hover > .bi-mi { opacity: 0; }
.bi:hover > .bi-en { opacity: 1; }

/* DEFAULT (option 1): seamless crossfade, English arrives in accent green. No block. */
.bi:hover { color: var(--koromiko-dark); }
.feature-band .bi:hover { color: #A7C7A9; }

/* Test variants (used on the style guide to choose the site-wide treatment). */
/* option 2: underline wipe */
.bi--underline { position: relative; }
.bi--underline::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -.14em; height: 2px;
  background: var(--koromiko); transform: scaleX(0); transform-origin: left;
  transition: transform .3s ease;
}
.bi--underline:hover::after { transform: scaleX(1); }
.feature-band .bi--underline::after { background: #A7C7A9; }
/* option 3: left accent rule */
.bi--rule { position: relative; }
.bi--rule::before {
  content: ""; position: absolute; left: -.55em; top: .12em; bottom: .12em; width: 3px;
  background: var(--koromiko); transform: scaleY(0); transform-origin: top;
  transition: transform .3s ease;
}
.bi--rule:hover::before { transform: scaleY(1); }
.feature-band .bi--rule::before { background: #A7C7A9; }
/* option 4: whisper tint (a hint of block, text stays green, not the old slab) */
.bi--tint { border-radius: var(--radius); transition: color .22s ease, background-color .22s ease, box-shadow .22s ease; }
.bi--tint:hover { color: var(--ngahere); background: var(--bone-tint); box-shadow: 0 0 0 .28em var(--bone-tint); }
.feature-band .bi--tint:hover { color: var(--bone); background: rgba(255,255,255,.08); box-shadow: 0 0 0 .28em rgba(255,255,255,.08); }

/* touch devices have no hover: show English as a subline so it stays bilingual */
@media (hover: none) {
  .bi { display: inline; }
  .bi > .bi-en { opacity: 1; display: block; font-size: .5em; font-weight: 600;
    color: var(--koromiko); letter-spacing: .02em; margin-top: .15em; }
}

.section-head { margin-bottom: 1.75rem; font-size: clamp(1.7rem, 3.6vw, 2.6rem); }
.lede { font-size: 1.2rem; color: var(--ink); line-height: 1.55; }
p { max-width: var(--measure); }
.center p, .band-statement { max-width: none; }
p + p { margin-top: 1rem; }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; gap: .5rem; font-weight: 600;
  font-size: .975rem; letter-spacing: .01em; padding: .8rem 1.5rem; border-radius: var(--radius);
  border: 1.5px solid transparent; cursor: pointer; transition: background .18s, color .18s, border-color .18s, transform .18s; }
.btn-primary { background: var(--koromiko); color: var(--white); }
.btn-primary:hover { background: var(--koromiko-dark); transform: translateY(-1px); }
.btn-secondary { background: transparent; color: var(--ngahere); border-color: var(--line-strong); }
.btn-secondary:hover { border-color: var(--koromiko); color: var(--koromiko); }
.btn-group { display: flex; flex-wrap: wrap; gap: .75rem; }
/* buttons on dark feature bands */
.feature-band .btn-primary { background: var(--bone); color: var(--ngahere); }
.feature-band .btn-primary:hover { background: var(--white); }
.feature-band .btn-secondary { color: var(--bone); border-color: rgba(246,242,234,.4); }
.feature-band .btn-secondary:hover { background: rgba(246,242,234,.08); border-color: var(--bone); }

/* ---------- links ---------- */
.link { color: var(--koromiko); font-weight: 600; display: inline-flex; align-items: center; gap: .3rem; }
.link:hover { color: var(--koromiko-dark); text-decoration: underline; text-underline-offset: 3px; }

/* ---------- feature band (the only dark surface) ---------- */
.feature-band { background: var(--ngahere); color: var(--bone); }
.feature-band h1, .feature-band h2, .feature-band h3 { color: var(--bone); }
.feature-band .eyebrow { color: #9FC3A6; }
.band-statement { font-family: var(--display); font-size: clamp(1.8rem, 4.2vw, 3rem); font-weight: 700;
  letter-spacing: -0.01em; line-height: 1.15; max-width: 20ch; margin: 0 auto; }

/* ---------- icon card ---------- */
.icon-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.75rem;
  transition: border-color .18s, box-shadow .18s, transform .18s;
}
.icon-card:hover { border-color: var(--koromiko); box-shadow: var(--shadow-hover); transform: translateY(-2px); }
.icon-card .ic { width: 32px; height: 32px; color: var(--koromiko); stroke-width: 1.6; margin-bottom: 1rem; }
.icon-card h3 { font-size: 1.15rem; margin-bottom: .5rem; }
.icon-card p { color: var(--ink-soft); font-size: .95rem; }

/* ---------- quote block (editorial, rules top + bottom) ---------- */
.quote-block {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: clamp(2.5rem, 6vw, 4.5rem) 0;
  text-align: center;
}
.quote-block .koru { width: 30px; height: 30px; color: var(--koromiko); margin: 0 auto 1.25rem; }
.quote-block blockquote {
  font-family: var(--display);
  font-size: clamp(1.5rem, 3.2vw, 2.25rem);
  font-weight: 600;
  color: var(--ngahere);
  line-height: 1.28;
  letter-spacing: -0.015em;
  max-width: 24ch;
  margin: 0 auto;
}
.quote-block cite { display: block; margin-top: 1.25rem; font-style: normal; font-size: .78rem;
  text-transform: uppercase; letter-spacing: .18em; color: var(--ink-soft); }

/* ---------- chips ---------- */
.chip-row { display: flex; flex-wrap: wrap; gap: .5rem; }
.chip { background: transparent; color: var(--ngahere); border: 1px solid var(--line-strong); border-radius: var(--radius);
  padding: .45rem .95rem; font-size: .85rem; font-weight: 600; transition: border-color .15s, color .15s, background .15s; }
.chip[role="button"]:hover { border-color: var(--koromiko); color: var(--koromiko); cursor: pointer; }
.chip.is-active { background: var(--koromiko); color: var(--white); border-color: var(--koromiko); cursor: pointer; }
.chip.is-active:hover { background: var(--ngahere); border-color: var(--ngahere); color: var(--bone); }

/* ---------- plant strip ---------- */
.plant-strip { display: flex; flex-wrap: wrap; justify-content: center; gap: clamp(1.5rem, 6vw, 3.5rem); }
.plant { display: flex; flex-direction: column; align-items: center; gap: .65rem; color: var(--ngahere); }
.plant svg { width: 38px; height: 38px; color: var(--koromiko); stroke-width: 1.5; }
.plant span { font-size: .74rem; font-weight: 600; text-transform: uppercase; letter-spacing: .1em; }

/* ---------- form block ---------- */
.form-block {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(1.5rem, 4vw, 2.5rem);
}
.form-block .field { margin-bottom: 1.1rem; }
.form-block label { display: block; font-weight: 600; font-size: .82rem; text-transform: uppercase;
  letter-spacing: .06em; margin-bottom: .4rem; color: var(--ngahere); }
.form-block input, .form-block select, .form-block textarea {
  width: 100%; font: inherit; color: var(--ink);
  padding: .7rem .85rem; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: var(--white);
}
.form-block input:focus, .form-block select:focus, .form-block textarea:focus {
  outline: none; border-color: var(--koromiko); box-shadow: 0 0 0 3px rgba(60,138,87,.12);
}
.form-embed-note {
  border: 1px dashed var(--line-strong); border-radius: var(--radius); background: var(--bone-tint);
  padding: 1rem 1.25rem; color: var(--ink-soft); font-size: .9rem; text-align: center;
}

/* =========================================================
   Header (transparent, minimal, hamburger -> full-screen menu)
   ========================================================= */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 80;
  background: transparent; border-bottom: 1px solid transparent;
  transition: background .3s ease, border-color .3s ease, box-shadow .3s ease;
}
.site-header .container { display: flex; align-items: center; justify-content: space-between; height: 76px; gap: 1rem; }
.brand { display: inline-flex; align-items: center; }
.site-header .brand-logo { height: 38px; }
.brand-logo.logo-wht { display: none; }
/* solid state once scrolled off the hero */
.site-header.is-scrolled { background: rgba(255,255,255,.96); backdrop-filter: saturate(1.1) blur(10px);
  border-bottom-color: var(--line); }
/* over a dark hero (home top) or with the menu open: white logo */
.site-header.over-dark:not(.is-scrolled) .brand-logo.logo-green,
.site-header.menu-open .brand-logo.logo-green { display: none; }
.site-header.over-dark:not(.is-scrolled) .brand-logo.logo-wht,
.site-header.menu-open .brand-logo.logo-wht { display: block; }
.site-header.menu-open { background: transparent; border-bottom-color: transparent; box-shadow: none; }

/* hamburger */
.nav-toggle { position: relative; z-index: 2; width: 44px; height: 44px; padding: 0; border: 0;
  background: transparent; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.nav-toggle-box { position: relative; width: 26px; height: 14px; }
.nav-toggle-inner, .nav-toggle-inner::before, .nav-toggle-inner::after {
  content: ""; position: absolute; left: 0; width: 26px; height: 2px; background: var(--ngahere);
  transition: transform .3s ease, background-color .3s ease, opacity .2s ease; }
.nav-toggle-inner { top: 6px; }
.nav-toggle-inner::before { top: -6px; }
.nav-toggle-inner::after { top: 6px; }
.site-header.over-dark:not(.is-scrolled) .nav-toggle-inner,
.site-header.over-dark:not(.is-scrolled) .nav-toggle-inner::before,
.site-header.over-dark:not(.is-scrolled) .nav-toggle-inner::after { background: var(--bone); }
.nav-toggle.is-open .nav-toggle-inner { background: transparent; }
.nav-toggle.is-open .nav-toggle-inner::before { transform: translateY(6px) rotate(45deg); background: var(--bone); }
.nav-toggle.is-open .nav-toggle-inner::after { transform: translateY(-6px) rotate(-45deg); background: var(--bone); }

/* full-screen menu overlay */
.nav-menu { position: fixed; inset: 0; z-index: 70; background: var(--ngahere); color: var(--bone);
  display: flex; flex-direction: column; justify-content: center;
  padding: clamp(5rem, 12vw, 9rem) clamp(1.5rem, 8vw, 6rem) clamp(2rem, 8vw, 5rem);
  opacity: 0; visibility: hidden; transform: translateY(-10px); overflow: hidden;
  transition: opacity .35s ease, transform .35s ease, visibility 0s linear .35s; }
.nav-menu.is-open { opacity: 1; visibility: visible; transform: none;
  transition: opacity .35s ease, transform .35s ease; }
.nav-menu::after { content: ""; position: absolute; top: 0; bottom: 0; right: 0; z-index: 0; pointer-events: none;
  width: min(52%, 520px);
  background: url("img/pattern-overlay.svg") right top / 100% auto repeat-y; opacity: .25; }
.nav-menu-links { position: relative; z-index: 1; display: flex; flex-direction: column; gap: clamp(.4rem, 1.5vw, 1rem); }
.nav-menu-links a { font-family: var(--display); font-weight: 700; letter-spacing: -.02em; line-height: 1.02;
  font-size: clamp(2.1rem, 7vw, 4.25rem); color: var(--bone); width: max-content;
  opacity: 0; transform: translateY(14px); transition: color .2s ease; }
.nav-menu-links a:hover, .nav-menu-links a[aria-current="page"] { color: #A7C7A9; }
.nav-menu.is-open .nav-menu-links a { opacity: 1; transform: none;
  transition: opacity .45s ease, transform .45s ease, color .2s ease; }
.nav-menu.is-open .nav-menu-links a:nth-child(1) { transition-delay: .06s; }
.nav-menu.is-open .nav-menu-links a:nth-child(2) { transition-delay: .12s; }
.nav-menu.is-open .nav-menu-links a:nth-child(3) { transition-delay: .18s; }
.nav-menu.is-open .nav-menu-links a:nth-child(4) { transition-delay: .24s; }
.nav-menu.is-open .nav-menu-links a:nth-child(5) { transition-delay: .30s; }
.nav-menu-foot { position: relative; z-index: 1; margin-top: clamp(2rem, 5vw, 3.5rem);
  display: flex; flex-wrap: wrap; align-items: center; gap: 1.5rem;
  opacity: 0; transform: translateY(14px); }
.nav-menu.is-open .nav-menu-foot { opacity: 1; transform: none;
  transition: opacity .45s ease .36s, transform .45s ease .36s; }
.nav-menu .btn-primary { background: var(--bone); color: var(--ngahere); }
.nav-menu .btn-primary:hover { background: var(--white); }
.nav-login { color: var(--bone); font-size: .8rem; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; }
.nav-login:hover { color: #A7C7A9; }

body.no-scroll { overflow: hidden; }
/* short / landscape screens: let a tall menu scroll from the top */
@media (max-height: 560px) { .nav-menu { justify-content: flex-start; overflow-y: auto; } }

/* =========================================================
   Hero
   ========================================================= */
.hero { padding: clamp(3.5rem, 9vw, 7rem) 0; background: var(--white); }
.hero--tint { background: linear-gradient(180deg, var(--bone-tint), transparent 55%); }
/* image background hero */
.hero--image { position: relative; overflow: hidden; background: var(--ngahere); color: var(--bone);
  min-height: 100vh; min-height: 100svh; display: flex; align-items: center; padding: clamp(3rem, 8vw, 6rem) 0; }
.hero-image { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center; z-index: 0; }
.hero-scrim { position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background:
    linear-gradient(90deg, rgba(28,50,19,.86) 0%, rgba(28,50,19,.55) 55%, rgba(28,50,19,.30) 100%),
    linear-gradient(0deg, rgba(28,50,19,.55), transparent 45%); }
.hero--image .container { position: relative; z-index: 3; }
.hero--image h1, .hero--image .lede { color: var(--bone); }
.hero--image .btn-secondary { color: var(--bone); border-color: rgba(246,242,234,.5); }
.hero--image .btn-secondary:hover { color: var(--bone); border-color: var(--bone); background: rgba(246,242,234,.1); }
.hero h1 { font-size: clamp(2.5rem, 6.5vw, 4.5rem); line-height: 1.03; letter-spacing: -0.02em; max-width: 15ch; }
.hero .lede { margin-top: 1.5rem; max-width: 52ch; }
.hero .btn-group { margin-top: 2.25rem; }
.page-hero { padding: clamp(6.5rem, 11vw, 9rem) 0 clamp(1.5rem, 3vw, 2.5rem); }
.page-hero h1 { font-size: clamp(2.1rem, 5.2vw, 3.4rem); letter-spacing: -0.015em; }

/* =========================================================
   Post cards (Pānui)
   ========================================================= */
.post-card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
  display: flex; flex-direction: column; transition: border-color .18s, box-shadow .18s, transform .18s; }
.post-card:hover { border-color: var(--koromiko); box-shadow: var(--shadow-hover); transform: translateY(-2px); }
.post-card .thumb { aspect-ratio: 16/9; background: var(--bone-tint); object-fit: cover; width: 100%; }
.post-card .body { padding: 1.35rem; display: flex; flex-direction: column; gap: .55rem; flex: 1; }
.post-card .meta { font-size: .72rem; color: var(--ink-soft); text-transform: uppercase; letter-spacing: .1em; }
.post-card h3 { font-size: 1.15rem; }
.post-card p { font-size: .93rem; color: var(--ink-soft); }
.post-card .link { margin-top: auto; }

/* single post */
.article { max-width: 700px; margin: 0 auto; }
.article h1 { font-size: clamp(1.9rem, 4vw, 2.75rem); letter-spacing: -0.03em; }
.article .meta { color: var(--ink-soft); font-size: .78rem; text-transform: uppercase; letter-spacing: .12em; margin: .6rem 0 2rem; }
.article p { margin-top: 1.15rem; }
.article h2 { margin-top: 2.25rem; font-size: 1.45rem; }

/* =========================================================
   Structure diagram (About)
   ========================================================= */
.structure { display: flex; flex-direction: column; align-items: center; gap: .6rem; text-align: center; }
.structure .node { background: var(--white); border: 1px solid var(--line-strong); border-radius: var(--radius);
  padding: .8rem 1.75rem; font-weight: 600; color: var(--ngahere); }
.structure .node--lead { background: var(--ngahere); color: var(--bone); border-color: var(--ngahere); }
.structure .arm { color: var(--koromiko); font-size: 1.1rem; line-height: 1; }
.structure .support { font-size: .9rem; color: var(--ink-soft); max-width: 40ch; margin-top: .5rem; }

/* value cards with internal/external */
.value-card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.75rem; }
.value-card h3 { font-size: 1.25rem; margin-bottom: .9rem; }
.value-card .row { margin-top: .9rem; }
.value-card .tag { display: inline-block; font-size: .68rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .14em; color: var(--koromiko); margin-bottom: .25rem; }
.value-card p { font-size: .95rem; color: var(--ink-soft); }

/* steps */
.steps { counter-reset: step; display: grid; gap: 1.25rem; }
.step { display: flex; gap: 1.1rem; align-items: flex-start; }
.step::before { counter-increment: step; content: counter(step); flex: none;
  width: 42px; height: 42px; border-radius: var(--radius); background: var(--bone-tint); color: var(--ngahere);
  border: 1px solid var(--line-strong); font-weight: 700; display: grid; place-items: center; }
.step h3 { font-size: 1.05rem; margin-bottom: .15rem; }
.step p { color: var(--ink-soft); }

/* =========================================================
   Footer
   ========================================================= */
.site-footer { background: var(--ngahere); color: var(--bone); padding: clamp(3rem, 6vw, 4.5rem) 0 2rem;
  border-top: 1px solid rgba(246,242,234,.14); }
.site-footer a { color: var(--bone); }
.site-footer a:hover { color: var(--white); }
.footer-grid { display: grid; gap: 2.5rem; grid-template-columns: 1.5fr 1fr 1fr; }
.footer-brand svg { width: 38px; height: 38px; color: var(--bone); margin-bottom: .8rem; }
.footer-brand .brand-name { font-size: 1.2rem; font-weight: 700; letter-spacing: -.01em; }
.footer-purpose { color: #BCCDBF; max-width: 32ch; margin-top: .6rem; font-size: .95rem; }
.footer-col h4 { color: var(--bone); font-size: .72rem; text-transform: uppercase; letter-spacing: .14em; margin-bottom: 1rem; }
.footer-col ul { list-style: none; display: grid; gap: .6rem; font-size: .93rem; }
.footer-bottom { margin-top: 3rem; padding-top: 1.5rem; border-top: 1px solid rgba(246,242,234,.16);
  display: flex; flex-wrap: wrap; gap: .75rem 1.5rem; justify-content: space-between; font-size: .82rem; color: #BCCDBF; }
@media (max-width: 720px) { .footer-grid { grid-template-columns: 1fr; gap: 2rem; } }

/* =========================================================
   Utilities
   ========================================================= */
.skip-link { position: absolute; left: -9999px; top: 0; background: var(--ngahere); color: var(--bone);
  padding: .6rem 1rem; border-radius: var(--radius-sm); z-index: 100; }
.skip-link:focus { left: 1rem; top: 1rem; }
.mt-1 { margin-top: 1rem; } .mt-2 { margin-top: 2rem; }
.stack > * + * { margin-top: 1.25rem; }

/* =========================================================
   Brand assets (real logo suite)
   ========================================================= */
.brand-logo { display: block; width: auto; }
.site-footer .brand-logo { height: 48px; margin-bottom: .75rem; }

/* real plant icons: circular badges */
.plant img { width: 62px; height: 62px; display: block; }

/* kōwhaiwhai overlay: bottom-right, no repeat. For dark bands or over imagery.
   Apply .pattern-br to any dark section (or an image wrapper). */
.pattern-br { position: relative; overflow: hidden; }
.pattern-br > * { position: relative; z-index: 1; }
.pattern-br::after {
  content: ""; position: absolute; z-index: 0; top: 0; bottom: 0; right: 0;
  width: min(46%, 440px);
  background: url("img/pattern-overlay.svg") right top / 100% auto repeat-y;
  opacity: .28; pointer-events: none;
}

/* =========================================================
   Rohe selector (find / belong to your rohe)
   ========================================================= */
.rohe-selector { border: 1px solid var(--line); background: var(--white); }
.rohe-head { padding: clamp(1.25rem, 3vw, 2rem); border-bottom: 1px solid var(--line); background: var(--bone-tint);
  display: flex; flex-wrap: wrap; gap: 1.25rem; justify-content: space-between; align-items: flex-start; }
.rohe-head h2 { font-size: clamp(1.5rem, 3vw, 2rem); }
.rohe-head .lede { font-size: 1rem; margin-top: .5rem; max-width: 52ch; }
/* island filter, square segmented control */
.rohe-filter { display: inline-flex; border: 1px solid var(--line-strong); background: var(--white); flex: none; }
.rohe-filter button { font: inherit; font-size: .76rem; font-weight: 600; padding: .5rem .9rem; border: 0;
  background: transparent; color: var(--ink-soft); cursor: pointer; transition: background .15s, color .15s; white-space: nowrap; }
.rohe-filter button + button { border-left: 1px solid var(--line-strong); }
.rohe-filter button:hover { color: var(--ngahere); }
.rohe-filter button.is-active { background: var(--koromiko); color: var(--white); }
/* body: list + detail */
.rohe-body { display: grid; grid-template-columns: 5fr 7fr; }
.rohe-list { border-right: 1px solid var(--line); max-height: 460px; overflow-y: auto; }
.rohe-item { width: 100%; text-align: left; background: transparent; border: 0; border-bottom: 1px solid var(--line);
  border-left: 3px solid transparent; padding: 1rem 1.1rem; cursor: pointer; display: flex; align-items: center;
  justify-content: space-between; gap: .75rem; transition: background .15s, border-color .15s; font: inherit; }
.rohe-item:hover { background: var(--bone-tint); }
.rohe-item[aria-selected="true"] { background: var(--bone-tint); border-left-color: var(--koromiko); }
.rohe-item .r-name { font-weight: 700; color: var(--ngahere); transition: color .15s; }
.rohe-item:hover .r-name, .rohe-item[aria-selected="true"] .r-name { color: var(--koromiko); }
.rohe-item .r-region { display: block; font-size: .76rem; color: var(--ink-soft); margin-top: .15rem; }
.rohe-item .r-chev { width: 16px; height: 16px; color: var(--koromiko); flex: none; opacity: .35; transition: opacity .15s, transform .15s; }
.rohe-item:hover .r-chev, .rohe-item[aria-selected="true"] .r-chev { opacity: 1; transform: translateX(2px); }
/* detail panel */
.rohe-detail { padding: clamp(1.25rem, 3vw, 2rem); background: var(--white); display: flex; flex-direction: column; }
.rohe-detail .r-badges { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem .75rem; margin-bottom: .85rem; }
.rohe-detail .r-island { font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em;
  background: var(--white); color: var(--koromiko); padding: .25rem .6rem; border: 1px solid var(--line-strong); }
.rohe-detail .r-loc { font-size: .8rem; color: var(--ink-soft); display: inline-flex; align-items: center; gap: .35rem; }
.rohe-detail .r-loc svg { width: 14px; height: 14px; color: var(--koromiko); flex: none; }
.rohe-detail h3 { font-size: clamp(1.4rem, 2.5vw, 1.9rem); margin-bottom: 1rem; }
.rohe-kaitiaki { display: inline-flex; align-items: center; gap: .75rem; border: 1px solid var(--line);
  background: var(--bone-tint); padding: .75rem 1rem; margin-bottom: 1.25rem; align-self: flex-start; }
.rohe-kaitiaki svg { width: 20px; height: 20px; color: var(--takawa); flex: none; }
.rohe-kaitiaki .k-label { font-size: .66rem; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-soft); font-weight: 700; display: block; }
.rohe-kaitiaki .k-name { font-size: .9rem; font-weight: 700; color: var(--ngahere); }
.rohe-detail .r-desc { font-size: .95rem; color: var(--ink); margin-bottom: 1.25rem; max-width: none; }
.rohe-plants { margin-bottom: 1.25rem; }
.rohe-plants .p-label { font-size: .66rem; text-transform: uppercase; letter-spacing: .1em; font-weight: 700; color: var(--ink-soft); display: block; margin-bottom: .55rem; }
.rohe-plants .chip { display: inline-flex; align-items: center; gap: .4rem; }
.rohe-plants .chip svg { width: 14px; height: 14px; color: var(--koromiko); flex: none; }
.rohe-foot { margin-top: auto; padding-top: 1.25rem; border-top: 1px solid var(--line);
  display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; justify-content: space-between; }
.rohe-foot .r-quote { font-size: .8rem; font-style: italic; color: var(--ink-soft); margin: 0; }
.rohe-foot .btn svg { width: 16px; height: 16px; }
.rohe-fallback { list-style: none; display: grid; gap: .5rem; padding: 1.25rem; }
.rohe-fallback a { color: var(--koromiko); font-weight: 600; }
@media (max-width: 820px) {
  .rohe-body { grid-template-columns: 1fr; }
  .rohe-list { border-right: 0; border-bottom: 1px solid var(--line); max-height: 300px; }
  .rohe-head { flex-direction: column; }
  .rohe-filter { width: 100%; }
  .rohe-filter button { flex: 1; text-align: center; }
}
