/* ============================================
   Mr French — The Power of Intelligence
   Palette: Cool slate, steel blue accent, warm ivory
   Tone: Corporate noir, authoritative, discreet
   ============================================ */

:root {
  --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);

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

  --radius-sm: 0.375rem; --radius-md: 0.5rem; --radius-lg: 0.75rem; --radius-xl: 1rem; --radius-full: 9999px;
  --transition-interactive: 180ms cubic-bezier(0.16, 1, 0.3, 1);
  --content-narrow: 640px; --content-default: 960px; --content-wide: 1200px;

  --font-display: 'DM Serif Display', 'Georgia', serif;
  --font-body: 'DM Sans', 'Helvetica Neue', sans-serif;
}

/* Light Mode */
:root, [data-theme="light"] {
  --color-bg:             #f4f3f0;
  --color-surface:        #ffffff;
  --color-surface-2:      #f0efec;
  --color-surface-offset: #e8e7e3;
  --color-divider:        #d6d4cf;
  --color-border:         #c5c3bd;
  --color-text:           #1c1e22;
  --color-text-muted:     #5a5d65;
  --color-text-faint:     #9a9da5;
  --color-text-inverse:   #f4f3f0;
  --color-accent:         #3a6b8c;
  --color-accent-hover:   #2d546e;
  --color-accent-active:  #1f3d52;
  --color-accent-light:   #e8f0f5;
  --shadow-sm: 0 1px 3px rgba(28,30,34,0.06);
  --shadow-md: 0 4px 12px rgba(28,30,34,0.08);
  --shadow-lg: 0 12px 32px rgba(28,30,34,0.12);
}

/* Dark Mode */
[data-theme="dark"] {
  --color-bg:             #0e1015;
  --color-surface:        #161920;
  --color-surface-2:      #1c1f28;
  --color-surface-offset: #14171e;
  --color-divider:        #262a35;
  --color-border:         #353a48;
  --color-text:           #d8dae0;
  --color-text-muted:     #8a8e9a;
  --color-text-faint:     #555a68;
  --color-text-inverse:   #0e1015;
  --color-accent:         #5a9bc5;
  --color-accent-hover:   #7ab4da;
  --color-accent-active:  #4080aa;
  --color-accent-light:   #1a2530;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.3);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.4);
  --shadow-lg: 0 12px 32px rgba(0,0,0,0.5);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --color-bg: #0e1015; --color-surface: #161920; --color-surface-2: #1c1f28;
    --color-surface-offset: #14171e; --color-divider: #262a35; --color-border: #353a48;
    --color-text: #d8dae0; --color-text-muted: #8a8e9a; --color-text-faint: #555a68;
    --color-text-inverse: #0e1015; --color-accent: #5a9bc5; --color-accent-hover: #7ab4da;
    --color-accent-active: #4080aa; --color-accent-light: #1a2530;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.3); --shadow-md: 0 4px 12px rgba(0,0,0,0.4); --shadow-lg: 0 12px 32px rgba(0,0,0,0.5);
  }
}

/* ============================================ Layout */
.container { width: 100%; max-width: var(--content-wide); margin: 0 auto; padding-inline: var(--space-6); }
section { padding-block: clamp(var(--space-12), 8vw, var(--space-24)); }

/* ============================================ Header */
.header {
  position: sticky; top: 0; z-index: 50;
  background: oklch(from var(--color-bg) l c h / 0.92);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-divider);
}
.header--scrolled { box-shadow: var(--shadow-sm); }
.header__inner { display: flex; align-items: center; justify-content: space-between; padding-block: var(--space-4); gap: var(--space-6); }
.header__logo { display: flex; align-items: center; gap: var(--space-3); text-decoration: none; color: var(--color-text); }
.header__logo-icon { width: 36px; height: 36px; flex-shrink: 0; }
.header__logo-text { font-family: var(--font-display); font-size: var(--text-lg); font-weight: 400; line-height: 1.1; letter-spacing: 0.01em; }
.header__logo-text span { display: block; font-size: var(--text-xs); font-family: var(--font-body); font-weight: 400; letter-spacing: 0.2em; text-transform: uppercase; color: var(--color-accent); margin-top: 2px; }
nav { display: flex; align-items: center; gap: var(--space-6); }
nav a { font-size: var(--text-sm); font-weight: 500; text-decoration: none; color: var(--color-text-muted); letter-spacing: 0.04em; text-transform: uppercase; }
nav a:hover { color: var(--color-accent); }
.theme-toggle { padding: var(--space-2); color: var(--color-text-muted); border-radius: var(--radius-sm); }
.theme-toggle:hover { color: var(--color-text); background: var(--color-surface-2); }
.nav-toggle { display: none; padding: var(--space-2); color: var(--color-text); }
@media (max-width: 768px) {
  .nav-toggle { display: block; }
  nav { display: none; position: absolute; top: 100%; left: 0; right: 0; background: var(--color-surface); flex-direction: column; padding: var(--space-6); border-bottom: 1px solid var(--color-divider); box-shadow: var(--shadow-md); gap: var(--space-4); }
  nav.open { display: flex; }
  nav a { font-size: var(--text-base); }
}

