/* ===========================================================================
   NZ Traveller Declaration — stylesheet
   New Zealand bush palette: near-black forest ink, fern green, ivory paper.
   Headings are set in a serif to read editorial and to stand clearly apart
   from the sibling sites, which are all sans. Full-bleed dark cover hero with
   a glass facts panel; no split or centred-banner hero.
   =========================================================================== */

:root {
  --ink: #16261F;          /* near-black forest */
  --ink-2: #0F1B15;
  --fern: #2E7D53;         /* fern green */
  --fern-deep: #24623F;
  --fern-soft: #4a9b6f;
  --kowhai: #E8B23A;       /* warm micro-accent (kowhai flower) */

  --ivory: #F6F4EC;
  --ivory-2: #ECE8DA;
  --paper: #ffffff;
  --line: #ded9c8;
  --line-strong: #c7c0aa;

  --text: #20302a;
  --text-soft: #5a685f;

  --r: 4px;                /* small radius: crisp, editorial, not bubbly */
  --r-lg: 8px;

  --shadow: 0 1px 2px rgb(15 27 21 / 6%), 0 12px 32px rgb(15 27 21 / 8%);
  --shadow-lg: 0 26px 64px rgb(15 27 21 / 18%);

  --gap: clamp(1rem, 3vw, 2rem);
  --band: clamp(3rem, 7vw, 5.5rem);

  --sans: "Inter", ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI",
          Roboto, "Helvetica Neue", Arial, sans-serif;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua",
           Georgia, "Times New Roman", serif;
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 5.5rem; }
html, body { max-width: 100%; overflow-x: clip; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

body {
  margin: 0;
  font-family: var(--sans);
  font-size: clamp(1rem, .97rem + .16vw, 1.07rem);
  line-height: 1.68;
  color: var(--text);
  background: var(--ivory);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { margin: 0 0 .5em; line-height: 1.15; font-weight: 600; letter-spacing: -.01em; text-wrap: balance; color: var(--ink); font-family: var(--serif); }
h1 { font-size: clamp(2.1rem, 1.4rem + 2.9vw, 3.4rem); }
h2 { font-size: clamp(1.5rem, 1.15rem + 1.5vw, 2.15rem); }
h3 { font-size: clamp(1.15rem, 1.02rem + .6vw, 1.4rem); }

p { margin: 0 0 1.1em; }
a { color: var(--fern-deep); text-underline-offset: 2px; }
a:hover { color: var(--ink); }
img, svg { max-width: 100%; height: auto; }
ul, ol { margin: 0 0 1.2em; padding-left: 1.3em; }
hr { border: 0; border-top: 1px solid var(--line); margin: 2.5rem 0; }
::selection { background: rgb(46 125 83 / 22%); }

:focus-visible { outline: 3px solid var(--fern); outline-offset: 2px; border-radius: 3px; }

.skip { position: absolute; left: -9999px; top: .5rem; z-index: 90; background: var(--ink); color: #fff; padding: .6rem 1rem; border-radius: var(--r); }
.skip:focus { left: .5rem; color: #fff; }

/* --- containers ---------------------------------------------------------- */

.bound { width: min(100% - 2.5rem, 1180px); margin-inline: auto; }
.bound--read { width: min(100% - 2.5rem, 760px); }

/* --- tags (kickers) ------------------------------------------------------ */

.tag {
  display: inline-block;
  margin: 0 0 1rem;
  font-family: var(--sans);
  font-size: .74rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--fern-deep);
}
.tag--light { color: #a9d8bd; }
.tag--fern { color: #fff; background: var(--fern); padding: .28rem .8rem; border-radius: var(--r); letter-spacing: .1em; }

.lead-h { position: relative; margin-bottom: 1.7rem; padding-top: 1rem; }
.lead-h::before { content: ""; position: absolute; top: 0; left: 0; width: 2.6rem; height: 3px; background: var(--fern); }

/* --- buttons ------------------------------------------------------------- */

.btn {
  --bg: var(--ink);
  --fg: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: .78rem 1.5rem;
  border: 2px solid transparent;
  border-radius: var(--r);
  background: var(--bg);
  color: var(--fg);
  font-weight: 650;
  font-size: .96rem;
  text-decoration: none;
  transition: background-color .15s ease, transform .15s ease, box-shadow .15s ease;
}
.btn:hover { color: var(--fg); transform: translateY(-1px); box-shadow: var(--shadow); }
.btn--go { --bg: var(--fern); }
.btn--go:hover { --bg: var(--fern-deep); }
.btn--ondark { --bg: transparent; --fg: #fff; border-color: rgb(255 255 255 / 50%); }
.btn--ondark:hover { --bg: rgb(255 255 255 / 12%); }
.btn--line { --bg: transparent; --fg: var(--ink); border-color: var(--line-strong); }
.btn--line:hover { --bg: var(--ivory-2); }
.btn--sm { padding: .48rem 1.05rem; font-size: .88rem; }
.btn--lg { padding: .92rem 1.8rem; font-size: 1.02rem; }

/* --- top bar ------------------------------------------------------------- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgb(246 244 236 / 90%);
  backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.topbar__row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 74px; padding-block: .55rem; }

.wordmark { display: flex; align-items: center; gap: .7rem; text-decoration: none; color: inherit; min-width: 0; }
.wordmark__mark { flex: none; border-radius: var(--r); }
.wordmark__text { display: grid; min-width: 0; }
.wordmark__name { font-family: var(--serif); font-weight: 600; font-size: 1.08rem; line-height: 1.15; color: var(--ink); }
.wordmark__sub { font-size: .72rem; color: var(--text-soft); line-height: 1.3; }

.menu { display: flex; align-items: center; gap: .4rem 1.15rem; flex-wrap: wrap; justify-content: flex-end; }
.menu__link { color: var(--text); text-decoration: none; font-weight: 620; font-size: .93rem; padding: .28rem 0; border-bottom: 2px solid transparent; }
.menu__link:hover { color: var(--fern-deep); border-bottom-color: var(--fern); }

.switch { display: inline-flex; border: 1px solid var(--line-strong); border-radius: var(--r); overflow: hidden; }
.switch__opt { padding: .26rem .64rem; font-size: .77rem; font-weight: 700; letter-spacing: .04em; color: var(--text-soft); text-decoration: none; }
.switch__opt + .switch__opt { border-left: 1px solid var(--line-strong); }
.switch__opt:hover { background: var(--ivory-2); color: var(--text); }
.switch__opt.on { background: var(--ink); color: #fff; }

@media (max-width: 780px) { .wordmark__sub { display: none; } .menu__link { display: none; } }
@media (max-width: 470px) {
  .topbar__row { flex-wrap: wrap; }
  .wordmark { flex: 1 1 100%; }
  .menu { flex: 1 1 100%; justify-content: space-between; padding-bottom: .2rem; }
}

/* --- cover hero ---------------------------------------------------------- */

.cover { position: relative; isolation: isolate; color: #fff; background: var(--ink-2); }
.cover__photo { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; object-position: 50% 45%; }
.cover__wash {
  position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(90deg, rgb(9 18 13 / 88%) 0%, rgb(9 18 13 / 66%) 42%, rgb(9 18 13 / 30%) 100%),
    linear-gradient(180deg, rgb(9 18 13 / 30%) 0%, rgb(9 18 13 / 12%) 40%, rgb(9 18 13 / 55%) 100%);
}
.cover__inner {
  display: grid;
  gap: clamp(2rem, 4vw, 3.5rem);
  padding-block: clamp(3.5rem, 8vw, 6.5rem);
  align-items: center;
}
@media (min-width: 940px) { .cover__inner { grid-template-columns: 1.15fr .85fr; } }
.cover__copy { max-width: 40rem; }
.cover__copy h1 { color: #fff; }
.cover__copy :is(h1, .cover__lead, .tag) { text-shadow: 0 1px 18px rgb(4 10 7 / 55%); }
.cover__lead { font-size: clamp(1.02rem, .95rem + .4vw, 1.18rem); color: rgb(255 255 255 / 90%); }
.cover__cta { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 1.8rem; }

/* Frosted facts panel */
.glass {
  background: rgb(22 38 31 / 58%);
  border: 1px solid rgb(255 255 255 / 18%);
  border-radius: var(--r-lg);
  padding: clamp(1.4rem, 3vw, 2rem);
  backdrop-filter: blur(12px) saturate(120%);
  -webkit-backdrop-filter: blur(12px) saturate(120%);
}
.glass__title { color: #fff; font-size: 1.2rem; margin-bottom: 1.1rem; }
.glass__facts { margin: 0 0 1.2rem; display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.glass__item dt { font-family: var(--serif); font-size: 1.5rem; color: var(--kowhai); line-height: 1; }
.glass__item dd { margin: .25rem 0 0; font-size: .82rem; color: rgb(255 255 255 / 82%); }
.ticks { list-style: none; margin: 0; padding-top: 1.1rem; border-top: 1px solid rgb(255 255 255 / 16%); display: grid; gap: .5rem; }
.ticks li { position: relative; padding-left: 1.6rem; font-size: .9rem; color: rgb(255 255 255 / 90%); }
.ticks li::before {
  content: ""; position: absolute; left: 0; top: .45em;
  width: 1rem; height: 1rem; border-radius: 50%;
  background: var(--fern) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12.5 4.5 4.5L19 7'/%3E%3C/svg%3E") center / 66% no-repeat;
}

/* --- steps --------------------------------------------------------------- */

.steps { padding-block: var(--band); }
.steps__list { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--gap); grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }
.steps__item { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 1.6rem 1.5rem; }
.steps__n {
  display: grid; place-items: center;
  width: 2.4rem; height: 2.4rem; margin-bottom: .9rem;
  border-radius: 50%;
  background: rgb(46 125 83 / 12%);
  color: var(--fern-deep); font-family: var(--serif); font-weight: 600; font-size: 1.1rem;
}
.steps__item h3 { margin-bottom: .35rem; }
.steps__item p { margin: 0; color: var(--text-soft); font-size: .95rem; }

/* --- pitch (dark link block) --------------------------------------------- */

.pitch { padding-block: var(--band); background: var(--ink); color: #fff; }
.pitch h2 { color: #fff; }
.pitch__grid { display: grid; gap: var(--gap); }
@media (min-width: 900px) { .pitch__grid { grid-template-columns: 5fr 6fr; align-items: start; gap: clamp(2rem, 4vw, 4rem); } }
.pitch__intro p { color: rgb(255 255 255 / 82%); }
.pitch .more { color: var(--kowhai); font-weight: 650; text-decoration: none; }
.pitch .more:hover { text-decoration: underline; }

.pitch__links { list-style: none; margin: 0; padding: 0; display: grid; gap: .1rem; }
.pitch__links a {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 1rem .3rem; color: #fff; text-decoration: none;
  border-bottom: 1px solid rgb(255 255 255 / 14%); font-weight: 550;
}
.pitch__links li:first-child a { border-top: 1px solid rgb(255 255 255 / 14%); }
.pitch__links a:hover { color: var(--kowhai); }
.pitch__arrow { color: var(--kowhai); flex: none; transition: transform .15s ease; }
.pitch__links a:hover .pitch__arrow { transform: translateX(4px); }

/* --- essay / prose ------------------------------------------------------- */

.essay { padding-block: var(--band); }

.prose { font-size: 1.05rem; }
.prose > *:first-child { margin-top: 0; }
.prose h2 { margin-top: 2.5rem; scroll-margin-top: 6rem; }
.prose h3 { margin-top: 2rem; scroll-margin-top: 6rem; }
.prose li { margin-bottom: .45em; }
.prose li::marker { color: var(--fern); }

.prose blockquote {
  margin: 1.9rem 0;
  padding: 1.1rem 1.4rem;
  background: var(--paper);
  border: 1px solid var(--line);
  border-left: 4px solid var(--fern);
  border-radius: 0 var(--r-lg) var(--r-lg) 0;
  font-family: var(--serif);
  font-size: 1.05rem;
}
.prose blockquote p:last-child { margin-bottom: 0; }

.prose figure { margin: 2.1rem 0; }
.prose figure img { width: 100%; border-radius: var(--r-lg); border: 1px solid var(--line); background: var(--paper); }
.prose figcaption { margin-top: .55rem; font-size: .85rem; color: var(--text-soft); text-align: center; }

.prose table { width: 100%; border-collapse: collapse; margin: 1.9rem 0; font-size: .93rem; background: var(--paper); border: 1px solid var(--line); }
.prose :is(th, td) { padding: .68rem .85rem; border: 1px solid var(--line); text-align: left; vertical-align: top; }
.prose thead th { background: var(--ink); color: #fff; border-color: var(--ink); font-weight: 600; font-family: var(--serif); }
.prose tbody tr:nth-child(even) { background: var(--ivory); }

.prose code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .88em; background: var(--ivory-2); padding: .12em .4em; border-radius: 4px; }

/* app.js wraps wide tables to scroll; the query is the fallback */
.scroller { overflow-x: auto; margin: 1.9rem 0; -webkit-overflow-scrolling: touch; border-radius: var(--r-lg); }
.scroller table { margin: 0; min-width: 34rem; }
@media (max-width: 640px) { .prose > table { display: block; overflow-x: auto; } }

/* --- notes / callouts ---------------------------------------------------- */

.note { margin: 2.1rem 0; padding: 1.2rem 1.4rem; border-radius: var(--r-lg); background: var(--paper); border: 1px solid var(--line); }
.note > *:last-child { margin-bottom: 0; }
.note strong { display: block; margin-bottom: .35rem; font-size: 1.05rem; color: var(--ink); font-family: var(--serif); }
.note--tip { border-left: 5px solid var(--kowhai); background: #fbf5e6; }
.note--cta {
  border: 0;
  padding: 2rem 1.6rem;
  text-align: center;
  color: #fff;
  background: linear-gradient(135deg, var(--fern-deep) 0%, var(--ink) 100%);
}
.note--cta strong { color: #fff; font-size: 1.2rem; }
.note--cta p { color: rgb(255 255 255 / 85%); }
.note--cta a:not(.btn) { color: #fff; }
.note--cta .btn { margin-top: .6rem; --bg: var(--kowhai); --fg: var(--ink); }
.note--cta .btn:hover { --bg: #d69f2a; }

/* --- magazine list ------------------------------------------------------- */

.list__head { padding-block: var(--band) 0; }
.list__intro { font-size: 1.08rem; color: var(--text-soft); }
.list__body { padding-block: var(--band); }
.list__foot { padding-bottom: var(--band); }

.feature {
  display: grid; gap: 0;
  margin-bottom: var(--gap);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden; text-decoration: none; color: inherit;
  box-shadow: var(--shadow);
  transition: transform .16s ease, box-shadow .16s ease;
}
.feature:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
@media (min-width: 760px) { .feature { grid-template-columns: 1.1fr 1fr; align-items: stretch; } }
.feature__media { display: block; background: var(--ivory-2); aspect-ratio: 16 / 9; }
.feature__media img { width: 100%; height: 100%; object-fit: cover; }
.feature__body { padding: clamp(1.4rem, 3vw, 2.2rem); display: flex; flex-direction: column; justify-content: center; }
.feature__title { display: block; font-family: var(--serif); font-size: clamp(1.35rem, 1.1rem + .9vw, 1.8rem); color: var(--ink); margin: .5rem 0 .5rem; line-height: 1.2; }
.feature__desc { color: var(--text-soft); font-size: .98rem; }
.feature__more { margin-top: 1rem; font-weight: 650; color: var(--fern-deep); }

.cards { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--gap); grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.card { display: flex; flex-direction: column; height: 100%; background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; text-decoration: none; color: inherit; transition: transform .16s ease, box-shadow .16s ease; }
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.card__media { display: block; aspect-ratio: 16 / 9; background: var(--ivory-2); }
.card__media img { width: 100%; height: 100%; object-fit: cover; }
.card__body { padding: 1.05rem 1.15rem 1.3rem; display: flex; flex-direction: column; flex: 1; }
.card__date { font-size: .74rem; letter-spacing: .05em; text-transform: uppercase; color: var(--text-soft); }
.card__title { display: block; font-family: var(--serif); font-size: 1.14rem; color: var(--ink); margin: .35rem 0 .4rem; line-height: 1.3; }
.card__desc { font-size: .91rem; color: var(--text-soft); }

/* --- article page -------------------------------------------------------- */

.article { padding-block: clamp(1.4rem, 4vw, 2.4rem) var(--band); }
.crumbs { font-size: .84rem; color: var(--text-soft); margin-bottom: 1.3rem; display: flex; gap: .5rem; flex-wrap: wrap; }
.crumbs a { color: var(--text-soft); text-decoration: none; }
.crumbs a:hover { color: var(--fern-deep); text-decoration: underline; }

.article__head { padding-bottom: 1.7rem; border-bottom: 1px solid var(--line); margin-bottom: 2.2rem; }
.article__standfirst { font-size: 1.14rem; color: var(--text-soft); font-family: var(--serif); }
.article__meta { font-size: .83rem; color: var(--text-soft); display: flex; gap: .5rem; flex-wrap: wrap; margin: 0; }

.article__foot { margin-top: 2.9rem; padding-top: 1.7rem; border-top: 1px solid var(--line); display: flex; gap: .8rem; flex-wrap: wrap; }

/* --- faq ----------------------------------------------------------------- */

.faq { padding-block: var(--band); }
.is-home .faq { background: var(--ivory-2); }
.faq__list { display: grid; gap: .7rem; }
.faq__item { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
.faq__q { cursor: pointer; list-style: none; padding: 1rem 3rem 1rem 1.2rem; font-weight: 650; position: relative; color: var(--ink); font-family: var(--serif); }
.faq__q::-webkit-details-marker { display: none; }
.faq__q::after {
  content: "+"; position: absolute; right: 1.2rem; top: 50%; transform: translateY(-50%);
  font-size: 1.4rem; font-weight: 400; line-height: 1; color: var(--fern);
}
.faq__item[open] .faq__q::after { content: "\2212"; }
.faq__q:hover { background: var(--ivory); }
.faq__a { padding: 0 1.2rem 1.1rem; color: var(--text-soft); }
.faq__a p:last-child { margin-bottom: 0; }

/* --- form pages ---------------------------------------------------------- */

.formtop { padding-block: var(--band) 1.4rem; text-align: center; }
.formtop p { color: var(--text-soft); }
.formhost { padding-block: 1.5rem var(--band); }
.formhost .bound { max-width: 900px; }

/* --- footer -------------------------------------------------------------- */

.ground { background: var(--ink-2); color: rgb(255 255 255 / 78%); padding-block: var(--band) 2rem; font-size: .92rem; }
.ground a { color: rgb(255 255 255 / 84%); text-decoration: none; }
.ground a:hover { color: #fff; text-decoration: underline; }
.ground__grid { display: grid; gap: 2.2rem; }
@media (min-width: 760px) { .ground__grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1040px) { .ground__grid { grid-template-columns: 1.7fr .75fr .75fr 1.4fr; } }

.wordmark--foot .wordmark__name { color: #fff; }
.wordmark--foot .wordmark__sub { color: rgb(255 255 255 / 58%); display: block; }

.ground__secure { margin: 1.25rem 0; font-size: .84rem; color: rgb(255 255 255 / 66%); }
.pay__label { font-size: .72rem; text-transform: uppercase; letter-spacing: .11em; color: rgb(255 255 255 / 48%); margin-bottom: .5rem; }
.pay { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .45rem; }
.pay img { display: block; border-radius: 4px; box-shadow: 0 0 0 1px rgb(255 255 255 / 12%); }

.ground__col h2 { font-family: var(--serif); font-size: .95rem; letter-spacing: .02em; color: #fff; margin-bottom: .85rem; }
.ground__col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .48rem; }
.ground__help p { font-size: .86rem; }
.ground__notice { font-size: .78rem; color: rgb(255 255 255 / 60%); line-height: 1.6; }
.ground__notice a { text-decoration: underline; }

.ground__base { margin: 2.3rem 0 0; padding-top: 1.35rem; border-top: 1px solid rgb(255 255 255 / 14%); display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.ground__base small { font-size: .75rem; color: rgb(255 255 255 / 50%); }

/* --- print --------------------------------------------------------------- */

@media print {
  .topbar, .ground, .article__foot, .note--cta, .skip { display: none !important; }
  body { background: #fff; color: #000; font-size: 11pt; }
  .prose a::after { content: " (" attr(href) ")"; font-size: .85em; color: #555; }
}
