/* ==========================================================================
   CE Otago — theme styles
   ========================================================================== */

:root {
	--ink: #2d2240;
	--purple: #523a80;
	--purple-deep: #3f2c66;
	--purple-soft: #ebe6f5;
	--harbour: #0c7489;
	--harbour-light: #7fd3e3;
	--mist: #f2f0f7;
	--line: #e0dbeb;
	--muted: #5e5772;
	--white: #fff;
	--error: #b3261e;
	--error-soft: #fcecea;
	--ok: #1d6b4f;

	--font-body: "Atkinson Hyperlegible", "Segoe UI", system-ui, sans-serif;
	--font-display: "Bricolage Grotesque", "Atkinson Hyperlegible", system-ui, sans-serif;

	--r-img: 32px;
	--r-card: 24px;
	--r-input: 12px;

	--gutter: 16px;
	--wrap: 1400px;
	--header-h: 88px;

	--shadow: 0 18px 40px -24px rgba(45, 34, 64, .35);
	--ease: cubic-bezier(.22, .8, .24, 1);
}
@media (min-width: 720px) { :root { --gutter: 32px; } }

/* Base ------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 16px); }
body {
	margin: 0;
	background: var(--white);
	color: var(--ink);
	font-family: var(--font-body);
	font-size: 1.0625rem;
	line-height: 1.65;
	-webkit-font-smoothing: antialiased;
	overflow-x: hidden;
}
@media (min-width: 720px) { body { font-size: 1.125rem; } }
img, svg, iframe { max-width: 100%; }
img { height: auto; display: block; }
a { color: var(--harbour); text-underline-offset: .18em; text-decoration-thickness: 1.5px; }
a:hover { color: var(--purple); }
:focus-visible { outline: 3px solid var(--harbour); outline-offset: 3px; border-radius: 4px; }
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 650; line-height: 1.15; letter-spacing: -.01em; margin: 0 0 .5em; text-wrap: balance; }
p { margin: 0 0 1em; }
button { font: inherit; color: inherit; }

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

.screen-reader-text {
	position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
	overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
	position: absolute; left: 16px; top: -100px; z-index: 1000;
	background: var(--ink); color: var(--white); padding: 12px 18px; border-radius: 0 0 12px 12px; font-weight: 700;
}
.skip-link:focus { top: 0; color: var(--white); }

.icon { flex: none; }

/* Buttons ---------------------------------------------------------------- */
.btn {
	display: inline-flex; align-items: center; justify-content: center; gap: .55em;
	min-height: 52px; padding: 0 1.6em; border-radius: 999px; border: 2px solid transparent;
	font-family: var(--font-body); font-weight: 700; font-size: 1rem; line-height: 1.2;
	text-decoration: none; cursor: pointer;
	transition: background-color .2s, color .2s, border-color .2s, transform .2s var(--ease);
}
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--purple); color: var(--white); }
.btn--primary:hover { background: var(--ink); color: var(--white); }
.btn--ghost { border-color: var(--purple); color: var(--purple); background: transparent; }
.btn--ghost:hover { background: var(--purple); color: var(--white); }
.btn--light { background: var(--white); color: var(--ink); }
.btn--light:hover { background: var(--ink); color: var(--white); }
.btn--small { min-height: 42px; padding: 0 1.1em; font-size: .95rem; }
.btn--large { min-height: 58px; padding: 0 2em; font-size: 1.0625rem; }

.text-link {
	display: inline-flex; align-items: center; gap: .4em;
	padding: 0; border: 0; background: none; cursor: pointer;
	color: var(--purple); font-weight: 700; text-decoration: underline; text-decoration-color: var(--harbour-light);
	text-decoration-thickness: 2px; text-underline-offset: .25em;
	transition: text-decoration-color .2s, color .2s;
}
.text-link:hover { color: var(--ink); text-decoration-color: var(--purple); }

/* Header ----------------------------------------------------------------- */
.site-header {
	position: sticky; top: 0; z-index: 50;
	background: rgba(255, 255, 255, .92);
	-webkit-backdrop-filter: saturate(1.4) blur(12px); backdrop-filter: saturate(1.4) blur(12px);
	border-bottom: 1px solid transparent;
	transition: border-color .3s, box-shadow .3s;
}
.admin-bar .site-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .site-header { top: 0; } }
.site-header.is-scrolled { border-bottom-color: var(--line); box-shadow: 0 8px 24px -20px rgba(45, 34, 64, .4); }
.site-header__inner { display: flex; align-items: center; gap: 24px; height: var(--header-h); transition: height .3s var(--ease); }
.site-header.is-scrolled .site-header__inner { height: 68px; }
.site-header__logo { flex: none; display: block; }
.site-header__logo img { height: 56px; width: auto; transition: height .3s var(--ease); }
.site-header.is-scrolled .site-header__logo img { height: 44px; }
.site-header__call { margin-left: auto; white-space: nowrap; }
@media (max-width: 639px) { .site-header__call { display: none; } .site-header__logo img { height: 46px; } }

