/* ===================================================================
   PEAK PERFORMANCE PARTNER — DESIGN SYSTEM v2.0
   Premium corporate · Apple/Wavestone level
   ================================================================== */

:root {
  /* — COLOR TOKENS — */
  --white: #ffffff;
  --off-white: #fbfbfa;
  --paper: #f5f4f1;
  --rule: #e8e6e0;
  --rule-soft: #f0eeea;
  
  --ink: #0a0a0a;
  --ink-soft: #2a2a2a;
  --ink-muted: #5e5e5e;
  --ink-subtle: #9a9a98;
  
  --navy: #0b1f3a;
  --navy-deep: #050d1c;
  --navy-soft: #1b3658;
  --navy-glow: rgba(11, 31, 58, 0.05);
  
  --accent: #1d4ed8;
  --accent-light: #3b82f6;
  --accent-soft: rgba(29, 78, 216, 0.08);
  
  --gold: #b89860;
  --gold-deep: #8c7345;
  --gold-light: #d4b87a;
  --gold-glow: rgba(184, 152, 96, 0.12);

  /* — TYPOGRAPHY — */
  --serif: 'Fraunces', 'IBM Plex Serif', 'Georgia', serif;
  --sans: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;

  /* — SPACING (8pt grid) — */
  --space-1: 0.5rem;
  --space-2: 1rem;
  --space-3: 1.5rem;
  --space-4: 2rem;
  --space-6: 3rem;
  --space-8: 4rem;
  --space-12: 6rem;
  --space-16: 8rem;
  --space-20: 10rem;

  /* — LAYOUT — */
  --gutter: 1.5rem;
  --section-pad: 5rem;
  --max-w: 1360px;
  --max-w-narrow: 880px;
  
  /* — SHADOWS — */
  --shadow-sm: 0 1px 2px rgba(11, 31, 58, 0.04);
  --shadow: 0 2px 6px rgba(11, 31, 58, 0.06), 0 1px 2px rgba(11, 31, 58, 0.04);
  --shadow-soft: 0 8px 24px rgba(11, 31, 58, 0.06), 0 2px 4px rgba(11, 31, 58, 0.04);
  --shadow-soft-lg: 0 24px 60px rgba(11, 31, 58, 0.08), 0 4px 12px rgba(11, 31, 58, 0.04);
  --shadow-heavy: 0 40px 80px rgba(11, 31, 58, 0.12);
  
  /* — TRANSITIONS — */
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --duration: 0.3s;
  --duration-slow: 0.6s;
}

/* — RESET — */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--sans);
  background: var(--white);
  color: var(--ink);
  line-height: 1.6;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-feature-settings: "ss01", "cv11", "kern";
  font-variant-ligatures: common-ligatures;
  overflow-x: hidden;
}

::selection { background: var(--navy); color: var(--white); }
a { color: inherit; text-decoration: none; }
img, svg { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }

.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.container-narrow {
  max-width: var(--max-w-narrow);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* — TYPOGRAPHY — */
.eyebrow {
  display: inline-flex; align-items: center; gap: 0.65rem;
  font-size: 0.7rem; font-weight: 600;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1.5rem;
}
.eyebrow::before {
  content: ''; width: 24px; height: 1px; background: var(--accent);
  display: inline-block;
}

.display {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2.5rem, 6vw, 5.5rem);
  line-height: 0.96;
  letter-spacing: -0.035em;
  color: var(--ink);
  font-feature-settings: "ss01", "ss02";
}

h1, h2, h3, h4 {
  color: var(--ink);
  letter-spacing: -0.02em;
  line-height: 1.15;
  font-feature-settings: "ss01";
}

h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2rem, 4vw, 3.4rem);
  line-height: 1.05;
  letter-spacing: -0.025em;
}

h3 {
  font-weight: 500;
  font-size: clamp(1.25rem, 2vw, 1.5rem);
}

h4 {
  font-weight: 600;
  font-size: 1rem;
}

.lead {
  font-size: clamp(1.05rem, 1.5vw, 1.25rem);
  line-height: 1.6;
  color: var(--ink-muted);
  max-width: 720px;
}