/* ============================================ Hero */
.hero { position: relative; min-height: 85vh; display: flex; align-items: center; overflow: hidden; padding-block: var(--space-16); }
.hero__bg { position: absolute; inset: 0; z-index: 0; }
.hero__bg img { width: 100%; height: 100%; object-fit: cover; }
.hero__overlay { position: absolute; inset: 0; background: linear-gradient(135deg, rgba(14,16,21,0.85) 0%, rgba(14,16,21,0.6) 50%, rgba(14,16,21,0.75) 100%); }
.hero__content { position: relative; z-index: 1; max-width: 680px; padding-inline: var(--space-6); }
.hero__tagline { font-size: var(--text-xs); letter-spacing: 0.25em; text-transform: uppercase; color: var(--color-accent); font-weight: 500; margin-bottom: var(--space-4); opacity: 0.9; }
.hero h1 { font-family: var(--font-display); font-size: var(--text-3xl); font-weight: 400; color: #f4f3f0; margin-bottom: var(--space-6); letter-spacing: -0.01em; line-height: 1.08; }
.hero__subtitle { font-size: var(--text-base); color: rgba(244,243,240,0.7); margin-bottom: var(--space-8); max-width: 52ch; line-height: 1.7; }
.hero__cta { display: inline-flex; align-items: center; gap: var(--space-2); padding: var(--space-3) var(--space-8); background: var(--color-accent); color: #fff; font-size: var(--text-sm); font-weight: 500; letter-spacing: 0.06em; text-transform: uppercase; text-decoration: none; border-radius: var(--radius-sm); }
.hero__cta:hover { background: var(--color-accent-hover); }
.hero__cta svg { width: 16px; height: 16px; }

/* ============================================ Credentials Bar */
.credentials { background: var(--color-bg-alt, var(--color-surface)); border-bottom: 1px solid var(--color-divider); padding: var(--space-3) 0; }
.credentials__inner { display: flex; align-items: center; justify-content: center; gap: var(--space-4); flex-wrap: wrap; }
.credentials__item { font-size: var(--text-xs); color: var(--color-text-muted); text-transform: uppercase; letter-spacing: 0.1em; font-weight: 500; }
.credentials__divider { width: 4px; height: 4px; border-radius: 50%; background: var(--color-accent); flex-shrink: 0; }
@media (max-width: 600px) {
  .credentials__inner { flex-direction: column; gap: var(--space-2); text-align: center; }
  .credentials__divider { display: none; }
}

/* ============================================ Stats */
.stats { background: var(--color-surface); border-bottom: 1px solid var(--color-divider); }
.stats__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-6); text-align: center; }
.stat__number { font-family: var(--font-display); font-size: var(--text-xl); color: var(--color-accent); margin-bottom: var(--space-1); }
.stat__label { font-size: var(--text-xs); color: var(--color-text-muted); text-transform: uppercase; letter-spacing: 0.12em; font-weight: 500; }
@media (max-width: 600px) { .stats__grid { grid-template-columns: repeat(2, 1fr); } }

/* ============================================ Services Grid */
.services__intro { text-align: center; max-width: 60ch; margin: 0 auto var(--space-10); }
.services__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-6); }
@media (max-width: 900px) { .services__grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .services__grid { grid-template-columns: 1fr; } }
.service-card { padding: var(--space-8) var(--space-6); background: var(--color-surface); border: 1px solid var(--color-divider); border-radius: var(--radius-lg); transition: border-color var(--transition-interactive), box-shadow var(--transition-interactive); }
.service-card:hover { border-color: var(--color-accent); box-shadow: var(--shadow-md); }
.service-card__icon { width: 40px; height: 40px; margin-bottom: var(--space-4); color: var(--color-accent); }
.service-card h3 { font-family: var(--font-display); font-size: var(--text-lg); font-weight: 400; margin-bottom: var(--space-3); color: var(--color-text); }
.service-card p { font-size: var(--text-sm); color: var(--color-text-muted); line-height: 1.7; }

/* ============================================ About / Split */
.about__grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-12); align-items: center; }
@media (max-width: 768px) { .about__grid { grid-template-columns: 1fr; gap: var(--space-8); } }
.about__image { border-radius: var(--radius-lg); overflow: hidden; aspect-ratio: 4/3; }
.about__image img { width: 100%; height: 100%; object-fit: cover; }

