/* =============================================
   AEGIS AI ADVISORY — Design Tokens & Styles
   Dark-first design: charcoal bg, teal accent,
   warm beige text, orange CTA
   ============================================= */

/* --- DESIGN TOKENS --- */
:root {
  /* Type Scale */
  --text-xs:   clamp(0.75rem,  0.7rem  + 0.25vw, 0.875rem);
  --text-sm:   clamp(0.875rem, 0.8rem  + 0.35vw, 1rem);
  --text-base: clamp(1rem,     0.95rem + 0.25vw, 1.125rem);
  --text-lg:   clamp(1.125rem, 1rem    + 0.75vw, 1.5rem);
  --text-xl:   clamp(1.5rem,   1.2rem  + 1.25vw, 2.25rem);
  --text-2xl:  clamp(2rem,     1.2rem  + 2.5vw,  3.5rem);
  --text-3xl:  clamp(2.5rem,   1rem    + 4vw,    5rem);

  /* Spacing (4px base) */
  --space-1:  0.25rem;
  --space-2:  0.5rem;
  --space-3:  0.75rem;
  --space-4:  1rem;
  --space-5:  1.25rem;
  --space-6:  1.5rem;
  --space-8:  2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;
  --space-32: 8rem;

  /* Fonts */
  --font-display: 'Cabinet Grotesk', 'Trebuchet MS', sans-serif;
  --font-body: 'Satoshi', 'Calibri', sans-serif;

  /* Radius */
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-full: 9999px;

  /* Transitions */
  --transition-interactive: 180ms cubic-bezier(0.16, 1, 0.3, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);

  /* Content widths */
  --content-narrow: 640px;
  --content-default: 960px;
  --content-wide: 1200px;
  --content-full: 100%;

  /* === AEGIS DARK PALETTE (primary) === */
  --color-bg:             #141310;
  --color-surface:        #1C1B19;
  --color-surface-2:      #242320;
  --color-surface-offset: #1A1917;
  --color-border:         #3A3835;
  --color-divider:        #2A2927;

  /* Text */
  --color-text:           #F7F6F2;
  --color-text-muted:     #A8A7A2;
  --color-text-faint:     #6B6A66;

  /* Primary — Teal */
  --color-primary:        #2E8B8B;
  --color-primary-hover:  #3AA3A3;
  --color-primary-dark:   #01696F;

  /* Accent — Orange (CTAs) */
  --color-accent:         #D47B3A;
  --color-accent-hover:   #E08D4E;

  /* Alert — Red */
  --color-alert:          #C44536;

  /* Shadows */
  --shadow-sm: 0 1px 3px oklch(0 0 0 / 0.3);
  --shadow-md: 0 4px 16px oklch(0 0 0 / 0.35);
  --shadow-lg: 0 12px 40px oklch(0 0 0 / 0.4);
}

/* Light mode */
[data-theme="light"] {
  --color-bg:             #F7F6F2;
  --color-surface:        #FFFFFF;
  --color-surface-2:      #F0EFEB;
  --color-surface-offset: #E8E7E3;
  --color-border:         #D4D1CA;
  --color-divider:        #E0DDD8;

  --color-text:           #0F1B2D;
  --color-text-muted:     #5A5850;
  --color-text-faint:     #9A9890;

  --color-primary:        #01696F;
  --color-primary-hover:  #0C4E54;
  --color-primary-dark:   #01696F;

  --color-accent:         #D47B3A;
  --color-accent-hover:   #C06B2A;

  --shadow-sm: 0 1px 3px oklch(0.2 0.01 80 / 0.08);
  --shadow-md: 0 4px 16px oklch(0.2 0.01 80 / 0.1);
  --shadow-lg: 0 12px 40px oklch(0.2 0.01 80 / 0.14);
}

/* --- GLOBAL --- */
body {
  font-family: var(--font-body);
  background: var(--color-bg);
  color: var(--color-text);
}

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

/* --- CONTAINER --- */
.container {
  max-width: var(--content-wide);
  margin-inline: auto;
  padding-inline: var(--space-6);
}
.container--narrow {
  max-width: var(--content-default);
}

