/* Gi Unit — NZ money information site */
:root {
  --ink: #14231f;
  --ink-soft: #3a4f48;
  --forest: #176b52;
  --forest-dark: #0f4d3b;
  --sea: #1c6673;
  --mist: #e4eee9;
  --fog: #f3f7f5;
  --line: #c9d8d1;
  --white: #ffffff;
  --sand: #f7faf8;
  --coral: #c9613d;
  --coral-dark: #a64c2d;
  --success: #1f7a4d;
  --error: #b42318;
  --shadow: 0 18px 40px rgba(20, 35, 31, 0.08);
  --radius: 6px;
  --max: 1120px;
  --font-display: "Bricolage Grotesque", Georgia, serif;
  --font-body: "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif;
  --header-h: 72px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.05rem;
  line-height: 1.65;
  color: var(--ink);
  background:
    radial-gradient(1200px 500px at 10% -10%, rgba(23, 107, 82, 0.12), transparent 60%),
    radial-gradient(900px 420px at 100% 0%, rgba(28, 102, 115, 0.1), transparent 55%),
    linear-gradient(180deg, var(--fog) 0%, var(--sand) 40%, var(--white) 100%);
  min-height: 100vh;
}

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

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

a:hover {
  color: var(--coral);
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0 0 0.75rem;
  color: var(--ink);
}

h1 { font-size: clamp(2.2rem, 4.5vw, 3.5rem); font-weight: 700; }
h2 { font-size: clamp(1.7rem, 3vw, 2.35rem); font-weight: 700; }
h3 { font-size: 1.35rem; font-weight: 650; }

p { margin: 0 0 1rem; color: var(--ink-soft); }

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

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--ink);
  color: var(--white);
  padding: 0.75rem 1rem;
  z-index: 1000;
}

.skip-link:focus {
  left: 1rem;
  top: 1rem;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(12px);
  background: rgba(247, 250, 248, 0.92);
  border-bottom: 1px solid rgba(201, 216, 209, 0.8);
}

.site-header .header-inner {
  position: relative;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: var(--header-h);
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  color: var(--ink);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.35rem;
  letter-spacing: -0.03em;
}

.logo-mark {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background:
    linear-gradient(145deg, var(--forest) 0%, var(--sea) 100%);
  display: grid;
  place-items: center;
  color: var(--white);
  font-size: 0.85rem;
  font-weight: 700;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.2);
}

.nav-toggle {
  display: none;
  border: 1px solid var(--line);
  background: var(--white);
  border-radius: var(--radius);
  padding: 0.55rem 0.75rem;
  cursor: pointer;
  font: inherit;
  color: var(--ink);
}

.nav-list {
  display: flex;
  align-items: center;
  gap: 0.25rem 1.1rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-list a {
  text-decoration: none;
  color: var(--ink-soft);
  font-weight: 500;
  font-size: 0.98rem;
}

.nav-list a:hover,
.nav-list a[aria-current="page"] {
  color: var(--forest-dark);
}

.nav-cta {
  display: inline-flex;
  align-items: center;
  background: var(--forest);
  color: var(--white) !important;
  padding: 0.55rem 0.95rem;
  border-radius: 999px;
  text-decoration: none !important;
}

.nav-cta:hover {
  background: var(--forest-dark);
  color: var(--white) !important;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.85rem 1.35rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
}

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

.btn-primary {
  background: var(--coral);
  color: var(--white);
}

.btn-primary:hover {
  background: var(--coral-dark);
  color: var(--white);
}

.btn-secondary {
  background: var(--white);
  color: var(--forest-dark);
  border-color: var(--line);
}

.btn-secondary:hover {
  border-color: var(--forest);
  color: var(--forest-dark);
}

.btn-dark {
  background: var(--ink);
  color: var(--white);
}

.btn-dark:hover {
  background: #0b1613;
  color: var(--white);
}

.btn-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

/* Hero — full-bleed visual plane */
.hero {
  position: relative;
  min-height: min(88vh, 760px);
  display: grid;
  align-items: end;
  color: var(--white);
  overflow: hidden;
}

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

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  animation: heroShow 1.2s ease both;
}

.hero-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(10, 24, 20, 0.2) 0%, rgba(10, 24, 20, 0.55) 45%, rgba(10, 24, 20, 0.82) 100%);
}

.hero-content {
  position: relative;
  z-index: 1;
  padding: 4.5rem 0 3.5rem;
  max-width: 720px;
  animation: riseIn 0.9s ease 0.15s both;
}