.menu-button {
	display: inline-flex; align-items: center; gap: 8px; margin-left: auto;
	min-height: 44px; padding: 0 14px; border-radius: 999px; border: 0;
	background: var(--mist); color: var(--ink); font-weight: 700; cursor: pointer;
}
@media (min-width: 640px) { .site-header__call + .menu-button { margin-left: 0; } }
.menu-button:hover { background: var(--purple-soft); }

/* Desktop navigation */
.nav--desktop { display: none; }
@media (min-width: 1200px) {
	.nav--desktop { display: block; margin-left: auto; }
	.site-header .menu-button { display: none; }
	.site-header__call { margin-left: 0; }
}
.nav__list, .nav__sub { list-style: none; margin: 0; padding: 0; }
.nav--desktop .nav__list { display: flex; align-items: center; gap: 2px; }
.nav--desktop .nav__item--d1 { position: relative; display: flex; align-items: center; }
.nav--desktop .nav__item--d1 > a {
	position: relative; display: block; padding: 10px 10px; color: var(--ink);
	text-decoration: none; font-weight: 700; font-size: .98rem; white-space: nowrap; border-radius: 10px;
}
.nav--desktop .nav__item--d1 > a::after {
	content: ""; position: absolute; left: 10px; right: 10px; bottom: 4px; height: 2px;
	background: var(--purple); border-radius: 2px; transform: scaleX(0); transform-origin: left;
	transition: transform .3s var(--ease);
}
.nav--desktop .nav__item--d1 > a:hover::after,
.nav--desktop .nav__item--d1.is-current > a::after,
.nav--desktop .nav__item--d1.is-ancestor > a::after { transform: scaleX(1); }
.nav--desktop .nav__item--d1.has-children > a { padding-right: 2px; }
.nav--desktop .nav__toggle {
	display: grid; place-items: center; width: 26px; height: 32px; padding: 0; border: 0; background: none;
	color: var(--muted); cursor: pointer; border-radius: 8px;
}
.nav--desktop .nav__toggle svg { transition: transform .25s var(--ease); }
.nav--desktop .nav__item--d1 > .nav__sub {
	position: absolute; top: calc(100% + 6px); left: 0; min-width: 280px; padding: 10px;
	background: var(--white); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow);
	opacity: 0; visibility: hidden; transform: translateY(6px);
	transition: opacity .2s, transform .25s var(--ease), visibility 0s .25s;
}
.nav--desktop .nav__item--d1 > .nav__sub::before { content: ""; position: absolute; left: 0; right: 0; top: -12px; height: 12px; }
.nav--desktop .nav__item--d1:hover > .nav__sub,
.nav--desktop .nav__item--d1:focus-within > .nav__sub,
.nav--desktop .nav__item--d1.is-open > .nav__sub { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }
.nav--desktop .nav__item--d1:hover > .nav__toggle svg,
.nav--desktop .nav__item--d1.is-open > .nav__toggle svg { transform: rotate(180deg); }
.nav--desktop .nav__sub a {
	display: block; padding: 9px 12px; border-radius: 10px; color: var(--ink); text-decoration: none; font-size: .97rem; line-height: 1.35;
}
.nav--desktop .nav__sub a:hover, .nav--desktop .nav__sub .is-current > a { background: var(--mist); color: var(--purple); }
.nav--desktop .nav__sub .nav__toggle { display: none; }
.nav--desktop .nav__sub .nav__sub { padding-left: 12px; margin-left: 12px; border-left: 2px solid var(--purple-soft); }

