/* ============================================================
   The Jungle & The Sea — design system
   Fonts: self-hosted from /fonts (preloaded in every page head)
   Colors + type rules come from the supplied brand kit.
   ============================================================ */

/* ---------- Fonts ---------- */
@font-face {
  font-family: "Instrument Serif";
  src: url("/fonts/instrument-serif-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Cormorant Garamond";
  src: url("/fonts/cormorant-garamond-500.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Cormorant Garamond";
  src: url("/fonts/cormorant-garamond-500-italic.woff2") format("woff2");
  font-weight: 500;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Cormorant Garamond";
  src: url("/fonts/cormorant-garamond-600.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "DM Sans";
  src: url("/fonts/dm-sans-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "DM Sans";
  src: url("/fonts/dm-sans-500.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

/* ---------- Tokens ---------- */
:root {
  --mangrove: #173D32;
  --canopy: #10291F;
  --teal: #366E73;
  --fern: #2E6B4F;
  --sea-glass: #B9D3CC;
  --sand: #D7C8A4;
  --linen: #EAE2D1;
  --clay: #AB7755;
  --clay-deep: #8A5A3C;
  --ink-muted: #4B5F57;
  --line: #D9D0BD;
  --oyster: #F5F0E5;
  --white: #FFFFFF;

  --font-serif-display: "Instrument Serif", Georgia, serif;
  --font-serif-head: "Cormorant Garamond", Georgia, serif;
  --font-sans: "DM Sans", "Helvetica Neue", Arial, sans-serif;

  --w: min(1160px, calc(100% - 48px));
  --band-gap: 96px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-sans);
  font-weight: 400;
  color: var(--canopy);
  background: var(--oyster);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; display: block; }

/* ---------- Type scale ---------- */
h1, h2, h3 { font-family: var(--font-serif-head); font-weight: 600; line-height: 1.15; letter-spacing: -0.01em; }
.display {
  font-family: var(--font-serif-display);
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: -0.015em;
}
.eyebrow {
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: 12px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--teal);
  display: block;
}
.byline { font-size: 13px; color: var(--ink-muted); letter-spacing: 0.04em; }
.caps-label { font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--ink-muted); font-weight: 500; }

/* ---------- Layout ---------- */
.wrap { width: var(--w); margin-inline: auto; }
.narrow { width: min(720px, calc(100% - 40px)); margin-inline: auto; }
.band { margin-block: var(--band-gap); }
.band:first-of-type { margin-top: 64px; }
@media (max-width: 720px) { :root { --band-gap: 64px; } }

/* Hairline rules instead of shadows */
.rule { border: 0; border-top: 1px solid var(--line); }
.hairline-t { border-top: 1px solid var(--line); }
.hairline-b { border-bottom: 1px solid var(--line); }

/* ---------- Header / masthead ---------- */
.site-header { background: var(--oyster); border-bottom: 1px solid var(--line); }
.masthead { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 20px 0; }
.brand img { height: 34px; width: auto; }
@media (max-width: 560px) { .brand img { height: 26px; } }
nav.main-nav { display: flex; align-items: center; gap: 28px; }
nav.main-nav a {
  font-size: 13px; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--canopy); text-decoration: none; font-weight: 500;
  padding-block: 6px; position: relative;
}
nav.main-nav a:hover { color: var(--teal); }
.has-menu { position: relative; }
.has-menu > a::after { content: " ▾"; font-size: 9px; vertical-align: 2px; color: var(--ink-muted); }
.menu {
  position: absolute; top: 100%; left: -16px; min-width: 210px;
  background: var(--white); border: 1px solid var(--line);
  padding: 10px 0; display: none; z-index: 50;
}
.has-menu:hover .menu, .has-menu:focus-within .menu { display: block; }
.menu a { display: block; padding: 8px 18px; text-transform: none; letter-spacing: 0.02em; font-size: 14px; font-weight: 400; }
.menu a:hover { background: var(--linen); color: var(--mangrove); }
.nav-toggle { display: none; background: none; border: 1px solid var(--line); padding: 8px 12px; font: inherit; font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--canopy); cursor: pointer; }
@media (max-width: 860px) {
  nav.main-nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: var(--white); border-bottom: 1px solid var(--line); flex-direction: column; align-items: stretch; padding: 12px 20px 20px; gap: 4px; z-index: 40; }
  nav.main-nav.open { display: flex; }
  nav.main-nav a { padding: 12px 4px; border-bottom: 1px solid var(--line); }
  .menu { position: static; border: 0; display: block; padding: 0 0 8px 16px; }
  .has-menu > a::after { content: ""; }
  .nav-toggle { display: inline-block; }
}
.site-header .wrap { position: relative; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block; font-family: var(--font-sans); font-weight: 500;
  font-size: 13px; letter-spacing: 0.14em; text-transform: uppercase;
  padding: 14px 28px; text-decoration: none; border: 1px solid var(--mangrove);
  background: var(--mangrove); color: var(--white);
  transition: background-color .2s ease, color .2s ease;
}
.btn:hover { background: var(--canopy); border-color: var(--canopy); }
.btn.ghost { background: transparent; color: var(--mangrove); }
.btn.ghost:hover { background: var(--mangrove); color: var(--white); }
.btn.on-dark { background: var(--sea-glass); border-color: var(--sea-glass); color: var(--canopy); }
.btn.on-dark:hover { background: var(--white); border-color: var(--white); }
.btn.on-dark.ghost { background: transparent; color: var(--sea-glass); }
.btn.on-dark.ghost:hover { background: var(--sea-glass); color: var(--canopy); }

