/* Whaiao — (from Te Whare Whaihanga rua, kaupapa option)
   Brand: black / white / brand blue #5076FF, from TWW Master Brand D1.
   The triangle grid follows the tohu blade angle (282 : 798, about 19.5° off vertical).
   FT Polar is the brand face; Hanken Grotesk stands in on the web until FT Polar webfonts are licensed. */

:root {
  color-scheme: dark;
  --ink: #000000;
  --panel: #0a0c14;
  --deep: #060a1d;      /* deep blue-black for alternate sections */
  --line: #1e2334;
  --line-hi: #2c3452;
  --paper: #ffffff;
  --body: #d6d9e4;
  --mute: #9aa1b8;
  --blue: #5076ff;      /* brand blue: fills, blades, lines */
  --blue-hi: #8ba2ff;   /* small text and hairlines on black */
  --blue-dk: #3d5fe0;

  --sans: "Hanken Grotesk", "FT Polar", "Helvetica Neue", Arial, sans-serif;
  --serif: "Spectral", "Iowan Old Style", Georgia, serif;

  --gutter: clamp(16px, 4vw, 56px);
  --maxw: 1320px;
  --head-h: 84px;

  /* Brand triangle grid: verticals every 56px, diagonals at the blade angle */
  --grid: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='224' height='634' viewBox='0 0 224 634'%3E%3Cg stroke='%235076ff' stroke-width='1' fill='none'%3E%3Cpath d='M.5 0V634M56.5 0V634M112.5 0V634M168.5 0V634'/%3E%3Cpath d='M0 634L224 0M56 634L280 0M112 634L336 0M168 634L392 0M-224 634L0 0M-168 634L56 0M-112 634L112 0M-56 634L168 0'/%3E%3C/g%3E%3C/svg%3E");
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html { background: var(--ink); scroll-padding-top: calc(var(--head-h) + 12px); }
body {
  margin: 0;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--sans);
  font-weight: 300;
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--blue-hi); outline-offset: 4px; }

.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }

/* Spaced serif caps — from the brand's "GUARDIANS — AHIAUAHA" line */
.caps {
  font-family: var(--serif);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  font-size: 12.5px;
  color: var(--mute);
}