p { color: var(--ink-soft); }
em { font-style: italic; }

/* Italic em in display headers */
.display em, h1 em, h2 em {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  color: var(--navy);
  font-feature-settings: "ss01", "ss02";
}

/* — BUTTONS (refined) — */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 0.6rem;
  padding: 0.95rem 1.75rem;
  font-size: 0.92rem;
  font-weight: 500;
  letter-spacing: 0.005em;
  background: var(--navy);
  color: var(--white);
  border: 1px solid var(--navy);
  border-radius: 0;
  transition: all var(--duration) var(--ease);
  cursor: pointer;
  position: relative;
  overflow: hidden;
}
.btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, var(--accent) 0%, var(--navy) 100%);
  opacity: 0;
  transition: opacity var(--duration) var(--ease);
}
.btn:hover::before { opacity: 1; }
.btn > * { position: relative; z-index: 1; }
.btn:hover { transform: translateY(-1px); box-shadow: var(--shadow-soft); }

.btn-ghost {
  background: transparent;
  color: var(--navy);
  border: 1px solid var(--navy);
}
.btn-ghost::before {
  background: var(--navy);
}
.btn-ghost:hover { color: var(--white); }

/* — SECTIONS — */
.section {
  padding: var(--space-12) 0;
  position: relative;
}
.section-divider {
  border-top: 1px solid var(--rule);
}

@media (min-width: 720px) {
  :root { --gutter: 2.5rem; }
  .section { padding: var(--space-16) 0; }
}
@media (min-width: 1024px) {
  :root { --gutter: 4rem; }
  .section { padding: var(--space-20) 0; }
}

.section-head {
  margin-bottom: var(--space-8);
  max-width: 880px;
}
.section-head .lead { margin-top: 1.5rem; }

/* — GRID — */
.grid { display: grid; gap: 2rem; }
.grid-2 { grid-template-columns: 1fr; }
.grid-3 { grid-template-columns: 1fr; }
.grid-4 { grid-template-columns: 1fr; }

@media (min-width: 720px) {
  .grid-2 { grid-template-columns: 1fr 1fr; }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1024px) {
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
  .grid-4 { grid-template-columns: repeat(4, 1fr); }
}

/* — NAV — */
.site-nav {
  position: fixed; top: 0; left: 0; right: 0;
  background: rgba(255,255,255, 0.92);
  backdrop-filter: saturate(180%) blur(16px);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  z-index: 100;
  border-bottom: 1px solid transparent;
  transition: border-color var(--duration) var(--ease), background var(--duration) var(--ease);
}
.site-nav.scrolled {
  border-bottom-color: var(--rule);
  background: rgba(255,255,255, 0.96);
}
.nav-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 1rem var(--gutter);
  display: flex; align-items: center; justify-content: space-between;
  gap: 1.5rem;
}
.brand { display: flex; align-items: center; flex-shrink: 0; }
.brand-logo {
  height: 44px; width: auto;
  object-fit: contain;
  transition: opacity var(--duration) var(--ease);
}
.brand:hover .brand-logo { opacity: 0.85; }

.nav-links {
  display: none;
  list-style: none;
  align-items: center;
  gap: 2.25rem;
}
.nav-links a {
  font-size: 0.9rem; font-weight: 500; color: var(--ink-soft);
  transition: color var(--duration) var(--ease);
  position: relative;
  padding: 0.4rem 0;
}
.nav-links a::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: 0;
  height: 1.5px; background: var(--navy);
  transform: scaleX(0); transform-origin: left;
  transition: transform var(--duration) var(--ease);
}
.nav-links a:hover { color: var(--navy); }
.nav-links a:hover::after { transform: scaleX(1); }
.nav-links a.active { color: var(--navy); }
.nav-links a.active::after { transform: scaleX(1); }

.nav-cta {
  font-size: 0.88rem;
  font-weight: 500;
  padding: 0.6rem 1.25rem;
  background: var(--navy);
  color: var(--white);
  border: 1px solid var(--navy);
  transition: all var(--duration) var(--ease);
  white-space: nowrap;
  position: relative;
  overflow: hidden;
}
.nav-cta::before {
  content: '';
  position: absolute; inset: 0;
  background: var(--accent);
  transform: translateY(100%);
  transition: transform var(--duration) var(--ease);
}
.nav-cta > * { position: relative; z-index: 1; }
.nav-cta:hover::before { transform: translateY(0); }
.nav-cta:hover { border-color: var(--accent); }

