/* ==========================================================================
   BHL.NZ — Styles
   Single file. Custom properties → Reset → Base → Layout → Sections → States
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. DESIGN TOKENS
   -------------------------------------------------------------------------- */

:root {
  /* Colours */
  --navy-900: #0f1923;
  --navy-800: #1a2637;
  --navy-700: #243347;
  --gold-400: #d4a853;
  --gold-300: #e4c77a;
  --gold-500: #b8923e;
  --text-primary: #f0ece4;
  --text-secondary: #a8b2bf;
  --text-muted: #6b7a8d;

  /* Typography */
  --font-heading: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  --text-hero: clamp(2.5rem, 5vw + 1rem, 5rem);
  --text-h1: clamp(2rem, 3.5vw + 0.5rem, 3.5rem);
  --text-h2: clamp(1.5rem, 2vw + 0.5rem, 2.25rem);
  --text-h3: clamp(1.25rem, 1.5vw + 0.5rem, 1.75rem);
  --text-body-lg: clamp(1.125rem, 1vw + 0.5rem, 1.375rem);
  --text-body: clamp(1rem, 0.5vw + 0.75rem, 1.125rem);
  --text-sm: clamp(0.875rem, 0.5vw + 0.5rem, 1rem);
  --text-xs: clamp(0.75rem, 0.3vw + 0.5rem, 0.875rem);

  /* Weights */
  --weight-normal: 400;
  --weight-medium: 500;
  --weight-semibold: 600;
  --weight-bold: 700;
  --weight-extrabold: 800;

  /* Spacing */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;

  /* Section spacing (viewport-relative) */
  --section-gap: 20vh;

  /* Layout */
  --content-max: 1200px;
  --content-narrow: 720px;
  --content-wide: 900px;
  --content-offset: 10%;

  /* Focus */
  --focus-ring: var(--gold-400);
  --focus-ring-width: 2px;
  --focus-ring-offset: 3px;
}

/* Responsive section spacing */
@media (max-width: 1023px) {
  :root {
    --section-gap: 15vh;
    --content-offset: 0%;
  }
}

@media (max-width: 767px) {
  :root {
    --section-gap: 10vh;
    --content-offset: 0%;
  }
}

/* --------------------------------------------------------------------------
   2. FONT FACES
   -------------------------------------------------------------------------- */

@font-face {
  font-family: 'Inter';
  src: url('/fonts/inter-variable.woff2') format('woff2-variations');
  font-weight: 400 900;
  font-display: swap;
  font-style: normal;
}

/* --------------------------------------------------------------------------
   3. RESET
   -------------------------------------------------------------------------- */

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

* {
  margin: 0;
  padding: 0;
}

html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  font-size: var(--text-body);
  line-height: 1.7;
  color: var(--text-primary);
  background-color: var(--navy-800);
  min-height: 100vh;
  position: relative;
}

img, picture, video, canvas, svg {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

/* Content stacks above ambient background */
main, .site-header, .site-footer {
  position: relative;
}

h1, h2, h3 {
  font-family: var(--font-heading);
  line-height: 1.1;
  letter-spacing: -0.03em;
  text-wrap: balance;
}

blockquote {
  margin: 0;
}

/* --------------------------------------------------------------------------
   4. BASE TYPOGRAPHY
   -------------------------------------------------------------------------- */

p {
  max-width: 65ch;
}

p + p {
  margin-top: 1.5em;
}

/* Screen-reader only (visually hidden, accessible) */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

em {
  font-style: italic;
}

/* --------------------------------------------------------------------------
   5. SKIP LINK
   -------------------------------------------------------------------------- */

.skip-link {
  position: absolute;
  top: -100%;
  left: var(--space-lg);
  padding: var(--space-sm) var(--space-md);
  background: var(--gold-400);
  color: var(--navy-900);
  font-size: var(--text-sm);
  font-weight: 600;
  border-radius: 4px;
  z-index: 1000;
  transition: top 0.2s ease-out;
}

.skip-link:focus {
  top: var(--space-lg);
  outline: var(--focus-ring-width) solid var(--focus-ring);
  outline-offset: var(--focus-ring-offset);
}

/* --------------------------------------------------------------------------
   6. SITE HEADER
   -------------------------------------------------------------------------- */

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-lg);
  z-index: 100;
}

