/*
  House of Mastery — Shared Design System
  hom.css v1.0
  ─────────────────────────────────────────────────────────────────────────────
  Single source of truth for:
    1. Design tokens (colors, spacing, radius, shadow, font)
    2. Typography scale — 5 levels, mobile-first, one desktop override block
    3. Base element resets
    4. Shared layout utilities
    5. Navigation (shared across all pages)
    6. Footer (shared across all pages)
    7. Button system
    8. Responsive protocol:
         Mobile  : base styles (no @media wrapper)
         Desktop : single @media (min-width: 768px) block
         Wide    : single @media (min-width: 1100px) block
  ─────────────────────────────────────────────────────────────────────────────
  DO NOT use !important anywhere in this file.
  Page-specific overrides live in each page's own <style> block.
*/

/* ─── 1. DESIGN TOKENS ──────────────────────────────────────────────────── */

:root {
  /* Palette */
  --page:       #EBF1FA;
  --surface:    #FFFFFF;
  --surface-2:  #EDF2F8;

  --ink:        #0D2340;
  --ink-90:     rgba(13,35,64,0.92);
  --ink-80:     rgba(13,35,64,0.82);
  --ink-60:     rgba(13,35,64,0.64);
  --ink-40:     rgba(13,35,64,0.44);
  --ink-20:     rgba(13,35,64,0.20);
  --ink-12:     rgba(13,35,64,0.12);
  --ink-06:     rgba(13,35,64,0.06);

  --line:       rgba(13,35,64,0.09);
  --line-light: rgba(13,35,64,0.05);

  --cobalt:       #3b7fe8;
  --cobalt-light: #5a96f0;
  --cobalt-soft:  rgba(59,127,232,0.10);

  /* Alias: --gold maps to cobalt for legacy compatibility */
  --gold:       var(--cobalt);
  --gold-light: var(--cobalt-light);
  --gold-soft:  var(--cobalt-soft);

  --grad-dark: linear-gradient(135deg,#060D1A 0%,#0C1C35 100%);

  /* Typography */
  --font-sans:  'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-serif: 'Source Serif 4', Georgia, serif;
  --font:       var(--font-sans);

  /* Spacing */
  --r:  8px;
  --r2: 14px;
  --r3: 20px;

  /* Shadows */
  --shadow-sm:   0 1px 3px rgba(0,0,0,0.05), 0 1px 2px rgba(0,0,0,0.03);
  --shadow-md:   0 4px 16px rgba(0,0,0,0.07), 0 2px 6px rgba(0,0,0,0.03);
  --shadow-cta:  0 4px 20px rgba(15,31,75,0.22), 0 2px 6px rgba(15,31,75,0.10);
  --shadow-cobalt: 0 4px 20px rgba(59,127,232,0.28), 0 2px 6px rgba(59,127,232,0.14);

  /* Easing */
  --ease: cubic-bezier(0.22,1,0.36,1);

  /* ── Typography scale (mobile-first) ──────────────────────────────────── */
  /* Level 1: Page headline / hero H1 */
  --t1-size:   32px;
  --t1-weight: 600;
  --t1-lh:     1.10;
  --t1-ls:     -0.03em;

  /* Level 2: Section heading H2 */
  --t2-size:   24px;
  --t2-weight: 600;
  --t2-lh:     1.15;
  --t2-ls:     -0.025em;

  /* Level 3: Sub-heading H3 */
  --t3-size:   19px;
  --t3-weight: 600;
  --t3-lh:     1.25;
  --t3-ls:     -0.015em;

  /* Level 4: Body / sec-body */
  --t4-size:   16px;
  --t4-weight: 400;
  --t4-lh:     1.72;
  --t4-ls:     0;

  /* Level 5: Small / label / caption */
  --t5-size:   13px;
  --t5-weight: 600;
  --t5-lh:     1.5;
  --t5-ls:     0.04em;
}

/* Desktop scale — single override block */
@media (min-width: 768px) {
  :root {
    --t1-size: clamp(36px, 4.2vw, 60px);
    --t2-size: clamp(26px, 2.8vw, 40px);
    --t3-size: clamp(19px, 1.9vw, 26px);
    --t4-size: clamp(16px, 1.7vw, 18px);
    --t5-size: 13px;
  }
}

/* Wide-screen cap */
@media (min-width: 1100px) {
  :root {
    --t1-size: 60px;
    --t2-size: 40px;
    --t3-size: 26px;
    --t4-size: 18px;
  }
}


/* ─── 2. BASE RESET ─────────────────────────────────────────────────────── */

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

html {
  font-size: 100%;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  background: var(--page);
  color: var(--ink);
  line-height: var(--t4-lh);
  font-size: var(--t4-size);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

a {
  color: var(--cobalt);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

ul, ol {
  list-style: none;
}

button {
  cursor: pointer;
  font-family: inherit;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms;
    transition-duration: 0.01ms;
  }
}


/* ─── 3. TYPOGRAPHY ELEMENTS ────────────────────────────────────────────── */

h1 {
  font-size: var(--t1-size);
  font-weight: var(--t1-weight);
  line-height: var(--t1-lh);
  letter-spacing: var(--t1-ls);
  color: var(--ink);
  text-wrap: balance;
}

h2 {
  font-size: var(--t2-size);
  font-weight: var(--t2-weight);
  line-height: var(--t2-lh);
  letter-spacing: var(--t2-ls);
  color: var(--ink);
  text-wrap: balance;
}

h3 {
  font-size: var(--t3-size);
  font-weight: var(--t3-weight);
  line-height: var(--t3-lh);
  letter-spacing: var(--t3-ls);
  color: var(--ink);
}

p {
  font-size: var(--t4-size);
  line-height: var(--t4-lh);
  color: var(--ink-80);
}

strong {
  font-weight: 700;
  color: inherit;
}

em {
  font-style: italic;
}

small, .t5 {
  font-size: var(--t5-size);
  font-weight: var(--t5-weight);
  line-height: var(--t5-lh);
  letter-spacing: var(--t5-ls);
}


/* ─── 4. LAYOUT UTILITIES ───────────────────────────────────────────────── */

/* Width containers — mobile: 16px side padding; desktop: wider */
.w  { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.wm { width: 100%; max-width:  860px; margin: 0 auto; padding: 0 20px; }
.wl { width: 100%; max-width: 1040px; margin: 0 auto; padding: 0 20px; }
.wn { width: 100%; max-width:  640px; margin: 0 auto; padding: 0 20px; }
.wx { width: 100%; max-width: 1320px; margin: 0 auto; padding: 0 20px; }

@media (min-width: 768px) {
  .w  { padding: 0 40px; }
  .wm { padding: 0 48px; }
  .wl { padding: 0 56px; }
  .wn { padding: 0 32px; }
  .wx { padding: 0 64px; }
}

/* Section spacing */
.sec {
  padding: 72px 0;
  background: var(--surface);
}

.sec-alt {
  background: var(--page);
}

@media (min-width: 768px) {
  .sec {
    padding: 96px 0;
  }
}

/* Section label (eyebrow) */
.sec-label {
  display: block;
  font-size: var(--t5-size);
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--cobalt);
  margin-bottom: 20px;
}

/* Section body text */
.sec-body {
  font-size: var(--t4-size);
  line-height: var(--t4-lh);
  color: var(--ink-80);
  margin-bottom: 20px;
}

/* Callout block */
.callout {
  background: var(--cobalt-soft);
  border-left: 3px solid var(--cobalt);
  border-radius: 0 var(--r) var(--r) 0;
  padding: 20px 24px;
  margin: 32px 0;
  font-size: var(--t4-size);
  line-height: var(--t4-lh);
  color: var(--ink);
}

/* Interrupt bar */
.interrupt {
  background: var(--grad-dark);
  padding: 48px 0;
  text-align: center;
}

.interrupt-text {
  font-size: clamp(17px, 2.2vw, 22px);
  font-weight: 400;
  color: rgba(255,255,255,0.82);
  line-height: 1.6;
  max-width: 580px;
  margin: 0 auto;
  letter-spacing: -0.01em;
}

.interrupt-text strong {
  color: #fff;
  font-weight: 600;
}


/* ─── 5. NAVIGATION ─────────────────────────────────────────────────────── */

.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(235,241,250,0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
  padding: 0 20px;
  max-width: 1320px;
  margin: 0 auto;
}

@media (min-width: 768px) {
  .nav-inner {
    height: 60px;
    padding: 0 40px;
  }
}

.nav-brand {
  font-size: 15px;
  font-weight: 800;
  color: var(--ink);
  letter-spacing: -0.02em;
  text-decoration: none;
  flex-shrink: 0;
}

.nav-brand:hover {
  text-decoration: none;
  color: var(--ink);
}

/* Desktop nav links */
.nav-links {
  display: none;
  align-items: center;
  gap: 4px;
}

@media (min-width: 768px) {
  .nav-links {
    display: flex;
  }
}

.nav-link {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--ink-60);
  text-decoration: none;
  padding: 8px 10px;
  border-radius: var(--r);
  transition: color 150ms, background 150ms;
}

.nav-link:hover {
  color: var(--ink);
  background: var(--ink-06);
  text-decoration: none;
}

.nav-link.active {
  color: var(--cobalt);
}

/* Mobile hamburger */
.nav-mob {
  display: flex;
  align-items: center;
  gap: 12px;
}

@media (min-width: 768px) {
  .nav-mob {
    display: none;
  }
}

.nav-mob-btn {
  background: none;
  border: none;
  padding: 8px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 5px;
  border-radius: var(--r);
}

.nav-mob-btn span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform 200ms var(--ease), opacity 200ms;
}