.lang-switch {
  display: none;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--ink-muted);
  margin-right: 0.25rem;
  padding-right: 1rem;
  border-right: 1px solid var(--rule);
}
.lang-switch .lang-active {
  color: var(--navy);
  border-bottom: 1.5px solid var(--navy);
  padding-bottom: 1px;
}
.lang-switch .lang-link {
  color: var(--ink-muted);
  transition: color var(--duration) var(--ease);
}
.lang-switch .lang-link:hover { color: var(--navy); }
.lang-switch .lang-sep { color: var(--ink-subtle); font-weight: 400; }

.menu-toggle {
  display: flex;
  flex-direction: column;
  gap: 5px;
  background: transparent;
  border: none;
  padding: 0.5rem;
  cursor: pointer;
}
.menu-toggle span {
  display: block;
  width: 22px; height: 1.5px;
  background: var(--ink);
  transition: all var(--duration) var(--ease);
}
.menu-toggle.is-open span:nth-child(1) { transform: rotate(45deg) translate(4px, 5px); }
.menu-toggle.is-open span:nth-child(2) { opacity: 0; }
.menu-toggle.is-open span:nth-child(3) { transform: rotate(-45deg) translate(4px, -5px); }

@media (min-width: 1024px) {
  .nav-links { display: flex; }
  .menu-toggle { display: none; }
  .lang-switch { display: inline-flex; }
  .nav-inner { padding: 1.25rem var(--gutter); }
}

/* — MOBILE MENU — */
.mobile-menu {
  position: fixed; top: 0; left: 0; right: 0; bottom: 0;
  background: var(--white);
  z-index: 99;
  padding: 6rem 2rem 2rem;
  transform: translateY(-100%);
  transition: transform var(--duration-slow) var(--ease-out);
  overflow-y: auto;
}
.mobile-menu.is-open { transform: translateY(0); }
.mobile-menu ul { list-style: none; display: flex; flex-direction: column; gap: 0; }
.mobile-menu li { border-bottom: 1px solid var(--rule); }
.mobile-menu a {
  display: block;
  font-family: var(--serif);
  font-size: 1.5rem;
  color: var(--ink);
  padding: 1rem 0;
  letter-spacing: -0.015em;
  font-weight: 400;
}
.mobile-menu a.active { color: var(--navy); font-style: italic; }
.mobile-menu .mobile-lang-item {
  border-top: 2px solid var(--navy) !important;
  margin-top: 1rem;
  padding-top: 0.5rem;
  border-bottom: none;
}
.mobile-menu .mobile-lang-item a { color: var(--accent); font-weight: 500; font-size: 1.1rem; font-family: var(--sans); font-style: normal; }

/* — BREADCRUMB — */
.breadcrumb {
  font-size: 0.78rem; font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--ink-muted);
  display: flex; align-items: center; gap: 0.6rem;
  flex-wrap: wrap;
}
.breadcrumb a {
  color: var(--ink-muted);
  transition: color var(--duration) var(--ease);
  border-bottom: 1px solid transparent;
  padding-bottom: 1px;
}
.breadcrumb a:hover { color: var(--navy); border-color: var(--navy); }
.breadcrumb-sep { color: var(--ink-subtle); }

/* — PAGE HERO (non-homepage) — */
.page-hero {
  padding: 8rem 0 4rem;
  position: relative;
  background: var(--white);
}
.page-hero .display {
  margin-top: 1.5rem;
  max-width: 900px;
}
.page-hero .lead {
  margin-top: 2rem;
}
@media (min-width: 720px) {
  .page-hero { padding: 10rem 0 6rem; }
}
@media (min-width: 1024px) {
  .page-hero { padding: 12rem 0 8rem; }
}