/* Mobile menu */
.mobile-menu { position: fixed; inset: 0; z-index: 100; background: rgba(45, 34, 64, .45); }
.mobile-menu[hidden] { display: none; }
.mobile-menu__panel {
	position: absolute; top: 0; right: 0; bottom: 0; width: min(420px, 100%);
	display: flex; flex-direction: column; gap: 16px; padding: 16px var(--gutter) 24px;
	background: var(--white); overflow-y: auto; overscroll-behavior: contain;
	animation: panel-in .35s var(--ease);
}
.mobile-menu.is-closing { animation: fade-out .25s forwards; }
.mobile-menu.is-closing .mobile-menu__panel { animation: panel-out .25s forwards; }
@keyframes panel-in { from { transform: translateX(40px); opacity: 0; } }
@keyframes panel-out { to { transform: translateX(40px); opacity: 0; } }
@keyframes fade-out { to { opacity: 0; } }
.mobile-menu__top { display: flex; align-items: center; justify-content: space-between; }
.mobile-menu__logo { height: 44px; width: auto; }
.nav--mobile .nav__item { position: relative; border-bottom: 1px solid var(--line); }
.nav--mobile .nav__sub .nav__item { border-bottom: 0; }
.nav--mobile a { display: block; padding: 14px 52px 14px 4px; color: var(--ink); text-decoration: none; font-weight: 700; font-size: 1.1rem; }
.nav--mobile .nav__sub a { font-weight: 400; font-size: 1.02rem; padding: 10px 52px 10px 16px; }
.nav--mobile .nav__sub .nav__sub a { padding-left: 32px; }
.nav--mobile .is-current > a { color: var(--purple); }
.nav--mobile .nav__toggle {
	position: absolute; right: 0; top: 6px; width: 44px; height: 44px; display: grid; place-items: center;
	border: 0; border-radius: 12px; background: var(--mist); cursor: pointer;
}
.nav--mobile .nav__sub .nav__toggle { top: 2px; width: 40px; height: 40px; background: none; }
.nav--mobile .nav__toggle svg { transition: transform .25s var(--ease); }
.nav--mobile .nav__toggle[aria-expanded="true"] svg { transform: rotate(180deg); }
.nav--mobile .nav__sub { display: none; padding-bottom: 8px; }
.nav--mobile .nav__toggle[aria-expanded="true"] + .nav__sub { display: block; }
.mobile-menu__call { margin-top: auto; }

/* Home hero -------------------------------------------------------------- */
.hero { padding: 32px 0 48px; overflow: hidden; }
@media (min-width: 960px) { .hero { padding: 56px 0 80px; } }
.hero__grid { display: grid; gap: 40px; align-items: center; }
@media (min-width: 960px) { .hero__grid { grid-template-columns: 1.05fr 1fr; gap: 64px; } }
.hero__title { margin: 0 0 24px; }
.hero__title-main {
	display: block; font-weight: 750; font-size: clamp(3.4rem, 10vw, 7rem); line-height: .95; letter-spacing: -.035em; color: var(--ink);
}
.hero__title-sub {
	display: block; margin-top: .3em; max-width: 18ch;
	font-weight: 500; font-size: clamp(1.6rem, 3.6vw, 2.4rem); line-height: 1.15; color: var(--purple);
}
.hero__intro { max-width: 46ch; font-size: 1.15rem; color: var(--muted); }
.hero__intro p:last-child { margin-bottom: 0; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

.hero__visual { position: relative; width: min(100%, 540px); margin-inline: auto; aspect-ratio: 1; }
@media (max-width: 959px) { .hero__visual { width: min(88%, 440px); order: -1; } }
.lens { position: absolute; inset: 7%; border-radius: 50%; overflow: hidden; background: var(--mist); isolation: isolate; }
.lens__slide {
	position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
	opacity: 0; transform: scale(1.08); transition: opacity 1.4s ease, transform 7s linear;
}
.lens__slide.is-active { opacity: 1; transform: scale(1); }
.lens__ring { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.lens__ring path { stroke: var(--purple); stroke-width: 5; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 0; }
.lens__ring .lens__ring-thin { stroke: var(--harbour-light); stroke-width: 3; }

/* The one orchestrated moment: title settles, ring draws itself. */
@media (prefers-reduced-motion: no-preference) {
	.js .hero__title-main, .js .hero__title-sub, .js .hero__intro, .js .hero__actions { animation: rise .9s var(--ease) both; }
	.js .hero__title-sub { animation-delay: .12s; }
	.js .hero__intro { animation-delay: .24s; }
	.js .hero__actions { animation-delay: .36s; }
	.js .lens { animation: lens-in 1.2s var(--ease) both .1s; }
	.js .lens__ring path { stroke-dashoffset: 1; animation: draw 1.8s var(--ease) forwards .35s; }
	.js .lens__ring .lens__ring-thin { animation-delay: 1.5s; animation-duration: .9s; }
}
@keyframes rise { from { opacity: 0; transform: translateY(22px); } }
@keyframes lens-in { from { opacity: 0; transform: scale(.92); } }
@keyframes draw { to { stroke-dashoffset: 0; } }

/* Home tiles ------------------------------------------------------------- */
.tiles { display: flex; flex-wrap: wrap; gap: 16px; padding-bottom: 72px; }
.tile {
	position: relative; display: flex; align-items: flex-end; flex: 1 1 240px; min-height: 300px;
	border-radius: var(--r-card); overflow: hidden; background: var(--purple-deep); color: var(--white); text-decoration: none; isolation: isolate;
}
.tile--double { flex: 2 1 480px; }
.tile__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; transition: transform .7s var(--ease); }
.tile::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(45, 34, 64, .05) 25%, rgba(45, 34, 64, .88) 100%); }
a.tile:hover { color: var(--white); }
a.tile:hover .tile__img { transform: scale(1.05); }
.tile__body { display: flex; flex-direction: column; gap: 6px; padding: 24px; }
.tile__icon {
	display: grid; place-items: center; width: 52px; height: 52px; margin-bottom: 8px;
	border-radius: 50%; background: var(--white); color: var(--purple);
	transition: transform .4s var(--ease);
}
a.tile:hover .tile__icon { transform: rotate(-8deg) scale(1.06); }
.tile__title { font-family: var(--font-display); font-weight: 650; font-size: 1.5rem; line-height: 1.15; }
.tile__text { color: rgba(255, 255, 255, .86); font-size: 1rem; line-height: 1.45; max-width: 36ch; }