/* ---------- Section headers ---------- */
.sec-head { display: flex; align-items: baseline; justify-content: space-between; gap: 24px; margin-bottom: 36px; }
.sec-head h2 { font-size: clamp(26px, 3.4vw, 36px); }
.sec-head .more { font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--teal); text-decoration: none; font-weight: 500; white-space: nowrap; }
.sec-head .more:hover { color: var(--mangrove); }

/* ---------- Cards / article teasers ---------- */
.card { display: flex; flex-direction: column; gap: 12px; text-decoration: none; color: inherit; }
.card .img-slot {
  aspect-ratio: 3 / 2; background: linear-gradient(135deg, var(--linen), var(--sand));
  border: 1px solid var(--line); display: flex; align-items: center; justify-content: center;
  color: var(--ink-muted); font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase; text-align: center; padding: 16px;
  transition: opacity .25s ease;
}
.card:hover .img-slot { opacity: 0.85; }
.card h3 { font-size: 22px; }
.card .dek { font-size: 15px; color: var(--ink-muted); }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px 32px; }
@media (max-width: 900px) { .grid-3 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 620px) { .grid-3 { grid-template-columns: 1fr; } }

/* ---------- Hero (full-width) ---------- */
.hero { border-bottom: 1px solid var(--line); background: var(--linen); }
.hero-inner { display: grid; grid-template-columns: 1.1fr 0.9fr; align-items: stretch; min-height: 520px; }
.hero-copy { padding: 72px 6vw 72px 0; display: flex; flex-direction: column; justify-content: center; gap: 24px; }
.hero-copy .display { font-size: clamp(40px, 6vw, 72px); color: var(--mangrove); }
.hero-copy p { font-size: 18px; max-width: 46ch; color: var(--ink-muted); }
.hero-ctas { display: flex; gap: 16px; flex-wrap: wrap; }
.hero-media { position: relative; }
.hero-media .img-slot {
  position: absolute; inset: 0;
  background: linear-gradient(160deg, var(--sea-glass), var(--linen) 60%, var(--sand));
  display: flex; align-items: flex-end; justify-content: flex-start; padding: 20px;
}
@media (max-width: 860px) {
  .hero-inner { grid-template-columns: 1fr; min-height: 0; }
  .hero-copy { padding: 56px 0; }
  .hero-media { min-height: 300px; }
  .hero-media .img-slot { position: static; aspect-ratio: 16 / 9; }
}

