/* Aitutaki Capital - design system
   Palette: deep pine green, antique bronze, warm ivory, soft stone.
   Type: Fraunces (display), Inter (body). Variable fonts, self-hosted. */

@font-face {
  font-family: "Fraunces";
  src: url("/assets/fonts/fraunces-latin-standard-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("/assets/fonts/inter-latin-standard-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --green: #123A2E;
  --green-deep: #0D2B22;
  --ink: #1F2421;
  --bronze: #B08D57;
  --bronze-dark: #8F6E3D;
  --ivory: #FBF9F4;
  --stone: #F4F1EA;
  --muted: #6B6F6B;
  --line: rgba(176, 141, 87, 0.28);
  --line-soft: rgba(176, 141, 87, 0.18);
  --error: #A33A2A;
  --font-display: "Fraunces", "Iowan Old Style", Georgia, serif;
  --font-body: "Inter", -apple-system, "Segoe UI", Arial, sans-serif;
}

/* ---------- Reset and base ---------- */

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--ivory);
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--green); text-decoration-color: var(--line); text-underline-offset: 3px; }
a:hover { color: var(--bronze-dark); text-decoration-color: currentColor; }

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

::selection { background: rgba(176, 141, 87, 0.25); }

h1, h2 {
  font-family: var(--font-display);
  font-weight: 600;
  font-optical-sizing: auto;
  letter-spacing: -0.015em;
  line-height: 1.12;
  color: var(--green);
  margin: 0 0 0.45em;
}
h1 { font-size: clamp(2.35rem, 1.3rem + 3.3vw, 3.8rem); }
h2 { font-size: clamp(1.65rem, 1.25rem + 1.3vw, 2.3rem); line-height: 1.18; }
h3 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.22rem;
  line-height: 1.3;
  color: var(--ink);
  margin: 0 0 0.5em;
}
p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

.sr-only {
  position: absolute;
  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;
  top: -48px; left: 16px;
  z-index: 200;
  background: var(--green);
  color: var(--ivory);
  padding: 10px 18px;
  border-radius: 0 0 4px 4px;
  text-decoration: none;
  font-size: 0.9rem;
}
.skip-link:focus { top: 0; color: var(--ivory); }

.container {
  max-width: 1180px;
  margin-inline: auto;
  padding-inline: clamp(20px, 4vw, 48px);
}
.container-narrow { max-width: 820px; }

.eyebrow {
  display: block;
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--bronze-dark);
  margin-bottom: 1.35em;
}

.lede {
  font-size: 1.17rem;
  line-height: 1.7;
  color: var(--muted);
  max-width: 56ch;
}

.text-link {
  font-weight: 600;
  text-decoration-color: var(--bronze);
}

.small-print { font-size: 0.8rem; color: var(--muted); }

.tbc {
  border-bottom: 1px dashed rgba(176, 141, 87, 0.6);
  cursor: help;
  overflow-wrap: anywhere;
}

/* Numerals in indicators and tables align */
.stat-value, .def-table td {
  font-variant-numeric: lining-nums tabular-nums;
  font-feature-settings: "lnum" 1, "tnum" 1;
}

/* ---------- Buttons ---------- */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 15px 30px;
  border: 0;
  border-radius: 3px;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.25s ease, color 0.25s ease;
}
.button-primary { background: var(--green); color: var(--ivory); }
.button-primary:hover { background: var(--green-deep); color: var(--ivory); }
.button-on-green { background: var(--bronze); color: var(--green-deep); }
.button-on-green:hover { background: #C09A64; color: var(--green-deep); }
.button[disabled] { opacity: 0.6; cursor: default; }

/* ---------- Header ---------- */

.site-header {
  background: var(--ivory);
  border-bottom: 1px solid var(--line-soft);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 86px;
}
.brand, .footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
}
.brand-emblem {
  width: 46px;
  height: 46px;
  flex: 0 0 auto;
  border-radius: 2px;
}
.brand-text { display: flex; flex-direction: column; line-height: 1.25; }
.brand-name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.22rem;
  color: var(--green);
  letter-spacing: -0.01em;
}
.brand-sub {
  font-size: 0.66rem;
  letter-spacing: 0.05em;
  color: var(--muted);
}
.brand:hover .brand-name { color: var(--bronze-dark); }