.brand-hero {
  font-family: var(--font-display);
  font-size: clamp(2.8rem, 6vw, 4.6rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  margin: 0 0 0.85rem;
  color: var(--white);
  line-height: 1.05;
}

.hero h1 {
  color: var(--white);
  font-size: clamp(1.55rem, 2.8vw, 2.1rem);
  font-weight: 600;
  max-width: 28ch;
}

.hero p {
  color: rgba(255, 255, 255, 0.9);
  font-size: 1.12rem;
  max-width: 42ch;
}

/* Sections */
.section {
  padding: 4.5rem 0;
}

.section-alt {
  background:
    linear-gradient(180deg, rgba(228, 238, 233, 0.65), rgba(243, 247, 245, 0.4));
  border-block: 1px solid rgba(201, 216, 209, 0.6);
}

.section-head {
  max-width: 640px;
  margin-bottom: 2.25rem;
}

.section-head p {
  font-size: 1.08rem;
}

.eyebrow {
  display: inline-block;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--sea);
  margin-bottom: 0.65rem;
}

/* Feature grid — no card chrome unless interactive */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem 1.75rem;
}

.feature-item h3 {
  margin-top: 0.35rem;
}

.feature-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, var(--mist), var(--white));
  border: 1px solid var(--line);
  color: var(--forest);
  font-weight: 700;
  font-family: var(--font-display);
}

/* Steps */
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  counter-reset: step;
}

.step {
  position: relative;
  padding-top: 0.25rem;
}

.step::before {
  counter-increment: step;
  content: counter(step, decimal-leading-zero);
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
  color: var(--forest);
  display: block;
  margin-bottom: 0.75rem;
  line-height: 1;
}

/* Split media sections */
.split {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 2.5rem;
  align-items: center;
}

.split.reverse {
  grid-template-columns: 0.95fr 1.05fr;
}

.split.reverse .split-copy { order: 2; }
.split.reverse .split-media { order: 1; }

.split-media {
  position: relative;
  overflow: hidden;
  border-radius: 4px;
  min-height: 320px;
  box-shadow: var(--shadow);
}

.split-media img {
  width: 100%;
  height: 100%;
  min-height: 320px;
  object-fit: cover;
}

/* Info list */
.info-list {
  list-style: none;
  margin: 1.25rem 0 0;
  padding: 0;
}

.info-list li {
  position: relative;
  padding: 0.65rem 0 0.65rem 1.6rem;
  border-bottom: 1px solid var(--line);
  color: var(--ink-soft);
}

.info-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 1.15rem;
  width: 0.65rem;
  height: 0.65rem;
  border-radius: 50%;
  background: var(--forest);
}

/* FAQ */
.faq-list {
  display: grid;
  gap: 0.75rem;
}

.faq-item {
  border-bottom: 1px solid var(--line);
  padding: 0.25rem 0 0.85rem;
}

.faq-item summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--ink);
  list-style: none;
  padding: 0.85rem 0;
  font-size: 1.05rem;
}

.faq-item summary::-webkit-details-marker { display: none; }

.faq-item summary::after {
  content: "+";
  float: right;
  color: var(--forest);
  font-weight: 700;
  font-size: 1.25rem;
}

.faq-item[open] summary::after { content: "–"; }

.faq-item p {
  margin: 0 0 0.75rem;
  padding-right: 1.5rem;
}

/* Reviews */
.reviews {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem 2rem;
}

.review {
  padding: 0;
  border: none;
  background: transparent;
}

.review blockquote {
  margin: 0 0 0.85rem;
  font-size: 1.05rem;
  color: var(--ink);
  quotes: "“" "”";
}

.review blockquote::before {
  content: open-quote;
}

.review blockquote::after {
  content: close-quote;
}

.review-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  font-size: 0.92rem;
  color: var(--ink-soft);
}

.review-name {
  font-weight: 700;
  color: var(--ink);
}

/* CTA band */
.cta-band {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(135deg, var(--forest-dark), var(--sea));
  color: var(--white);
  padding: 3.5rem 0;
}

.cta-band::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(500px 220px at 90% 20%, rgba(255, 255, 255, 0.12), transparent 70%);
  pointer-events: none;
}

.cta-band .container {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.cta-band h2,
.cta-band p {
  color: var(--white);
  max-width: 560px;
}

.cta-band p { opacity: 0.92; margin-bottom: 0; }

/* Page hero (inner pages) */
.page-hero {
  padding: 3.5rem 0 2.5rem;
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(228, 238, 233, 0.7), transparent);
}