/* --- HEADER / NAV --- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: oklch(from var(--color-bg) l c h / 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--color-divider);
  transition: transform 0.3s var(--ease-out), box-shadow 0.3s var(--ease-out);
}
.site-header--scrolled {
  box-shadow: var(--shadow-sm);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: var(--space-4);
  max-width: var(--content-wide);
  margin-inline: auto;
  padding-inline: var(--space-6);
}
.logo {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  text-decoration: none;
  color: var(--color-text);
}
.logo img {
  height: 40px;
  width: auto;
  /* Logo is black on white — invert on dark, keep on light */
  filter: invert(1);
}
[data-theme="light"] .logo img {
  filter: none;
}
.logo-text {
  font-family: var(--font-display);
  font-size: var(--text-sm);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 1.2;
}
.logo-text span {
  display: block;
  font-size: 0.7em;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: var(--color-text-muted);
  text-transform: uppercase;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--space-8);
  list-style: none;
}
.nav-links a {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-text-muted);
  text-decoration: none;
  letter-spacing: 0.02em;
  transition: color var(--transition-interactive);
}
.nav-links a:hover {
  color: var(--color-text);
}

.theme-toggle {
  color: var(--color-text-muted);
  padding: var(--space-2);
  border-radius: var(--radius-md);
  transition: color var(--transition-interactive), background var(--transition-interactive);
}
.theme-toggle:hover {
  color: var(--color-text);
  background: var(--color-surface-2);
}

/* Mobile menu */
.menu-toggle {
  display: none;
  color: var(--color-text);
  padding: var(--space-2);
}

@media (max-width: 768px) {
  .menu-toggle { display: block; }
  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-divider);
    flex-direction: column;
    padding: var(--space-6);
    gap: var(--space-4);
  }
  .nav-links.open { display: flex; }
  .nav-links a { font-size: var(--text-base); }
}

/* --- HERO --- */
.hero {
  padding: clamp(var(--space-16), 10vw, var(--space-32)) 0;
  text-align: left;
  position: relative;
  overflow: hidden;
}
.hero-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-12);
  align-items: center;
}
.hero-content {
  max-width: 600px;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-1) var(--space-4);
  background: oklch(from var(--color-primary) l c h / 0.12);
  border: 1px solid oklch(from var(--color-primary) l c h / 0.25);
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--color-primary);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: var(--space-6);
}
.hero h1 {
  font-family: var(--font-display);
  font-size: var(--text-3xl);
  font-weight: 800;
  line-height: 1.05;
  color: var(--color-text);
  margin-bottom: var(--space-6);
}
.hero h1 .highlight {
  color: var(--color-primary);
}
.hero-desc {
  font-size: var(--text-base);
  line-height: 1.7;
  color: var(--color-text-muted);
  margin-bottom: var(--space-4);
  max-width: 50ch;
}
.hero-proof {
  font-size: var(--text-sm);
  color: var(--color-text-faint);
  letter-spacing: 0.01em;
  margin-bottom: var(--space-8);
}
.hero-ctas {
  display: flex;
  gap: var(--space-4);
  flex-wrap: wrap;
}

/* Hero graphic */
.hero-visual {
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
}
.hero-shield {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 400px;
}
.hero-shield-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: brightness(0) invert(1);
  opacity: 0.12;
}
[data-theme="light"] .hero-shield-img {
  filter: brightness(0);
  opacity: 0.05;
}
/* Animated network lines behind shield */
.hero-network {
  position: absolute;
  inset: -40px;
  opacity: 0.25;
}