.logotype {
  font-family: var(--font-sans);
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.header-cta {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  padding: var(--space-sm) var(--space-md);
  border-bottom: 1px solid transparent;
  transition: color 150ms ease-out, border-color 150ms ease-out;
}

.header-cta:hover {
  color: var(--gold-400);
  border-bottom-color: var(--gold-400);
}

.header-cta:focus-visible {
  outline: var(--focus-ring-width) solid var(--focus-ring);
  outline-offset: var(--focus-ring-offset);
  border-radius: 2px;
}

/* --------------------------------------------------------------------------
   7. HERO SECTION
   -------------------------------------------------------------------------- */

.hero {
  min-height: 100svh;
  display: flex;
  align-items: flex-end;
  padding: 0 var(--space-lg);
  padding-left: calc(var(--content-offset) + var(--space-lg));
  padding-bottom: 12vh;
  position: relative;
}

.hero-headline {
  font-size: var(--text-hero);
  font-weight: var(--weight-extrabold);
  color: var(--text-primary);
  max-width: 900px;
  line-height: 1.0;
  letter-spacing: -0.04em;
}

/* --------------------------------------------------------------------------
   8. STORY SECTION
   -------------------------------------------------------------------------- */

.story {
  padding-top: var(--section-gap);
  padding-left: calc(var(--content-offset) + var(--space-lg));
  padding-right: var(--space-lg);
}

.story-lead {
  font-size: var(--text-h1);
  font-weight: var(--weight-bold);
  color: var(--text-primary);
  max-width: 700px;
  margin-bottom: var(--space-2xl);
  line-height: 1.15;
}

.story-body {
  max-width: var(--content-narrow);
}

.story-body p {
  font-size: var(--text-body-lg);
  line-height: 1.8;
  color: var(--text-secondary);
}

.pull-quote {
  margin-top: var(--space-2xl);
  margin-bottom: var(--space-2xl);
  padding-left: 0;
  border-left: none;
  max-width: 600px;
}

.pull-quote p {
  font-family: var(--font-heading);
  font-size: var(--text-h2);
  font-weight: var(--weight-semibold);
  font-style: normal;
  color: var(--text-primary);
  line-height: 1.3;
}

/* --------------------------------------------------------------------------
   9. PILLARS SECTION
   -------------------------------------------------------------------------- */

.pillars {
  padding-top: var(--section-gap);
  padding-left: calc(var(--content-offset) + var(--space-lg));
  padding-right: var(--space-lg);
  max-width: 900px;
}

.pillar {
  margin-bottom: var(--space-2xl);
  padding-bottom: var(--space-2xl);
  border-bottom: 1px solid var(--navy-700);
}

.pillar:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.pillar--left,
.pillar--right {
  max-width: 600px;
}

.pillar-title {
  font-size: var(--text-h3);
  font-weight: var(--weight-bold);
  color: var(--text-primary);
  margin-bottom: var(--space-sm);
}

.pillar-body {
  font-size: var(--text-body);
  color: var(--text-secondary);
  line-height: 1.7;
}

/* Mobile: remove alternating */
@media (max-width: 767px) {
  .pillar--left,
  .pillar--right {
    margin-left: 0;
    margin-right: 0;
    padding-left: 0;
    border-left: none;
  }
}

/* Tablet */
@media (min-width: 768px) and (max-width: 1023px) {
  .pillar--left,
  .pillar--right {
    margin-left: 0;
    margin-right: 0;
  }

  .pillars .section-label {
    padding-left: 0;
  }
}

/* --------------------------------------------------------------------------
   10. FOUNDERS SECTION
   -------------------------------------------------------------------------- */

.founders {
  padding-top: var(--section-gap);
  padding-left: calc(var(--content-offset) + var(--space-lg));
  padding-right: var(--space-lg);
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-2xl);
  max-width: 900px;
}

.founder {
  max-width: 500px;
}

.founder-name {
  font-size: var(--text-h2);
  font-weight: var(--weight-extrabold);
  color: var(--text-primary);
  margin-bottom: var(--space-xs);
}

.founder-role {
  display: block;
  font-family: var(--font-sans);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--gold-400);
  margin-bottom: var(--space-lg);
}

.founder-credentials {
  font-size: var(--text-body);
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: var(--space-sm);
}

.founder-domain {
  font-size: var(--text-body);
  color: var(--text-muted);
  line-height: 1.7;
}

@media (min-width: 768px) {
  .founders {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-2xl);
  }
}

@media (max-width: 767px) {
  .founder {
    max-width: 100%;
  }
}

/* --------------------------------------------------------------------------
   11. CTA SECTION
   -------------------------------------------------------------------------- */

.cta {
  padding-top: var(--section-gap);
  padding-bottom: var(--section-gap);
  padding-left: calc(var(--content-offset) + var(--space-lg));
  padding-right: var(--space-lg);
}

.cta-headline {
  font-size: var(--text-h2);
  font-weight: var(--weight-bold);
  color: var(--text-primary);
  margin-bottom: var(--space-md);
}

.cta-body {
  font-size: var(--text-body);
  color: var(--text-secondary);
  margin-bottom: var(--space-xl);
  max-width: 500px;
}

