/* ============================================================
   Mathurco — styles.css
   Restrained, near-monochrome. One typeface. Hierarchy from
   scale, weight and whitespace. Edit the variables to re-theme.
   ============================================================ */

:root {
  --ink:        #17191e;   /* near-black — text & dark sections */
  --ink-soft:   #3c4149;
  --muted:      #5e6670;   /* labels, secondary text — AA contrast on light */
  --paper:      #ffffff;
  --paper-2:    #f5f4f1;   /* one warm off-white band */
  --line:       #e7e6e1;   /* hairlines */
  --on-dark:    #f2f2f0;
  --on-dark-soft:#9aa0a8;

  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --maxw: 1080px;
  --gutter: clamp(1.4rem, 5vw, 3rem);
}

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

html { scroll-behavior: smooth; }
section[id] { scroll-margin-top: 84px; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition-duration: 0.001ms !important; }
}

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--paper);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3 {
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.025em;
  margin: 0;
  color: var(--ink);
}

p { margin: 0; }
a { color: inherit; }

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

.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; left: 1rem; top: -3rem;
  background: var(--ink); color: #fff;
  padding: 0.6rem 1rem; border-radius: 6px;
  z-index: 100; transition: top 0.2s ease;
}
.skip-link:focus { top: 1rem; }

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

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--muted);
  margin: 0 0 1.4rem;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: saturate(180%) blur(10px);
  -webkit-backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
  font-weight: 600;
  font-size: 1.5rem;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.brand-mark {
  width: 22px;
  height: 30px;
  display: block;
  color: var(--ink);
  flex: none;
}

.nav-menu {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 2.25rem;
  margin: 0; padding: 0;
}
.nav-menu a {
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--ink-soft);
  transition: color 0.2s ease;
}
.nav-menu a:hover { color: var(--ink); }

.nav-toggle {
  display: none;
  width: 42px; height: 42px;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
  position: relative;
}
.nav-toggle-bar,
.nav-toggle-bar::before,
.nav-toggle-bar::after {
  content: "";
  position: absolute;
  left: 50%; top: 50%;
  width: 18px; height: 1.5px;
  background: var(--ink);
  transform: translate(-50%, -50%);
  transition: transform 0.25s ease;
}
.nav-toggle-bar::before { transform: translate(-50%, -6px); }
.nav-toggle-bar::after  { transform: translate(-50%, 5px); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar::before { transform: translate(-50%, -50%) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar::after  { transform: translate(-50%, -50%) rotate(-45deg); }

/* ---------- Link with arrow (primary CTA, understated) ---------- */
.link-arrow {
  display: inline-block;
  text-decoration: none;
  font-weight: 500;
  color: var(--ink);
  border-bottom: 1.5px solid var(--ink);
  padding-bottom: 2px;
  transition: opacity 0.2s ease;
}
.link-arrow::after { content: " \2192"; }
.link-arrow:hover { opacity: 0.6; }

/* ---------- Hero ---------- */
.hero {
  padding-block: clamp(5rem, 16vh, 9rem);
}
.hero-inner {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: clamp(2rem, 6vw, 5rem);
  align-items: center;
}
.hero-art { display: flex; justify-content: center; }
.hero-art svg { width: 100%; max-width: 230px; height: auto; }
@media (max-width: 820px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-art { display: none; }
}
.hero h1 {
  font-size: clamp(2.6rem, 7.5vw, 5.25rem);
  max-width: 14ch;
  margin-bottom: 1.6rem;
}
.hero-lede {
  font-size: clamp(1.15rem, 2.2vw, 1.4rem);
  color: var(--ink-soft);
  max-width: 46ch;
  margin-bottom: 2.4rem;
  line-height: 1.5;
}

/* ---------- Thesis band ---------- */
.thesis {
  background: var(--ink);
  color: var(--on-dark);
  padding-block: clamp(4rem, 12vw, 7rem);
}
.statement {
  font-size: clamp(1.8rem, 4.5vw, 3.25rem);
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.12;
  max-width: 20ch;
}
.statement-sub {
  margin-top: 1.5rem;
  font-size: clamp(1.05rem, 2vw, 1.35rem);
  color: var(--on-dark-soft);
  font-weight: 400;
}

/* ---------- Sections ---------- */
.section { padding-block: clamp(4rem, 10vw, 7rem); }
.section-alt { background: var(--paper-2); }

/* Clearly labelled section header: kicker + heading + lead */
.section-head {
  margin-bottom: 3rem;
}
.kicker {
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--muted);
  margin: 0 0 1rem;
}
.section-head h2 {
  font-size: clamp(1.55rem, 3vw, 2rem);
  margin: 0 0 1rem;
}
.section-lead {
  color: var(--ink-soft);
  font-size: 1.12rem;
  max-width: 52ch;
}
.leadership-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: clamp(2rem, 6vw, 4.5rem);
  align-items: center;
}
.leadership-name {
  font-size: clamp(1.45rem, 2.4vw, 1.9rem);
  white-space: nowrap;
}
.leadership-role {
  color: var(--muted);
  font-weight: 400;
}
.leadership-bio {
  color: var(--ink-soft);
  font-size: 1.08rem;
  line-height: 1.65;
  max-width: 60ch;
}
@media (max-width: 860px) {
  .leadership-grid { grid-template-columns: 1fr; }
  .leadership-name { white-space: normal; }
}