/* Mobile menu drawer */
.nav-drawer {
  display: none;
  flex-direction: column;
  background: var(--surface);
  border-top: 1px solid var(--line);
  padding: 16px 20px 24px;
}

.nav-drawer.open {
  display: flex;
}

.nav-drawer .nav-link {
  font-size: 13px;
  padding: 12px 8px;
  border-bottom: 1px solid var(--line-light);
  letter-spacing: 0.08em;
}

.nav-drawer .nav-link:last-child {
  border-bottom: none;
}

/* CTA in nav */
.nav-cta {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: #fff;
  background: var(--cobalt);
  padding: 8px 14px;
  border-radius: var(--r);
  text-decoration: none;
  transition: background 150ms;
  flex-shrink: 0;
}

.nav-cta:hover {
  background: var(--cobalt-light);
  text-decoration: none;
  color: #fff;
}


/* ─── 6. FOOTER ─────────────────────────────────────────────────────────── */

.footer {
  background: var(--ink);
  padding: 56px 0 32px;
}

.footer-inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
}

@media (min-width: 768px) {
  .footer-inner {
    grid-template-columns: 2fr 1fr 1fr;
    gap: 48px;
  }
}

.footer-brand {
  font-size: 18px;
  font-weight: 900;
  color: #fff;
  letter-spacing: -0.02em;
  display: block;
  margin-bottom: 12px;
}