.cta-link {
  display: inline-block;
  font-size: var(--text-body-lg);
  font-weight: var(--weight-medium);
  color: var(--text-primary);
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-thickness: 1px;
  text-decoration-color: var(--text-muted);
  padding: var(--space-sm) 0;
  margin-bottom: var(--space-2xl);
  transition: color 150ms ease-out, text-decoration-color 150ms ease-out;
}

.cta-link:hover {
  color: var(--gold-400);
  text-decoration-color: var(--gold-400);
}

.cta-link:focus-visible {
  outline: var(--focus-ring-width) solid var(--focus-ring);
  outline-offset: var(--focus-ring-offset);
  border-radius: 2px;
}

.cta-link:active {
  color: var(--gold-500);
}

/* --------------------------------------------------------------------------
   CONTACT FORM
   -------------------------------------------------------------------------- */

.contact-form {
  max-width: 500px;
  margin-top: var(--space-2xl);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-md);
  margin-bottom: var(--space-md);
}

@media (max-width: 560px) {
  .form-row {
    grid-template-columns: 1fr;
  }
}

.form-field {
  display: flex;
  flex-direction: column;
  margin-bottom: var(--space-md);
}

.form-row .form-field {
  margin-bottom: 0;
}

.form-field label {
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  color: var(--text-secondary);
}

.form-field input,
.form-field textarea {
  font-family: var(--font-sans);
  font-size: var(--text-body);
  color: var(--text-primary);
  background: var(--navy-900);
  border: 1px solid var(--navy-700);
  border-radius: 4px;
  padding: var(--space-md) var(--space-lg);
  transition: border-color 150ms ease-out;
  width: 100%;
}

.form-field input:hover,
.form-field textarea:hover {
  border-color: var(--text-muted);
}

.form-field input:focus,
.form-field textarea:focus {
  outline: none;
  border-color: var(--gold-400);
}

.form-field textarea {
  resize: vertical;
  min-height: 100px;
}

.form-field input::placeholder,
.form-field textarea::placeholder {
  color: var(--text-muted);
  font-family: 'SF Mono', 'Fira Code', 'JetBrains Mono', monospace;
  font-size: var(--text-sm);
}

.form-submit {
  font-family: var(--font-sans);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  letter-spacing: 0.02em;
  color: var(--navy-900);
  background: var(--text-primary);
  border: none;
  border-radius: 4px;
  padding: var(--space-sm) var(--space-xl);
  cursor: pointer;
  transition: background 150ms ease-out, transform 150ms ease-out;
  min-height: 44px;
}

.form-submit:hover {
  background: var(--gold-400);
}

.form-submit:focus-visible {
  outline: var(--focus-ring-width) solid var(--focus-ring);
  outline-offset: var(--focus-ring-offset);
}

.form-submit:active {
  transform: translateY(1px);
}

.form-submit:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.form-status {
  font-size: var(--text-sm);
  margin-top: var(--space-md);
}

.form-status--success {
  color: #6fcf97;
}

.form-status--error {
  color: #eb5757;
}

@media (max-width: 767px) {
  .cta {
    padding-bottom: 10vh;
  }
}

/* --------------------------------------------------------------------------
   12. FOOTER
   -------------------------------------------------------------------------- */

.site-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-2xl) var(--space-lg);
  border-top: 1px solid var(--navy-700);
  max-width: var(--content-max);
  margin: 0 auto;
}

.footer-copyright,
.footer-location {
  font-family: var(--font-sans);
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

@media (max-width: 480px) {
  .site-footer {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-sm);
  }
}

/* --------------------------------------------------------------------------
   13. ANIMATIONS & REVEALS
   -------------------------------------------------------------------------- */

/* Without JS: everything visible */
.no-js .reveal {
  opacity: 1;
  transform: none;
}

/* With JS: elements start hidden */
.js .reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 400ms ease-out, transform 400ms ease-out;
}

.js .reveal.visible {
  opacity: 1;
  transform: none;
}

/* Hero-specific: no translate, just fade */
.js .hero-headline.reveal {
  transform: none;
  transition: opacity 400ms ease-out;
  transition-delay: 200ms;
}

/* Pillar stagger */
.js .pillar:nth-child(2) { transition-delay: 0ms; }
.js .pillar:nth-child(3) { transition-delay: 100ms; }
.js .pillar:nth-child(4) { transition-delay: 200ms; }
.js .pillar:nth-child(5) { transition-delay: 300ms; }

/* --------------------------------------------------------------------------
   14. REDUCED MOTION
   -------------------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .js .reveal {
    opacity: 1 !important;
    transform: none !important;
  }
}

/* --------------------------------------------------------------------------
   15. FOCUS VISIBLE (global)
   -------------------------------------------------------------------------- */

:focus {
  outline: none;
}

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