.site-nav { display: flex; align-items: center; }
.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--line);
  border-radius: 3px;
  padding: 9px 16px;
  font: 600 0.9rem var(--font-body);
  color: var(--green);
  cursor: pointer;
}
.nav-menu {
  display: flex;
  align-items: center;
  gap: clamp(18px, 2.4vw, 34px);
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-menu a:not(.button) {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--ink);
  text-decoration: none;
  padding: 6px 0;
}
.nav-menu a:not(.button):hover { color: var(--bronze-dark); }
.nav-menu a[aria-current="page"] {
  color: var(--green);
  box-shadow: inset 0 -2px 0 var(--bronze);
}
.nav-cta { margin-left: 6px; }
.nav-cta .button { padding: 11px 22px; font-size: 0.88rem; }

@media (max-width: 920px) {
  .nav-toggle { display: inline-block; }
  .nav-menu {
    display: none;
    position: absolute;
    right: clamp(20px, 4vw, 48px);
    top: 74px;
    z-index: 100;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    background: var(--ivory);
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 18px 26px;
    box-shadow: 0 24px 48px -24px rgba(18, 58, 46, 0.35);
    min-width: 220px;
  }
  .site-header { position: relative; }
  .nav-menu.open { display: flex; }
  .nav-menu li { width: 100%; }
  .nav-menu a:not(.button) { display: block; padding: 9px 0; }
  .nav-cta { margin: 10px 0 4px; }
}

/* ---------- Hero ---------- */

.hero { padding: clamp(56px, 8vw, 108px) 0 clamp(48px, 6vw, 88px); }
.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
}
.hero-copy .lede { margin-top: 0.4em; }
.hero-actions {
  display: flex;
  align-items: center;
  gap: 28px;
  margin-top: 2.2em;
  flex-wrap: wrap;
}
.hero-visual {
  position: relative;
  aspect-ratio: 1 / 1;
  max-width: 560px;
  width: 100%;
  justify-self: end;
  background: radial-gradient(closest-side, rgba(176, 141, 87, 0.16), rgba(176, 141, 87, 0) 72%);
}
.hero-visual img,
.hero-visual canvas {
  position: absolute;
  inset: 0;
  width: 100% !important;
  height: 100% !important;
  object-fit: contain;
}
.hero-visual canvas { opacity: 0; transition: opacity 0.9s ease; }
.hero-visual.has3d canvas { opacity: 1; }
.hero-visual.has3d .hero-fallback { opacity: 0; transition: opacity 0.9s ease; }

@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-visual { max-width: 380px; justify-self: center; order: -1; }
}

/* ---------- Indicators band ---------- */

.indicators {
  background: var(--green);
  color: var(--ivory);
  padding: clamp(44px, 5vw, 64px) 0;
}
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(186px, 1fr));
  gap: 36px clamp(24px, 3vw, 48px);
}
.stat { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.stat-value {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.55rem, 1.15rem + 1.2vw, 2.1rem);
  line-height: 1.12;
  color: var(--bronze);
  letter-spacing: -0.01em;
  overflow-wrap: anywhere;
}
.stat-label {
  font-size: 0.8rem;
  line-height: 1.45;
  color: rgba(251, 249, 244, 0.78);
  max-width: 24ch;
}
.stats-note {
  margin: 38px 0 0;
  padding-top: 20px;
  border-top: 1px solid rgba(176, 141, 87, 0.3);
  font-size: 0.74rem;
  line-height: 1.6;
  color: rgba(251, 249, 244, 0.6);
  max-width: 84ch;
}
.stats-note .tbc { border-bottom-color: rgba(176, 141, 87, 0.5); }

/* ---------- Sections ---------- */

.section { padding: clamp(64px, 8vw, 104px) 0; }
.section-tight { padding: clamp(20px, 3vw, 40px) 0; }
.section + .section, .section-tight + .section { padding-top: 0; }

.page-header {
  background: var(--stone);
  border-bottom: 1px solid var(--line-soft);
  padding: clamp(56px, 7vw, 92px) 0 clamp(40px, 5vw, 64px);
}
.page-header .lede { margin-top: 0.9em; }

.cols-2, .cols-3 {
  display: grid;
  gap: clamp(36px, 4vw, 56px);
}
.cols-2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.cols-3 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }

.point h3 { margin-top: 0.9em; }
.point::before {
  content: "";
  display: block;
  width: 34px;
  height: 2px;
  background: var(--bronze);
}
.point p { color: var(--muted); font-size: 0.98rem; }

.card {
  background: #FFFDF8;
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  padding: clamp(28px, 4vw, 48px);
  box-shadow: 0 1px 0 rgba(31, 36, 33, 0.03), 0 32px 56px -40px rgba(18, 58, 46, 0.25);
}

.callout {
  background: var(--stone);
  border-left: 3px solid var(--bronze);
  border-radius: 0 6px 6px 0;
  padding: 28px 32px;
}
.callout p { color: var(--ink); }

/* Lists */
.plain-list, .check-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.plain-list li, .check-list li {
  position: relative;
  padding: 7px 0 7px 28px;
}
.plain-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 1.16em;
  width: 13px;
  height: 1px;
  background: var(--bronze);
}
.check-list li::before {
  content: "\2713";
  position: absolute;
  left: 0;
  top: 7px;
  color: var(--bronze-dark);
  font-weight: 600;
}

/* Definition tables */
.def-table {
  width: 100%;
  border-collapse: collapse;
}
.def-table th, .def-table td {
  text-align: left;
  vertical-align: top;
  padding: 14px 18px 14px 0;
  border-bottom: 1px solid var(--line-soft);
}
.def-table tr:last-child th, .def-table tr:last-child td { border-bottom: 0; }
.def-table th {
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--muted);
  width: 38%;
  padding-top: 17px;
}

/* Principal */
.principal-grid {
  display: grid;
  grid-template-columns: minmax(230px, 320px) 1fr;
  gap: clamp(32px, 5vw, 64px);
  align-items: center;
}
@media (max-width: 780px) {
  .principal-grid { grid-template-columns: 1fr; }
  .principal-grid .figure-placeholder { max-width: 320px; }
}
.figure-placeholder {
  margin: 0;
  aspect-ratio: 4 / 5;
  background:
    linear-gradient(160deg, rgba(176, 141, 87, 0.1), rgba(176, 141, 87, 0) 55%),
    var(--stone);
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  display: flex;
  align-items: flex-end;
}
.figure-placeholder figcaption {
  padding: 20px 24px;
  font-size: 0.85rem;
  line-height: 1.5;
  color: var(--muted);
}

/* Mini steps (Home) */
.mini-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: clamp(28px, 3.5vw, 44px);
}
.mini-step .k {
  display: block;
  font-family: var(--font-display);
  font-size: 0.95rem;
  color: var(--bronze-dark);
  letter-spacing: 0.12em;
  margin-bottom: 12px;
}
.mini-step h3 { font-size: 1.1rem; }
.mini-step p { color: var(--muted); font-size: 0.94rem; }

/* Numbered steps (Process) */
.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: step;
}
.steps li {
  counter-increment: step;
  display: grid;
  grid-template-columns: 74px 1fr;
  gap: 8px 0;
  padding: 34px 0;
  border-top: 1px solid var(--line-soft);
}
.steps li:last-child { border-bottom: 1px solid var(--line-soft); }
.steps li::before {
  content: counter(step, decimal-leading-zero);
  grid-row: 1 / 3;
  font-family: var(--font-display);
  font-size: 1.7rem;
  font-weight: 600;
  color: var(--bronze);
  line-height: 1;
  padding-top: 3px;
  font-variant-numeric: lining-nums tabular-nums;
}
.steps h3 { margin-bottom: 0.35em; }
.steps p { color: var(--muted); grid-column: 2; }

/* CTA band */
.cta-band {
  background: var(--green);
  color: var(--ivory);
  padding: clamp(48px, 6vw, 72px) 0;
}
.cta-band-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: clamp(24px, 4vw, 56px);
  flex-wrap: wrap;
}
.cta-band h2 { color: var(--ivory); margin-bottom: 0.3em; }
.cta-band p { color: rgba(251, 249, 244, 0.75); max-width: 52ch; }

/* ---------- Contact ---------- */

