@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,500;1,300;1,400&family=DM+Sans:opsz,wght@9..40,300;9..40,400;9..40,500&display=swap');

/* ── Custom Properties ───────────────────────────────── */
:root {
  --bg: #0a0a0a;
  --bg-card: #111111;
  --bg-card-hover: #161616;
  --border: rgba(255, 255, 255, 0.10);
  --border-hover: rgba(255, 255, 255, 0.20);
  --text-primary: #f0ead8;       /* 16.47:1 on bg — unchanged */
  --text-secondary: #e0dbd4;     /* 13.70:1 on bg — near-primary warm, clearly readable */
  --text-muted: #c0b8b0;         /* 10.50:1 on bg, 10.08:1 on card */
  --accent: #c8b89a;             /* 10.16:1 on bg — unchanged */
  --accent-dim: #d4b878;         /* 10.94:1 on bg — warm gold */
  --nav-height: 68px;
  --max-width: 1100px;
  --px: 48px;
  --font-display: 'Cormorant Garamond', Georgia, serif;
  --font-body: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* ── Reset ───────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
}
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

/* ── Accessibility Utilities ─────────────────────────── */

/* Screen-reader only — hides visually, keeps in accessibility tree.
   clip-path: inset(50%) is required alongside the legacy clip property;
   without it, position:absolute inside an inline-flex container with no
   positioned ancestor can place the text visibly on the page. */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* Skip to main content — visible on keyboard focus only */
.skip-link {
  position: fixed;
  top: -100%;
  left: 0;
  z-index: 200;
  padding: 12px 24px;
  background: var(--accent);
  color: #0a0a0a;               /* 10.16:1 contrast — inverted for legibility */
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-decoration: none;
  transition: top 0.2s ease;
}
.skip-link:focus {
  top: 0;
  outline: 2px solid #0a0a0a;
  outline-offset: -4px;
}

/* Global focus ring — 2px minimum, accent color (10.16:1 on dark bg) */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

/* ── Animations ──────────────────────────────────────── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(22px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* ── Reduced Motion ──────────────────────────────────── */
/* Respects OS-level "reduce motion" preference (WCAG 2.3.3) */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  html {
    scroll-behavior: auto;
  }
}

/* ── Navigation ──────────────────────────────────────── */
.site-nav {
  position: fixed;
  inset: 0 0 auto;
  z-index: 100;
  height: var(--nav-height);
  padding: 0 var(--px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(10, 10, 10, 0.9);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  animation: fadeIn 0.8s ease both;
}

/* Home page: transparent nav until scrolled */
.page-home .site-nav {
  background: transparent;
  border-bottom-color: transparent;
  transition: background 0.5s ease, border-color 0.5s ease, backdrop-filter 0.5s ease;
}
.page-home .site-nav.nav-scrolled {
  background: rgba(10, 10, 10, 0.9);
  border-bottom-color: var(--border);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.nav-logo {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 400;
  letter-spacing: 0.06em;
  color: var(--text-primary);
  transition: color 0.25s ease;
}
.nav-logo:hover { color: var(--accent); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 40px;
}

.nav-link {
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-secondary);  /* 4.73:1 on bg */
  position: relative;
  transition: color 0.25s ease;
}
.nav-link::after {
  content: '';
  position: absolute;
  left: 0; bottom: -3px;
  width: 0; height: 1px;
  background: var(--accent);
  transition: width 0.3s ease;
}
.nav-link:hover,
.nav-link.active { color: var(--text-primary); }
.nav-link.active::after,
.nav-link:hover::after { width: 100%; }

/* ── Footer ──────────────────────────────────────────── */
.site-footer {
  padding: 28px var(--px);
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.footer-email {
  font-size: 15px;
  font-weight: 400;
  letter-spacing: 0.02em;
  color: var(--text-secondary);  /* 7.10:1 */
  transition: color 0.25s ease;
}
.footer-email:hover { color: var(--accent); }
.footer-copy {
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.04em;
  color: var(--text-muted);     /* 6.16:1 on bg */
}

/* ── Container ───────────────────────────────────────── */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--px);
}

/* ── Home Page ───────────────────────────────────────── */
.page-home {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
.home-main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: var(--nav-height) var(--px) 60px;
}
.home-center {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.wordmark {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.wordmark-monogram {
  font-family: var(--font-display);
  font-size: 86px;
  font-weight: 300;
  letter-spacing: 0.14em;
  color: var(--text-primary);
  line-height: 1;
  animation: fadeUp 1s 0.1s both;
}
.wordmark-rule {
  width: 36px;
  height: 1px;
  background: var(--accent-dim);
  margin: 22px 0 18px;
  animation: fadeIn 1.2s 0.4s both;
}
.wordmark-name {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 400;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--text-primary);
  animation: fadeUp 1s 0.3s both;
}
.wordmark-llc {
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--text-secondary);  /* 13.70:1 */
  margin-top: 9px;
  animation: fadeUp 1s 0.45s both;
}
.hero-tagline {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 20px;
  font-weight: 400;
  color: var(--text-primary);    /* 16.47:1 — italic serif needs full brightness */
  max-width: 420px;
  line-height: 1.85;
  margin-top: 48px;
  animation: fadeUp 1s 0.65s both;
}

