/* Matrix Capital — site stylesheet (v2, editorial / light)
   Palette: ivory, charcoal, gold. Fonts: Cormorant Garamond (display), Inter (body). */

:root {
  --ivory: #f6f3ed;
  --ivory-2: #efeae1;
  --ivory-3: #e6dfd3;
  --ink: #17171a;
  --ink-2: #2b2b30;
  --muted: #6b675f;
  --line: rgba(23, 23, 26, 0.12);
  --line-soft: rgba(23, 23, 26, 0.07);
  --gold: #a8843f;
  --gold-2: #c9a45c;
  --gold-soft: rgba(168, 132, 63, 0.14);
  --dark: #121214;
  --dark-2: #1b1b1f;
  --dark-line: rgba(255, 255, 255, 0.1);
  --dark-text: #ece8df;
  --dark-muted: #a29e95;
  --serif: "Cormorant Garamond", "Times New Roman", Georgia, serif;
  --sans: "Inter", "Helvetica Neue", Arial, sans-serif;
  --max: 1200px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--ivory); color: var(--ink);
  font-family: var(--sans); font-size: 16px; line-height: 1.75; font-weight: 400;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 500; line-height: 1.08; margin: 0 0 0.5em; letter-spacing: -0.005em; }
h1 { font-size: clamp(2.8rem, 6.4vw, 5.4rem); }
h2 { font-size: clamp(2.1rem, 4.2vw, 3.4rem); }
h3 { font-size: clamp(1.5rem, 2.4vw, 2rem); }
p { margin: 0 0 1.1em; }
p:last-child { margin-bottom: 0; }
em { font-style: italic; }
.container { width: min(var(--max), calc(100% - 3rem)); margin-inline: auto; }
.narrow { max-width: 760px; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 0.8rem;
  font-size: 0.68rem; letter-spacing: 0.3em; text-transform: uppercase; font-weight: 500;
  color: var(--gold); margin-bottom: 1.4rem;
}
.eyebrow::before { content: ""; width: 26px; height: 1px; background: var(--gold); }
.lead { font-size: clamp(1.1rem, 1.6vw, 1.3rem); line-height: 1.6; font-family: var(--serif); font-weight: 400; }
.muted { color: var(--muted); }
.gold { color: var(--gold); }
.skip { position: absolute; left: -999px; top: 0; background: var(--gold); color: #fff; padding: 0.5rem 1rem; z-index: 999; }
.skip:focus { left: 1rem; top: 1rem; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 0.7rem;
  padding: 0.95rem 1.8rem;
  font-size: 0.7rem; letter-spacing: 0.24em; text-transform: uppercase; font-weight: 500;
  border: 1px solid var(--ink); color: var(--ink); background: transparent;
  transition: background 0.3s var(--ease), color 0.3s var(--ease), border-color 0.3s var(--ease);
}
.btn:hover { background: var(--ink); color: var(--ivory); }
.btn-solid { background: var(--ink); color: var(--ivory); }
.btn-solid:hover { background: var(--gold); border-color: var(--gold); color: #fff; }
.btn-gold { border-color: var(--gold); color: var(--gold); }
.btn-gold:hover { background: var(--gold); color: #fff; }
.btn .arrow { transition: transform 0.3s var(--ease); }
.btn:hover .arrow { transform: translateX(4px); }
.textlink { display: inline-flex; align-items: center; gap: 0.6rem; font-size: 0.7rem; letter-spacing: 0.24em; text-transform: uppercase; font-weight: 500; color: var(--ink); border-bottom: 1px solid var(--gold); padding-bottom: 0.3rem; }
.textlink:hover { color: var(--gold); }

/* Header */
.header {
  position: fixed; inset: 0 0 auto 0; z-index: 100; padding: 1.3rem 0;
  transition: padding 0.3s var(--ease), background 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.header.scrolled { background: rgba(246, 243, 237, 0.92); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); padding: 0.8rem 0; box-shadow: 0 1px 0 var(--line-soft); }
.header .container { display: flex; align-items: center; justify-content: space-between; }
.logo svg { height: 44px; width: auto; display: block; transition: height 0.3s var(--ease); fill: var(--ink); }
.logo svg text:last-child { fill: var(--gold); }
.header.scrolled .logo svg { height: 36px; }
.nav { display: flex; gap: 2.4rem; align-items: center; }
.nav a { font-size: 0.68rem; letter-spacing: 0.26em; text-transform: uppercase; font-weight: 500; color: var(--ink); position: relative; padding: 0.3rem 0; }
.nav a::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px; background: var(--gold); transform: scaleX(0); transform-origin: left; transition: transform 0.3s var(--ease); }
.nav a:hover::after, .nav a.active::after { transform: scaleX(1); }
.nav a.active { color: var(--gold); }
.nav-toggle { display: none; background: none; border: 1px solid var(--line); width: 44px; height: 44px; cursor: pointer; padding: 0; position: relative; }
.nav-toggle span { position: absolute; left: 12px; right: 12px; height: 1px; background: var(--ink); transition: transform 0.3s, opacity 0.3s, top 0.3s; }
.nav-toggle span:nth-child(1) { top: 15px; }
.nav-toggle span:nth-child(2) { top: 21px; }
.nav-toggle span:nth-child(3) { top: 27px; }
.nav-open .nav-toggle span:nth-child(1) { top: 21px; transform: rotate(45deg); }
.nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
.nav-open .nav-toggle span:nth-child(3) { top: 21px; transform: rotate(-45deg); }
@media (max-width: 880px) {
  .nav-toggle { display: block; }
  .nav { position: fixed; inset: 0; background: var(--ivory); flex-direction: column; justify-content: center; gap: 2.2rem; opacity: 0; pointer-events: none; transition: opacity 0.3s; }
  .nav a { font-family: var(--serif); font-size: 2rem; letter-spacing: 0; text-transform: none; font-weight: 500; }
  .nav-open .nav { opacity: 1; pointer-events: auto; }
  .nav-open .header { background: var(--ivory); }
  .nav-open { overflow: hidden; }
  .header .container { position: relative; z-index: 2; }
}

/* Hero */
.hero { position: relative; min-height: 100svh; display: flex; align-items: center; padding: 8rem 0 5rem; overflow: hidden; }
.hero .container { position: relative; z-index: 1; }
.hero h1 { max-width: 12ch; margin-bottom: 1.6rem; }
.hero h1 em { color: var(--gold); }
.hero .lead { max-width: 46ch; color: var(--ink-2); margin-bottom: 2.4rem; }
.hero-actions { display: flex; gap: 1rem; flex-wrap: wrap; }
.hero-art { position: absolute; right: -6vw; top: 50%; transform: translateY(-50%); width: min(62vw, 900px); height: auto; opacity: 0.9; pointer-events: none; }
.hero-art path, .hero-art circle, .hero-art line, .hero-art rect { stroke: var(--gold); fill: none; stroke-width: 0.8; vector-effect: non-scaling-stroke; }
.hero-art .draw { stroke-dasharray: 2000; stroke-dashoffset: 2000; animation: draw 3.2s var(--ease) forwards; }
.hero-art .draw:nth-child(2) { animation-delay: 0.2s; }
.hero-art .draw:nth-child(3) { animation-delay: 0.4s; }
.hero-art .draw:nth-child(4) { animation-delay: 0.6s; }
.hero-art .draw:nth-child(5) { animation-delay: 0.8s; }
.hero-art .draw:nth-child(6) { animation-delay: 1s; }
.hero-art .dots circle { fill: var(--gold); stroke: none; opacity: 0.35; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.hero-meta { position: absolute; left: 0; right: 0; bottom: 2rem; }
.hero-meta .container { display: flex; justify-content: space-between; align-items: flex-end; font-size: 0.66rem; letter-spacing: 0.26em; text-transform: uppercase; color: var(--muted); }
.hero-meta .scroll::after { content: ""; display: block; width: 1px; height: 40px; background: var(--gold); margin: 0.8rem auto 0; animation: pulse 2.2s infinite; }
@keyframes pulse { 0%, 100% { opacity: 0.25; } 50% { opacity: 1; } }
@media (max-width: 880px) {
  .hero { padding-top: 7rem; }
  .hero-art { right: -34vw; top: auto; bottom: -14rem; transform: none; width: 110vw; opacity: 0.4; }
  .hero-meta { display: none; }
}

/* Inner page hero */
.page-hero { position: relative; padding: 11rem 0 5rem; overflow: hidden; border-bottom: 1px solid var(--line-soft); }
.page-hero .container { position: relative; z-index: 1; }
.page-hero h1 { max-width: 14ch; margin-bottom: 1.2rem; }
.page-hero .lead { max-width: 58ch; color: var(--ink-2); }
.page-hero .hero-art { width: min(50vw, 720px); opacity: 0.6; right: -8vw; }
@media (max-width: 880px) { .page-hero { padding-top: 8rem; } .page-hero .hero-art { display: none; } }

/* Sections */
.section { padding: clamp(4.5rem, 9vw, 8rem) 0; }
.section-alt { background: var(--ivory-2); }
.section-line { border-top: 1px solid var(--line-soft); }
.section-head { max-width: 720px; margin-bottom: 3.5rem; }
.section-head p { color: var(--muted); }
.grid { display: grid; gap: 2rem; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 960px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

/* Dark sections */
.dark { background: var(--dark); color: var(--dark-text); }
.dark .muted, .dark .section-head p { color: var(--dark-muted); }
.dark .btn { border-color: var(--dark-line); color: var(--dark-text); }
.dark .btn:hover { background: var(--gold-2); border-color: var(--gold-2); color: var(--dark); }
.dark .textlink { color: var(--dark-text); }
.dark .textlink:hover { color: var(--gold-2); }

/* Values strip */
.values { border-block: 1px solid var(--line-soft); }
.values .grid { gap: 0; }
.value { padding: 2.6rem 2rem 2.6rem 0; border-right: 1px solid var(--line-soft); margin-right: 2rem; }
.value:last-child { border-right: 0; margin-right: 0; }
.value .k { font-family: var(--serif); font-size: 1.9rem; color: var(--ink); line-height: 1; margin-bottom: 0.6rem; }
.value .k span { color: var(--gold); font-size: 0.9rem; font-family: var(--sans); letter-spacing: 0.2em; vertical-align: super; margin-right: 0.4rem; }
.value p { color: var(--muted); font-size: 0.95rem; }
@media (max-width: 960px) { .value { border-right: 0; margin-right: 0; border-bottom: 1px solid var(--line-soft); padding: 1.8rem 0; } .value:last-child { border-bottom: 0; } }

/* Split */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 5rem; align-items: center; }
.split .media { position: relative; }
.split .media img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; filter: grayscale(1) sepia(0.28) contrast(0.95) brightness(0.98); }
.split .media::after { content: ""; position: absolute; inset: 1.2rem; border: 1px solid rgba(168,132,63,0.5); pointer-events: none; }
.split .media .cap { position: absolute; left: 0; bottom: -1.9rem; font-size: 0.62rem; letter-spacing: 0.28em; text-transform: uppercase; color: var(--muted); }
@media (max-width: 880px) { .split { grid-template-columns: 1fr; gap: 3rem; } .split .media img { aspect-ratio: 16 / 10; } }

/* Discipline cards (dark) */
.disc { display: grid; grid-template-columns: 1fr 1fr; gap: 0; border: 1px solid var(--dark-line); }
.disc a { display: block; padding: 3rem; border-right: 1px solid var(--dark-line); position: relative; transition: background 0.3s var(--ease); }
.disc a:last-child { border-right: 0; }
.disc a:hover { background: var(--dark-2); }
.disc .idx { font-family: var(--serif); font-size: 1rem; color: var(--gold-2); letter-spacing: 0.1em; margin-bottom: 2.2rem; }
.disc h3 { font-size: clamp(1.8rem, 3vw, 2.5rem); margin-bottom: 0.8rem; }
.disc p { color: var(--dark-muted); max-width: 44ch; margin-bottom: 2rem; }
.disc svg { position: absolute; right: 2rem; top: 2.4rem; width: 76px; height: 76px; stroke: var(--gold-2); fill: none; stroke-width: 0.8; opacity: 0.8; }
@media (max-width: 760px) { .disc { grid-template-columns: 1fr; } .disc a { border-right: 0; border-bottom: 1px solid var(--dark-line); padding: 2.2rem; } .disc a:last-child { border-bottom: 0; } }

/* Philosophy */
.philosophy { display: grid; grid-template-columns: repeat(5, 1fr); gap: 0; border-top: 1px solid var(--line); }
.philosophy div { padding: 2rem 1.6rem 2rem 0; border-right: 1px solid var(--line-soft); margin-right: 1.6rem; }
.philosophy div:last-child { border-right: 0; margin-right: 0; }
.philosophy h3 { font-size: 1.6rem; margin-bottom: 0.4rem; }
.philosophy p { color: var(--muted); font-size: 0.92rem; }
@media (max-width: 1000px) { .philosophy { grid-template-columns: repeat(2, 1fr); } .philosophy div { border-bottom: 1px solid var(--line-soft); } }
@media (max-width: 560px) { .philosophy { grid-template-columns: 1fr; } .philosophy div { border-right: 0; margin-right: 0; } }

/* Numbered statements */
.statements { border-top: 1px solid var(--line); }
.statement { display: grid; grid-template-columns: 140px 1fr; gap: 2rem; padding: 3.2rem 0; border-bottom: 1px solid var(--line-soft); align-items: start; }
.statement .n { font-family: var(--serif); font-size: clamp(3rem, 6vw, 5rem); line-height: 0.9; color: var(--gold); font-weight: 400; }
.statement h3 { margin-bottom: 0.6rem; }
.statement p { color: var(--ink-2); font-size: 1.05rem; max-width: 62ch; }
@media (max-width: 640px) { .statement { grid-template-columns: 1fr; gap: 0.8rem; } }

/* Tiles */
.tile { padding: 2.2rem 0 0; border-top: 1px solid var(--ink); }
.tile .num { font-family: var(--serif); font-size: 1rem; color: var(--gold); letter-spacing: 0.12em; margin-bottom: 1.2rem; }
.tile h3 { font-size: 1.55rem; margin-bottom: 0.6rem; }
.tile p { color: var(--muted); font-size: 0.95rem; }
.tile ul { margin: 0.6rem 0 0; padding-left: 0; list-style: none; color: var(--muted); font-size: 0.95rem; }
.tile li { margin-bottom: 0.55rem; padding-left: 1.2rem; position: relative; }
.tile li::before { content: ""; position: absolute; left: 0; top: 0.75em; width: 6px; height: 1px; background: var(--gold); }
.tile li strong { color: var(--ink); font-weight: 500; }
.tile-box { padding: 2.2rem; border: 1px solid var(--line); background: var(--ivory); }
.dark .tile { border-top-color: var(--dark-line); }
.dark .tile p, .dark .tile ul { color: var(--dark-muted); }
.dark .tile li strong { color: var(--dark-text); }

/* Steps */
.steps { border-left: 1px solid var(--line); margin-left: 0.4rem; }
.step { position: relative; padding: 0 0 2.6rem 2.4rem; }
.step:last-child { padding-bottom: 0; }
.step::before { content: ""; position: absolute; left: -0.3rem; top: 0.55rem; width: 0.55rem; height: 0.55rem; border-radius: 50%; background: var(--gold); box-shadow: 0 0 0 5px var(--ivory); }
.section-alt .step::before { box-shadow: 0 0 0 5px var(--ivory-2); }
.step .k { font-size: 0.64rem; letter-spacing: 0.28em; text-transform: uppercase; color: var(--gold); margin-bottom: 0.3rem; display: block; }
.step h3 { font-size: 1.5rem; margin-bottom: 0.4rem; }
.step p { color: var(--muted); max-width: 60ch; }

/* Quote */
.quote { text-align: center; }
.quote blockquote { margin: 0 auto; max-width: 860px; font-family: var(--serif); font-size: clamp(1.7rem, 3.6vw, 2.9rem); font-style: italic; font-weight: 400; line-height: 1.25; }
.quote cite { display: block; margin-top: 1.6rem; font-style: normal; font-family: var(--sans); font-size: 0.66rem; letter-spacing: 0.3em; text-transform: uppercase; color: var(--gold); }
.quote .orn { width: 60px; height: 60px; margin: 0 auto 1.6rem; stroke: var(--gold); fill: none; stroke-width: 0.8; }

/* Presence (photo band) */
.presence { position: relative; overflow: hidden; isolation: isolate; color: var(--dark-text); }
.presence img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; filter: grayscale(0.6) sepia(0.25) brightness(0.55) contrast(1.05); }
.presence::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(to right, rgba(18,18,20,0.85), rgba(18,18,20,0.35)); }
.presence .grid { align-items: end; }
.presence .loc { border-top: 1px solid var(--dark-line); padding-top: 1.2rem; }
.presence .loc h3 { font-size: 2rem; margin-bottom: 0.3rem; }
.presence .loc p { color: var(--dark-muted); font-size: 0.9rem; }

