/* ---------- Design tokens ---------- */
:root {
  --bg: #fbf9f5;
  --card: #ffffff;
  --line: #ece5d8;
  --card-line: #eee6d8;
  --ink: #1a1a1a;
  --ink-soft: #444444;
  --muted: #666666;
  --accent: #6f6148;
  --accent-soft: #b09a6a;
  --serif: "EB Garamond", Georgia, serif;
  --sans: "Inter", Helvetica, Arial, sans-serif;
  --measure: 700px;
  --wide: 960px;
}

*, *::before, *::after { box-sizing: border-box; }
::selection { background: #f0e8d8; color: var(--ink); }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

/* ---------- Paper grain (site-wide) ---------- */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.03;
  background-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxODAiIGhlaWdodD0iMTgwIj48ZmlsdGVyIGlkPSJuIj48ZmVUdXJidWxlbmNlIHR5cGU9ImZyYWN0YWxOb2lzZSIgYmFzZUZyZXF1ZW5jeT0iMC44NSIgbnVtT2N0YXZlcz0iMiIgc3RpdGNoVGlsZXM9InN0aXRjaCIvPjxmZUNvbG9yTWF0cml4IHR5cGU9Im1hdHJpeCIgdmFsdWVzPSIwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwLjkgMCIvPjwvZmlsdGVyPjxyZWN0IHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbHRlcj0idXJsKCNuKSIvPjwvc3ZnPg==");
  background-repeat: repeat;
  background-size: 180px 180px;
}
h1, h2, h3 { font-family: var(--serif); font-weight: 500; line-height: 1.25; margin: 0 0 0.5em; }
h1 { font-size: clamp(2.1rem, 5vw, 3.1rem); letter-spacing: -0.01em; }
h2 { font-size: clamp(1.5rem, 3vw, 1.9rem); }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; color: var(--ink-soft); }
a { color: inherit; }
img { max-width: 100%; }

.label {
  font-family: var(--sans);
  font-size: 0.7rem;
  font-weight: 400;
  line-height: 1.7;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1.7rem;
}
.container { max-width: var(--wide); margin: 0 auto; padding: 0 24px; }
.measure { max-width: var(--measure); }

/* ---------- Nav ---------- */
.site-nav {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--line);
}
.site-nav .container {
  display: flex; justify-content: space-between; align-items: center;
  padding-top: 16px; padding-bottom: 16px;
}
.wordmark { font-family: var(--serif); font-size: 1.15rem; letter-spacing: 0.04em; text-decoration: none; white-space: nowrap; }
.nav-links { display: flex; gap: 26px; }
.nav-links a {
  position: relative;
  font-size: 0.8rem; color: var(--muted); text-decoration: none;
  padding-bottom: 2px;
}
.nav-links a:hover, .nav-links a:focus-visible { color: var(--ink); }
.nav-links a::after {
  content: "";
  position: absolute; left: 0; right: 0; bottom: 0;
  height: 1px; background: currentColor;
  transform: scaleX(0); transform-origin: left;
  transition: transform 0.25s ease;
}
.nav-links a:hover::after, .nav-links a:focus-visible::after { transform: scaleX(1); }

/* ---------- Sections ---------- */
.section { padding: 96px 0; border-top: 1px solid var(--line); }
.section, .hero { scroll-margin-top: 90px; }
.hero {
  display: flex;
  align-items: center;
  min-height: min(72vh, 620px);
  padding: 90px 0 70px;
  border-top: none;
}
.hero .container { width: 100%; }
.hero .tagline { font-size: 1.05rem; color: var(--muted); max-width: 560px; }

/* ---------- Hero scroll cue (home page only) ---------- */
.scroll-cue {
  margin-top: 56px;
  width: fit-content;
  transition: opacity 0.4s ease;
}
.scroll-cue::after {
  content: "";
  display: block;
  width: 1px;
  height: 40px;
  background: var(--accent-soft);
}
.scroll-cue.is-hidden { opacity: 0; }

/* ---------- Hero stagger reveal (home page only) ---------- */
@keyframes hero-rise {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}
.js.home .hero .label,
.js.home .hero h1,
.js.home .hero .tagline,
.js.home .hero .scroll-cue {
  opacity: 0;
  animation: hero-rise 0.7s ease forwards;
}
.js.home .hero .label { animation-delay: 0ms; }
.js.home .hero h1 { animation-delay: 120ms; }
.js.home .hero .tagline { animation-delay: 240ms; }
.js.home .hero .scroll-cue { animation-delay: 450ms; }

/* ---------- Section numerals ---------- */
.section > .container { position: relative; z-index: 0; }
.section-numeral {
  position: absolute;
  top: -84px; right: 24px;
  font-family: var(--serif);
  font-size: clamp(2.75rem, 12vw, 5rem);
  line-height: 1;
  color: var(--accent);
  opacity: 0.12;
  z-index: -1;
  pointer-events: none;
  user-select: none;
}

