/* === 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 */
  --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;

  /* Font families */
  --font-display: 'Playfair Display', 'Georgia', serif;
  --font-body: 'DM Sans', 'Helvetica Neue', 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);

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

/* === LIGHT MODE (Default) === */
:root, [data-theme="light"] {
  /* Surfaces */
  --color-bg:             #fafaf8;
  --color-surface:        #ffffff;
  --color-surface-2:      #f5f5f3;
  --color-surface-offset: #f0efed;
  --color-divider:        #e2e0dc;
  --color-border:         #d4d1ca;

  /* Text */
  --color-text:           #1a1a2e;
  --color-text-muted:     #6b6b7b;
  --color-text-faint:     #a0a0ae;
  --color-text-inverse:   #fafaf8;

  /* Primary — Deep Navy */
  --color-primary:        #1a1a2e;
  --color-primary-hover:  #2d2d4a;
  --color-primary-active: #0f0f1e;

  /* Accent — Warm Gold */
  --color-accent:         #b8860b;
  --color-accent-hover:   #9a7209;
  --color-accent-active:  #7d5c07;
  --color-accent-light:   #f5e6c4;

  /* Shadows */
  --shadow-sm: 0 1px 2px oklch(0.2 0.01 80 / 0.06);
  --shadow-md: 0 4px 12px oklch(0.2 0.01 80 / 0.08);
  --shadow-lg: 0 12px 32px oklch(0.2 0.01 80 / 0.12);
}

/* === DARK MODE === */
[data-theme="dark"] {
  --color-bg:             #0f0f1e;
  --color-surface:        #1a1a2e;
  --color-surface-2:      #22223a;
  --color-surface-offset: #16162a;
  --color-divider:        #2d2d4a;
  --color-border:         #3a3a55;

  --color-text:           #e8e8ec;
  --color-text-muted:     #9090a4;
  --color-text-faint:     #5a5a70;
  --color-text-inverse:   #1a1a2e;

  --color-primary:        #e8e8ec;
  --color-primary-hover:  #d0d0d8;
  --color-primary-active: #b8b8c4;

  --color-accent:         #d4a017;
  --color-accent-hover:   #e8b42b;
  --color-accent-active:  #f0c040;
  --color-accent-light:   #2a2518;

  --shadow-sm: 0 1px 2px oklch(0 0 0 / 0.2);
  --shadow-md: 0 4px 12px oklch(0 0 0 / 0.3);
  --shadow-lg: 0 12px 32px oklch(0 0 0 / 0.4);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --color-bg:             #0f0f1e;
    --color-surface:        #1a1a2e;
    --color-surface-2:      #22223a;
    --color-surface-offset: #16162a;
    --color-divider:        #2d2d4a;
    --color-border:         #3a3a55;
    --color-text:           #e8e8ec;
    --color-text-muted:     #9090a4;
    --color-text-faint:     #5a5a70;
    --color-text-inverse:   #1a1a2e;
    --color-primary:        #e8e8ec;
    --color-primary-hover:  #d0d0d8;
    --color-primary-active: #b8b8c4;
    --color-accent:         #d4a017;
    --color-accent-hover:   #e8b42b;
    --color-accent-active:  #f0c040;
    --color-accent-light:   #2a2518;
    --shadow-sm: 0 1px 2px oklch(0 0 0 / 0.2);
    --shadow-md: 0 4px 12px oklch(0 0 0 / 0.3);
    --shadow-lg: 0 12px 32px oklch(0 0 0 / 0.4);
  }
}

/* === GLOBAL STYLES === */
body {
  font-family: var(--font-body);
  display: flex;
  flex-direction: column;
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 700;
}

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

/* === LAYOUT === */
.container {
  max-width: var(--content-wide);
  margin-inline: auto;
  padding-inline: var(--space-4);
}

.container--narrow {
  max-width: var(--content-default);
}

/* === 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 oklch(from var(--color-text) l c h / 0.08);
  transition: box-shadow 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.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-4);
}

.header__logo {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  text-decoration: none;
  color: var(--color-text);
}

.header__logo-text {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1.2;
}

.header__logo-sub {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 400;
  color: var(--color-text-muted);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  display: block;
}

.header__nav {
  display: flex;
  align-items: center;
  gap: var(--space-6);
}

.header__nav a {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  text-decoration: none;
  font-weight: 500;
  letter-spacing: 0.02em;
  position: relative;
  padding-block: var(--space-1);
}

.header__nav a:hover,
.header__nav a.active {
  color: var(--color-text);
}

.header__nav a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--color-accent);
  transition: width 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.header__nav a:hover::after,
.header__nav a.active::after {
  width: 100%;
}

.header__actions {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.theme-toggle {
  padding: var(--space-2);
  color: var(--color-text-muted);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
}

.theme-toggle:hover {
  color: var(--color-text);
  background: var(--color-surface-2);
}

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

@media (max-width: 768px) {
  .nav-toggle { display: flex; align-items: center; }
  .header__nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    background: var(--color-bg);
    border-bottom: 1px solid var(--color-divider);
    padding: var(--space-6) var(--space-4);
    gap: var(--space-4);
  }
  .header__nav.open { display: flex; }
}

/* === HERO === */
.hero {
  padding: clamp(var(--space-16), 10vw, var(--space-32)) 0;
  position: relative;
  overflow: hidden;
}

