/* === 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;
  --text: #ffffff;
  --text-secondary: #888888;
  --text-tertiary: #777777;
  --accent: #4A9EFF;
  --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;
}

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;
}

/* === Focus === */
:focus-visible {
  outline: 1px 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: 8px;
  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.03em;
  line-height: 1.1;
}

.t-h2 {
  font-size: clamp(24px, 3vw, 40px);
  font-weight: 300;
  letter-spacing: 0.02em;
  line-height: 1.2;
}

.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.02em;
  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: 48px;
}

/* === 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 h4,
.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-tertiary);
  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-wrap { display: none; }
  .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; }
}