[data-reveal] { transition: opacity .7s var(--ease), transform .7s var(--ease); transition-delay: calc(var(--i, 0) * 90ms); }
.js [data-reveal]:not(.is-visible) { opacity: 0; transform: translateY(24px); }
@media (prefers-reduced-motion: reduce) { .js [data-reveal]:not(.is-visible) { opacity: 1; transform: none; } }

/* Motto band ------------------------------------------------------------- */
.motto { background: var(--ink); color: var(--white); padding: 72px 0; text-align: center; position: relative; overflow: hidden; }
.motto::before {
	content: ""; position: absolute; width: 520px; height: 520px; left: 50%; top: 50%; transform: translate(-50%, -50%);
	border: 2px solid rgba(127, 211, 227, .18); border-radius: 50%;
}
.motto__inner { position: relative; }
.motto p { margin: 0; }
.motto__en { font-size: 1.15rem; color: var(--harbour-light); }
.motto__mi { font-family: var(--font-display); font-weight: 750; font-size: clamp(2.4rem, 7vw, 4.75rem); line-height: 1.05; letter-spacing: -.03em; margin: .1em 0 .25em !important; }
.motto__values { font-size: 1.15rem; letter-spacing: .02em; }

/* Sub-page hero ---------------------------------------------------------- */
.page-hero { background: var(--mist); padding: 40px 0 48px; }
@media (min-width: 960px) { .page-hero { padding: 56px 0 64px; } }
.page-hero__grid { display: grid; gap: 32px; align-items: center; }
@media (min-width: 900px) { .page-hero--image .page-hero__grid { grid-template-columns: 1.2fr 1fr; gap: 56px; } }
.page-hero__title { font-size: clamp(2.1rem, 5.2vw, 3.6rem); font-weight: 750; letter-spacing: -.03em; line-height: 1.05; margin: 0 0 .35em; }
.page-hero__subtitle { max-width: 56ch; font-size: 1.15rem; color: var(--muted); }
.page-hero__media { position: relative; }
.page-hero__media img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--r-img); }
.page-hero__arc { position: absolute; width: 38%; right: -6%; top: -10%; pointer-events: none; }
.page-hero__arc path { stroke: var(--purple); stroke-width: 5; stroke-linecap: round; }
@media (max-width: 899px) { .page-hero__media { max-width: 560px; } .page-hero__arc { right: -2%; } }
@media (prefers-reduced-motion: no-preference) {
	.js .page-hero__title, .js .page-hero__subtitle { animation: rise .8s var(--ease) both; }
	.js .page-hero__subtitle { animation-delay: .1s; }
	.js .page-hero__media img { animation: lens-in 1s var(--ease) both .1s; }
}

.breadcrumbs { font-size: .95rem; color: var(--muted); margin-bottom: 14px; }
.breadcrumbs a { color: var(--muted); text-decoration: none; }
.breadcrumbs a:hover { color: var(--purple); text-decoration: underline; }
.back-link { display: inline-flex; align-items: center; gap: 6px; margin-bottom: 12px; font-weight: 700; color: var(--purple); text-decoration: none; }
.back-link:hover { text-decoration: underline; }

/* Page layout + prose ---------------------------------------------------- */
.page-layout, .news-layout { display: grid; gap: 48px; padding-top: 48px; padding-bottom: 88px; }
@media (min-width: 960px) {
	.page-layout { grid-template-columns: minmax(0, 1fr) 320px; gap: 72px; padding-top: 64px; }
	.news-layout { grid-template-columns: minmax(0, 1fr) 320px; gap: 64px; padding-top: 64px; }
}
.page-layout__main { min-width: 0; }
.page-layout__aside { display: flex; flex-direction: column; gap: 20px; }
@media (min-width: 960px) { .page-layout__aside { position: sticky; top: calc(var(--header-h) + 24px); align-self: start; } }