/* What we do — clean numbered list */
.work-list {
  list-style: none;
  margin: 0; padding: 0;
  border-top: 1px solid var(--line);
}
.work-list li {
  display: grid;
  grid-template-columns: 3.5rem 1fr;
  gap: 1.5rem;
  align-items: baseline;
  padding: 1.9rem 0;
  border-bottom: 1px solid var(--line);
}
.work-num {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.04em;
}
.work-body { max-width: 58ch; }
.work-list h3 {
  font-size: 1.3rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
}
.work-list p {
  color: var(--ink-soft);
  font-size: 1.02rem;
}

/* Platforms & partners — monochrome wordmark strip */
.logos {
  list-style: none;
  margin: 0 0 1.5rem;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: clamp(1.75rem, 5vw, 3.5rem);
}
.logos li {
  font-size: clamp(1.3rem, 2.4vw, 1.7rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--muted);
  transition: color 0.2s ease;
}
.logos li:hover { color: var(--ink); }
.logos-note {
  font-size: 0.82rem;
  color: var(--muted);
}

/* Proof — track record (numbers + experience) */
.proof { padding-block: clamp(3.5rem, 8vw, 5.5rem); }
.experience { margin-top: clamp(2.75rem, 6vw, 4.5rem); }
.experience .kicker { margin-bottom: 1.75rem; }
.logo-wall {
  list-style: none;
  margin: 0;
  padding: 0.5rem 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: clamp(2rem, 5vw, 3.5rem);
  align-items: center;
  justify-items: start;
}
.logo-wall li { display: flex; align-items: center; justify-content: flex-start; min-height: 48px; }
.logo-wall img {
  max-height: 44px;
  max-width: 100%;
  width: auto;
  object-fit: contain;
  border-radius: 6px;
}
/* ANZ only publishes a white logo, shown on its brand blue — replicate that */
.logo-wall .logo-anz img {
  box-sizing: content-box;
  height: 24px;
  max-height: none;
  background: #244e6f;
  padding: 10px 16px;
  border-radius: 8px;
}
.exp-gov {
  margin-top: 2.25rem;
  font-size: 0.95rem;
  color: var(--ink-soft);
}
.exp-gov strong { font-weight: 600; color: var(--ink); }
.experience .logos-note { margin-top: 1rem; }
.stats {
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: clamp(2rem, 5vw, 3.5rem);
}
.stat { border-top: 1.5px solid var(--ink); padding-top: 1.25rem; }
.stat dt {
  font-size: clamp(2.6rem, 6vw, 4rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1;
  color: var(--ink);
}
.stat dd {
  margin: 0.75rem 0 0;
  color: var(--ink-soft);
  font-size: 1rem;
  max-width: 22ch;
}

/* How we work — three quiet tenets */
.tenets {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: clamp(2rem, 5vw, 3.5rem);
}
.tenet h3 {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  padding-top: 1.1rem;
  border-top: 1.5px solid var(--ink);
}
.tenet p { color: var(--ink-soft); font-size: 1.02rem; }

/* ---------- Contact ---------- */
.contact {
  position: relative;
  overflow: hidden;
  background: var(--ink);
  color: var(--on-dark);
  padding-block: clamp(4.5rem, 12vw, 8rem);
  text-align: center;
}
/* Oversized faint mark — a subtle background figure */
.contact-mark {
  position: absolute;
  right: 4%;
  bottom: -16%;
  width: min(26vw, 230px);
  height: auto;
  color: #ffffff;
  opacity: 0.06;
  pointer-events: none;
}
.contact > .container { position: relative; z-index: 1; }
.contact .kicker-dark { color: var(--on-dark-soft); margin-bottom: 1.25rem; }
.contact h2 {
  color: #fff;
  font-size: clamp(2.2rem, 6vw, 3.5rem);
  margin-bottom: 1rem;
}
.contact-lead {
  color: var(--on-dark-soft);
  font-size: 1.12rem;
  margin-bottom: 2rem;
}
.contact-note {
  margin-top: 1.75rem;
  font-size: 0.92rem;
  color: var(--on-dark-soft);
}
.contact-email {
  display: inline-block;
  font-size: clamp(1.1rem, 2.4vw, 1.5rem);
  font-weight: 500;
  color: var(--on-dark);
  text-decoration: none;
  border-bottom: 1.5px solid var(--on-dark-soft);
  padding-bottom: 3px;
  transition: border-color 0.2s ease;
}
.contact-email:hover { border-color: var(--on-dark); }

/* ---------- Footer ---------- */
.site-footer {
  padding-block: 2rem;
  border-top: 1px solid var(--line);
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.9rem;
}
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-weight: 600;
}
.footer-brand .brand-mark { width: 17px; height: 24px; }
.footer-legal { color: var(--muted); text-align: right; }
.footer-reg { display: block; margin-top: 0.3rem; font-size: 0.78rem; }
@media (max-width: 620px) {
  .footer-inner { flex-direction: column; gap: 0.7rem; text-align: center; }
  .footer-legal { text-align: center; }
}

