/* === Kern — Global Styles === */

@font-face {
  font-family: 'Inter';
  src: url('/assets/fonts/inter-latin.woff2') format('woff2');
  font-weight: 200 500;
  font-style: normal;
  font-display: swap;
}

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

:root {
  --bg: #000000;
  --surface: #0a0a0a;
  --border: #1a1a1a;
  --rule-strong: #2a2a2a;
  --input-line: #3a3a3a;
  --text: #ffffff;
  --text-secondary: #a0a0a0; /* ~7.0:1 on #000, AAA */
  --text-tertiary:  #7c7c7c; /* ~4.6:1 on #000, AA for normal text */
  --accent: #4A9EFF;
  --danger: #FF6B6B;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
  --max-width: 1200px;
  --gap: 80px;
}

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

:target,
section[id],
h2[id],
section[id] > .t-label {
  scroll-margin-top: 88px;
}

body {
  background: var(--bg);
  font-family: var(--font);
  color: var(--text);
  font-weight: 300;
  font-size: 16px;
  line-height: 1.7;
  letter-spacing: 0.01em;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: opacity 0.2s;
}

a:hover { opacity: 0.7; }

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

/* === Skip link === */
.skip-link {
  position: absolute;
  top: -100px;
  left: 16px;
  background: var(--accent);
  color: var(--bg);
  padding: 12px 24px;
  font-size: 14px;
  font-weight: 400;
  letter-spacing: 0.04em;
  z-index: 200;
  transition: top 0.2s;
}

.skip-link:focus {
  top: 12px;
  opacity: 1;
}

/* === Screen reader only === */
.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;
}

/* === Focus === */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

/* === Nav === */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 0 48px;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}

.nav-logo {
  height: 20px;
  width: auto;
}

.nav-links {
  display: flex;
  gap: 40px;
  list-style: none;
}

.nav-cta-mobile { display: none; }

.nav-links a {
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: color 0.2s;
}

.nav-links a:hover,
.nav-links a[aria-current="page"] {
  color: var(--text);
  opacity: 1;
}

.nav-cta {
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--bg) !important;
  background: var(--text);
  padding: 10px 24px;
  transition: background 0.2s, color 0.2s;
}

.nav-cta:hover {
  background: var(--accent);
  color: var(--bg) !important;
  opacity: 1;
}

/* Mobile nav */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text);
  font-size: 24px;
  cursor: pointer;
  padding: 10px 12px;
  min-width: 44px;
  min-height: 44px;
  line-height: 1;
}

/* === Layout === */
.page { padding-top: 72px; }

.section {
  padding: 120px 48px;
  max-width: var(--max-width);
  margin: 0 auto;
}

.section-tight {
  padding: 80px 48px;
}

.section-full {
  padding: 120px 48px;
  width: 100%;
}

/* === Typography === */
.t-display {
  font-size: clamp(48px, 7vw, 96px);
  font-weight: 200;
  letter-spacing: 0.04em;
  line-height: 1.05;
}

.t-h1 {
  font-size: clamp(36px, 5vw, 64px);
  font-weight: 200;
  letter-spacing: 0.035em;
  line-height: 1.1;
}

.t-h2 {
  font-size: clamp(24px, 3vw, 40px);
  font-weight: 300;
  letter-spacing: 0.03em;
  line-height: 1.2;
  margin-top: 24px;
  max-width: 640px;
}

.t-h2--narrow { max-width: 560px; }
.grid-after-h2 { margin-top: 64px; }

.t-h3 {
  font-size: 18px;
  font-weight: 400;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  line-height: 1.3;
}

.t-label {
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-secondary);
}

.t-body {
  font-size: 17px;
  font-weight: 300;
  color: var(--text-secondary);
  line-height: 1.7;
  max-width: 600px;
}

.t-body-lg {
  font-size: 20px;
  font-weight: 300;
  color: var(--text-secondary);
  line-height: 1.7;
  max-width: 640px;
}

.t-stat {
  font-size: clamp(48px, 6vw, 80px);
  font-weight: 200;
  letter-spacing: 0.04em;
  line-height: 1;
}

/* === Colours === */
.c-accent { color: var(--accent); }
.c-secondary { color: var(--text-secondary); }
.c-tertiary { color: var(--text-tertiary); }

/* === Grid === */
.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--gap);
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--gap);
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--gap);
}

/* === Divider === */
.divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 0;
}

/* === Buttons === */
.btn {
  display: inline-block;
  font-family: var(--font);
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 16px 40px;
  cursor: pointer;
  transition: all 0.2s;
  border: none;
}

.btn-primary {
  background: var(--text);
  color: var(--bg);
}

.btn-primary:hover {
  background: var(--accent);
  color: var(--bg);
  opacity: 1;
}