.prose { max-width: 68ch; }
.prose > *:first-child { margin-top: 0; }
.prose p:empty { display: none; }
.prose h2 { font-size: 1.75rem; margin-top: 1.6em; }
.prose h3 { font-size: 1.35rem; margin-top: 1.4em; }
.prose strong { font-weight: 700; }
.prose ul, .prose ol { padding-left: 0; margin: 0 0 1.4em; }
.prose ul { list-style: none; }
.prose ul > li { position: relative; padding-left: 1.6em; margin-bottom: .45em; }
.prose ul > li::before {
	content: ""; position: absolute; left: .2em; top: .62em; width: .55em; height: .55em;
	border: 2.5px solid var(--purple); border-radius: 50%;
}
.prose ol { padding-left: 1.4em; }
.prose ol > li { margin-bottom: .45em; padding-left: .2em; }
.prose ol > li::marker { color: var(--purple); font-weight: 700; }
.prose img { border-radius: 20px; margin: 1.5em 0; }
.prose .alignleft { float: left; margin: .4em 1.6em 1em 0; max-width: 50%; }
.prose .alignright { float: right; margin: .4em 0 1em 1.6em; max-width: 50%; }
.prose .aligncenter { margin-inline: auto; }
@media (max-width: 640px) { .prose .alignleft, .prose .alignright { float: none; margin: 1.2em 0; max-width: 100%; } }
.prose::after { content: ""; display: table; clear: both; }
.prose table { width: 100%; border-collapse: collapse; margin: 1.5em 0; font-size: 1rem; }
.prose th, .prose td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.prose th { background: var(--mist); }
.prose blockquote { margin: 1.5em 0; padding: 4px 0 4px 24px; border-left: 4px solid var(--purple); font-size: 1.2rem; }
.prose iframe, .prose embed, .prose object { border-radius: 16px; }
.prose--tight p { margin-bottom: .75em; }

.section-nav { padding: 24px; border: 1px solid var(--line); border-radius: var(--r-card); }
.section-nav__title { font-size: 1.05rem; color: var(--muted); font-family: var(--font-body); font-weight: 700; margin-bottom: 10px; letter-spacing: 0; }
.section-nav__list { list-style: none; margin: 0; padding: 0; }
.section-nav__list a {
	display: block; padding: 9px 12px; margin: 0 -12px; border-radius: 12px;
	color: var(--ink); text-decoration: none; line-height: 1.35; transition: background-color .2s;
}
.section-nav__list .is-root a { font-weight: 700; }
.section-nav__list .is-deep a { padding-left: 28px; }
.section-nav__list a:hover { background: var(--mist); }
.section-nav__list a[aria-current="page"] { background: var(--purple-soft); color: var(--purple-deep); font-weight: 700; box-shadow: inset 3px 0 0 var(--purple); }

.help-card { padding: 24px; background: var(--mist); border-radius: var(--r-card); }
.help-card__title { font-size: 1.25rem; margin-bottom: 12px; }
.help-card__list, .site-footer__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.help-card__list li, .site-footer__list li { display: flex; align-items: flex-start; gap: 10px; }
.help-card__list .icon, .site-footer__list .icon { margin-top: .25em; color: var(--purple); }
.help-card__list a { color: var(--ink); font-weight: 700; text-decoration: none; word-break: break-word; }
.help-card__list a:hover { color: var(--purple); text-decoration: underline; }

.notice-box { display: flex; gap: 10px; align-items: flex-start; padding: 14px 16px; border-radius: var(--r-input); margin-bottom: 20px; font-size: 1rem; }
.notice-box--error { background: var(--error-soft); color: var(--error); }

/* Forms ------------------------------------------------------------------ */
.contact-layout { display: grid; gap: 40px; padding-top: 48px; padding-bottom: 56px; }
@media (min-width: 960px) { .contact-layout { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 64px; padding-top: 64px; } }
.form-card { padding: 24px; border: 1px solid var(--line); border-radius: var(--r-card); background: var(--white); }
@media (min-width: 720px) { .form-card { padding: 40px; } }
.form-card__title { font-size: 1.75rem; }

