/* ==========================================================================
   809 Capital — Charcoal & Stone
   ========================================================================== */

:root {
  --charcoal: #252826;
  --charcoal-2: #1e211f;
  --charcoal-3: #191b1a;
  --limestone: #f2f0e9;
  --sage: #929c8c;
  --muted: #62675f;
  --border: #d7d9d0;
  --border-dark: rgba(242, 240, 233, 0.2);
  --on-dark: rgba(242, 240, 233, 0.84);
  --error: #f0b3a6;

  --serif: "Cormorant Garamond", "Iowan Old Style", Georgia, serif;
  --sans: "Instrument Sans", "Helvetica Neue", Arial, sans-serif;

  --container: 1160px;
  --reading: 680px;
  --gutter: clamp(20px, 4vw, 48px);
  --section-y: clamp(56px, 8vw, 112px);
  --nav-h: 76px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; overflow-x: clip; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }

body {
  margin: 0;
  background: var(--charcoal);
  color: var(--limestone);
  font-family: var(--sans);
  font-size: clamp(16px, 0.9rem + 0.25vw, 18px);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; color: inherit; }
::selection { background: var(--sage); color: var(--charcoal); }
:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }
section[id] { scroll-margin-top: calc(var(--nav-h) + 12px); } /* anchor jumps clear the fixed nav */

.container { width: 100%; max-width: calc(var(--container) + var(--gutter) * 2); margin: 0 auto; padding: 0 var(--gutter); }

/* ---------- type ---------- */
.h2, .h3, .hero__title { font-family: var(--serif); font-weight: 600; letter-spacing: -0.01em; margin: 0; text-wrap: balance; }
.h2 { font-size: clamp(34px, 1.6vw + 22px, 48px); line-height: 1.1; margin-bottom: 24px; }
.h3 { font-size: clamp(26px, 0.8vw + 19px, 32px); line-height: 1.2; margin-bottom: 16px; }
.prose { max-width: var(--reading); }
.prose p { margin: 0 0 1.1em; }
.lead { font-size: clamp(19px, 0.5vw + 15px, 21px); line-height: 1.55; }
.mark { display: block; width: 44px; height: auto; margin-bottom: 18px; color: var(--sage); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 16px 30px; border: 0; cursor: pointer; text-decoration: none; white-space: nowrap;
  font: 600 16px/1 var(--sans); letter-spacing: 0.01em;
  border-radius: 999px 999px 0 0 / 22px 22px 0 0; /* the logo's arch, kept subtle */
  transition: background-color 0.3s, color 0.3s, transform 0.4s var(--ease);
}
.btn:hover { transform: translateY(-1px); }
.btn--light { background: var(--limestone); color: var(--charcoal); }
.btn--light:hover { background: var(--sage); color: var(--charcoal); }
.btn--dark { background: var(--charcoal); color: var(--limestone); }
.btn--dark:hover { background: var(--sage); color: var(--charcoal); }
.btn--sm { padding: 12px 22px; font-size: 15px; }
.btn:disabled { opacity: 0.6; cursor: wait; transform: none; }

/* ==========================================================================
   INTRO (first visit per session)
   ========================================================================== */
.intro { display: none; }
.js .intro {
  display: grid; place-items: center;
  position: fixed; inset: 0; z-index: 200;
  background: var(--limestone); color: var(--charcoal);
  animation: intro-failsafe 0s 9s forwards; /* never trap the page if scripts fail */
}
.no-intro .intro { display: none !important; }
@keyframes intro-failsafe { to { visibility: hidden; } }
.intro__mark { position: relative; z-index: 2; width: clamp(280px, 52vw, 1100px); text-align: center; }
.intro__svg { width: 100%; height: auto; overflow: visible; }
.intro__logo { opacity: 0; }
.intro__tag { margin: 26px 0 0; color: var(--muted); font-size: 15px; letter-spacing: 0.08em; opacity: 0; }
.intro__photo { position: fixed; inset: 0; z-index: 3; clip-path: inset(50% 50% 50% 50% round 1000px 1000px 0px 0px); }
.intro__photo picture { display: block; height: 100%; }
.intro__photo img, .hero__media img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.08); }
.intro__photo img { transform: scale(1.3); }