/* ---------- Operating company cards ---------- */
.platform-card {
  display: block; background: var(--card); border: 1px solid var(--card-line);
  padding: 30px 32px; margin-bottom: 18px; text-decoration: none;
  transition: border-color 0.2s, transform 0.2s;
}
.platform-card:hover, .platform-card:focus-visible { border-color: var(--accent-soft); transform: translateY(-2px); }
.platform-name {
  display: block; font-family: var(--serif); font-size: 1.6rem; letter-spacing: 0.01em;
  color: var(--ink); margin-bottom: 6px;
}
.platform-desc { display: block; font-size: 0.9rem; color: var(--muted); margin-bottom: 12px; max-width: 560px; }
.platform-card .more { font-size: 0.8rem; color: var(--accent); display: inline-flex; align-items: center; }
.platform-card .more .arrow { display: inline-block; margin-left: 4px; transition: transform 0.2s ease; }
.platform-card:hover .more .arrow, .platform-card:focus-visible .more .arrow { transform: translateX(4px); }
.op-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 18px; }
.op-card {
  display: block; background: var(--card); border: 1px solid var(--card-line);
  padding: 28px; text-decoration: none; transition: border-color 0.2s, transform 0.2s;
}
.op-card:hover, .op-card:focus-visible { border-color: var(--accent-soft); transform: translateY(-2px); }
.op-card .op-logo { height: 40px; margin-bottom: 14px; display: flex; align-items: center; }
.op-card .op-logo img { max-height: 40px; width: auto; }
.op-card p { font-size: 0.9rem; color: var(--muted); margin: 0 0 12px; }
.op-card .more { font-size: 0.8rem; color: var(--accent); display: inline-flex; align-items: center; }
.op-card .more .arrow { display: inline-block; margin-left: 4px; transition: transform 0.2s ease; }
.op-card:hover .more .arrow, .op-card:focus-visible .more .arrow { transform: translateX(4px); }

/* ---------- Investment grid ---------- */
.inv-group { margin-bottom: 40px; }
.inv-group:last-child { margin-bottom: 0; }
.inv-group-title { font-size: 0.85rem; color: var(--muted); margin-bottom: 14px; }
.inv-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.inv-tile {
  position: relative; background: var(--card); border: 1px solid var(--card-line);
  height: 84px; display: flex; align-items: center; justify-content: center;
  cursor: pointer; padding: 14px; transition: border-color 0.2s, transform 0.2s;
  font: inherit;
}
.inv-tile:hover, .inv-tile:focus-visible { border-color: var(--accent-soft); transform: translateY(-2px); }
.inv-tile img { max-height: 34px; max-width: 78%; filter: grayscale(1); opacity: 0.75; transition: filter 0.2s, opacity 0.2s; }
.inv-tile:hover img, .inv-tile:focus-visible img { filter: none; opacity: 1; }
.inv-tile .word-fallback { font-family: var(--serif); font-size: 1.02rem; color: var(--ink-soft); }
.inv-tile .status-flag {
  position: absolute; top: 7px; right: 9px;
  font-size: 0.55rem; letter-spacing: 0.15em; color: var(--accent); text-transform: uppercase;
}

/* ---------- Modal ---------- */
.modal-backdrop {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(26, 24, 20, 0.45);
  display: flex; align-items: center; justify-content: center; padding: 20px;
}
.modal-backdrop[hidden] { display: none; }
.modal {
  background: var(--card); border: 1px solid var(--card-line);
  max-width: 460px; width: 100%; padding: 36px; position: relative;
}
.modal .modal-logo { height: 44px; display: flex; align-items: center; margin-bottom: 16px; }
.modal .modal-logo img { max-height: 44px; max-width: 200px; }
.modal .modal-tag { font-size: 0.65rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--accent); margin-bottom: 10px; }
.modal h3 { font-size: 1.4rem; }
.modal p { font-size: 0.92rem; }
.modal .visit {
  display: inline-block; margin-top: 6px; font-size: 0.85rem;
  color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--ink); padding-bottom: 2px;
}
.modal .visit[hidden] { display: none; }
.modal-close {
  position: absolute; top: 12px; right: 12px;
  background: none; border: none; font-size: 1.3rem; line-height: 1;
  color: var(--muted); cursor: pointer; padding: 8px;
}
.modal-close:hover, .modal-close:focus-visible { color: var(--ink); }

/* ---------- Founder ---------- */
.founder h3 { font-size: 1.35rem; }
.founder .role { font-size: 0.8rem; color: var(--accent); letter-spacing: 0.1em; text-transform: uppercase; margin-bottom: 1.1rem; }
.founder p.measure { font-size: 1rem; max-width: 600px; }
.member-stamp {
  margin-top: 2rem;
  padding-top: 1.2rem;
  border-top: 1px solid var(--line);
  max-width: 600px;
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
}

/* ---------- Pull quote ---------- */
.pull-quote {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.55rem;
  color: var(--ink);
  line-height: 1.4;
  margin: 2.2rem 0 0;
  padding-left: 1.4rem;
  border-left: 2px solid var(--accent-soft);
  max-width: var(--measure);
}

