/* ==========================================================================
   Migrant Connections Taranaki
   Shared stylesheet. Palette sampled directly from the MCT logo.
   Mobile-first. Change a token here and it changes everywhere.
   ========================================================================== */

:root {
  /* Brand, sampled from the logo */
  --blue-deep:    #132D7B;
  --blue:         #1E388C;
  --blue-mid:     #314B9B;
  --blue-light:   #39A8CE;
  --orange:       #EA6B36;
  --orange-dark:  #C25423;   /* AA-safe with white text */
  --green:        #10A556;
  --purple:       #9E3191;
  --red:          #E91821;

  /* Neutrals */
  --ink:          #1F2933;
  --ink-soft:     #4A5568;
  --line:         #E2E6EC;
  --bg:           #FFFFFF;
  --bg-tint:      #F5F7FA;
  --bg-blue:      #F0F4FB;

  /* Type scale */
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
          "Helvetica Neue", Arial, sans-serif;
  --step--1: clamp(0.94rem, 0.92rem + 0.1vw, 1rem);
  --step-0:  clamp(1.06rem, 1rem + 0.25vw, 1.19rem);
  --step-1:  clamp(1.3rem, 1.2rem + 0.5vw, 1.6rem);
  --step-2:  clamp(1.6rem, 1.4rem + 1vw, 2.2rem);
  --step-3:  clamp(2rem, 1.6rem + 1.8vw, 3rem);
  --step-4:  clamp(2.4rem, 1.8rem + 2.8vw, 3.9rem);

  /* Spacing */
  --sp-xs: 0.5rem;
  --sp-s:  1rem;
  --sp-m:  1.75rem;
  --sp-l:  3rem;
  --sp-xl: 4.5rem;
  --sp-2xl: 6.5rem;

  --wrap: 1180px;
  --wrap-narrow: 760px;
  --radius: 10px;
  --shadow: 0 2px 4px rgba(31,41,51,.05), 0 10px 30px rgba(31,41,51,.07);
}

/* Reset ------------------------------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: var(--step-0);
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 var(--sp-s); color: var(--blue-deep); font-weight: 700; }
h1 { font-size: var(--step-4); letter-spacing: -0.02em; }
h2 { font-size: var(--step-3); letter-spacing: -0.015em; }
h3 { font-size: var(--step-1); }
p  { margin: 0 0 var(--sp-s); max-width: 68ch; }
a  { color: var(--blue); }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 3px solid var(--blue-light);
  outline-offset: 2px;
}
ul { padding-left: 1.2em; }

/* Layout ----------------------------------------------------------------- */
.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--sp-s); }
@media (min-width: 700px) { .wrap { padding-inline: var(--sp-m); } }
.wrap--narrow { max-width: var(--wrap-narrow); }
.section { padding-block: var(--sp-xl); }
@media (min-width: 900px) { .section { padding-block: var(--sp-2xl); } }
.section--tint { background: var(--bg-tint); }
.section--blue { background: var(--bg-blue); }
.center { text-align: center; }
.center p { margin-inline: auto; }
/* A <p class="center"> is the centred element itself, not a child of one, so
   `.center p` never matches it. Without this its 68ch max-width pins it left
   and only the text inside is centred, which reads as a misaligned button. */
p.center { max-width: none; margin-inline: auto; }

/* Skip link -------------------------------------------------------------- */
.skip {
  position: absolute; left: -9999px; top: 0; z-index: 999;
  background: var(--blue-deep); color: #fff; padding: var(--sp-s) var(--sp-m);
}
.skip:focus { left: 0; }