/* ---------- Department cards ---------- */
.dept-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px; }
@media (max-width: 900px) { .dept-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .dept-grid { grid-template-columns: 1fr; } }
.dept-card { display: flex; flex-direction: column; gap: 12px; text-decoration: none; color: inherit; border-top: 2px solid var(--line); padding-top: 20px; transition: border-color .2s ease; }
.dept-card:hover { border-top-color: var(--teal); }
.dept-card .img-slot { aspect-ratio: 4 / 5; background: linear-gradient(180deg, var(--linen), var(--sand)); border: 1px solid var(--line); display: flex; align-items: center; justify-content: center; color: var(--ink-muted); font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase; text-align: center; padding: 16px; }
.dept-card h3 { font-size: 21px; }
.dept-card p { font-size: 14px; color: var(--ink-muted); }

/* ---------- Feature rows ---------- */
.feature-row { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 48px; align-items: stretch; }
.feature-row.flip { grid-template-columns: 0.85fr 1.15fr; }
.feature-row .img-slot { min-height: 320px; background: linear-gradient(150deg, var(--sand), var(--sea-glass)); border: 1px solid var(--line); display: flex; align-items: center; justify-content: center; color: var(--ink-muted); font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase; text-align: center; padding: 16px; }
.feature-row h3 { font-size: clamp(24px, 3vw, 34px); margin-block: 10px 12px; }
.feature-row p { color: var(--ink-muted); max-width: 52ch; }
.feature-row .feature-body { display: flex; flex-direction: column; justify-content: center; gap: 6px; }
@media (max-width: 860px) { .feature-row, .feature-row.flip { grid-template-columns: 1fr; } }

/* ---------- Water Issue band (dark) ---------- */
.dark-band { background: var(--mangrove); color: var(--sea-glass); padding: 88px 0; }
.dark-band .eyebrow { color: var(--sea-glass); }
.dark-band h2 { color: var(--white); }
.dark-band p { color: var(--sea-glass); }

/* ---------- Newsletter band ---------- */
.newsletter { background: var(--linen); border-block: 1px solid var(--line); padding: 88px 0; }
.newsletter-inner { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
@media (max-width: 820px) { .newsletter-inner { grid-template-columns: 1fr; } }
.newsletter h2 { font-size: clamp(28px, 3.6vw, 40px); color: var(--mangrove); }

/* ---------- Footer ---------- */
.site-footer { background: var(--canopy); color: var(--sea-glass); padding: 64px 0 40px; margin-top: var(--band-gap); }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 48px; }
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .footer-grid { grid-template-columns: 1fr; } }
.site-footer img { height: 30px; width: auto; }
.site-footer p { font-size: 14px; max-width: 34ch; }
.site-footer nav { display: flex; flex-direction: column; gap: 10px; }
.site-footer a { color: var(--sea-glass); text-decoration: none; font-size: 14px; }
.site-footer a:hover { color: var(--white); }
.site-footer .foot-label { font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--sea-glass); opacity: .7; margin-bottom: 12px; display: block; }
.footer-legal { border-top: 1px solid rgba(185, 211, 204, .25); margin-top: 48px; padding-top: 24px; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: 12.5px; }
.footer-form input { background: transparent; border: 1px solid rgba(185, 211, 204, .4); color: var(--white); padding: 12px 14px; font: inherit; font-size: 14px; width: 100%; }
.footer-form input::placeholder { color: rgba(185, 211, 204, .6); }
.footer-form button { margin-top: 10px; }

/* ---------- Forms ---------- */
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-muted); font-weight: 500; }
.field input, .field select, .field textarea {
  font: inherit; font-size: 15px; padding: 12px 14px;
  border: 1px solid var(--line); background: var(--white); color: var(--canopy); border-radius: 0;
}
.field input:focus, .field select:focus, .field textarea:focus { outline: 2px solid var(--teal); outline-offset: 1px; }
.form-note { font-size: 12.5px; color: var(--ink-muted); }

/* ---------- Product cards ---------- */
.product-card { border: 1px solid var(--line); background: var(--white); display: flex; flex-direction: column; }
.product-card .img-slot { aspect-ratio: 1 / 1; background: linear-gradient(135deg, var(--linen), var(--oyster)); border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: center; color: var(--ink-muted); font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; text-align: center; padding: 16px; }
.product-card .pc-body { padding: 18px 18px 20px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.product-card .pc-brand { font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--ink-muted); }
.product-card h4 { font-family: var(--font-serif-head); font-weight: 600; font-size: 19px; line-height: 1.25; }
.product-card p { font-size: 13.5px; color: var(--ink-muted); }
.product-card .pc-cta { margin-top: auto; padding-top: 10px; }
.badge { display: inline-block; font-size: 10.5px; letter-spacing: 0.16em; text-transform: uppercase; padding: 4px 10px; border: 1px solid currentColor; }
.badge.verified { color: var(--fern); }