.footer-tagline {
  font-size: 14px;
  color: rgba(255,255,255,0.70);
  line-height: 1.6;
  margin: 0;
}

.footer-head {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.55);
  margin-bottom: 16px;
}

.footer-link {
  font-size: 14px;
  font-weight: 500;
  color: rgba(255,255,255,0.55);
  text-decoration: none;
  display: block;
  margin-bottom: 10px;
  transition: color 150ms;
}

.footer-link:hover {
  color: rgba(255,255,255,0.90);
  text-decoration: none;
}

.footer-copy {
  font-size: 13px;
  color: rgba(255,255,255,0.40);
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid rgba(255,255,255,0.08);
}


/* ─── 7. BUTTON SYSTEM ──────────────────────────────────────────────────── */

.b {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 14px 28px;
  border-radius: var(--r2);
  border: none;
  cursor: pointer;
  transition: background 160ms var(--ease), box-shadow 160ms var(--ease), transform 100ms;
  white-space: nowrap;
  min-width: 140px;
}

.b:hover {
  text-decoration: none;
  transform: translateY(-1px);
}

.b:active {
  transform: translateY(0);
}

.b-blue {
  background: var(--cobalt);
  color: #fff;
  box-shadow: var(--shadow-cobalt);
}

.b-blue:hover {
  background: var(--cobalt-light);
  color: #fff;
}

.b-outline {
  background: transparent;
  color: var(--cobalt);
  border: 2px solid var(--cobalt);
}

.b-outline:hover {
  background: var(--cobalt-soft);
}

/* Mobile: full-width buttons in hero and CTA sections */
@media (max-width: 767px) {
  .hero .b,
  .cta-section .b {
    display: block;
    width: 100%;
    text-align: center;
    white-space: normal;
    word-break: break-word;
    min-width: 0;
    padding: 15px 20px;
    font-size: 12px;
  }
}


/* ─── 8. HERO BASE ──────────────────────────────────────────────────────── */

.hero {
  background: var(--grad-dark);
  padding: 80px 0 72px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

@media (min-width: 768px) {
  .hero {
    padding: 112px 0 96px;
    text-align: left;
  }
}

/* Hero glass panel (used on daily-reset, summit) */
.hero-glass {
  background: rgba(5,10,18,0.42);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: 14px;
  padding: 40px 24px;
  border: 1px solid rgba(255,255,255,0.07);
}

@media (min-width: 768px) {
  .hero-glass {
    padding: 56px 48px;
  }
}

.hero h1 {
  color: #fff;
  font-size: clamp(28px, 5.5vw, 56px);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.03em;
  text-wrap: balance;
}

.hero-opening {
  font-size: 16px;
  line-height: 1.68;
  color: rgba(255,255,255,0.82);
  margin-top: 20px;
}

.hero-sub {
  font-size: 16px;
  line-height: 1.65;
  color: rgba(255,255,255,0.75);
  margin-top: 16px;
}

@media (min-width: 768px) {
  .hero-opening,
  .hero-sub {
    font-size: 18px;
  }
}

.hero strong,
.hero b {
  color: #fff;
  font-weight: 700;
}

/* Skip link */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--cobalt);
  color: #fff;
  padding: 8px 16px;
  z-index: 999;
  font-size: 13px;
  transition: top 200ms;
}

.skip-link:focus {
  top: 0;
}


/* ─── 9. FADE-UP ANIMATION ──────────────────────────────────────────────── */

.fade-up {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 500ms var(--ease), transform 500ms var(--ease);
}

.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}