/* CTA */
.cta { text-align: center; }
.cta h2 { max-width: 18ch; margin-inline: auto; }
.cta p { max-width: 54ch; margin: 0 auto 2.2rem; color: var(--muted); }

/* Offices */
.office { padding: 2.6rem 0 0; border-top: 1px solid var(--ink); }
.office h3 { font-size: 2.2rem; margin-bottom: 1.4rem; }
.office dl { margin: 0; display: grid; grid-template-columns: 90px 1fr; gap: 0.7rem 1rem; }
.office dt { font-size: 0.62rem; letter-spacing: 0.26em; text-transform: uppercase; color: var(--gold); padding-top: 0.4rem; }
.office dd { margin: 0; color: var(--ink-2); }
.office dd a { border-bottom: 1px solid var(--line); transition: border-color 0.2s, color 0.2s; }
.office dd a:hover { color: var(--gold); border-color: var(--gold); }
.map { border: 1px solid var(--line); overflow: hidden; aspect-ratio: 16 / 7; background: var(--ivory-3); }
.map iframe { width: 100%; height: 100%; border: 0; filter: grayscale(1) sepia(0.15) contrast(0.92); }

/* Footer */
.footer { background: var(--dark); color: var(--dark-text); padding: 4.5rem 0 2rem; font-size: 0.92rem; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 2.5rem; }
.footer .logo svg { height: 42px; margin-bottom: 1.4rem; fill: var(--dark-text); }
.footer .logo svg text:last-child { fill: var(--gold-2); }
.footer p { color: var(--dark-muted); max-width: 34ch; font-size: 0.9rem; }
.footer h4 { font-family: var(--sans); font-size: 0.64rem; letter-spacing: 0.28em; text-transform: uppercase; color: var(--gold-2); margin-bottom: 1rem; font-weight: 500; }
.footer ul { list-style: none; margin: 0; padding: 0; }
.footer li { margin-bottom: 0.5rem; color: var(--dark-muted); }
.footer li a:hover { color: var(--gold-2); }
.footer-bottom { margin-top: 3.5rem; padding-top: 1.5rem; border-top: 1px solid var(--dark-line); display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; color: var(--dark-muted); font-size: 0.78rem; letter-spacing: 0.04em; }
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .footer-grid { grid-template-columns: 1fr; } }

/* Reveal */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.9s var(--ease), transform 0.9s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .hero-art .draw { animation: none; stroke-dashoffset: 0; }
  html { scroll-behavior: auto; }
}
