/* =============================================
   TOKENS — matching stitch/code.html Tailwind config
   ============================================= */
:root {
  --primary: #002434;
  --primary-container: #1a3a4a;
  --on-primary: #ffffff;
  --on-primary-container: #85a4b7;
  --secondary: #0a6875;
  --on-secondary: #ffffff;
  --secondary-container: #a1ecfa;
  --tertiary: #102600;
  --tertiary-container: #1d3e00;
  --on-tertiary-container: #73af42;
  --surface: #f9f9fa;
  --surface-bright: #f9f9fa;
  --surface-container-lowest: #ffffff;
  --surface-container-low: #f3f3f4;
  --surface-container: #eeeeef;
  --surface-container-high: #e8e8e9;
  --surface-container-highest: #e2e2e3;
  --on-surface: #1a1c1d;
  --on-surface-variant: #42474b;
  --outline: #72787c;
  --outline-variant: #c2c7cc;
  --background: #f9f9fa;
  --font-headline: 'Newsreader', serif;
  --font-body: 'Inter', sans-serif;
}

/* =============================================
   RESET
   ============================================= */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  color: var(--on-surface);
  background: var(--background);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
::selection { background: var(--secondary-container); }

/* =============================================
   GRAIN
   ============================================= */
.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 100;
  opacity: 0.03;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 256px 256px;
}

/* =============================================
   HERO — matches stitch layout, logo replaces stock image
   ============================================= */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 0 32px;
  max-width: 1280px;
  margin: 0 auto;
}

.hero-grid {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 2rem;
}

.hero-content {
  grid-column: 1 / 8;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.eyebrow {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--secondary);
  margin-bottom: 24px;
}

h1 {
  font-family: var(--font-headline);
  font-style: italic;
  font-size: clamp(3rem, 6vw, 5.5rem);
  font-weight: 400;
  line-height: 1.1;
  color: var(--primary);
  margin-bottom: 32px;
}

.hero-sub {
  font-size: 1.25rem;
  font-weight: 400;
  color: var(--on-surface-variant);
  line-height: 1.65;
  max-width: 520px;
  margin-bottom: 40px;
}

.hero-cta {
  display: inline-block;
  background: linear-gradient(135deg, var(--primary), var(--primary-container));
  color: white;
  padding: 16px 32px;
  border-radius: 8px;
  font-weight: 500;
  text-decoration: none;
  box-shadow: 0 8px 24px rgba(0, 36, 52, 0.15);
  transition: transform 0.3s, box-shadow 0.3s;
  width: fit-content;
}

.hero-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(0, 36, 52, 0.2);
}

/* Hero visual — logo replacing stock image */
.hero-visual-col {
  grid-column: 8 / -1;
  position: relative;
}

.hero-visual-shape {
  position: absolute;
  right: -32px;
  top: 0;
  width: 100%;
  height: 100%;
  background: var(--surface-container-low);
  border-bottom-left-radius: 12rem;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-logo-wrapper {
  padding: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-logo {
  width: 260px;
  height: 260px;
  object-fit: contain;
  opacity: 0.85;
  mix-blend-mode: multiply;
}

/* =============================================
   PILLARS — tonal background shift, no borders
   ============================================= */
.pillars {
  background: var(--surface-container-low);
  padding: 128px 32px;
}

.pillars-wrap {
  max-width: 1280px;
  margin: 0 auto;
}

.section-header {
  margin-bottom: 80px;
}

.section-header h2 {
  font-family: var(--font-headline);
  font-style: italic;
  font-size: clamp(2rem, 4vw, 3.25rem);
  font-weight: 400;
  color: var(--primary);
  margin-bottom: 16px;
}

.accent-bar {
  width: 96px;
  height: 4px;
  background: var(--secondary);
  border-radius: 9999px;
}

.pillars-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
}

.pillar {
  background: var(--surface-container-lowest);
  padding: 40px;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.pillar-teal { border-left: 4px solid var(--secondary); }
.pillar-green { border-left: 4px solid var(--tertiary-container); }

.pillar-icon {
  font-size: 2.25rem;
  margin-bottom: 24px;
  display: block;
}

.icon-teal { color: var(--secondary); }
.icon-green { color: var(--on-tertiary-container); }

.pillar h3 {
  font-family: var(--font-headline);
  font-style: italic;
  font-size: 1.5rem;
  font-weight: 400;
  color: var(--primary);
  line-height: 1.35;
  margin-bottom: 16px;
}

.pillar p {
  font-size: 0.95rem;
  color: var(--on-surface-variant);
  line-height: 1.7;
  margin-bottom: 32px;
}

.pillar-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: auto;
}

.pillar-tags span {
  padding: 4px 12px;
  background: var(--surface-container);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--on-surface-variant);
  border-radius: 9999px;
}