/* ---------- Contact form ---------- */
.contact-form { max-width: 460px; display: flex; flex-direction: column; gap: 14px; margin-top: 24px; }
.contact-form label { font-size: 0.75rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.contact-form input, .contact-form textarea {
  width: 100%; background: var(--card); border: 1px solid #ddd3c2;
  padding: 12px 14px; font: inherit; font-size: 0.95rem; color: var(--ink); margin-top: 4px;
}
.contact-form input:focus, .contact-form textarea:focus { outline: 2px solid var(--accent-soft); outline-offset: 1px; }
.contact-form textarea { min-height: 130px; resize: vertical; }
.contact-form button {
  background: var(--ink); color: var(--bg); border: none; padding: 14px;
  font-family: var(--sans); font-size: 0.8rem; letter-spacing: 0.15em; text-transform: uppercase;
  cursor: pointer;
}
.contact-form button:hover, .contact-form button:focus-visible { background: #000; }
.contact-form button:disabled { opacity: 0.6; cursor: not-allowed; }
.form-note { font-size: 0.9rem; margin-top: 12px; }
.form-note.success { color: #4a6741; }
.form-note.error { color: #a04030; }
.hidden-field { position: absolute; left: -9999px; }

/* ---------- Detail pages ---------- */
.back-link {
  position: relative;
  font-size: 0.85rem; color: var(--muted); text-decoration: none;
  padding-bottom: 2px;
}
.back-link:hover, .back-link:focus-visible { color: var(--ink); }
.back-link::after {
  content: "";
  position: absolute; left: 0; right: 0; bottom: 0;
  height: 1px; background: currentColor;
  transform: scaleX(0); transform-origin: left;
  transition: transform 0.25s ease;
}
.back-link:hover::after, .back-link:focus-visible::after { transform: scaleX(1); }
.detail-hero { padding: 80px 0 50px; }
.detail-hero .detail-logo { height: 56px; display: flex; align-items: center; margin-bottom: 24px; }
.detail-hero .detail-logo img { max-height: 56px; }
.detail-hero .group-note { font-size: 0.85rem; color: var(--muted); }
.detail-body { padding-bottom: 40px; }
.visit-site {
  display: inline-block; margin: 10px 0 40px; font-size: 0.9rem;
  color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--ink); padding-bottom: 2px;
}
.detail-cta {
  border-top: 1px solid var(--line);
  padding-top: 24px;
  margin-top: 8px;
}
.detail-cta p { font-size: 0.95rem; color: var(--muted); }
.detail-cta a {
  display: inline-block; font-size: 0.9rem;
  color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--ink); padding-bottom: 2px;
}

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding: 48px 0 32px; }
.footer-top {
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 14px;
}
.footer-wordmark { font-family: var(--serif); font-size: 1.05rem; color: var(--ink); text-decoration: none; }
.footer-links { display: flex; gap: 22px; flex-wrap: wrap; }
.footer-links a {
  position: relative;
  font-size: 0.78rem; color: var(--muted); text-decoration: none; padding-bottom: 2px;
}
.footer-links a:hover, .footer-links a:focus-visible { color: var(--ink); }
.footer-links a::after {
  content: "";
  position: absolute; left: 0; right: 0; bottom: 0;
  height: 1px; background: currentColor;
  transform: scaleX(0); transform-origin: left;
  transition: transform 0.25s ease;
}
.footer-links a:hover::after, .footer-links a:focus-visible::after { transform: scaleX(1); }
.footer-email {
  font-size: 0.8rem; color: var(--muted); text-decoration: none;
  border-bottom: 1px solid var(--line); padding-bottom: 2px;
}
.footer-email:hover, .footer-email:focus-visible { color: var(--ink); border-color: currentColor; }
.footer-bottom {
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px;
  font-size: 0.72rem; color: var(--muted);
  margin-top: 28px; padding-top: 18px; border-top: 1px solid var(--line);
}

/* ---------- Reveal animation ---------- */
.js .reveal { opacity: 0; transform: translateY(26px); transition: opacity 0.8s ease, transform 0.8s ease; }
.js .reveal.visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .op-card, .inv-tile { transition: none; }
  .op-card .more .arrow, .platform-card .more .arrow { transition: none; }
  .platform-card { transition: none; }
  .js.home .hero .label,
  .js.home .hero h1,
  .js.home .hero .tagline,
  .js.home .hero .scroll-cue {
    opacity: 1;
    animation: none;
  }
  .scroll-cue { transition: none; }
  .nav-links a::after, .back-link::after, .footer-links a::after { transition: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 640px) {
  .nav-links { gap: 12px; }
  .nav-links a { font-size: 0.7rem; }
  .hero { min-height: min(58vh, 460px); padding: 70px 0 60px; }
  .scroll-cue { display: none; }
  .section { padding: 64px 0; }
  .section-numeral { top: -56px; }
  .modal { padding: 26px; }
  .footer-top { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 420px) {
  .site-nav .container { flex-wrap: wrap; row-gap: 8px; }
  .wordmark { flex: 1 0 100%; }
  .nav-links { flex: 1 0 100%; justify-content: space-between; gap: 0; }
}