.btn-outline {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-outline:hover {
  border-color: var(--text);
  opacity: 1;
}

/* === Footer === */
.footer {
  border-top: 1px solid var(--border);
  padding: 80px 48px;
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
}

.footer-brand p {
  color: var(--text-tertiary);
  font-size: 14px;
  font-weight: 300;
  margin-top: 16px;
  max-width: 280px;
  line-height: 1.6;
}

.footer-col .footer-heading {
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-bottom: 20px;
}

.footer-col ul {
  list-style: none;
}

.footer-col li {
  margin-bottom: 12px;
}

.footer-col a {
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 300;
  transition: color 0.2s;
}

.footer-col a:hover {
  color: var(--text);
  opacity: 1;
}

.footer-bottom {
  max-width: var(--max-width);
  margin: 48px auto 0;
  padding-top: 32px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  color: var(--text-tertiary);
  font-weight: 300;
}

/* === Animations === */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}

.fade-in {
  opacity: 0;
  animation: fadeUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.fade-in-d1 { animation-delay: 0.1s; }
.fade-in-d2 { animation-delay: 0.2s; }
.fade-in-d3 { animation-delay: 0.3s; }
.fade-in-d4 { animation-delay: 0.4s; }
.fade-in-d5 { animation-delay: 0.5s; }

/* Scroll-triggered reveal */
.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* === Responsive === */
@media (max-width: 1024px) {
  :root { --gap: 48px; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  :root { --gap: 32px; }

  .nav { padding: 0 24px; }
  .nav-links { display: none; }
  .nav-toggle { display: block; }
  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 72px;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg);
    padding: 48px 24px;
    gap: 32px;
    border-top: 1px solid var(--border);
  }
  .nav-links.open a {
    font-size: 18px;
  }
  .nav-cta-mobile { display: list-item; }
  .nav-cta-mobile a {
    color: var(--bg) !important;
    background: var(--text);
    padding: 12px 24px;
    display: inline-block;
    font-size: 14px !important;
    margin-top: 16px;
  }

  .section, .section-full { padding: 80px 24px; }
  .section-tight { padding: 48px 24px; }

  .grid-2, .grid-3, .grid-4 {
    grid-template-columns: 1fr;
  }

  .footer-inner {
    grid-template-columns: 1fr 1fr;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 8px;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .section, .section-full { padding: 64px 20px; }
  .footer { padding: 48px 20px; }
  .footer-inner { grid-template-columns: 1fr; }
}

/* === Lifestyle break === */
.lifestyle-break {
  padding: 120px 48px;
  text-align: center;
  max-width: 100%;
  position: relative;
  overflow: hidden;
}

.lifestyle-break .break-word {
  font-family: 'Inter', -apple-system, sans-serif;
  font-size: clamp(64px, 12vw, 160px);
  font-weight: 200;
  letter-spacing: 0.06em;
  color: var(--text);
  opacity: 0.08;
  line-height: 1;
  user-select: none;
}

.lifestyle-break .break-line {
  width: 120px;
  height: 1px;
  background: var(--accent);
  margin: 32px auto;
  opacity: 0.5;
}

/* === CTA banner === */
.cta-banner {
  text-align: center;
  padding: 160px 48px;
  max-width: var(--max-width);
  margin: 0 auto;
}

.cta-banner .t-h1 { margin-bottom: 24px; }

.cta-banner .t-body-lg {
  margin: 0 auto 48px;
  text-align: center;
}

@media (max-width: 768px) {
  .cta-banner { padding: 80px 24px; }
}

/* === Typography helpers === */
.t-micro {
  color: var(--text-tertiary);
  font-size: 12px;
  font-weight: 300;
  letter-spacing: 0.06em;
  line-height: 1.6;
  text-transform: none;
}

.t-footnote {
  color: var(--text-tertiary);
  font-size: 13px;
  font-weight: 300;
  letter-spacing: 0.02em;
  margin-top: 8px;
}

.t-footnote--tight { margin-top: 16px; }

/* === Hero (shared between index + team) === */
.hero {
  min-height: calc(100vh - 72px);
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  align-items: center;
  padding: 120px 48px 80px;
  max-width: var(--max-width);
  margin: 0 auto;
  gap: 80px;
}

.hero-content { display: flex; flex-direction: column; }

.hero-image { display: flex; justify-content: center; align-items: center; }
.hero-image svg { max-height: 70vh; width: auto; }

.hero-tagline {
  margin-top: 24px;
  color: var(--text-secondary);
  font-size: clamp(18px, 2.5vw, 24px);
  font-weight: 300;
  letter-spacing: 0.02em;
  max-width: 600px;
  line-height: 1.6;
}

.hero-sub {
  margin-top: 24px;
  color: var(--text-secondary);
  font-size: clamp(18px, 2.5vw, 24px);
  font-weight: 300;
  letter-spacing: 0.02em;
  max-width: 640px;
  line-height: 1.6;
}

.hero-ctas { display: flex; gap: 16px; margin-top: 40px; }

.hero-scroll {
  margin-top: 64px;
  color: var(--text-tertiary);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 400;
}

/* === Hero quote === */
.hero-quote {
  margin-top: 40px;
  padding-left: 20px;
  border-left: 1px solid var(--rule-strong);
  color: var(--text-secondary);
  font-size: 16px;
  font-weight: 300;
  font-style: normal;
  letter-spacing: 0.01em;
  line-height: 1.65;
  max-width: 520px;
}

.hero-quote cite {
  display: block;
  margin-top: 12px;
  font-style: normal;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-tertiary);
}