.hero__content {
  position: relative;
  z-index: 2;
}

.hero__eyebrow {
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: var(--space-4);
}

.hero__title {
  font-size: var(--text-2xl);
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: var(--space-6);
  max-width: 18ch;
}

.hero__subtitle {
  font-size: var(--text-base);
  color: var(--color-text-muted);
  max-width: 52ch;
  margin-bottom: var(--space-8);
  line-height: 1.7;
}

/* === BUTTONS === */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-6);
  font-size: var(--text-sm);
  font-weight: 600;
  border-radius: var(--radius-md);
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: all var(--transition-interactive);
}

.btn--primary {
  background: var(--color-primary);
  color: var(--color-text-inverse);
}

.btn--primary:hover {
  background: var(--color-primary-hover);
  box-shadow: var(--shadow-md);
}

.btn--outline {
  background: transparent;
  color: var(--color-text);
  border: 1px solid oklch(from var(--color-text) l c h / 0.2);
}

.btn--outline:hover {
  border-color: var(--color-text);
  background: oklch(from var(--color-text) l c h / 0.04);
}

.btn--accent {
  background: var(--color-accent);
  color: #fff;
}

.btn--accent:hover {
  background: var(--color-accent-hover);
  box-shadow: var(--shadow-md);
}

/* === SECTIONS === */
.section {
  padding: clamp(var(--space-12), 8vw, var(--space-24)) 0;
}

.section--alt {
  background: var(--color-surface-2);
}

.section__eyebrow {
  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__title {
  font-size: var(--text-xl);
  margin-bottom: var(--space-4);
  color: var(--color-text);
}

.section__desc {
  font-size: var(--text-base);
  color: var(--color-text-muted);
  max-width: 60ch;
  line-height: 1.7;
}

/* === STATS ROW === */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr));
  gap: var(--space-8);
  padding-top: var(--space-10);
}

.stat__number {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: var(--space-1);
}

.stat__label {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

/* === CARDS === */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(320px, 100%), 1fr));
  gap: var(--space-6);
}

.card {
  background: var(--color-surface);
  border: 1px solid oklch(from var(--color-text) l c h / 0.08);
  border-radius: var(--radius-lg);
  padding: var(--space-8);
  transition: box-shadow var(--transition-interactive), transform var(--transition-interactive);
}

.card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.card__icon {
  width: 48px;
  height: 48px;
  color: var(--color-accent);
  margin-bottom: var(--space-4);
}

.card__title {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  margin-bottom: var(--space-3);
}

.card__text {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: 1.7;
}

/* === TWO COLUMN LAYOUT === */
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-12);
  align-items: center;
}

@media (max-width: 768px) {
  .two-col { grid-template-columns: 1fr; gap: var(--space-8); }
}

.two-col__image {
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--color-surface-2);
  aspect-ratio: 4/3;
}

.two-col__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* === SECTOR TAGS === */
.sectors {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-top: var(--space-6);
}

.sector-tag {
  font-size: var(--text-xs);
  font-weight: 500;
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-full);
  border: 1px solid oklch(from var(--color-text) l c h / 0.12);
  color: var(--color-text-muted);
}

/* === PORTFOLIO / TRACK RECORD === */
.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr));
  gap: var(--space-6);
}

.portfolio-card {
  background: var(--color-surface);
  border: 1px solid oklch(from var(--color-text) l c h / 0.08);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  transition: box-shadow var(--transition-interactive);
}

.portfolio-card:hover {
  box-shadow: var(--shadow-md);
}

.portfolio-card__sector {
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: var(--space-3);
}

.portfolio-card__name {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  margin-bottom: var(--space-2);
}

.portfolio-card__desc {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: 1.6;
  margin-bottom: var(--space-4);
}

.portfolio-card__meta {
  display: flex;
  gap: var(--space-4);
  font-size: var(--text-xs);
  color: var(--color-text-faint);
}

/* === TIMELINE === */
.timeline {
  position: relative;
  padding-left: var(--space-8);
}

.timeline::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2px;
  background: oklch(from var(--color-text) l c h / 0.1);
}

.timeline__item {
  position: relative;
  padding-bottom: var(--space-10);
}

.timeline__item:last-child {
  padding-bottom: 0;
}

.timeline__item::before {
  content: '';
  position: absolute;
  left: calc(-1 * var(--space-8) - 4px);
  top: 6px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--color-accent);
}

.timeline__year {
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--color-accent);
  margin-bottom: var(--space-2);
}

.timeline__title {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  margin-bottom: var(--space-2);
}

.timeline__text {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: 1.7;
}

/* === CONTACT === */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-12);
}

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

.form-group {
  margin-bottom: var(--space-5);
}

.form-group label {
  display: block;
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-text);
  margin-bottom: var(--space-2);
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: var(--space-3) var(--space-4);
  background: var(--color-surface);
  border: 1px solid oklch(from var(--color-text) l c h / 0.12);
  border-radius: var(--radius-md);
  font-size: var(--text-base);
  color: var(--color-text);
  transition: border-color var(--transition-interactive);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--color-accent);
}