.contact-grid {
  display: grid;
  grid-template-columns: 1.35fr 0.9fr;
  gap: clamp(40px, 6vw, 88px);
  align-items: start;
}
@media (max-width: 960px) {
  .contact-grid { grid-template-columns: 1fr; }
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
}
@media (max-width: 620px) {
  .form-grid { grid-template-columns: 1fr; }
  .field-full { grid-column: auto; }
}
.field { display: flex; flex-direction: column; }
.field-full { grid-column: 1 / -1; }
.field label {
  font-size: 0.88rem;
  font-weight: 600;
  margin-bottom: 7px;
}
.field .hint { font-weight: 400; color: var(--muted); font-size: 0.8rem; }
.field input[type="text"],
.field input[type="email"],
.field input[type="tel"],
.field textarea {
  font: inherit;
  font-size: 1rem;
  color: var(--ink);
  background: #FFFFFF;
  border: 1px solid #D9D4C8;
  border-radius: 4px;
  padding: 13px 14px;
  width: 100%;
}
.field textarea { min-height: 170px; resize: vertical; }
.field input:focus, .field textarea:focus {
  outline: none;
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(18, 58, 46, 0.12);
}
.field.invalid input, .field.invalid textarea { border-color: var(--error); }
.field-error {
  display: none;
  color: var(--error);
  font-size: 0.82rem;
  margin: 7px 0 0;
}
.field-error.show { display: block; }

.field-consent {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 4px 12px;
  align-items: start;
}
.field-consent input[type="checkbox"] {
  width: 19px;
  height: 19px;
  margin-top: 2px;
  accent-color: var(--green);
}
.field-consent label { font-size: 0.92rem; line-height: 1.55; }

.hp-wrap {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}

.form-status {
  display: none;
  border-radius: 4px;
  padding: 14px 18px;
  font-size: 0.95rem;
}
.form-status.ok {
  display: block;
  background: rgba(18, 58, 46, 0.08);
  border: 1px solid rgba(18, 58, 46, 0.25);
  color: var(--green);
}
.form-status.err {
  display: block;
  background: rgba(163, 58, 42, 0.07);
  border: 1px solid rgba(163, 58, 42, 0.3);
  color: var(--error);
}
.form-foot { margin-top: 20px; font-size: 0.92rem; color: var(--muted); }

.details-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.details-list li { padding: 12px 0; }
.details-list .label {
  display: block;
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 3px;
}

/* ---------- Privacy ---------- */

.privacy-body h2 {
  font-size: 1.45rem;
  margin: 2em 0 0.6em;
}
.privacy-body p { max-width: 76ch; }

/* ---------- Footer ---------- */

.site-footer {
  background: var(--green);
  color: rgba(251, 249, 244, 0.66);
  padding: clamp(56px, 6vw, 80px) 0 36px;
  font-size: 0.83rem;
  line-height: 1.7;
}
.site-footer a { color: rgba(251, 249, 244, 0.92); text-decoration-color: rgba(176, 141, 87, 0.5); }
.site-footer a:hover { color: var(--bronze); }
.footer-top {
  display: grid;
  grid-template-columns: 1.6fr 0.9fr;
  gap: clamp(40px, 6vw, 88px);
}
@media (max-width: 780px) {
  .footer-top { grid-template-columns: 1fr; }
}
.footer-brand { margin-bottom: 26px; }
.footer-brand .brand-name { color: var(--ivory); }
.footer-brand .brand-sub { color: rgba(251, 249, 244, 0.55); }
.footer-brand:hover .brand-name { color: var(--bronze); }
.footer-brand .brand-emblem { outline: 1px solid rgba(176, 141, 87, 0.35); outline-offset: -1px; }
.footer-legal p { margin: 0 0 11px; max-width: 78ch; }
.footer-contact .label {
  display: block;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: rgba(251, 249, 244, 0.5);
  margin: 18px 0 3px;
}
.footer-contact .label:first-child { margin-top: 4px; }
.footer-contact p { margin: 0; }
.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid rgba(176, 141, 87, 0.3);
}
.site-footer .tbc { border-bottom-color: rgba(176, 141, 87, 0.45); }

/* ---------- Reveal on scroll ---------- */

.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition:
    opacity 0.7s ease var(--reveal-delay, 0s),
    transform 0.7s ease var(--reveal-delay, 0s);
}
.reveal.in { opacity: 1; transform: none; }
html.no-js .reveal { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .hero-visual canvas, .hero-visual.has3d .hero-fallback { transition: none; }
  * { scroll-behavior: auto !important; }
}