/* ==========================================================================
   NAV
   ========================================================================== */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 24px;
  min-height: var(--nav-h); padding: 10px var(--gutter);
  color: var(--limestone);
  transition: background-color 0.4s;
}
/* glass over the hero that fades out instead of ending on a line */
.nav::before {
  content: ""; position: absolute; inset: 0 0 -18px; z-index: -1;
  background: linear-gradient(180deg, rgba(37, 40, 38, 0.8) 0%, rgba(37, 40, 38, 0.55) 70%, rgba(37, 40, 38, 0) 100%);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  -webkit-mask-image: linear-gradient(180deg, #000 70%, transparent 100%); mask-image: linear-gradient(180deg, #000 70%, transparent 100%);
  transition: opacity 0.4s;
}
.nav.is-solid { background: var(--charcoal); }
.nav.is-solid::before { opacity: 0; }
.nav__logo { display: block; width: clamp(140px, 12vw, 180px); justify-self: start; }
.nav__logo img { width: 100%; height: auto; }
.nav__links { display: flex; align-items: center; gap: clamp(24px, 3vw, 44px); font-size: 16px; font-weight: 500; }
.nav__links a { position: relative; padding: 6px 0; text-decoration: none; color: var(--on-dark); transition: color 0.3s; }
.nav__links a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1.5px; background: var(--sage);
  transform: scaleX(0); transform-origin: right; transition: transform 0.4s var(--ease);
}
.nav__links a:hover, .nav__links a.is-active { color: var(--limestone); }
.nav__links a:hover::after, .nav__links a.is-active::after { transform: scaleX(1); transform-origin: left; }
.nav__cta { justify-self: end; }
.nav__toggle { display: none; }

.menu {
  position: fixed; inset: 0; z-index: 99; background: var(--charcoal);
  display: flex; flex-direction: column; justify-content: center; padding: 96px var(--gutter) 36px;
}
.menu[hidden] { display: none; }
.menu nav { display: flex; flex-direction: column; }
.menu nav a {
  padding: 14px 0; border-bottom: 1px solid var(--border-dark); text-decoration: none;
  font-family: var(--serif); font-weight: 600; font-size: clamp(30px, 8vw, 44px); line-height: 1.15;
}
.menu__foot { margin-top: auto; color: var(--on-dark); font-size: 15px; }

/* ==========================================================================
   HERO
   ========================================================================== */