.form-group textarea {
  min-height: 140px;
  resize: vertical;
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: var(--space-8);
}

.contact-info__item {
  display: flex;
  gap: var(--space-4);
  align-items: flex-start;
}

.contact-info__icon {
  width: 24px;
  height: 24px;
  color: var(--color-accent);
  flex-shrink: 0;
  margin-top: 2px;
}

.contact-info__label {
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin-bottom: var(--space-1);
}

.contact-info__value {
  font-size: var(--text-base);
  color: var(--color-text);
}

/* === FOOTER === */
.footer {
  border-top: 1px solid oklch(from var(--color-text) l c h / 0.08);
  padding: var(--space-12) 0 var(--space-8);
  margin-top: auto;
}

.footer__inner {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: var(--space-8);
}

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

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

.footer__brand p {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  margin-top: var(--space-3);
  max-width: 32ch;
  line-height: 1.6;
}

.footer__col h4 {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: var(--space-4);
  letter-spacing: 0.05em;
}

.footer__col ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.footer__col a {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  text-decoration: none;
}

.footer__col a:hover {
  color: var(--color-text);
}

.footer__bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: var(--space-10);
  padding-top: var(--space-6);
  border-top: 1px solid oklch(from var(--color-text) l c h / 0.06);
  font-size: var(--text-xs);
  color: var(--color-text-faint);
}

.footer__bottom a {
  color: var(--color-text-faint);
  text-decoration: none;
}

.footer__bottom a:hover {
  color: var(--color-text-muted);
}

/* === UTILITY === */
.text-accent { color: var(--color-accent); }
.mb-4 { margin-bottom: var(--space-4); }
.mb-6 { margin-bottom: var(--space-6); }
.mb-8 { margin-bottom: var(--space-8); }
.mb-10 { margin-bottom: var(--space-10); }
.mt-6 { margin-top: var(--space-6); }
.mt-8 { margin-top: var(--space-8); }

/* === SCROLL ANIMATIONS === */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1), transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Staggered children */
.reveal-stagger > .reveal:nth-child(1) { transition-delay: 0ms; }
.reveal-stagger > .reveal:nth-child(2) { transition-delay: 80ms; }
.reveal-stagger > .reveal:nth-child(3) { transition-delay: 160ms; }
.reveal-stagger > .reveal:nth-child(4) { transition-delay: 240ms; }
.reveal-stagger > .reveal:nth-child(5) { transition-delay: 320ms; }
.reveal-stagger > .reveal:nth-child(6) { transition-delay: 400ms; }

/* === PAGE-SPECIFIC === */
/* About page */
.values-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(260px, 100%), 1fr));
  gap: var(--space-6);
  margin-top: var(--space-8);
}

.value-item {
  padding: var(--space-6);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
  border: 1px solid oklch(from var(--color-text) l c h / 0.06);
}

.value-item__number {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 700;
  color: oklch(from var(--color-accent) l c h / 0.2);
  margin-bottom: var(--space-3);
}

.value-item__title {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  margin-bottom: var(--space-2);
}

.value-item__text {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: 1.7;
}

/* Leadership */
.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(240px, 100%), 1fr));
  gap: var(--space-6);
}

.team-member {
  text-align: left;
}

.team-member__photo {
  width: 100%;
  aspect-ratio: 1;
  border-radius: var(--radius-lg);
  background: var(--color-surface-2);
  margin-bottom: var(--space-4);
  overflow: hidden;
}

.team-member__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.team-member__name {
  font-family: var(--font-display);
  font-size: var(--text-base);
  font-weight: 600;
  margin-bottom: var(--space-1);
}

.team-member__role {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

/* CTA Section */
.cta-section {
  background: var(--color-primary);
  color: var(--color-text-inverse);
  text-align: center;
  padding: clamp(var(--space-16), 8vw, var(--space-24)) 0;
}

.cta-section .section__title {
  color: var(--color-text-inverse);
}

.cta-section .section__desc {
  color: oklch(from var(--color-text-inverse) l c h / 0.7);
  margin-inline: auto;
}

/* === SKIP LINK === */
.skip-link {
  position: absolute;
  top: -100px;
  left: var(--space-4);
  background: var(--color-primary);
  color: var(--color-text-inverse);
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  z-index: 100;
  transition: top 0.2s;
}

.skip-link:focus {
  top: var(--space-2);
}

/* === BREADCRUMB / PAGE HEADERS === */
.page-header {
  padding: clamp(var(--space-12), 6vw, var(--space-20)) 0;
  background: var(--color-surface-2);
}

.page-header__title {
  font-size: var(--text-2xl);
  margin-bottom: var(--space-3);
}

.page-header__desc {
  font-size: var(--text-base);
  color: var(--color-text-muted);
  max-width: 52ch;
  line-height: 1.7;
}

/* === DIVIDER LINE === */
.divider {
  width: 48px;
  height: 2px;
  background: var(--color-accent);
  margin-bottom: var(--space-6);
}