@media (max-width: 768px) {
  .hero-inner {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .hero-content { max-width: 100%; }
  .hero-desc { max-width: 100%; }
  .hero-ctas { justify-content: center; }
  .hero-visual { order: -1; }
  .hero-shield { max-width: 260px; }
}

/* --- BUTTONS --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-6);
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: background var(--transition-interactive),
              color var(--transition-interactive),
              transform var(--transition-interactive),
              box-shadow var(--transition-interactive);
}
.btn:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}
.btn:active {
  transform: translateY(0);
  box-shadow: var(--shadow-sm);
}
.btn--primary {
  background: var(--color-accent);
  color: #fff;
}
.btn--primary:hover {
  background: var(--color-accent-hover);
  color: #fff;
}
.btn--outline {
  background: transparent;
  color: var(--color-text);
  border: 1px solid var(--color-border);
}
.btn--outline:hover {
  background: var(--color-surface-2);
  border-color: var(--color-text-muted);
  color: var(--color-text);
}

/* --- SECTIONS --- */
.section {
  padding-block: clamp(var(--space-16), 8vw, var(--space-32));
}
.section--alt {
  background: var(--color-surface);
}
.section-label {
  display: inline-block;
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 700;
  color: var(--color-primary);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: var(--space-4);
}
.section-title {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: var(--space-4);
}
.section-desc {
  font-size: var(--text-base);
  color: var(--color-text-muted);
  max-width: 60ch;
  line-height: 1.7;
}

/* --- PROBLEM SECTION --- */
.problem-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-8);
  margin-top: var(--space-10);
}
.problem-stat {
  padding: var(--space-8);
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
}
.stat-number {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 800;
  color: var(--color-accent);
  line-height: 1;
  margin-bottom: var(--space-3);
}
.stat-label {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: 1.5;
}

@media (max-width: 768px) {
  .problem-grid {
    grid-template-columns: 1fr;
  }
}

/* --- CLEAR-AI FRAMEWORK --- */
.framework-intro {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-12);
  align-items: start;
  margin-bottom: var(--space-12);
}

@media (max-width: 768px) {
  .framework-intro {
    grid-template-columns: 1fr;
  }
}

.clear-steps {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: var(--space-4);
}
.clear-step {
  padding: var(--space-6);
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
  text-align: center;
  transition: border-color var(--transition-interactive),
              box-shadow var(--transition-interactive);
}
.clear-step:hover {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 1px var(--color-primary);
}
.step-letter {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 800;
  color: var(--color-primary);
  margin-bottom: var(--space-2);
}
.step-word {
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: var(--space-2);
}
.step-desc {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  line-height: 1.5;
}

@media (max-width: 900px) {
  .clear-steps {
    grid-template-columns: repeat(3, 1fr);
  }
}
@media (max-width: 600px) {
  .clear-steps {
    grid-template-columns: 1fr 1fr;
  }
}

/* --- WHY / ICEBERG --- */
.why-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-12);
  align-items: center;
  margin-top: var(--space-10);
}
/* Shared visual image system — used across hero, framework, iceberg */
.site-visual-img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: var(--radius-lg);
  box-shadow: 0 4px 28px rgba(0,0,0,0.18);
}

.hero-logo-img {
  max-width: 400px;
}

.framework-img {
  max-width: 860px;
  margin: 0 auto;
}

.iceberg-img {
  max-width: 100%;
}

.iceberg-visual {
  display: flex;
  align-items: center;
  justify-content: center;
}
.why-content h3 {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: var(--space-4);
}
.why-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}
.why-list li {
  display: flex;
  gap: var(--space-3);
  align-items: flex-start;
  font-size: var(--text-base);
  color: var(--color-text-muted);
  line-height: 1.6;
}
.why-list li svg {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  color: var(--color-primary);
  margin-top: 3px;
}

@media (max-width: 768px) {
  .why-grid {
    grid-template-columns: 1fr;
  }
  .iceberg-visual { order: -1; }
}

/* --- ABOUT --- */
.about-grid {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: var(--space-12);
  align-items: start;
}
.about-photo {
  width: 200px;
  height: 200px;
  border-radius: var(--radius-xl);
  background: var(--color-surface-2);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--color-border);
  overflow: hidden;
}
.about-photo svg {
  width: 80px;
  height: 80px;
  color: var(--color-text-faint);
}
.about-content h3 {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: var(--space-2);
}
.about-role {
  font-size: var(--text-sm);
  color: var(--color-primary);
  font-weight: 600;
  margin-bottom: var(--space-4);
}
.about-bio {
  font-size: var(--text-base);
  color: var(--color-text-muted);
  line-height: 1.7;
  margin-bottom: var(--space-4);
}
.credential-tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}
.credential-tag {
  display: inline-block;
  padding: var(--space-1) var(--space-3);
  background: var(--color-surface-2);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  font-weight: 500;
}