.hero {
  position: relative; overflow: hidden; background: var(--charcoal);
  min-height: 100vh; min-height: 100svh;
  display: flex; flex-direction: column; justify-content: flex-start; align-items: center;
  /* sits the text in the sky inside the arch, above the tower */
  padding: max(calc(var(--nav-h) + 24px), 13vh) var(--gutter) 56px;
}
.hero__media { position: absolute; inset: 0 0 auto; height: 100vh; height: 100svh; overflow: hidden; } /* always one screen, matching the intro */
.hero__media picture { display: block; height: 100%; }
.hero__shade {
  position: absolute; inset: 0 0 auto; height: 100vh; height: 100svh;
  background:
    linear-gradient(180deg, rgba(37, 40, 38, 0.45) 0%, rgba(37, 40, 38, 0) 22%),
    linear-gradient(0deg, rgba(37, 40, 38, 0.55) 0%, rgba(37, 40, 38, 0) 30%);
}
/* the block is as wide as the headline; the paragraph aligns to its left edge (under "in") */
.hero__content { position: relative; z-index: 0; width: max-content; max-width: 100%; }
.hero__title { text-align: center; }
/* barely-there frosted glass behind the paragraph only, feathered so it has no visible edge */
.hero__sub { position: relative; z-index: 0; }
.hero__sub::before {
  content: ""; position: absolute; z-index: -1; inset: -40px -64px;
  background: rgba(30, 33, 31, 0.24);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  /* fade every edge to nothing over ~40px so the panel never shows a border */
  -webkit-mask-image: linear-gradient(to right, transparent, #000 64px, #000 calc(100% - 64px), transparent), linear-gradient(to bottom, transparent, #000 40px, #000 calc(100% - 40px), transparent);
  -webkit-mask-composite: source-in;
  mask-image: linear-gradient(to right, transparent, #000 64px, #000 calc(100% - 64px), transparent), linear-gradient(to bottom, transparent, #000 40px, #000 calc(100% - 40px), transparent);
  mask-composite: intersect;
  pointer-events: none;
}
.hero__title { font-size: clamp(40px, min(4.4vw + 12px, 8.4vh), 80px); line-height: 1.04; text-shadow: 0 2px 18px rgba(20, 22, 21, 0.55); }
.hero__title em { font-style: italic; font-weight: 500; }
.line { display: block; overflow: hidden; padding-bottom: 0.08em; margin-bottom: -0.08em; }
.line > span { display: block; }
.hero__sub {
  width: 0; min-width: 100%; margin: 24px 0 0; text-align: left;
  font-size: clamp(17px, 0.6vw + 13px, 20px); line-height: 1.6; color: var(--limestone);
  text-shadow: 0 1px 8px rgba(20, 22, 21, 0.45); text-wrap: pretty;
}

/* desktop: the paragraph's last line lines up with the top of the fortress (~49% down the photo),
   so the text drops lower on taller screens and never covers the tower */
@media (min-width: 961px) {
  .hero { justify-content: flex-end; padding-top: calc(var(--nav-h) + 16px); padding-bottom: min(calc(50.6vh + 2px), calc(100vh - var(--nav-h) - 316px));
    padding-bottom: min(calc(50.6svh + 2px), calc(100svh - var(--nav-h) - 316px)); } /* short screens: never taller than the screen */
}

/* ==========================================================================
   SECTIONS
   ========================================================================== */
.section { padding: var(--section-y) 0; }
.section--light { background: var(--limestone); color: var(--charcoal); }
.section--light .prose p:not(.lead) { color: var(--muted); }
.section--light :focus-visible { outline-color: var(--charcoal); }
.section--dark { background: var(--charcoal); color: var(--limestone); }
.section--darker { background: var(--charcoal-2); color: var(--limestone); }
.section--dark .prose p:not(.lead), .section--darker .prose p:not(.lead) { color: var(--on-dark); }

/* About: heading column + reading column */
.split { display: grid; grid-template-columns: minmax(200px, 1fr) minmax(0, var(--reading)); gap: clamp(32px, 6vw, 96px); align-items: start; }

/* Approach / Owners: copy beside a single arch-framed photograph */
.media-split { display: grid; grid-template-columns: minmax(0, var(--reading)) minmax(260px, 400px); justify-content: space-between; gap: clamp(40px, 6vw, 96px); align-items: center; }
.media-split--reverse { grid-template-columns: minmax(260px, 400px) minmax(0, var(--reading)); }
.arch-photo { margin: 0; aspect-ratio: 4 / 5; overflow: hidden; border-radius: 1000px 1000px 0 0; background: var(--charcoal-2); }
.arch-photo picture, .arch-photo img { width: 100%; height: 100%; }
.arch-photo img { object-fit: cover; transform: scale(1.14); }

/* Investment Criteria */
.section__head { margin-bottom: clamp(8px, 1.5vw, 16px); }
.criteria { display: grid; grid-template-columns: minmax(0, var(--reading)) minmax(280px, 400px); justify-content: space-between; gap: clamp(36px, 6vw, 96px); align-items: start; }
.industries { padding: clamp(28px, 3vw, 40px); background: #f8f7f3; border: 1px solid var(--border); }
.industries ul { list-style: none; margin: 4px 0 0; padding: 0; }
.industries li { position: relative; padding: 9px 0 9px 26px; font-size: clamp(17px, 0.3vw + 15px, 19px); font-weight: 500; color: var(--charcoal); }
.industries li::before { content: ""; position: absolute; left: 2px; top: 1.05em; width: 8px; height: 8px; border: 1.5px solid var(--sage); transform: rotate(45deg); }

/* Owners */
.confidential { font-family: var(--serif); font-style: italic; font-weight: 500; font-size: clamp(21px, 0.6vw + 16px, 24px); color: var(--limestone) !important; margin-top: 8px !important; }
.prose .btn { margin-top: 12px; }

/* ==========================================================================
   CONTACT
   ========================================================================== */
.contact { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 560px); gap: clamp(40px, 6vw, 96px); align-items: start; }
.location { display: grid; gap: 2px; margin-top: 28px !important; color: var(--limestone) !important; font-size: 18px; }
.location span { font-size: 15px; color: var(--sage); font-weight: 500; }

.form { display: grid; gap: 22px; }
.field { display: grid; gap: 8px; }
.field label { font-size: 16px; font-weight: 500; color: var(--limestone); }
.field .optional { font-weight: 400; color: var(--on-dark); }
.field input, .field textarea {
  width: 100%; padding: 14px 16px;
  font: 400 17px/1.45 var(--sans); color: var(--limestone);
  background: rgba(242, 240, 233, 0.05);
  border: 1.5px solid rgba(242, 240, 233, 0.42); border-radius: 4px;
  transition: border-color 0.2s, box-shadow 0.2s, background-color 0.2s;
}
.field textarea { resize: vertical; min-height: 140px; }
.field input:hover, .field textarea:hover { border-color: rgba(242, 240, 233, 0.62); }
.field input:focus-visible, .field textarea:focus-visible {
  outline: none; border-color: var(--limestone); background: rgba(242, 240, 233, 0.08);
  box-shadow: 0 0 0 3px rgba(146, 156, 140, 0.55);
}
.field.is-invalid input, .field.is-invalid textarea { border-color: var(--error); }
.field__error { margin: 0; min-height: 0; font-size: 15px; color: var(--error); }
.field__error:empty { display: none; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.form .btn { justify-self: start; margin-top: 4px; }
.form__status { padding: 14px 18px; border-radius: 4px; font-size: 16px; border: 1.5px solid var(--sage); background: rgba(146, 156, 140, 0.14); color: var(--limestone); }
.form__status.is-error { border-color: var(--error); background: rgba(240, 179, 166, 0.1); }

/* ==========================================================================
   FOOTER
   ========================================================================== */
.footer { background: var(--charcoal-3); color: var(--on-dark); padding: 40px 0 32px; font-size: 15px; }
.footer__row { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.footer__row p { margin: 0; }
.footer__logo { width: 160px; height: auto; }
.footer__credits { margin: 16px auto 0; font-size: 13px; line-height: 1.6; color: rgba(242, 240, 233, 0.62); }
.footer__credits summary { cursor: pointer; width: max-content; list-style: none; }
.footer__credits summary::-webkit-details-marker { display: none; }
.footer__credits summary:hover { color: var(--limestone); }
.footer__credits p { margin: 8px 0 0; }

/* ==========================================================================
   REVEAL STATES (only when JS + motion are on)
   ========================================================================== */
.js.motion [data-reveal] { opacity: 0; transform: translateY(28px); }
.js.motion .hero .line > span { transform: translateY(110%); }
.js.motion [data-hero-fade] { opacity: 0; transform: translateY(20px); }

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
@media (max-width: 1080px) {
  .nav__links { gap: 22px; font-size: 15px; }
}
@media (max-width: 960px) {
  :root { --nav-h: 68px; }
  .nav { grid-template-columns: 1fr auto; }
  .nav__links, .nav__cta { display: none; }
  .nav__toggle {
    display: grid; gap: 7px; width: 44px; height: 44px; place-content: center; justify-self: end;
    background: none; border: 0; cursor: pointer; padding: 0; position: relative; z-index: 101;
  }
  .nav__toggle span { display: block; width: 26px; height: 1.5px; background: currentColor; transition: transform 0.4s var(--ease); }
  .nav__toggle[aria-expanded="true"] span:first-child { transform: translateY(4.25px) rotate(45deg); }
  .nav__toggle[aria-expanded="true"] span:last-child { transform: translateY(-4.25px) rotate(-45deg); }

  .split, .media-split, .media-split--reverse, .criteria, .contact { grid-template-columns: 1fr; }
  .arch-photo { width: min(100%, 360px); aspect-ratio: 5 / 6; }
  .media-split .arch-photo { order: 2; }
  .media-split--reverse .arch-photo { order: 0; }
}
@media (max-width: 600px) {
  /* keep the tower in view below the text on phones */
  .hero { justify-content: flex-start; padding-top: calc(var(--nav-h) + 5vh); }
  .btn { padding: 15px 26px; }
  .form .btn { justify-self: stretch; }
  .footer__row { flex-direction: column; align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