/* Buttons ---------------------------------------------------------------- */
.btn {
  display: inline-block;
  padding: 0.85em 1.9em;
  font-size: var(--step-0);
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  border-radius: var(--radius);
  border: 2px solid transparent;
  transition: background-color .15s ease, transform .15s ease, border-color .15s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn--primary { background: var(--orange-dark); color: #fff; }
.btn--primary:hover { background: #A8451B; }
.btn--ghost { background: transparent; color: var(--blue-deep); border-color: var(--blue-mid); }
.btn--ghost:hover { background: var(--blue-deep); color: #fff; border-color: var(--blue-deep); }
.btn--on-dark { background: #fff; color: var(--blue-deep); }
.btn--on-dark:hover { background: #F0F4FB; }

/* Header ----------------------------------------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,.97);
  backdrop-filter: saturate(150%) blur(6px);
  border-bottom: 1px solid var(--line);
}
.site-header__inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--sp-s);
  padding-block: 0.6rem;
}
.brand { display: flex; align-items: center; gap: 0.7rem; text-decoration: none; color: var(--blue-deep); }
.brand img { width: 52px; height: 52px; }
.brand__text { font-weight: 700; font-size: var(--step--1); line-height: 1.15; letter-spacing: -0.01em; }
.brand__text span { display: block; font-weight: 500; color: var(--ink-soft); }

.nav-toggle {
  display: inline-flex; align-items: center; gap: .5rem;
  background: none; border: 2px solid var(--line); border-radius: var(--radius);
  padding: .55rem .8rem; font: inherit; font-size: var(--step--1); font-weight: 600;
  color: var(--blue-deep); cursor: pointer;
}
.nav-toggle__bars { display: block; width: 20px; height: 2px; background: currentColor; position: relative; }
.nav-toggle__bars::before, .nav-toggle__bars::after {
  content: ""; position: absolute; left: 0; width: 20px; height: 2px; background: currentColor;
}
.nav-toggle__bars::before { top: -6px; }
.nav-toggle__bars::after  { top: 6px; }

.nav { display: none; }
.nav[data-open="true"] {
  display: block;
  position: absolute; left: 0; right: 0; top: 100%;
  background: #fff; border-bottom: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.nav ul { list-style: none; margin: 0; padding: var(--sp-s); display: grid; gap: 2px; }
.nav a {
  display: block; padding: .8rem 1rem; text-decoration: none;
  color: var(--blue-deep); font-weight: 600; border-radius: var(--radius);
}
.nav a:hover { background: var(--bg-blue); }
.nav a[aria-current="page"] { background: var(--bg-blue); box-shadow: inset 3px 0 0 var(--orange); }
/* One contact entry only. Previously the nav carried both a "Get support"
   CTA and a plain "Contact" link pointing at the same page, which is
   redundant. The mobile/desktop swap also failed silently: `.nav a` beat
   `.nav__mobile-contact` on specificity, so both showed at once. */
.nav .nav__cta { display: block; margin-top: .4rem; }
.nav .nav__cta a { background: var(--orange-dark); color: #fff; }
.nav .nav__cta a:hover { background: #A8451B; color: #fff; }

/* Facebook icon link, next to the Get support CTA (homepage header only,
   per Narayan's 16 Aug request). Small and quiet by design — it's a
   secondary link, not a second CTA. */
.nav .nav__social { display: flex; justify-content: center; margin-top: .3rem; }
.nav .nav__social a {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; padding: 0;
  color: var(--blue-deep); background: var(--bg-blue); border-radius: 50%;
}
.nav .nav__social a:hover { background: var(--blue-deep); color: #fff; }
.nav .nav__social svg { width: 18px; height: 18px; }

@media (min-width: 950px) {
  .nav-toggle { display: none; }
  .nav { display: block !important; }
  .nav ul { display: flex; align-items: center; gap: .2rem; padding: 0; }
  .nav a { padding: .55rem .85rem; font-size: var(--step--1); }
  .nav a[aria-current="page"] { background: transparent; box-shadow: inset 0 -3px 0 var(--orange); border-radius: 0; }
  .nav .nav__cta { margin-left: .6rem; margin-top: 0; }
  .nav .nav__cta a { border-radius: var(--radius); }
  .nav .nav__social { margin-left: .5rem; margin-top: 0; }
  .brand img { width: 60px; height: 60px; }
}

/* The CTA keeps its solid fill even when it is the current page. Without this
   the `aria-current` rule (equal specificity, later in source) strips the
   background and leaves white text on white: an invisible button. */
.nav .nav__cta a[aria-current="page"] {
  background: var(--orange-dark);
  color: #fff;
  box-shadow: none;
  border-radius: var(--radius);
}

/* Hero ------------------------------------------------------------------- */
.hero { position: relative; background: var(--blue-deep); color: #fff; overflow: hidden; }
.hero__img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; opacity: .28;
}
.hero__inner { position: relative; padding-block: var(--sp-xl); }
@media (min-width: 900px) { .hero__inner { padding-block: var(--sp-2xl); } }
.hero h1 { color: #fff; max-width: 16ch; }
.hero__lead {
  font-size: var(--step-1); color: #E8EEF9; max-width: 46ch;
  margin-bottom: var(--sp-m);
}
.hero__actions { display: flex; flex-wrap: wrap; gap: var(--sp-s); }
.hero__note { margin-top: var(--sp-m); font-size: var(--step--1); color: #C3D0E8; }
.hero__note a { color: #fff; }

/* Eyebrow ---------------------------------------------------------------- */
.eyebrow {
  display: inline-block; font-size: var(--step--1); font-weight: 700;
  letter-spacing: .08em; text-transform: uppercase; color: var(--orange-dark);
  margin-bottom: var(--sp-xs);
}
.hero .eyebrow { color: #FFC9A8; }

/* Cards ------------------------------------------------------------------ */
.grid { display: grid; gap: var(--sp-m); }
@media (min-width: 700px)  { .grid--2 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px)  { .grid--3 { grid-template-columns: repeat(3, 1fr); } }

.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: var(--sp-m); box-shadow: var(--shadow);
}
.card h3 { margin-bottom: .4rem; }
.card p:last-child { margin-bottom: 0; }
.card__icon {
  width: 44px; height: 44px; border-radius: 50%;
  display: grid; place-items: center; margin-bottom: var(--sp-s);
  background: var(--bg-blue); color: var(--blue);
}
.card__icon svg { width: 24px; height: 24px; }

/* Split (image + text) --------------------------------------------------- */
.split { display: grid; gap: var(--sp-m); align-items: center; }
@media (min-width: 850px) {
  .split { grid-template-columns: 1fr 1fr; gap: var(--sp-l); }
  .split--reverse .split__media { order: 2; }
}
.split__media img { border-radius: var(--radius); box-shadow: var(--shadow); width: 100%; }

/* Use for two text columns of uneven height (e.g. Contact), so the shorter
   column sits flush with the top of the taller one instead of centring. */
.split--top { align-items: start; }

/* Tribute ---------------------------------------------------------------- */
.tribute { display: grid; gap: var(--sp-m); align-items: center; }
@media (min-width: 750px) { .tribute { grid-template-columns: 220px 1fr; gap: var(--sp-l); } }
.tribute__photo {
  width: 200px; height: 200px; border-radius: 50%; object-fit: cover;
  box-shadow: var(--shadow); justify-self: center;
}
@media (min-width: 750px) { .tribute__photo { width: 220px; height: 220px; } }
blockquote {
  margin: 0 0 var(--sp-s);
  padding-left: var(--sp-s);
  border-left: 4px solid var(--orange);
  font-size: var(--step-1);
  line-height: 1.45;
  color: var(--blue-deep);
}
blockquote cite { display: block; font-size: var(--step--1); font-style: normal; color: var(--ink-soft); margin-top: .6rem; }

/* Stat strip ------------------------------------------------------------- */
.section--stats { padding-block: var(--sp-l); }
@media (min-width: 900px) { .section--stats { padding-block: var(--sp-xl); } }
.stats { display: grid; gap: var(--sp-m); text-align: center; }
@media (min-width: 700px) { .stats { grid-template-columns: repeat(3, 1fr); gap: var(--sp-l); } }
.stat__num { display: block; font-size: var(--step-3); font-weight: 700; color: var(--blue); line-height: 1.1; }
.stat__label { display: block; color: var(--ink-soft); font-size: var(--step-0); margin-top: .3rem; }

/* Sponsors --------------------------------------------------------------- */
.sponsors { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: var(--sp-m); }
.sponsors img { height: 52px; width: auto; opacity: .82; }
.sponsors img:hover { opacity: 1; }

/* CTA band --------------------------------------------------------------- */
.cta-band { background: var(--blue-deep); color: #fff; }
.cta-band h2 { color: #fff; }
.cta-band p { color: #DCE5F5; }
.cta-band .btn { margin-top: var(--sp-xs); }

/* Footer ----------------------------------------------------------------- */
.site-footer { background: #12203F; color: #C7D2E6; padding-block: var(--sp-xl) var(--sp-m); font-size: var(--step--1); }
.site-footer h2, .site-footer h3 { color: #fff; font-size: var(--step-0); margin-bottom: .6rem; }
.site-footer a { color: #fff; }
.footer-grid { display: grid; gap: var(--sp-m); }
@media (min-width: 750px) { .footer-grid { grid-template-columns: 1.4fr 1fr 1fr; gap: var(--sp-l); } }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: .45rem; }
.site-footer .footer-brand img { width: 64px; height: 64px; background: #fff; border-radius: 8px; padding: 4px; }
.footer-bottom {
  margin-top: var(--sp-m); padding-top: var(--sp-s);
  border-top: 1px solid rgba(255,255,255,.15);
  display: flex; flex-wrap: wrap; gap: var(--sp-s); justify-content: space-between;
}
.footer-bottom p { margin: 0; }

/* Interior page hero ----------------------------------------------------- */
.page-hero { position: relative; background: var(--blue-deep); color: #fff; overflow: hidden; }
.page-hero__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .25; }
.page-hero__inner { position: relative; padding-block: var(--sp-l) var(--sp-xl); }
@media (min-width: 900px) { .page-hero__inner { padding-block: var(--sp-xl) var(--sp-2xl); } }
.page-hero h1 { color: #fff; max-width: 20ch; }
.page-hero p { color: #E8EEF9; font-size: var(--step-1); max-width: 52ch; margin-bottom: 0; }
.page-hero .eyebrow { color: #FFC9A8; }

/* Service blocks --------------------------------------------------------- */
.service { padding-block: var(--sp-l); border-top: 1px solid var(--line); }
.service:first-of-type { border-top: 0; }
.service h2 { font-size: var(--step-2); }
.service ul { margin: 0 0 var(--sp-s); }
.service li { margin-bottom: .4rem; }

/* Numbered steps --------------------------------------------------------- */
.steps { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--sp-m); counter-reset: step; }
/* Two columns on wider screens so a short list doesn't leave the page
   looking like a narrow ribbon of text in a wide container. */
@media (min-width: 860px) {
  .steps--2col { grid-template-columns: repeat(2, 1fr); gap: var(--sp-l) var(--sp-l); }
}
.steps > li {
  counter-increment: step;
  display: grid; grid-template-columns: 46px 1fr; gap: var(--sp-s); align-items: start;
}
.steps > li::before {
  content: counter(step);
  display: grid; place-items: center;
  width: 46px; height: 46px; border-radius: 50%;
  background: var(--blue-deep); color: #fff;
  font-weight: 700; font-size: var(--step-0);
}
.steps h3 { font-size: var(--step-1); margin-bottom: .3rem; }
.steps p:last-child { margin-bottom: 0; }

/* Link groups ------------------------------------------------------------ */
/* Each group is its own card and they flow into a masonry-ish column layout,
   so groups of different lengths don't leave one column ending awkwardly
   short of the others. */
.link-groups { columns: 1; column-gap: var(--sp-m); }
@media (min-width: 700px)  { .link-groups { columns: 2; } }
@media (min-width: 1000px) { .link-groups { columns: 3; } }
.link-group {
  break-inside: avoid; -webkit-column-break-inside: avoid;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: var(--sp-m); margin-bottom: var(--sp-m);
  text-align: left;
}
.link-group h3 { font-size: var(--step-0); margin-bottom: .6rem; }
.link-group ul { list-style: none; padding: 0; margin: 0; display: grid; gap: .55rem; }
.link-group li { line-height: 1.4; }
.link-group a { font-weight: 600; }
.link-group .note { display: block; color: var(--ink-soft); font-size: var(--step--1); font-weight: 400; }

/* Place cards ------------------------------------------------------------ */
.place { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.place img { width: 100%; aspect-ratio: 16/10; object-fit: cover; }
.place__body { padding: var(--sp-m); }
.place__body h3 { margin-bottom: .4rem; }
.place__body p:last-child { margin-bottom: 0; }

/* Prose (terms and similar) ---------------------------------------------- */
.prose h2 { font-size: var(--step-1); margin-top: var(--sp-m); }
.prose p, .prose li { max-width: 70ch; }

/* Forms ------------------------------------------------------------------ */
/* Labels are always visible, never placeholder-only: placeholders vanish on
   focus, which is hard for anyone translating as they go or returning to a
   half-filled form. Controls are 48px+ so they're comfortable on a phone. */
.form { display: grid; gap: var(--sp-m); }
.field { display: grid; gap: .35rem; }
.field label { font-weight: 600; color: var(--blue-deep); }
.field .hint { font-size: var(--step--1); color: var(--ink-soft); }
.field input, .field textarea, .field select {
  font: inherit; font-size: var(--step-0); color: var(--ink);
  padding: .7em .85em; min-height: 48px;
  background: #fff;
  border: 2px solid #C3CBD8; border-radius: var(--radius);
  width: 100%;
}
.field textarea { min-height: 150px; resize: vertical; line-height: 1.5; }
.field input:hover, .field textarea:hover, .field select:hover { border-color: var(--blue-mid); }
.field input:focus, .field textarea:focus, .field select:focus {
  border-color: var(--blue); outline: 3px solid var(--blue-light); outline-offset: 1px;
}
.field .req { color: var(--orange-dark); font-weight: 700; }
.form button[type="submit"] { justify-self: start; cursor: pointer; font-family: inherit; }
/* Spam honeypot: hidden from people, visible to bots that fill everything. */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Contact details -------------------------------------------------------- */
.contact-list { list-style: none; padding: 0; margin: 0 0 var(--sp-m); display: grid; gap: var(--sp-m); }
.contact-item { display: grid; grid-template-columns: 44px 1fr; gap: var(--sp-s); align-items: start; }
.contact-item__icon {
  width: 44px; height: 44px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--bg-blue); color: var(--blue);
}
.contact-item__icon svg { width: 22px; height: 22px; }
.contact-item h3 { font-size: var(--step-0); margin-bottom: .15rem; }
.contact-item p { margin-bottom: 0; }
.contact-item .big { font-size: var(--step-1); font-weight: 700; }

/* Callout ---------------------------------------------------------------- */
.callout {
  background: var(--bg-blue); border-left: 4px solid var(--blue-mid);
  border-radius: 0; padding: var(--sp-m);
  margin-block: var(--sp-m);
}
.callout :last-child { margin-bottom: 0; }
.callout h2, .callout h3 { font-size: var(--step-0); margin-bottom: .4rem; }

/* Utility ---------------------------------------------------------------- */
.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.lede { font-size: var(--step-1); color: var(--ink-soft); }

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

/* Shielded Site badge (Women's Refuge) ------------------------------------
   Discreet exit to domestic-violence support. Opens in a same-page modal,
   so it never touches browser history. Sits in the footer's bottom row
   rather than floating, so it never sits on top of page content. */
.footer-shielded {
  width: 100%;
  display: flex;
  align-items: center;
}
#shielded-logo {
  display: inline-block;
  line-height: 0;
  border-radius: 50%;
  box-shadow: 0 2px 8px rgba(0,0,0,.25);
}
#shielded-logo:focus-visible { outline: 3px solid var(--blue-light); outline-offset: 2px; }
#shielded-logo img { display: block; border-radius: 50%; width: 36px; height: 36px; }

/* Translate links --------------------------------------------------------
   Plain-text list in the footer, not a floating widget. Each link opens
   the current page through Google's translate.goog proxy in a new tab.
   Sits as the first line of .footer-bottom, so it shares that row's one
   divider rather than adding a second border. */
.translate-links {
  width: 100%;
  font-size: var(--step--2);
  color: #94A6CC;
}
.translate-links span:first-child { margin-right: var(--sp-xs); color: #B7C4E0; }
.translate-links a {
  color: #94A6CC;
  text-decoration: underline;
  text-underline-offset: 2px;
  margin-right: .6rem;
  white-space: nowrap;
}
.translate-links a:hover,
.translate-links a:focus-visible { color: #fff; }