/* ── Interior Pages ──────────────────────────────────── */
.page-interior {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
.page-main {
  flex: 1;
  padding-top: calc(var(--nav-height) + 80px);
  padding-bottom: 120px;
}
.page-header {
  margin-bottom: 64px;
}
.page-eyebrow {
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent-dim);     /* 6.56:1 on bg */
  margin-bottom: 14px;
  animation: fadeUp 0.7s 0.1s both;
}
.page-title {
  font-family: var(--font-display);
  font-size: 60px;
  font-weight: 300;
  letter-spacing: -0.01em;
  color: var(--text-primary);
  line-height: 1.05;
  animation: fadeUp 0.7s 0.2s both;
}

/* ── About Page ──────────────────────────────────────── */
.about-body {
  max-width: 640px;
}
.about-lead {
  font-family: var(--font-display);
  font-size: 23px;
  font-weight: 300;
  line-height: 1.75;
  color: var(--text-primary);
  margin-bottom: 36px;
  animation: fadeUp 0.7s 0.3s both;
}
.about-rule {
  width: 48px;
  height: 1px;
  background: var(--border);
  margin-bottom: 36px;
  animation: fadeIn 1s 0.4s both;
}
.about-text {
  display: flex;
  flex-direction: column;
  gap: 22px;
}
.about-text p {
  font-size: 15px;
  font-weight: 400;              /* was 300 — raised for legibility */
  line-height: 1.9;
  color: var(--text-secondary);  /* 4.73:1 on bg */
}
.about-text p:nth-child(1) { animation: fadeUp 0.7s 0.45s both; }
.about-text p:nth-child(2) { animation: fadeUp 0.7s 0.55s both; }
.about-text p:nth-child(3) { animation: fadeUp 0.7s 0.65s both; }
.about-cta {
  display: inline-block;
  margin-top: 48px;
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.10em;
  color: var(--accent-dim);     /* 4.54:1 on bg */
  transition: color 0.25s ease, letter-spacing 0.25s ease;
  animation: fadeUp 0.7s 0.75s both;
}
.about-cta:hover { color: var(--accent); letter-spacing: 0.14em; }

/* ── Companies Page ──────────────────────────────────── */
.companies-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 12px;
  animation: fadeIn 0.6s 0.3s both;
}

/* 3-column layout, second row centered */
.company-card:nth-child(1) { grid-column: 1 / 3; }
.company-card:nth-child(2) { grid-column: 3 / 5; }
.company-card:nth-child(3) { grid-column: 5 / 7; }
.company-card:nth-child(4) { grid-column: 2 / 4; }
.company-card:nth-child(5) { grid-column: 4 / 6; }

.company-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 36px 32px 28px;
  display: flex;
  flex-direction: column;
  transition: transform 0.25s ease, border-color 0.25s ease,
              background 0.25s ease, box-shadow 0.25s ease;
}
.company-card:hover {
  transform: translateY(-5px);
  border-color: var(--border-hover);
  background: var(--bg-card-hover);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.5);
}

.company-badge {
  width: 52px;
  height: 52px;
  flex-shrink: 0;
  margin-bottom: 24px;
}
.company-name {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 400;
  color: var(--text-primary);
  line-height: 1.25;
  margin-bottom: 8px;
}
.company-desc {
  font-size: 15px;
  font-weight: 400;
  letter-spacing: 0.02em;
  line-height: 1.7;
  color: var(--text-secondary);  /* 6.81:1 on card */
  flex: 1;
}
.company-link-wrap {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}
.company-url {
  font-size: 14px;
  font-weight: 400;
  letter-spacing: 0.02em;
  color: var(--text-muted);     /* 5.92:1 on card */
  display: inline-flex;
  align-items: center;
  gap: 5px;
  position: relative;           /* contains the sr-only absolute child */
  transition: color 0.25s ease;
}
.company-url svg {
  width: 9px;
  height: 9px;
  transition: transform 0.25s ease;
  flex-shrink: 0;
}
.company-card:hover .company-url { color: var(--accent); }
.company-card:hover .company-url svg { transform: translate(2px, -2px); }

/* ── Responsive ──────────────────────────────────────── */
@media (max-width: 960px) {
  :root { --px: 32px; }

  .companies-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
  .company-card:nth-child(n) { grid-column: auto; }

  .page-title { font-size: 48px; }
  .wordmark-monogram { font-size: 68px; }
  .wordmark-name { font-size: 19px; }
}

@media (max-width: 600px) {
  :root { --px: 24px; }

  .site-nav { padding: 0 24px; }
  .nav-links { gap: 28px; }

  .companies-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .page-title { font-size: 38px; }
  .wordmark-monogram { font-size: 52px; }
  .wordmark-name { font-size: 16px; letter-spacing: 0.18em; }
  .hero-tagline { font-size: 16px; margin-top: 36px; }

  .about-lead { font-size: 20px; }

  .site-footer {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    padding: 24px var(--px);
  }
}