.form { position: relative; }
.form__grid { display: grid; gap: 18px 20px; margin-bottom: 18px; }
@media (min-width: 640px) {
	.form__grid { grid-template-columns: 1fr 1fr; }
	.form__grid--name { grid-template-columns: minmax(110px, .7fr) 1fr 1fr; }
}
@media (min-width: 760px) { .form__grid--3 { grid-template-columns: repeat(3, 1fr); } }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field--full { grid-column: 1 / -1; }
.field label { font-weight: 700; font-size: 1rem; line-height: 1.3; }
.field__req { color: var(--purple); }
.field__hint { font-size: .9rem; color: var(--muted); line-height: 1.35; }
.field input, .field textarea, .field select {
	width: 100%; min-height: 52px; padding: 12px 14px;
	border: 1.5px solid #cfc8de; border-radius: var(--r-input); background: var(--white);
	font: inherit; font-size: 1.0625rem; color: var(--ink);
	transition: border-color .2s, box-shadow .2s;
	-webkit-appearance: none; appearance: none;
}
.field textarea { min-height: 140px; resize: vertical; line-height: 1.5; }
.field input:hover, .field textarea:hover { border-color: #a99fc2; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--purple); box-shadow: 0 0 0 4px var(--purple-soft); }
.field input[type="date"] { min-height: 52px; }
.field.is-invalid input, .field.is-invalid textarea { border-color: var(--error); box-shadow: 0 0 0 4px var(--error-soft); }
.field__error { display: flex; align-items: flex-start; gap: 6px; color: var(--error); font-size: .95rem; font-weight: 700; line-height: 1.35; }
.field__error svg, .form__status svg { flex: none; margin-top: .15em; }

.form__hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form__status {
	display: flex; gap: 10px; align-items: flex-start; padding: 14px 16px; margin-bottom: 20px;
	border-radius: var(--r-input); background: var(--error-soft); color: var(--error); font-weight: 700;
}
.form__status[hidden] { display: none; }
.form__footer { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 24px; margin-top: 8px; }
.form__legal { margin: 0; flex: 1 1 260px; font-size: .85rem; line-height: 1.45; color: var(--muted); }
.form__legal a { color: var(--muted); }
.grecaptcha-badge { visibility: hidden !important; }

.form__submit { position: relative; min-width: 200px; }
.spinner {
	display: none; width: 20px; height: 20px; border-radius: 50%;
	border: 2.5px solid rgba(255, 255, 255, .35); border-top-color: var(--white);
	animation: spin .8s linear infinite;
}
.form.is-sending .spinner { display: inline-block; }
.form.is-sending .form__submit { pointer-events: none; opacity: .85; }
@keyframes spin { to { transform: rotate(360deg); } }

.form-success { text-align: center; padding: 32px 8px; }
.form-success__icon {
	display: grid; place-items: center; width: 76px; height: 76px; margin: 0 auto 20px;
	border-radius: 50%; background: var(--purple); color: var(--white);
}
.form-success__title { font-size: 1.75rem; }
.form-success p { max-width: 46ch; margin-inline: auto; color: var(--muted); }
@media (prefers-reduced-motion: no-preference) {
	.form-success { animation: rise .6s var(--ease) both; }
	.form-success__icon { animation: pop .6s var(--ease) both .15s; }
	.form-success__icon svg path { stroke-dasharray: 24; stroke-dashoffset: 24; animation: tick .5s ease forwards .45s; }
}
@keyframes pop { from { transform: scale(.4); opacity: 0; } }
@keyframes tick { to { stroke-dashoffset: 0; } }

/* Enrolment */
.enrol-layout { max-width: calc(940px + var(--gutter) * 2); padding-top: 48px; padding-bottom: 88px; }
.enrol-layout__intro { margin-bottom: 32px; }
.form--enrol { display: grid; gap: 24px; }
.form-step {
	margin: 0; padding: 24px; min-width: 0;
	border: 1px solid var(--line); border-radius: var(--r-card);
}
@media (min-width: 720px) { .form-step { padding: 36px 40px; } }
.form-step__title {
	display: flex; align-items: center; gap: 14px; padding: 0; margin-bottom: 24px; float: left; width: 100%;
	font-family: var(--font-display); font-weight: 650; font-size: 1.5rem; line-height: 1.2;
}
.form-step__title + * { clear: both; }
.form-step__num {
	display: grid; place-items: center; flex: none; width: 40px; height: 40px; border-radius: 50%;
	background: var(--purple-soft); color: var(--purple); font-size: 1.1rem;
}
.form-step__sub { font-size: 1.15rem; margin: 28px 0 14px; padding-top: 24px; border-top: 1px solid var(--line); }
.form-step__note { font-family: var(--font-body); font-weight: 400; font-size: .95rem; color: var(--muted); }
.consent-name { padding: 12px 16px; background: var(--mist); border-radius: var(--r-input); }

.checks { display: grid; gap: 12px; margin-top: 20px; }
@media (min-width: 640px) { .checks { grid-template-columns: 1fr 1fr; } }
.check {
	position: relative; display: flex; align-items: center; gap: 14px; padding: 16px;
	border: 1.5px solid #cfc8de; border-radius: 16px; cursor: pointer; line-height: 1.3;
	transition: border-color .2s, background-color .2s;
}
.check:hover { border-color: var(--purple); }
.check input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.check__box {
	display: grid; place-items: center; flex: none; width: 28px; height: 28px;
	border: 2px solid #a99fc2; border-radius: 8px; color: transparent; background: var(--white);
	transition: background-color .2s, border-color .2s, color .2s, transform .2s var(--ease);
}
.check input:checked ~ .check__box { background: var(--purple); border-color: var(--purple); color: var(--white); transform: scale(1.06); }
.check:has(input:checked) { border-color: var(--purple); background: var(--purple-soft); }
.check input:focus-visible ~ .check__box { outline: 3px solid var(--harbour); outline-offset: 3px; }
.check__label { font-weight: 700; }

/* Contact info + map */
.contact-info { display: grid; gap: 28px; align-content: start; }
.contact-info__heading { font-family: var(--font-body); font-size: 1rem; font-weight: 700; color: var(--muted); margin-bottom: 6px; letter-spacing: 0; }
.contact-info__block p { margin: 0 0 4px; }
.contact-info__big { font-family: var(--font-display); font-weight: 650; font-size: 1.9rem; line-height: 1.2; }
.contact-info__big a { color: var(--ink); text-decoration: none; }
.contact-info__big a:hover { color: var(--purple); }
.person { display: flex; gap: 16px; align-items: flex-start; padding: 16px; background: var(--mist); border-radius: 20px; }
.person + .person { margin-top: 12px; }
.person__photo {
	display: grid; place-items: center; flex: none; width: 64px; height: 64px; border-radius: 50%; overflow: hidden;
	background: var(--purple); color: var(--white); font-family: var(--font-display); font-weight: 650; font-size: 1.6rem;
}
.person__photo img { width: 100%; height: 100%; object-fit: cover; }
.person__name { font-weight: 700; font-size: 1.15rem; }
.person__role { color: var(--muted); }
.person p { margin: 0 0 2px; }

.map { position: relative; padding-bottom: 88px; }
.map iframe { display: block; width: 100%; height: 440px; border: 0; border-radius: var(--r-card); background: var(--mist); filter: saturate(.85); }
.map__directions { position: absolute; left: calc(var(--gutter) + 16px); bottom: 104px; box-shadow: var(--shadow); }

/* News ------------------------------------------------------------------- */
.news-layout__main { min-width: 0; }
.post-list { display: grid; gap: 24px; }
.post-card { display: grid; border: 1px solid var(--line); border-radius: var(--r-card); overflow: hidden; background: var(--white); }
@media (min-width: 720px) { .post-card.has-post-thumbnail { grid-template-columns: 38% 1fr; } }
.post-card__media { display: block; overflow: hidden; background: var(--mist); }
.post-card__media img { width: 100%; height: 100%; min-height: 220px; object-fit: cover; transition: transform .6s var(--ease); }
.post-card:hover .post-card__media img { transform: scale(1.04); }
.post-card__body { padding: 24px 28px 28px; }
.post-card__meta { display: flex; flex-wrap: wrap; gap: 4px 14px; color: var(--muted); font-size: .95rem; margin-bottom: 8px; }
.post-card__author::before { content: "By "; }
.post-card__title { font-size: 1.5rem; margin-bottom: 10px; }
.post-card__title a { color: var(--ink); text-decoration: none; }
.post-card__title a:hover { color: var(--purple); }
.post-card__excerpt { color: var(--muted); }
.post-feature { margin: 0 0 32px; }
.post-feature img { width: 100%; border-radius: var(--r-img); }

.news-aside { display: flex; flex-direction: column; gap: 20px; }
.news-aside__block { padding: 24px; border: 1px solid var(--line); border-radius: var(--r-card); }
.news-aside__title { font-size: 1.2rem; margin-bottom: 14px; }
.recent, .archive-list, .tag-list { list-style: none; margin: 0; padding: 0; }
.recent { display: grid; gap: 16px; }
.recent__item { display: flex; gap: 14px; align-items: center; }
.recent__thumb { width: 64px; height: 64px; object-fit: cover; border-radius: 14px; flex: none; }
.recent__link { display: block; color: var(--ink); font-weight: 700; text-decoration: none; line-height: 1.3; }
.recent__link:hover { color: var(--purple); text-decoration: underline; }
.recent__date { font-size: .9rem; color: var(--muted); }
.archive-list li { padding: 6px 0; color: var(--muted); }
.archive-list a { color: var(--ink); }
.tag-list { display: flex; flex-wrap: wrap; gap: 8px; }
.tag-list a {
	display: inline-block; padding: 6px 14px; border-radius: 999px; background: var(--mist);
	color: var(--ink); text-decoration: none; font-size: .95rem; transition: background-color .2s, color .2s;
}
.tag-list a:hover, .tag-list a[aria-current] { background: var(--purple); color: var(--white); }
.tag-list--post { margin-top: 32px; }

.pagination { margin-top: 40px; }
.pagination ul { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; }
.pagination .page-numbers {
	display: grid; place-items: center; min-width: 46px; height: 46px; padding: 0 16px; border-radius: 999px;
	border: 1.5px solid var(--line); color: var(--ink); text-decoration: none; font-weight: 700;
}
.pagination a.page-numbers:hover { border-color: var(--purple); color: var(--purple); }
.pagination .current { background: var(--purple); border-color: var(--purple); color: var(--white); }
.empty { padding: 40px; text-align: center; background: var(--mist); border-radius: var(--r-card); }

.search-results { list-style: none; padding: 0; margin: 32px 0; display: grid; gap: 24px; }
.search-results a { font-family: var(--font-display); font-size: 1.35rem; font-weight: 650; color: var(--ink); }
.search-results p { color: var(--muted); margin: 4px 0 0; }
.search-form { display: flex; gap: 8px; }
.search-form label { flex: 1; }
.search-field { width: 100%; min-height: 52px; padding: 12px 14px; border: 1.5px solid #cfc8de; border-radius: var(--r-input); font: inherit; }
.search-submit { min-height: 52px; padding: 0 22px; border: 0; border-radius: 999px; background: var(--purple); color: var(--white); font-weight: 700; cursor: pointer; }

/* Staff ------------------------------------------------------------------ */
.staff-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 40px 32px; padding: 56px 0 88px; }
.staff__photo { aspect-ratio: 1; border-radius: 50%; overflow: hidden; background: var(--mist); margin-bottom: 20px; max-width: 240px; }
.staff__photo img { width: 100%; height: 100%; object-fit: cover; }
.staff__name { font-size: 1.5rem; margin-bottom: 2px; }
.staff__role { color: var(--purple); font-weight: 700; margin-bottom: 6px; }
.staff__intro { color: var(--muted); }
.bio {
	width: min(720px, calc(100% - 32px)); max-height: calc(100vh - 64px); padding: 0;
	border: 0; border-radius: var(--r-card); color: var(--ink); box-shadow: 0 40px 80px -30px rgba(45, 34, 64, .5);
}
.bio::backdrop { background: rgba(45, 34, 64, .55); }
.bio__inner { position: relative; padding: 40px; }
.bio__title { font-size: 1.8rem; padding-right: 48px; }
.bio__close {
	position: absolute; top: 20px; right: 20px; display: grid; place-items: center; width: 44px; height: 44px;
	border: 0; border-radius: 50%; background: var(--mist); cursor: pointer;
}
.bio__close:hover { background: var(--purple-soft); }
@media (prefers-reduced-motion: no-preference) {
	.bio[open] { animation: rise .4s var(--ease); }
	.bio[open]::backdrop { animation: backdrop-in .3s ease; }
}
@keyframes backdrop-in { from { opacity: 0; } }

/* 404 -------------------------------------------------------------------- */
.not-found { padding: 80px var(--gutter) 120px; text-align: center; }
.not-found__code { font-family: var(--font-display); font-weight: 750; font-size: clamp(6rem, 22vw, 12rem); line-height: 1; color: var(--purple-soft); margin: 0; letter-spacing: -.05em; }
.not-found__title { font-size: clamp(2rem, 5vw, 3rem); }
.not-found p { color: var(--muted); max-width: 48ch; margin-inline: auto; }

/* Footer ----------------------------------------------------------------- */
.site-footer { background: var(--ink); color: #ddd6ea; padding-top: 64px; font-size: 1rem; }
.motto + .site-footer { padding-top: 0; }
.motto + .site-footer .site-footer__grid { border-top: 1px solid rgba(255, 255, 255, .12); padding-top: 56px; }
.site-footer a { color: var(--white); text-decoration: none; }
.site-footer a:hover { color: var(--harbour-light); text-decoration: underline; }
.site-footer__grid { display: grid; gap: 40px; padding-bottom: 48px; }
@media (min-width: 800px) { .site-footer__grid { grid-template-columns: 1.3fr 1fr auto; gap: 64px; } }
.site-footer__logo img { width: 190px; height: auto; margin-bottom: 20px; }
.site-footer__whakatauki { font-family: var(--font-display); font-weight: 650; font-size: 1.35rem; color: var(--white); margin: 0; line-height: 1.25; }
.site-footer__translation { color: var(--harbour-light); margin: 4px 0 0; }
.site-footer__heading { font-family: var(--font-body); font-size: .95rem; font-weight: 700; color: var(--harbour-light); margin-bottom: 14px; letter-spacing: 0; }
.site-footer__list .icon { color: var(--harbour-light); }
.site-footer__icons { display: flex; gap: 10px; }
.social-link {
	display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%;
	border: 1.5px solid rgba(255, 255, 255, .3); transition: background-color .2s, border-color .2s, color .2s;
}
.site-footer .social-link:hover { background: var(--white); border-color: var(--white); color: var(--ink); text-decoration: none; }
.site-footer__base { padding-top: 20px; padding-bottom: 28px; border-top: 1px solid rgba(255, 255, 255, .12); font-size: .9rem; color: #b5abc9; }
.site-footer__base p { margin: 0; }

/* Motion safety ---------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
	.lens__slide { transition: opacity .01ms; }
}