/* === Mission belief (demoted accent) === */
.mission-belief {
  margin-top: 48px;
  padding-top: 32px;
  border-top: 1px solid var(--rule-strong);
  color: var(--text);
  font-size: 17px;
  font-weight: 300;
  letter-spacing: 0.03em;
  line-height: 1.5;
  max-width: 560px;
}

.mission-belief::before {
  content: "—";
  color: var(--accent);
  margin-right: 12px;
}

/* === Forms === */
.form {
  max-width: 440px;
  margin: 0 auto;
  text-align: left;
}

.form-field {
  width: 100%;
  padding: 16px 0;
  background: none;
  border: none;
  border-bottom: 1px solid var(--input-line);
  color: var(--text);
  font-family: inherit;
  font-size: 15px;
  font-weight: 300;
  letter-spacing: 0.02em;
  outline: none;
  margin-bottom: 24px;
  transition: border-color 0.15s;
}

textarea.form-field {
  margin-bottom: 32px;
  resize: none;
}

.form-field:focus {
  outline: none;
  border-bottom: 2px solid var(--accent);
  padding-bottom: 15px; /* preserve layout: 16px padding + 1px border → 15px padding + 2px border */
}

.form-field:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.form-submit { width: 100%; text-align: center; }

.form-status {
  margin-top: 16px;
  min-height: 1.5em;
  font-size: 13px;
  font-weight: 300;
  letter-spacing: 0.02em;
  text-align: center;
  color: var(--text-tertiary);
  transition: color 0.15s;
}

.form-status.is-hidden   { visibility: hidden; }
.form-status.is-success  { color: var(--accent); }
.form-status.is-error    { color: var(--danger); }
.form-status.is-success::before { content: "\2713  "; font-weight: 400; }
.form-status.is-error::before   { content: "Error \2014 "; font-weight: 400; }

.btn[disabled] {
  opacity: 0.6;
  cursor: progress;
  background: var(--text);
  color: var(--bg);
}

/* === Disclosure button (e.g. "Add a note (optional)") === */
.disclosure-btn {
  background: none;
  border: none;
  padding: 0;
  margin-bottom: 24px;
  color: var(--text-tertiary);
  font-family: inherit;
  font-size: 13px;
  font-weight: 300;
  letter-spacing: 0.04em;
  text-decoration: underline;
  text-underline-offset: 4px;
  cursor: pointer;
}
.disclosure-btn:hover { color: var(--text-secondary); }
.disclosure-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* === Post-submit confirmation block === */
.cta-confirm {
  max-width: 440px;
  margin: 0 auto;
  text-align: center;
}
.cta-confirm .t-label { color: var(--text-tertiary); }
.cta-confirm h3 { margin-top: 16px; color: var(--text); }
.cta-confirm p { margin-top: 24px; color: var(--text-secondary); }
.cta-confirm .btn { margin-top: 24px; }

/* === Footer coming-soon label === */
.footer-stub {
  color: var(--text-tertiary);
  font-size: 14px;
  font-weight: 300;
}

/* === Layout helpers === */
.grid-center { align-items: center; }
.grid-top    { align-items: start; }

.t-body--wide   { max-width: 640px; }
.t-body--spaced { margin-top: 24px; }

.culture-text--spaced { margin-top: 48px; }

.section-wrap {
  max-width: var(--max-width);
  margin: 0 auto;
}

.diff-grid--wrap {
  max-width: var(--max-width);
  margin: 64px auto 0;
}

.result--muted { color: var(--text-tertiary); }

.footnotes {
  color: var(--text-tertiary);
  font-size: 13px;
  font-weight: 300;
  letter-spacing: 0.02em;
  margin-top: 16px;
}

/* === Mobile overrides === */
@media (max-width: 768px) {
  .hero {
    grid-template-columns: 1fr;
    padding: 80px 24px 48px;
    min-height: auto;
    gap: 24px;
  }
  .hero-image { order: 2; }
  .hero-image svg { max-height: 32vh; }
  .hero-ctas { flex-direction: column; margin-top: 24px; }
  .hero-ctas .btn { text-align: center; }
  .hero-scroll { display: none; }
  .hero-tagline { font-size: 16px; margin-top: 16px; }

  .nav-cta-wrap { display: block; }
  .nav-cta {
    padding: 8px 12px;
    font-size: 11px;
    letter-spacing: 0.06em;
    white-space: nowrap;
  }
}

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