.page-hero p {
  max-width: 58ch;
  font-size: 1.12rem;
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  font-size: 0.9rem;
  color: var(--ink-soft);
  margin-bottom: 1rem;
  list-style: none;
  padding: 0;
}

.breadcrumbs a {
  color: var(--ink-soft);
  text-decoration: none;
}

.breadcrumbs a:hover { color: var(--forest); }

.prose {
  max-width: 740px;
}

.prose h2 {
  margin-top: 2.5rem;
}

.prose h3 {
  margin-top: 1.75rem;
}

.prose ul,
.prose ol {
  color: var(--ink-soft);
  padding-left: 1.25rem;
}

.prose li { margin-bottom: 0.45rem; }

.legal-nav {
  display: grid;
  gap: 0.35rem;
  margin: 1.5rem 0 2rem;
  padding: 1rem 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.legal-nav a {
  text-decoration: none;
  font-weight: 500;
}

/* Blog */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
}

.blog-card {
  display: grid;
  gap: 1rem;
  text-decoration: none;
  color: inherit;
  transition: transform 0.25s ease;
}

.blog-card:hover {
  transform: translateY(-3px);
  color: inherit;
}

.blog-card-media {
  overflow: hidden;
  border-radius: 4px;
  aspect-ratio: 4 / 3;
  background: var(--mist);
}

.blog-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease;
}

.blog-card:hover img {
  transform: scale(1.04);
}

.blog-card h3 {
  margin: 0 0 0.4rem;
  color: var(--ink);
}

.blog-meta {
  font-size: 0.9rem;
  color: var(--ink-soft);
}

.article-hero-img {
  margin: 2rem 0;
  border-radius: 4px;
  overflow: hidden;
  aspect-ratio: 16 / 9;
}

.article-hero-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Contact */
.contact-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 2.5rem;
  align-items: start;
}

.contact-details {
  display: grid;
  gap: 1.25rem;
}

.contact-block h3 {
  margin-bottom: 0.35rem;
}

.map-wrap {
  margin-top: 1.5rem;
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid var(--line);
  min-height: 300px;
  background: var(--mist);
}

.map-wrap iframe {
  width: 100%;
  height: 320px;
  border: 0;
  display: block;
}

/* Forms */
.form {
  display: grid;
  gap: 1rem;
}

.form-row {
  display: grid;
  gap: 0.4rem;
}

.form-row.two {
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

label {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--ink);
}

input,
textarea,
select {
  width: 100%;
  padding: 0.8rem 0.95rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  font: inherit;
  color: var(--ink);
}

input:focus,
textarea:focus,
select:focus {
  outline: 2px solid rgba(23, 107, 82, 0.35);
  border-color: var(--forest);
}

.field-error {
  color: var(--error);
  font-size: 0.88rem;
  min-height: 1.2em;
}

input.is-invalid,
textarea.is-invalid {
  border-color: var(--error);
}

.form-success {
  display: none;
  padding: 1rem 1.1rem;
  background: rgba(31, 122, 77, 0.1);
  border: 1px solid rgba(31, 122, 77, 0.35);
  border-radius: var(--radius);
  color: var(--success);
  font-weight: 600;
}

.form-success.is-visible { display: block; }

/* Thank-you popup after form submit */
.thanks-popup {
  position: fixed;
  inset: 0;
  z-index: 400;
  display: grid;
  place-items: center;
  padding: 1.25rem;
  background: rgba(10, 22, 18, 0.55);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.thanks-popup.is-visible {
  opacity: 1;
  visibility: visible;
}

.thanks-popup-card {
  position: relative;
  width: min(100%, 420px);
  background: var(--white);
  border-radius: 14px;
  padding: 2rem 1.75rem 1.5rem;
  box-shadow: 0 24px 48px rgba(20, 35, 31, 0.22);
  text-align: center;
  animation: riseIn 0.3s ease both;
}

.thanks-popup-card h2 {
  margin-bottom: 0.5rem;
  color: var(--forest-dark);
}

.thanks-popup-card p {
  margin-bottom: 1.35rem;
}

.thanks-popup-close {
  position: absolute;
  top: 0.55rem;
  right: 0.7rem;
  border: 0;
  background: transparent;
  font-size: 1.6rem;
  line-height: 1;
  color: var(--ink-soft);
  cursor: pointer;
}

.thanks-popup-close:hover {
  color: var(--ink);
}

body.popup-open {
  overflow: hidden;
}

.checkbox-row {
  display: flex;
  gap: 0.65rem;
  align-items: flex-start;
}

.checkbox-row input {
  width: auto;
  margin-top: 0.3rem;
}

/* Quiz */
.quiz-shell {
  max-width: 720px;
  margin: 0 auto;
}

.quiz-progress {
  height: 6px;
  background: var(--mist);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 1.5rem;
}

.quiz-progress span {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--forest), var(--sea));
  transition: width 0.35s ease;
}

