/* Nursing Research Aotearoa holding page
   Source: Figma "Nursing Research Aotearoa", Holding Page frame (533-3928).
   Tokens use the Weave contract slugs so the block theme's theme.json can reuse them.
   Fluid values scale between 390px and 1440px viewports. */

/* ---------- Fonts (self-hosted) ---------- */
@font-face {
  font-family: "Domaine Display";
  src: url("fonts/domaine-display-regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Domaine Display";
  src: url("fonts/domaine-display-medium.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Domaine Display";
  src: url("fonts/domaine-display-medium-italic.woff2") format("woff2");
  font-weight: 500;
  font-style: italic;
  font-display: swap;
}
/* Special Gothic (Google Fonts, OFL). Variable weight file, split by unicode range as Google serves it. */
@font-face {
  font-family: "Special Gothic";
  src: url("fonts/special-gothic-latin.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Special Gothic";
  src: url("fonts/special-gothic-latin-ext.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* ---------- Tokens ---------- */
:root {
  /* Primitives (Figma variable names in comments) */
  --brand-green: #00403e;        /* Base/Green */
  --brand-green-deep: #002e2c;   /* darker step for hover, not in Figma */
  --brand-mint: #c8f6e2;         /* Accent/Mint */
  --brand-mint-tint: #e3faf0;    /* Accent/Mint at 50% over white */
  --brand-pink: #f892e5;         /* Accent/Pink */
  --brand-highlighter: #fb764a;  /* Accent/Highlighter */
  --brand-highlighter-deep: #e0592b;
  --neutral-off-white: #f9f5ec;  /* Base/Off White */
  --neutral-soft-black: #1d1a1a; /* Base/Soft Black */
  --green-dark: #4c5a52;         /* Dark green */
  --green-medium: #89968f;       /* Medium green */
  --white: #ffffff;
  --black: #000000;

  /* Semantic (Weave contract slugs) */
  --surface: var(--white);
  --surface-subtle: var(--neutral-off-white);
  --surface-raised: var(--brand-mint-tint);
  --surface-inverse: var(--brand-green);
  --text: var(--neutral-soft-black);
  --text-muted: var(--green-dark);
  --text-inverse: var(--neutral-off-white);
  --border: var(--neutral-off-white);
  --primary: var(--brand-green);
  --primary-strong: var(--brand-green-deep);
  --accent: var(--brand-highlighter);
  --accent-strong: var(--brand-highlighter-deep);
  --accent-mint: var(--brand-mint);
  --accent-pink: var(--brand-pink);
  --focus: var(--brand-highlighter);

  /* Type */
  --font-heading: "Domaine Display", Georgia, "Times New Roman", serif;
  --font-body: "Special Gothic", "Helvetica Neue", Arial, sans-serif;
  --size-display: clamp(2.5rem, 1.757rem + 3.048vw, 4.5rem);      /* 40 to 72 */
  --size-heading: clamp(2rem, 1.629rem + 1.524vw, 3rem);           /* 32 to 48 */
  --size-subheading: clamp(1.625rem, 1.393rem + 0.952vw, 2.25rem); /* 26 to 36 */
  --size-lead: clamp(1.125rem, 1.032rem + 0.381vw, 1.375rem);      /* 18 to 22 */
  --size-body: clamp(1rem, 0.954rem + 0.19vw, 1.125rem);           /* 16 to 18 */
  --size-small: 1rem;                                              /* 16 */
  --size-caption: 0.75rem;                                         /* 12 */
  --lh-display: 1.222;
  --lh-heading: 1.167;
  --lh-subheading: 1.222;
  --lh-lead: 1.273;
  --lh-body: 1.333;
  --lh-small: 1.5;

  /* Spacing */
  --space-10: 0.625rem;
  --space-20: 1.25rem;
  --space-30: 1.875rem;
  --space-40: 2.5rem;
  --space-50: 3.75rem;
  --space-60: 5rem;
  --gutter: clamp(1.25rem, -1.071rem + 9.524vw, 7.5rem);          /* 20 to 120 */
  --section-y: clamp(2.5rem, 1.571rem + 3.81vw, 5rem);            /* 40 to 80 */
  --hero-y: clamp(2.5rem, 1.943rem + 2.286vw, 4rem);              /* 40 to 64 */
  --band-gap: clamp(2.5rem, 2.036rem + 1.905vw, 3.75rem);         /* 40 to 60 */
  --card-pad: clamp(1.5rem, 1.129rem + 1.524vw, 2.5rem);          /* 24 to 40 */
  --card-row: clamp(1.5rem, 1.129rem + 1.524vw, 2.5rem);          /* 24 to 40 */
  --panel-y: clamp(3rem, 1.329rem + 6.857vw, 7.5rem);             /* 48 to 120 */
  --panel-x: clamp(1.25rem, 5vw, 4rem);

  /* Shape */
  --radius-card: 1.5rem;
  --radius-panel: 1rem;
  --radius-field: 0.5rem;
  --radius-pill: 999px;

  /* Widths */
  --width-content: 75rem;   /* 1200 */
  --width-cards: 60rem;     /* 960 */
  --width-form: 46.25rem;   /* 740 */
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  margin: 0;
  background: var(--surface);
  color: var(--text);
  font-family: var(--font-body);
  font-size: var(--size-body);
  line-height: var(--lh-body);
  font-variation-settings: "wdth" 100;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, p { margin: 0; }
h1, h2, h3 {
  font-family: var(--font-heading);
  font-weight: 500;
  text-wrap: balance;
}
img, svg { display: block; max-width: 100%; }
ul { margin: 0; padding: 0; list-style: none; }
a { color: inherit; }

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

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%);
  white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute;
  top: -100%;
  left: var(--space-20);
  z-index: 10;
  padding: 0.75rem 1rem;
  background: var(--surface);
  color: var(--text);
  border-radius: var(--radius-field);
  font-weight: 600;
  text-decoration: none;
}
.skip-link:focus { top: var(--space-20); }

.container {
  width: 100%;
  max-width: calc(var(--width-content) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* ---------- Header ---------- */
.site-header {
  background: var(--surface-inverse);
  padding: 1.875rem var(--gutter) 1.3125rem;
  display: flex;
  justify-content: center;
}
.site-header .logo {
  width: clamp(10.5rem, 8.9rem + 6.6vw, 14rem); /* 168 to 224 */
  height: auto;
  aspect-ratio: 224 / 86;
}

/* ---------- Hero ---------- */
.hero {
  background: var(--surface-inverse);
  color: var(--text-inverse);
  padding: var(--hero-y) var(--gutter);
  text-align: center;
}
.hero__inner {
  max-width: var(--width-content);
  margin-inline: auto;
  display: grid;
  gap: var(--space-40);
}
.hero__title {
  font-size: var(--size-display);
  line-height: var(--lh-display);
  color: var(--accent-mint);
  margin-inline: auto; /* measure is the 1200px hero content width, three lines at 1440 as in the frame */
}
.hero__title .quiet { opacity: 0.7; }
.hero__title em {
  font-style: italic;
  font-weight: 500;
}
.hero__lead {
  display: grid;
  gap: 1rem;
  font-size: var(--size-lead);
  line-height: var(--lh-lead);
}
.hero__reo {
  color: var(--accent-pink);
  font-weight: 400;
}

/* ---------- Funding band ---------- */
.funding {
  padding: var(--section-y) var(--gutter);
  background: var(--surface);
}
.funding__inner {
  max-width: var(--width-cards);
  margin-inline: auto;
  display: grid;
  gap: var(--band-gap);
}
.funding__title {
  font-size: var(--size-heading);
  line-height: var(--lh-heading);
  color: var(--black);
  text-align: center;
}
.cards {
  display: grid;
  gap: var(--card-row);
}
.card {
  position: relative;
  background: var(--surface-raised);
  border-radius: var(--radius-card);
  padding: calc(var(--card-pad) * 0.8) var(--card-pad) var(--card-pad);
  display: grid;
  gap: 2rem;
  overflow: hidden;
}
/* The Figma frame shows a 6px mint left bar on the middle card. Used here as the hover and focus state for every card. */
.card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 6px;
  background: var(--accent-mint);
  opacity: 0;
  transition: opacity 150ms ease;
}
.card:hover::before, .card:focus-within::before { opacity: 1; }
@media (prefers-reduced-motion: reduce) { .card::before { transition: none; } }
.card__body { display: grid; gap: 1rem; }
.card__title {
  font-size: var(--size-subheading);
  line-height: var(--lh-subheading);
  color: var(--text);
}
.card__subtitle {
  color: var(--text-muted);
  font-size: var(--size-lead);
  line-height: var(--lh-lead);
  font-weight: 600;
  margin-top: -0.25rem;
}
.card__text {
  color: var(--text);
  max-width: 70ch;
}
.card__text + .card__text { margin-top: -0.25rem; }

/* ---------- Buttons ---------- */
.button {
  display: inline-flex;
  align-items: center;
  gap: 1rem;
  padding: 0.375rem 0.375rem 0.375rem 1rem;
  border-radius: var(--radius-pill);
  border: 1px solid var(--text);
  background: transparent;
  color: var(--text);
  font: 600 var(--size-small) / 1.5 var(--font-body);
  font-variation-settings: "wdth" 100;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 150ms ease, color 150ms ease, border-color 150ms ease;
}
.button__icon {
  flex: 0 0 auto;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: var(--text);
  display: grid;
  place-items: center;
}
.button__icon img {
  width: 1.5rem;
  height: 1.5rem;
}
.button:hover, .button:focus-visible {
  background: var(--text);
  color: var(--surface);
}
.button--accent {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--white);
}
.button--accent .button__icon { background: var(--white); }
.button--accent:hover, .button--accent:focus-visible {
  background: var(--accent-strong);
  border-color: var(--accent-strong);
  color: var(--white);
}
.button[aria-disabled="true"], .button:disabled {
  opacity: 0.6;
  cursor: progress;
}
@media (prefers-reduced-motion: reduce) { .button { transition: none; } }

/* ---------- Contact ---------- */
.contact {
  padding: var(--section-y) var(--gutter);
  background: var(--surface);
}
.contact__panel {
  max-width: calc(var(--width-content) - 0.625rem); /* 1180 in the frame */
  margin-inline: auto;
  background: var(--surface-subtle);
  border-radius: var(--radius-panel);
  padding: var(--panel-y) var(--panel-x);
  display: grid;
  gap: 2rem;
  justify-items: center;
  text-align: center;
}
.contact__title {
  font-size: var(--size-heading);
  line-height: 1.083; /* 52 / 48 */
  color: var(--text-muted);
}
.contact__intro {
  color: var(--text);
  max-width: 60ch;
}
.form {
  width: 100%;
  max-width: var(--width-form);
  display: grid;
  gap: 1rem;
  text-align: left;
}
.form__row {
  display: grid;
  gap: 1rem;
}
@media (min-width: 40em) {
  .form__row--split { grid-template-columns: 1fr 1fr; }
}
.field {
  display: grid;
  gap: 0.25rem;
}
.field label {
  color: var(--text-muted);
  font-size: var(--size-body);
  line-height: var(--lh-body);
}
.field input,
.field select,
.field textarea {
  width: 100%;
  margin: 0;
  padding: 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-field);
  color: var(--text);
  font: 400 var(--size-small) / 1.5 var(--font-body);
  font-variation-settings: "wdth" 100;
  appearance: none;
  -webkit-appearance: none;
}
.field input::placeholder,
.field textarea::placeholder { color: #757575; opacity: 1; }
.field select:invalid { color: #757575; }
.field select option { color: var(--text); }
.field--select { position: relative; }
.field--select::after {
  /* chevron, mirrors the Figma select */
  content: "";
  position: absolute;
  right: 1rem;
  bottom: 1.5rem;
  width: 0.5rem;
  height: 0.5rem;
  border-right: 1.5px solid var(--text-muted);
  border-bottom: 1.5px solid var(--text-muted);
  transform: rotate(45deg);
  pointer-events: none;
}
.field select { padding-right: 2.5rem; }
.field textarea {
  min-height: 5rem;
  resize: vertical;
}
.field input:focus-visible,
.field select:focus-visible,
.field textarea:focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: 0;
  border-color: var(--primary);
}
.field input:user-invalid,
.field select:user-invalid,
.field textarea:user-invalid {
  border-color: var(--accent-strong);
}
.form__actions {
  display: flex;
  justify-content: center;
  padding-top: 1rem;
}
.form__status {
  min-height: 1.5rem;
  text-align: center;
  color: var(--text-muted);
}
.form__status[data-state="error"] { color: #b42318; }
.form__status[data-state="success"] { color: var(--primary); font-weight: 600; }
/* Honeypot: hidden from people, present for bots */
.form__hp {
  position: absolute;
  left: -10000px;
  width: 1px; height: 1px;
  overflow: hidden;
}
#thanks { display: none; }
#thanks:target { display: block; }

/* ---------- Footer ---------- */
.site-footer {
  position: relative;
  overflow: hidden;
  background: var(--surface-inverse);
  color: var(--text-inverse);
  padding: clamp(3rem, 2.629rem + 1.524vw, 4rem) var(--gutter) 2.5rem;
}
.site-footer__shape {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 37rem; /* 592 */
  height: 37rem;
  pointer-events: none;
}
.site-footer__inner {
  position: relative;
  max-width: var(--width-content);
  margin-inline: auto;
  display: grid;
  gap: 4rem;
}
.site-footer__top {
  display: grid;
  gap: 3rem;
}
@media (min-width: 56em) {
  .site-footer__top {
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
  }
}
.site-footer .logo {
  width: 13.0625rem; /* 209 */
  height: auto;
  aspect-ratio: 209 / 80;
}
.site-footer__content {
  display: grid;
  gap: 4rem;
}
.social {
  display: flex;
  gap: 0.5rem;
}
.social a {
  display: grid;
  place-items: center;
  padding: 0.25rem;
  border-radius: 0.25rem;
}
.social img {
  width: 2rem;
  height: 2rem;
}
.social a:hover img, .social a:focus-visible img { opacity: 0.8; }
.stay {
  display: grid;
  gap: 1.0625rem;
}
.stay__title {
  font-size: var(--size-heading);
  line-height: var(--lh-heading);
  color: var(--accent-mint);
}
.stay p { max-width: 45ch; }
.footer-nav {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr));
  gap: 1rem;
}
.footer-nav ul {
  display: grid;
  gap: 0.25rem;
}
.footer-nav li {
  padding-block: 0.25rem;
  font-size: var(--size-small);
  line-height: var(--lh-small);
}
.footer-nav a {
  text-decoration: none;
}
.footer-nav a:hover, .footer-nav a:focus-visible {
  text-decoration: underline;
  text-underline-offset: 0.2em;
}
.legals {
  display: grid;
  gap: 0.5rem;
  font-size: var(--size-caption);
  line-height: var(--lh-body);
}
@media (min-width: 56em) {
  .legals {
    grid-template-columns: 1fr 1fr;
    align-items: center;
  }
}
.legals ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 0.5rem;
}
.legals li + li::before {
  content: "|";
  margin-right: 0.5rem;
}
.legals a {
  text-decoration: none;
  padding-block: 0.125rem;
}
.legals a:hover, .legals a:focus-visible { text-decoration: underline; }

/* ---------- Small screens ---------- */
@media (max-width: 40em) {
  .card { gap: 1.5rem; }
  .button { width: 100%; justify-content: space-between; }
  .form__actions .button { width: auto; }
  .site-footer__shape { width: 20rem; height: 20rem; }
}

/* ---------- Print ---------- */
@media print {
  .site-header, .hero, .site-footer { background: none !important; color: #000 !important; }
  .site-footer__shape { display: none; }
}