/* ---------- Brand triangle grid background ---------- */
.gridded { position: relative; isolation: isolate; }
.gridded::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background-image: var(--grid);
  background-size: 224px 634px;
  background-position: center top;
  opacity: .26;
  -webkit-mask-image: linear-gradient(180deg, transparent, #000 18%, #000 82%, transparent);
          mask-image: linear-gradient(180deg, transparent, #000 18%, #000 82%, transparent);
}
.gridded.grid-strong::before { opacity: .42; }
.gridded.grid-fade-r::before {
  -webkit-mask-image: linear-gradient(90deg, transparent 20%, #000 75%);
          mask-image: linear-gradient(90deg, transparent 20%, #000 75%);
}

/* ---------- Crease cut: offset text background + underline that follows the grid ---------- */
/* Label sits on a black slab (so the grid breaks behind it) with a blue slab offset beneath,
   its right edge cut at the blade angle. */
.offset {
  position: relative; display: inline-block; isolation: isolate;
  padding: .32em calc(.9em + 10px) .32em .7em;
  color: var(--paper);
}
.offset::before, .offset::after {
  content: ""; position: absolute; inset: 0;
  clip-path: polygon(0 0, 100% 0, calc(100% - 10px) 100%, 0 100%);
}
.offset::before { z-index: -1; background: var(--ink); }
.offset::after  { z-index: -2; background: var(--blue); transform: translate(6px, 6px); }
.offset.caps { color: var(--paper); }

/* Heading underline that runs past the words and is cut by a blade-angle slash */
.crease { position: relative; display: inline-block; padding-bottom: .32em; margin-right: 2.4em; }
.crease::after {
  content: ""; position: absolute; left: 0; bottom: 0;
  width: calc(100% + 2em); height: 1px; background: var(--paper);
}
.crease::before {
  content: ""; position: absolute; bottom: -.5em;
  left: calc(100% + 1.55em);
  width: 2px; height: 1.15em; background: var(--blue);
  transform: skewX(-19.5deg); transform-origin: bottom;
}

/* ---------- Section breaks: three brand blades ---------- */
.blade-break { display: block; width: 100%; height: clamp(34px, 5.6vw, 84px); }
.blade-break polygon { fill: var(--blue); }
.blade-break.flip { transform: scaleY(-1); }

/* ---------- Site header (more prominent) ---------- */
.site-head {
  position: sticky;
  top: env(safe-area-inset-top, 0px);
  z-index: 20;
  background: rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line-hi);
}
/* blue rule under the header removed (mark-up 14 Oct) */
.site-head .wrap {
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px; min-height: var(--head-h); padding-block: 14px;
}
.brand { display: block; text-decoration: none; flex: none; }
.brand img { height: 60px; width: auto; transition: opacity .2s; }
.brand:hover img { opacity: .8; }
.nav { display: flex; gap: clamp(16px, 2.6vw, 40px); flex-wrap: wrap; justify-content: flex-end; align-items: center; }
.nav a {
  text-decoration: none; font-size: 15px; font-weight: 400; color: var(--body);
  padding-block: 6px; border-bottom: 2px solid transparent;
  transition: color .2s, border-color .2s;
}
.nav a:hover, .nav a[aria-current="page"] { color: var(--paper); border-bottom-color: var(--blue); }
@media (max-width: 720px) {
  :root { --head-h: 68px; }
  .brand img { height: 46px; }
  .nav { gap: 6px 16px; }
  .nav a { font-size: 14px; }
  .nav .btn-cta--nav { display: none; }
}

/* ---------- Footer (more prominent, filled triangle grid) ---------- */
.site-foot {
  margin-top: clamp(72px, 10vw, 140px);
  background: var(--deep);
  border-top: 3px solid var(--blue);
  position: relative; isolation: isolate; overflow: hidden;
}
.site-foot::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background-image: var(--grid); background-size: 224px 634px; opacity: .22;
}
.foot-top {
  display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 2fr);
  gap: clamp(32px, 5vw, 80px); padding-block: clamp(56px, 7vw, 96px) clamp(40px, 5vw, 64px);
}
.foot-brand { display: grid; gap: 24px; align-content: start; justify-items: start; }
.foot-brand img { width: min(260px, 60vw); height: auto; }
.foot-brand p { color: var(--body); max-width: 30ch; font-size: 16px; }
.foot-cols {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 28px; font-size: 15px; color: var(--body);
}
.foot-cols strong { display: block; color: var(--paper); font-weight: 500; margin-bottom: 10px; }
.foot-cols .caps { display: block; margin-bottom: 12px; color: var(--blue-hi); }
.foot-cols a { text-decoration: none; border-bottom: 1px solid var(--line-hi); }
.foot-cols a:hover { color: var(--paper); border-bottom-color: var(--blue); }
.foot-cols ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.foot-legal {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px;
  padding-block: 18px; border-top: 1px solid var(--line-hi);
  font-size: 13px; color: var(--mute);
}
@media (max-width: 820px) { .foot-top { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Shared headings ---------- */
h1, h2, h3 { font-weight: 300; margin: 0; text-wrap: balance; line-height: 1.08; letter-spacing: -0.015em; }
h1 { font-size: clamp(44px, 7vw, 104px); font-weight: 200; }
h2 { font-size: clamp(34px, 4.6vw, 64px); font-weight: 200; }
h3 { font-size: clamp(24px, 2.4vw, 32px); font-weight: 400; }
p { margin: 0; }

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

.sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* ---------- Call to action: blue blade button (black type for contrast on brand blue) ---------- */
.btn-cta {
  --cut: 16px;
  display: inline-flex; align-items: center; gap: 14px;
  font: inherit; font-size: 16px; font-weight: 500; letter-spacing: .01em;
  color: var(--ink); background: var(--blue);
  border: 0; cursor: pointer; text-decoration: none;
  padding: 16px calc(26px + var(--cut)) 16px 24px;
  clip-path: polygon(0 0, 100% 0, calc(100% - var(--cut)) 100%, 0 100%);
  transition: background .25s;
}
.btn-cta::after {
  content: ""; width: 18px; height: 10px; flex: none;
  background: currentColor;
  clip-path: polygon(0 40%, 70% 40%, 70% 0, 100% 50%, 70% 100%, 70% 60%, 0 60%);
  transition: transform .25s;
}
.btn-cta:hover { background: #7090ff; }
.btn-cta:hover::after { transform: translateX(4px); }
.btn-cta:focus-visible { outline: 2px solid var(--paper); outline-offset: 3px; }
.nav a.btn-cta--nav, .btn-cta--nav {
  --cut: 10px; font-size: 14px; font-weight: 500; color: var(--ink);
  padding: 10px calc(16px + var(--cut)) 10px 14px; gap: 10px; border-bottom: 0;
}
.nav a.btn-cta--nav:hover { color: var(--ink); }
.nav a.btn-cta--nav::after { width: 12px; height: 8px; }
.nav a.btn-cta--nav[aria-current="page"] { background: #7090ff; }

/* Ghost variant for use over imagery */
.btn-ghost {
  display: inline-flex; align-items: center; gap: 12px;
  font: inherit; font-size: 15px; font-weight: 500; color: var(--paper);
  background: rgba(0,0,0,.55); border: 1px solid rgba(255,255,255,.5);
  padding: 11px 18px; cursor: pointer; text-decoration: none;
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  transition: background .25s, border-color .25s, color .25s;
}
.btn-ghost:hover { background: var(--blue); border-color: var(--blue); color: var(--ink); }

.offset + h1, .offset + h2 { margin-top: 24px !important; }

/* ---------- Kaupapa option: client portal button replaces "Start a project" in the header ---------- */
/* Stays visible on phones (clients need it), unlike the old header CTA */
@media (max-width: 720px) {
  .nav .btn-cta--nav.btn-cta--kaupapa { display: inline-flex; font-size: 13px; padding: 8px calc(12px + var(--cut)) 8px 11px; }
}