/* ---------- Comparison table ---------- */
.table-wrap { overflow-x: auto; }
table.compare { width: 100%; border-collapse: collapse; font-size: 14.5px; }
table.compare th, table.compare td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.compare th { font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--mangrove); font-weight: 500; }
table.compare tbody tr:hover { background: var(--linen); }

/* ---------- Article ---------- */
.article-hero { max-width: 920px; margin-inline: auto; }
.article-hero h1 { font-size: clamp(32px, 4.6vw, 52px); }
.article-features { max-width: 1160px; margin: 40px auto; }
.article-features .img-slot { aspect-ratio: 16 / 9; background: linear-gradient(140deg, var(--sea-glass), var(--sand)); border: 1px solid var(--line); display: flex; align-items: flex-end; padding: 20px; color: var(--ink-muted); font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase; }
.article-body { max-width: 720px; margin-inline: auto; display: flex; flex-direction: column; gap: 22px; }
.article-body p { font-size: 17.5px; }
.article-body h2 { font-size: 30px; margin-top: 24px; }
.article-body h3 { font-size: 23px; margin-top: 18px; }
.article-body blockquote { border-left: 2px solid var(--clay); padding-left: 24px; font-family: var(--font-serif-head); font-size: 22px; font-style: italic; color: var(--mangrove); }
.article-body ul, .article-body ol { padding-left: 22px; }
.article-body a { color: var(--teal); }
.toc { background: var(--white); border: 1px solid var(--line); padding: 24px 28px; }
.toc ol { margin-left: 18px; }
.toc a { color: var(--canopy); text-decoration: none; }
.toc a:hover { color: var(--teal); }
.disclosure-inline { background: var(--linen); border-left: 2px solid var(--clay); padding: 14px 18px; font-size: 13.5px; color: var(--clay-deep); }
.sources ol { margin-left: 18px; font-size: 14px; color: var(--ink-muted); }
.sources li { margin-bottom: 8px; }
.author-bio { display: flex; gap: 18px; align-items: flex-start; border-top: 1px solid var(--line); padding-top: 28px; }
.author-bio .img-slot { width: 72px; height: 72px; flex: none; border-radius: 50%; border: 1px solid var(--line); background: var(--linen); }
.related-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
@media (max-width: 760px) { .related-grid { grid-template-columns: 1fr; } }
.series-tag { font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--clay-deep); border: 1px solid var(--clay); padding: 3px 10px; display: inline-block; }
.loc-tag { font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--fern); border: 1px solid var(--fern); padding: 3px 10px; display: inline-block; }

/* ---------- Breadcrumbs ---------- */
.crumbs { font-size: 12px; letter-spacing: 0.08em; color: var(--ink-muted); margin-bottom: 28px; }
.crumbs a { color: var(--ink-muted); text-decoration: none; }
.crumbs a:hover { color: var(--teal); }

/* ---------- Department hero ---------- */
.dept-hero { background: var(--mangrove); color: var(--sea-glass); padding: 72px 0; }
.dept-hero .display { color: var(--white); font-size: clamp(36px, 5vw, 60px); margin-top: 10px; }
.dept-hero p { max-width: 58ch; margin-top: 14px; }

/* ---------- Misc ---------- */
.center { text-align: center; }
.spacer-8 { height: 8px; } .spacer-16 { height: 16px; } .spacer-24 { height: 24px; } .spacer-48 { height: 48px; }
.muted { color: var(--ink-muted); }
a { color: var(--teal); }
.skip-link { position: absolute; left: -9999px; }
.skip-link:focus { left: 8px; top: 8px; background: var(--white); padding: 8px 12px; z-index: 100; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.placeholder-note { font-size: 12px; color: var(--ink-muted); }