/* =============================================
   PHILOSOPHY — centered quote, surface background
   ============================================= */
.philosophy {
  background: var(--surface);
  padding: 128px 32px;
}

.philosophy-inner {
  max-width: 860px;
  margin: 0 auto;
  text-align: center;
}

.philosophy h2 {
  font-family: var(--font-headline);
  font-style: italic;
  font-size: clamp(1.5rem, 3.5vw, 2.75rem);
  font-weight: 400;
  color: var(--primary);
  line-height: 1.45;
}

/* =============================================
   CONTACT — dark primary gradient
   ============================================= */
.contact {
  background: linear-gradient(135deg, var(--primary), var(--primary-container));
  color: white;
  padding: 96px 32px;
  overflow: hidden;
  position: relative;
}

.contact-inner {
  max-width: 1280px;
  margin: 0 auto;
  position: relative;
  z-index: 2;
  text-align: center;
}

.contact h2 {
  font-family: var(--font-headline);
  font-style: italic;
  font-size: clamp(2rem, 4vw, 3.25rem);
  font-weight: 400;
  margin-bottom: 32px;
}

.contact-sub {
  font-size: 1.05rem;
  color: var(--on-primary-container);
  max-width: 560px;
  margin: 0 auto 64px;
  line-height: 1.7;
}

.contact-links {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 96px;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 16px;
  text-decoration: none;
  color: rgba(255, 255, 255, 0.9);
  font-size: 1.15rem;
  transition: color 0.3s;
}

.contact-item:hover { color: var(--secondary-container); }

.contact-icon {
  font-size: 1.75rem;
  color: var(--secondary);
}

/* =============================================
   FOOTER — tonal shift from surface
   ============================================= */
.footer {
  background: var(--surface-container-low);
  padding: 40px 32px;
  /* No top border — "no-line" rule: tonal shift handles separation */
}

.footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-brand {
  font-family: var(--font-headline);
  font-style: italic;
  font-size: 1.15rem;
  color: var(--on-surface);
}

.footer-links a {
  font-size: 0.8rem;
  color: var(--outline);
  text-decoration: none;
  letter-spacing: 0.02em;
  transition: color 0.2s;
}

.footer-links a:hover { color: var(--secondary); }

.footer-copy {
  font-size: 0.8rem;
  color: var(--outline);
  letter-spacing: 0.02em;
}

/* =============================================
   RESPONSIVE
   ============================================= */
@media (max-width: 768px) {
  .hero {
    min-height: auto;
    padding: 48px 24px 0;
  }

  .hero-grid {
    display: flex;
    flex-direction: column;
    gap: 0;
  }

  .hero-content {
    padding-bottom: 32px;
    text-align: center;
  }

  .hero-sub {
    margin: 0 auto 32px;
  }

  .hero-cta {
    margin: 0 auto;
  }

  .hero-visual-col {
    position: relative;
    height: auto;
    display: flex;
    justify-content: center;
    padding-bottom: 48px;
  }

  .hero-visual-shape {
    position: relative;
    right: auto;
    top: auto;
    height: auto;
    width: auto;
    background: none;
    border-radius: 0;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .hero-logo-wrapper {
    padding: 0;
  }

  .hero-logo {
    width: 140px;
    height: 140px;
    opacity: 1;
    mix-blend-mode: normal;
  }

  .hero-glow { display: none; }

  .pillars { padding: 80px 24px; }

  .pillars-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .pillar { padding: 32px; }

  .philosophy { padding: 80px 24px; }

  .contact { padding: 72px 24px; }

  .contact-links {
    flex-direction: column;
    gap: 32px;
  }

  .footer-inner {
    flex-direction: column;
    gap: 12px;
    text-align: center;
  }
}