/* ---------- Section scroller (dot nav) ---------- */
.section-nav {
  position: fixed;
  right: clamp(0.6rem, 1.8vw, 1.4rem);
  top: 50%;
  transform: translateY(-50%);
  z-index: 45;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.85rem;
}
.section-nav a {
  position: relative;
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
}
.section-nav a::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: transparent;
  border: 1.5px solid var(--muted);
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}
.section-nav a:hover::before { border-color: var(--ink); }
.section-nav a.active::before {
  background: var(--ink);
  border-color: var(--ink);
  transform: scale(1.3);
}
.section-nav a::after {
  content: attr(data-label);
  position: absolute;
  right: 22px;
  top: 50%;
  transform: translateY(-50%);
  white-space: nowrap;
  font-size: 0.76rem;
  font-weight: 500;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.2rem 0.65rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.07);
}
.section-nav a:hover::after { opacity: 1; }
/* On dark bands (thesis / contact) flip the dots to light so they stay visible */
.section-nav.nav-dark a::before { border-color: rgba(255, 255, 255, 0.55); }
.section-nav.nav-dark a:hover::before { border-color: #fff; }
.section-nav.nav-dark a.active::before { background: #fff; border-color: #fff; }
@media (max-width: 900px) {
  .section-nav { display: none; }
}

/* ---------- Scroll-reveal motion ---------- */
/* Only hide when JS is present (so it can reveal); never hide content otherwise. */
.js .reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.2, 0.6, 0.2, 1);
  will-change: opacity, transform;
}
.js .reveal.is-visible {
  opacity: 1;
  transform: none;
}
@media (prefers-reduced-motion: reduce) {
  .js .reveal {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}

/* ---------- Responsive ---------- */
@media (max-width: 720px) {
  .nav-toggle { display: block; }
  .nav-menu {
    position: absolute;
    top: 68px; left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    padding: 0.25rem var(--gutter) 1rem;
    display: none;
  }
  .nav-menu.open { display: flex; }
  .nav-menu li { border-top: 1px solid var(--line); }
  .nav-menu a { display: block; padding: 0.9rem 0; }

  .work-list li {
    grid-template-columns: 2.5rem 1fr;
    gap: 1rem;
  }
}