.quiz-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 1.75rem;
  box-shadow: var(--shadow);
}

.quiz-options {
  display: grid;
  gap: 0.75rem;
  margin-top: 1.25rem;
}

.quiz-option {
  text-align: left;
  width: 100%;
  padding: 0.95rem 1.1rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--fog);
  font: inherit;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.15s ease;
}

.quiz-option:hover {
  border-color: var(--forest);
  background: var(--white);
  transform: translateX(3px);
}

.quiz-result {
  display: none;
  text-align: center;
  padding: 1rem 0;
}

.quiz-result.is-visible { display: block; animation: riseIn 0.5s ease both; }

.quiz-result h2 {
  color: var(--forest-dark);
  margin-bottom: 0.75rem;
}

.quiz-badge {
  display: inline-flex;
  margin-bottom: 1rem;
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  background: var(--mist);
  color: var(--forest-dark);
  font-weight: 700;
  font-size: 0.9rem;
}

/* Footer */
.site-footer {
  margin-top: 2rem;
  background:
    linear-gradient(180deg, #0f1c18 0%, #0b1411 100%);
  color: rgba(255, 255, 255, 0.82);
  padding: 3.5rem 0 2rem;
}

.site-footer a {
  color: rgba(255, 255, 255, 0.86);
  text-decoration: none;
}

.site-footer a:hover {
  color: #9bd4c0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 2rem;
  margin-bottom: 2.5rem;
}

.footer-brand {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 0.75rem;
}

.footer-col h3 {
  color: var(--white);
  font-size: 1rem;
  margin-bottom: 0.9rem;
}

.footer-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.45rem;
}

.footer-legal {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding-top: 1.5rem;
  display: grid;
  gap: 0.65rem;
  font-size: 0.92rem;
}

.footer-address {
  white-space: pre-line;
}

/* Cookie notice */
.cookie-banner {
  position: fixed;
  left: 1rem;
  right: 1rem;
  bottom: 1rem;
  z-index: 200;
  max-width: 520px;
  margin-left: auto;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow);
  padding: 1.1rem 1.2rem;
  display: none;
}

.cookie-banner.is-visible { display: block; animation: riseIn 0.35s ease both; }

.cookie-banner p {
  font-size: 0.95rem;
  margin-bottom: 0.85rem;
}

.cookie-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

/* 404 */
.error-page {
  min-height: 60vh;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 4rem 0;
}

.error-code {
  font-family: var(--font-display);
  font-size: clamp(4rem, 12vw, 7rem);
  line-height: 1;
  color: var(--forest);
  margin: 0;
}

/* Utilities */
.muted { color: var(--ink-soft); }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

@keyframes riseIn {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes heroShow {
  from { transform: scale(1.06); opacity: 0.7; }
  to { transform: scale(1); opacity: 1; }
}

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.is-in {
  opacity: 1;
  transform: translateY(0);
}

/* Responsive */
@media (max-width: 960px) {
  .feature-grid,
  .steps,
  .footer-grid,
  .split,
  .split.reverse,
  .contact-grid {
    grid-template-columns: 1fr;
  }

  .split.reverse .split-copy,
  .split.reverse .split-media { order: initial; }

  .reviews,
  .blog-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 820px) {
  .nav-toggle {
    display: inline-flex;
    z-index: 2;
  }

  .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(247, 250, 248, 0.98);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 16px 28px rgba(20, 35, 31, 0.12);
    padding: 0.75rem 1rem 1.25rem;
    display: none;
    z-index: 101;
  }

  .site-nav.is-open { display: block; }

  .nav-list {
    flex-direction: column;
    align-items: stretch;
    gap: 0.35rem;
  }

  .nav-list a {
    display: block;
    padding: 0.65rem 0.25rem;
  }

  .nav-cta {
    justify-content: center;
    margin-top: 0.35rem;
  }

  .form-row.two { grid-template-columns: 1fr; }

  .hero { min-height: 72vh; }
}

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