/* — REVEAL ANIMATIONS — */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out);
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger children */
.reveal-stagger > * {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
}
.reveal-stagger.is-visible > *:nth-child(1) { transition-delay: 0ms; opacity: 1; transform: translateY(0); }
.reveal-stagger.is-visible > *:nth-child(2) { transition-delay: 100ms; opacity: 1; transform: translateY(0); }
.reveal-stagger.is-visible > *:nth-child(3) { transition-delay: 200ms; opacity: 1; transform: translateY(0); }
.reveal-stagger.is-visible > *:nth-child(4) { transition-delay: 300ms; opacity: 1; transform: translateY(0); }
.reveal-stagger.is-visible > *:nth-child(5) { transition-delay: 400ms; opacity: 1; transform: translateY(0); }
.reveal-stagger.is-visible > *:nth-child(n+6) { transition-delay: 500ms; opacity: 1; transform: translateY(0); }

/* — MARQUEE (logos clients) — */
.marquee {
  position: relative;
  overflow: hidden;
  padding: 2rem 0;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  background: var(--white);
}
.marquee::before, .marquee::after {
  content: '';
  position: absolute;
  top: 0; bottom: 0; width: 80px;
  z-index: 2;
  pointer-events: none;
}
.marquee::before { left: 0; background: linear-gradient(to right, var(--white), transparent); }
.marquee::after { right: 0; background: linear-gradient(to left, var(--white), transparent); }
.marquee-track {
  display: flex;
  width: max-content;
  animation: marquee-scroll 60s linear infinite;
  gap: 4rem;
}
.marquee-item {
  font-family: var(--serif);
  font-size: 1.35rem;
  font-weight: 400;
  color: var(--ink-muted);
  letter-spacing: -0.01em;
  white-space: nowrap;
  flex-shrink: 0;
}
@keyframes marquee-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* — FOOTER (refined) — */
.site-footer {
  background: var(--navy-deep);
  color: rgba(255,255,255, 0.7);
  padding: 5rem 0 2rem;
  margin-top: 0;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
}
.footer-col { display: flex; flex-direction: column; gap: 1rem; }
.footer-brand {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.4rem;
  color: var(--white);
  letter-spacing: -0.02em;
  margin-bottom: 0.5rem;
}
.footer-brand-sub {
  font-size: 0.88rem;
  line-height: 1.6;
  color: rgba(255,255,255, 0.6);
  max-width: 300px;
}
.footer-col h4 {
  font-size: 0.7rem; font-weight: 600;
  letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--white); margin-bottom: 0.75rem;
}
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 0.7rem; }
.footer-col a {
  font-size: 0.9rem; color: rgba(255,255,255, 0.7);
  transition: color var(--duration) var(--ease);
}
.footer-col a:hover { color: var(--white); }
.footer-col li { font-size: 0.9rem; color: rgba(255,255,255, 0.7); line-height: 1.5; }

.footer-bottom {
  margin-top: 4rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(255,255,255, 0.1);
  display: flex; flex-direction: column; gap: 1rem;
  justify-content: space-between; align-items: flex-start;
  font-size: 0.82rem;
  color: rgba(255,255,255, 0.5);
}
.footer-legal { display: flex; gap: 1.5rem; flex-wrap: wrap; }
.footer-legal a {
  color: rgba(255,255,255, 0.5);
  transition: color var(--duration) var(--ease);
}
.footer-legal a:hover { color: var(--white); }

@media (min-width: 720px) {
  .footer-grid { grid-template-columns: 2fr 1fr 1fr 1fr; gap: 3rem; }
  .footer-bottom { flex-direction: row; align-items: center; }
}

/* — UTILITIES — */
.text-center { text-align: center; }
.text-navy { color: var(--navy); }
.text-accent { color: var(--accent); }
.text-gold { color: var(--gold); }
.bg-paper { background: var(--paper); }
.bg-navy { background: var(--navy); color: var(--white); }
.bg-off-white { background: var(--off-white); }
.serif { font-family: var(--serif); }
.italic { font-style: italic; }

/* — REDUCED MOTION — */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .reveal { opacity: 1; transform: none; }
}

/* — ACCESSIBILITY — */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
button:focus, a:focus { outline: none; }
button:focus-visible, a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