@media (max-width: 768px) {
  .about-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .about-photo { margin-inline: auto; }
  .credential-tags { justify-content: center; }
}

/* --- CTA SECTION --- */
.cta-section {
  background: var(--color-surface);
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
}
.cta-inner {
  text-align: center;
  max-width: 600px;
  margin-inline: auto;
}
.cta-inner h2 {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: var(--space-4);
}
.cta-inner p {
  font-size: var(--text-base);
  color: var(--color-text-muted);
  line-height: 1.7;
  margin-bottom: var(--space-8);
  max-width: 100%;
}
.cta-actions {
  display: flex;
  gap: var(--space-4);
  justify-content: center;
  flex-wrap: wrap;
}

/* --- CONTACT --- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-12);
}
.contact-info h3 {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: var(--space-4);
}
.contact-detail {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
  font-size: var(--text-base);
  color: var(--color-text-muted);
}
.contact-detail svg {
  width: 20px;
  height: 20px;
  color: var(--color-primary);
  flex-shrink: 0;
}
.contact-detail a {
  color: var(--color-text-muted);
  transition: color var(--transition-interactive);
}
.contact-detail a:hover {
  color: var(--color-primary);
}

/* Contact form */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}
.form-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}
.form-group label {
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.form-group input,
.form-group textarea {
  padding: var(--space-3) var(--space-4);
  background: var(--color-surface-2);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  color: var(--color-text);
  transition: border-color var(--transition-interactive), box-shadow var(--transition-interactive);
}
.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--color-text-faint);
}
.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px oklch(from var(--color-primary) l c h / 0.15);
}
.form-group textarea {
  resize: vertical;
  min-height: 120px;
}

@media (max-width: 768px) {
  .contact-grid {
    grid-template-columns: 1fr;
  }
}

/* --- FOOTER --- */
.site-footer {
  padding-block: var(--space-8);
  border-top: 1px solid var(--color-divider);
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-4);
}
.footer-copy {
  font-size: var(--text-xs);
  color: var(--color-text-faint);
}
.footer-links {
  display: flex;
  gap: var(--space-6);
}
.footer-links a {
  font-size: var(--text-xs);
  color: var(--color-text-faint);
  transition: color var(--transition-interactive);
}
.footer-links a:hover {
  color: var(--color-text-muted);
}

@media (max-width: 600px) {
  .footer-inner {
    flex-direction: column;
    text-align: center;
  }
}

/* --- SCROLL REVEAL --- */
.fade-in {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}
.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* --- SERVICES SECTION --- */
.services-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-6);
  margin-top: var(--space-10);
}

.service-row {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: var(--space-6);
  padding: var(--space-6) var(--space-8);
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
  align-items: start;
  transition: border-color var(--transition-interactive);
}
.service-row:hover {
  border-color: oklch(from var(--color-primary) l c h / 0.4);
}

.service-icon {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-primary);
  margin-top: 2px;
}
.service-icon svg {
  width: 24px;
  height: 24px;
}
.service-text h3 {
  font-family: var(--font-display);
  font-size: var(--text-base);
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: var(--space-2);
}
.service-text p {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: 1.6;
}
.deliverables-label {
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--color-primary);
  margin-bottom: var(--space-2) !important;
}
.deliverables-list {
  margin: 0;
  padding-left: var(--space-5);
  list-style: disc;
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: 1.7;
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

@media (max-width: 768px) {
  .service-row {
    padding: var(--space-5) var(--space-5);
  }
}

/* --- TRUST INDICATORS --- */
.trust-strip {
  display: flex;
  justify-content: center;
  gap: var(--space-12);
  flex-wrap: wrap;
  padding-block: var(--space-6);
  border-bottom: 1px solid var(--color-divider);
}
.trust-item {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-xs);
  color: var(--color-text-faint);
  font-weight: 500;
  letter-spacing: 0.03em;
}
.trust-item svg {
  width: 16px;
  height: 16px;
  color: var(--color-primary);
}