/* ============================================ Specialist Banner */
.specialist { position: relative; overflow: hidden; }
.specialist__bg { position: absolute; inset: 0; z-index: 0; }
.specialist__bg img { width: 100%; height: 100%; object-fit: cover; }
.specialist__overlay { position: absolute; inset: 0; background: linear-gradient(to bottom, rgba(14,16,21,0.82), rgba(14,16,21,0.92)); }
.specialist__content { position: relative; z-index: 1; }
.specialist__grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--space-6); margin-top: var(--space-8); }
@media (max-width: 768px) { .specialist__grid { grid-template-columns: 1fr; } .specialist__grid > * { grid-column: span 1 !important; } }
.spec-card { padding: var(--space-6); background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1); border-radius: var(--radius-lg); }
[data-theme="dark"] .spec-card { background: var(--color-surface); border-color: var(--color-border); }
@media (prefers-color-scheme: dark) { :root:not([data-theme]) .spec-card { background: var(--color-surface); border-color: var(--color-border); } }
.spec-card h3 { font-family: var(--font-display); font-size: var(--text-lg); font-weight: 400; color: #f4f3f0; margin-bottom: var(--space-3); }
[data-theme="dark"] .spec-card h3 { color: var(--color-text); }
@media (prefers-color-scheme: dark) { :root:not([data-theme]) .spec-card h3 { color: var(--color-text); } }
.spec-card p { font-size: var(--text-sm); color: rgba(244,243,240,0.7); line-height: 1.7; }
[data-theme="dark"] .spec-card p { color: var(--color-text-muted); }
@media (prefers-color-scheme: dark) { :root:not([data-theme]) .spec-card p { color: var(--color-text-muted); } }

/* ============================================ Clients */
.clients { background: var(--color-surface-2); }
.clients__list { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--space-4); margin-top: var(--space-8); }
.client-tag { padding: var(--space-3) var(--space-6); background: var(--color-surface); border: 1px solid var(--color-divider); border-radius: var(--radius-full); font-size: var(--text-sm); font-weight: 500; color: var(--color-text); letter-spacing: 0.02em; }

/* ============================================ Contact */
.contact__grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-12); }
@media (max-width: 768px) { .contact__grid { grid-template-columns: 1fr; gap: var(--space-8); } }
.contact__info { display: flex; flex-direction: column; gap: var(--space-6); }
.contact__item { display: flex; align-items: flex-start; gap: var(--space-4); }
.contact__icon { width: 24px; height: 24px; flex-shrink: 0; color: var(--color-accent); margin-top: 2px; }
.contact__item h3 { font-size: var(--text-sm); font-weight: 600; margin-bottom: var(--space-1); color: var(--color-text); }
.contact__item p, .contact__item a { font-size: var(--text-sm); color: var(--color-text-muted); text-decoration: none; line-height: 1.5; }
.contact__item a:hover { color: var(--color-accent); }
.contact__links { display: flex; flex-direction: column; gap: var(--space-4); }
.contact__link { display: flex; align-items: center; gap: var(--space-3); padding: var(--space-4) var(--space-6); background: var(--color-surface); border: 1px solid var(--color-divider); border-radius: var(--radius-lg); text-decoration: none; color: var(--color-text); font-weight: 500; font-size: var(--text-sm); }
.contact__link:hover { border-color: var(--color-accent); background: var(--color-surface-2); }
.contact__link svg { width: 20px; height: 20px; flex-shrink: 0; color: var(--color-accent); }
.contact__link-arrow { margin-left: auto; color: var(--color-text-faint); }

/* ============================================ Footer */
.footer { background: var(--color-surface-offset); border-top: 1px solid var(--color-divider); padding-block: var(--space-8); }
.footer__inner { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: var(--space-4); }
.footer p { font-size: var(--text-xs); color: var(--color-text-muted); }
.footer a { color: var(--color-accent); text-decoration: none; font-size: var(--text-xs); }
.footer a:hover { color: var(--color-accent-hover); }
.footer__links { display: flex; gap: var(--space-6); }
.footer__credentials { display: flex; align-items: center; justify-content: center; gap: var(--space-3); flex-wrap: wrap; width: 100%; margin-top: var(--space-2); }
.footer__credentials span { font-size: var(--text-xs); color: var(--color-text-muted); text-transform: uppercase; letter-spacing: 0.08em; }
.footer__dot { width: 4px; height: 4px; border-radius: 50%; background: var(--color-accent); flex-shrink: 0; }
.footer__inner { flex-direction: column; text-align: center; }

/* ============================================ Shared */
.section-label { font-size: var(--text-xs); font-weight: 600; letter-spacing: 0.2em; text-transform: uppercase; color: var(--color-accent); margin-bottom: var(--space-3); }
.section-heading { font-family: var(--font-display); font-size: var(--text-xl); font-weight: 400; margin-bottom: var(--space-4); color: var(--color-text); }
.section-body { font-size: var(--text-base); color: var(--color-text-muted); line-height: 1.7; margin-bottom: var(--space-4); }
.divider { width: 48px; height: 2px; background: var(--color-accent); margin-bottom: var(--space-6); }
.divider--center { margin-inline: auto; }

/* ============================================ Scroll Animations */
.fade-in { opacity: 0; transform: translateY(16px); 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); }
