/* KOACH & O. — Semper, KOACH & O. Ltd */

:root {
  --cream: #f8f8f4;
  --gold: #a39215;
  --ink: #3e3d35;
  --sage: #d7d9ca;
  --stone: #dbd9d3;
  --muted: #71716f;
  --olive: #5d5c2b;

  --sans: "Mulish", "Avenir Next", Avenir, -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  --serif: "Playfair Display", Georgia, "Times New Roman", serif;

  --gutter: clamp(1.5rem, 5vw, 5.5rem);
  --maxw: 1400px;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 300;
  font-size: 17px;
  line-height: 1.9;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img { max-width: 100%; display: block; }
a { color: inherit; }

h1, h2, h3, h4 {
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.12;
  margin: 0;
}

p { margin: 0 0 1.35em; }
p:last-child { margin-bottom: 0; }

.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding-inline: var(--gutter);
}

/* ---------- Header ---------- */

.site-header {
  background: var(--cream);
  border-bottom: 1px solid var(--ink);
  position: sticky;
  top: 0;
  z-index: 50;
}

.header-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 1.25rem var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.brand { display: block; flex: none; }
.brand img { width: clamp(180px, 22vw, 300px); height: auto; }

.nav {
  display: flex;
  align-items: center;
  gap: clamp(1.5rem, 4vw, 4rem);
}

.nav a {
  text-decoration: none;
  font-size: 15px;
  font-weight: 400;
  letter-spacing: 0.01em;
  color: var(--ink);
  padding-bottom: 3px;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease, color 0.2s ease;
  white-space: nowrap;
}

.nav a:hover { border-bottom-color: var(--gold); }
.nav a[aria-current="page"] { border-bottom-color: var(--ink); }

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--ink);
  color: var(--ink);
  font: inherit;
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.5rem 0.9rem;
  cursor: pointer;
}

/* ---------- Hero (Total Eclipse, generated) ---------- */

.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  overflow: hidden;
  isolation: isolate;
  display: flex;
  align-items: flex-end;
  padding-block: 0;
  color: var(--cream);
  background: radial-gradient(140% 120% at 74% 40%, #2a2a1f 0%, #16160f 42%, #0a0a07 78%);
}

/* ---- Shared eclipse effect layers (used by .hero and .page-head) ---- */
/* Disc size/position is driven by custom props so each context can scale it:
   --disc-size, --disc-x, --disc-y (with hero-scale defaults). */

.fx-stars {
  position: absolute; inset: 0; z-index: -5; opacity: 0.5;
  background-image:
    radial-gradient(1.2px 1.2px at 20% 30%, rgba(248,248,244,0.6), transparent),
    radial-gradient(1px 1px at 60% 70%, rgba(248,248,244,0.5), transparent),
    radial-gradient(1.4px 1.4px at 80% 22%, rgba(222,204,120,0.6), transparent),
    radial-gradient(1px 1px at 35% 80%, rgba(248,248,244,0.4), transparent),
    radial-gradient(1px 1px at 90% 60%, rgba(248,248,244,0.4), transparent),
    radial-gradient(1px 1px at 12% 62%, rgba(248,248,244,0.35), transparent);
  animation: heroTwinkle 6s ease-in-out infinite alternate;
}
@keyframes heroTwinkle { from { opacity: 0.35; } to { opacity: 0.6; } }

.fx-eclipse {
  position: absolute; z-index: -4;
  top: var(--disc-y, 46%); left: var(--disc-x, 76%); translate: -50% -50%;
  width: var(--disc-size, min(82vh, 90vw, 760px)); aspect-ratio: 1; border-radius: 50%;
  background: radial-gradient(circle at 50% 50%, #0c0c08 0 58%, transparent 60%);
  box-shadow:
    0 0 4px 2px rgba(222,204,120,0.9),
    0 0 60px 14px rgba(214,196,110,0.55),
    0 0 160px 60px rgba(163,146,21,0.35),
    0 0 320px 140px rgba(163,146,21,0.18);
  animation: heroDrift 30s ease-in-out infinite alternate, heroPulse 7s ease-in-out infinite;
}
@keyframes heroDrift { from { transform: translate(0,0) scale(1); } to { transform: translate(-2%, 1.5%) scale(1.05); } }
@keyframes heroPulse {
  0%,100% { box-shadow: 0 0 4px 2px rgba(222,204,120,0.85), 0 0 60px 14px rgba(214,196,110,0.5), 0 0 160px 60px rgba(163,146,21,0.32), 0 0 320px 140px rgba(163,146,21,0.16); }
  50%     { box-shadow: 0 0 6px 3px rgba(230,214,140,1), 0 0 80px 20px rgba(214,196,110,0.65), 0 0 210px 80px rgba(163,146,21,0.42), 0 0 380px 170px rgba(163,146,21,0.22); }
}

.fx-flare {
  position: absolute; z-index: -3; top: var(--flare-y, 40%); left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(222,204,120,0.5) 60%, rgba(230,214,140,0.9) 76%, transparent 88%);
  filter: blur(0.5px); opacity: 0.55; pointer-events: none;
}

.fx-grade {
  position: absolute; inset: 0; z-index: -3; pointer-events: none;
  background: linear-gradient(90deg, rgba(10,10,7,0.82) 0%, rgba(10,10,7,0.3) 42%, transparent 70%);
}

.fx-vign {
  position: absolute; inset: 0; z-index: -2; pointer-events: none;
  background: radial-gradient(120% 100% at 74% 42%, transparent 40%, rgba(0,0,0,0.66) 100%);
}

.fx-grain {
  position: absolute; inset: 0; z-index: -1; pointer-events: none; opacity: 0.06; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: heroGrain 1.1s steps(2) infinite;
}
@keyframes heroGrain { 0%{transform:translate(0,0)} 50%{transform:translate(-3%,2%)} 100%{transform:translate(2%,-2%)} }

.hero .wrap {
  position: relative;
  z-index: 2;
  width: 100%;
  padding-block: clamp(3rem, 9vh, 7rem);
}

.hero h1 {
  font-size: clamp(2.6rem, 6vw, 4.8rem);
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.05;
  max-width: 15ch;
  color: var(--cream);
}

/* Cinematic line-by-line rise — visible by default, animates only when motion is allowed */
.hero h1 .ln { display: block; overflow: hidden; }
.hero h1 .ln > span { display: block; }

@media (prefers-reduced-motion: no-preference) {
  .hero h1 .ln > span { transform: translateY(110%); animation: heroRise 1s cubic-bezier(0.16, 0.8, 0.24, 1) forwards; }
  .hero h1 .ln:nth-child(1) > span { animation-delay: 0.2s; }
  .hero h1 .ln:nth-child(2) > span { animation-delay: 0.37s; }
  .hero h1 .ln:nth-child(3) > span { animation-delay: 0.54s; }
}
@keyframes heroRise { to { transform: none; } }

.hero__rule {
  height: 2px; width: min(340px, 42vw); background: var(--gold);
  margin: 2rem 0 0;
}
@media (prefers-reduced-motion: no-preference) {
  .hero__rule { width: 0; animation: heroDraw 1.1s ease 0.95s forwards; }
  @keyframes heroDraw { to { width: min(340px, 42vw); } }
}

.hero-lede {
  margin-top: 2.25rem;
  max-width: 74ch;
  font-size: clamp(1rem, 1.35vw, 1.125rem);
  line-height: 1.9;
}

.hero-note {
  margin-top: 1.75rem;
  max-width: 86ch;
  font-size: 14px;
  line-height: 1.6;
  opacity: 0.72;
}

/* ---------- Page head (interior pages) ---------- */

.page-head {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  display: flex;
  align-items: flex-end;
  min-height: 56vh;
  min-height: 56svh;
  padding-block: clamp(3.5rem, 8vw, 6rem);
  color: var(--cream);
  background: radial-gradient(140% 150% at 80% 34%, #2a2a1f 0%, #16160f 46%, #0a0a07 82%);
  /* Band-scaled eclipse: smaller disc, pushed further to the right edge */
  --disc-size: min(64vh, 78vw, 560px);
  --disc-x: 84%;
  --disc-y: 42%;
  --flare-y: 46%;
}

.page-head .wrap { position: relative; z-index: 2; width: 100%; }

.page-head h1 {
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  max-width: 20ch;
}

.page-head h1::after {
  content: "";
  display: block;
  height: 2px;
  width: min(300px, 40vw);
  background: var(--gold);
  margin-top: 1.75rem;
}

.page-head .lede {
  margin-top: 2rem;
  max-width: 62ch;
  font-size: clamp(1rem, 1.3vw, 1.0625rem);
  line-height: 1.9;
}

/* ---------- Sections ---------- */

section { padding-block: clamp(3.5rem, 8vw, 7rem); }

.sect-dark { background: var(--ink); color: var(--cream); }
.sect-sage { background: var(--sage); }
.sect-stone { background: var(--stone); }

.wordmark {
  font-family: var(--serif);
  font-size: clamp(1.7rem, 2.6vw, 2.5rem);
  font-weight: 400;
  letter-spacing: -0.02em;
  margin-bottom: 2rem;
}

.sect-dark .wordmark { color: var(--cream); }

.wordmark-pron {
  margin: -1.4rem 0 1.75rem;
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.12em;
  font-style: italic;
  color: rgba(248, 248, 244, 0.6);
}

.eyebrow {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1.5rem;
}

/* Two-column split with image */

.split {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: clamp(2.5rem, 6vw, 6rem);
  align-items: center;
}

.split.reverse { grid-template-columns: 0.85fr 1.15fr; }
.split.reverse .split-media { order: -1; }

.split-media {
  overflow: hidden;
  box-shadow: 0 30px 60px -40px rgba(62, 61, 53, 0.55);
}

.split-media img {
  width: 100%;
  height: 100%;
  min-height: 320px;
  max-height: 680px;
  object-fit: cover;
  transition: transform 1.4s cubic-bezier(0.2, 0.7, 0.2, 1);
  will-change: transform;
}

.split-media:hover img { transform: scale(1.04); }

.split-body { max-width: 62ch; }

.split-body h2 {
  font-size: clamp(1.7rem, 3.2vw, 2.5rem);
  margin-bottom: 1.75rem;
}

/* Pull quote band */

.quote-band h2 {
  font-size: clamp(1.7rem, 3.4vw, 2.5rem);
  max-width: 22ch;
  margin-bottom: 2.25rem;
}

.quote-band .quote-body { max-width: 66ch; }

/* Sector / bullet list */

.sectors {
  list-style: none;
  margin: 1.75rem 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 0.9rem 2.5rem;
}

.sectors li {
  padding-left: 1.5rem;
  position: relative;
  line-height: 1.6;
}

.sectors li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.7em;
  width: 8px;
  height: 1px;
  background: var(--gold);
}

/* Card grid */

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: clamp(1.5rem, 3vw, 2.5rem);
  margin-top: clamp(2.5rem, 5vw, 4rem);
}

.card {
  background: var(--cream);
  border-top: 2px solid var(--gold);
  padding: clamp(1.75rem, 3vw, 2.5rem);
  transition: transform 0.4s cubic-bezier(0.2, 0.7, 0.2, 1), box-shadow 0.4s ease;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 22px 48px -28px rgba(62, 61, 53, 0.5);
}

.sect-dark .card { background: rgba(248, 248, 244, 0.06); }
.sect-dark .card:hover { box-shadow: 0 22px 48px -24px rgba(0, 0, 0, 0.55); }

.card h3 {
  font-size: clamp(1.15rem, 1.7vw, 1.4rem);
  margin-bottom: 1.1rem;
  font-weight: 800;
}

.card p { font-size: 16px; line-height: 1.8; }

/* Partner cards */

.partner-card { display: flex; flex-direction: column; }

.partner-card .eyebrow { margin-bottom: 0.9rem; }

.partner-card h3 { margin-bottom: 0.4rem; }

.partner-card .partner-tagline {
  font-style: italic;
  color: var(--muted);
  margin-bottom: 1.1rem;
  font-size: 15px;
}

.partner-card p { flex: 0 0 auto; }

.partner-foot { margin-top: auto; padding-top: 1.5rem; }

.partner-link {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  text-decoration: none;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink);
  border-bottom: 1px solid var(--gold);
  padding-bottom: 3px;
  transition: gap 0.25s ease, color 0.2s ease;
}
.partner-link:hover { gap: 0.9rem; color: var(--gold); }
.partner-link .arrow { transition: transform 0.25s ease; }
.partner-link:hover .arrow { transform: translateX(2px); }

.partner-soon {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  border: 1px solid rgba(113, 113, 111, 0.4);
  border-radius: 999px;
  padding: 0.4rem 0.9rem;
}

/* Profile photos + monogram placeholders — one uniform size across the whole page */
.advisor-photo {
  margin: 0 0 1.4rem;
  width: 210px;
  max-width: 100%;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: linear-gradient(140deg, #2b2a24, #16160f);
}

.advisor-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 18%;
  display: block;
  filter: grayscale(1) contrast(1.03);
}

/* Placeholder (gold monogram) until a real photo is supplied */
.advisor-photo--ph {
  display: flex;
  align-items: center;
  justify-content: center;
}
.advisor-photo--ph span {
  font-family: var(--serif);
  font-size: clamp(2rem, 4vw, 2.8rem);
  color: var(--gold);
  letter-spacing: 0.06em;
  opacity: 0.92;
}

/* Leadership: keep the founder photo to the side but compact (matches advisory photos) */
.split.reverse.leader-split {
  grid-template-columns: 320px 1fr;
  align-items: start;
  gap: clamp(2rem, 5vw, 4.5rem);
}
.leader-split .split-media img {
  width: 100%;
  aspect-ratio: 4 / 5;
  height: auto;
  min-height: 0;
  max-height: none;
  object-fit: cover;
  object-position: 50% 14%;
}
@media (max-width: 900px) {
  .split.reverse.leader-split { grid-template-columns: 1fr; }
  .leader-split .split-media { max-width: 300px; }
}

/* Section intro */

.sect-intro { max-width: 62ch; }

.sect-intro h2 {
  font-size: clamp(1.8rem, 3.6vw, 2.75rem);
  margin-bottom: 1.75rem;
}

.stack-title {
  font-size: clamp(1.8rem, 3.6vw, 2.75rem);
  line-height: 1.05;
  margin-bottom: 1.75rem;
}

/* Founder / profile */

.profile-meta {
  margin: 0 0 1.75rem;
  font-size: 15px;
  line-height: 1.9;
}

.profile-meta .role { color: var(--gold); font-weight: 700; }
.profile-meta a { color: inherit; text-decoration: none; border-bottom: 1px solid rgba(163,146,21,0.5); }
.profile-meta a:hover { border-bottom-color: var(--gold); }

.signature {
  margin-top: 2rem;
  font-weight: 700;
  font-size: 16px;
}

/* Image band */

.band {
  padding: 0;
  height: clamp(280px, 34vw, 480px);
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
}

/* ---------- Contact ---------- */

.contact-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: clamp(2.5rem, 6vw, 5rem);
  align-items: start;
}

.contact-detail {
  margin: 0 0 1.75rem;
  line-height: 1.85;
}

.contact-detail dt {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.4rem;
}

.contact-detail dd { margin: 0; }
.contact-detail a { text-decoration: none; border-bottom: 1px solid rgba(163,146,21,0.5); }
.contact-detail a:hover { border-bottom-color: var(--gold); }

form { display: grid; gap: 1.25rem; }

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}

label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
  color: var(--ink);
}

input[type="text"], input[type="email"], textarea {
  width: 100%;
  font: inherit;
  font-size: 16px;
  color: var(--ink);
  background: transparent;
  border: none;
  border-bottom: 1px solid rgba(62, 61, 53, 0.35);
  padding: 0.6rem 0;
  border-radius: 0;
  transition: border-color 0.2s ease;
}

input:focus, textarea:focus {
  outline: none;
  border-bottom-color: var(--gold);
}

textarea { resize: vertical; min-height: 120px; }

.checkbox-row {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
  font-size: 15px;
}

.checkbox-row label {
  text-transform: none;
  letter-spacing: 0;
  font-weight: 300;
  font-size: 15px;
  margin: 0;
}

button {
  justify-self: start;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  background: var(--ink);
  color: var(--cream);
  border: 1px solid var(--ink);
  padding: 0.95rem 2.5rem;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

button:hover { background: var(--gold); border-color: var(--gold); }

/* Newsletter block */

.newsletter { background: var(--sage); }

.newsletter-inner {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}

/* ---------- Footer ---------- */

.site-footer {
  background: var(--ink);
  color: var(--cream);
  padding-block: clamp(3rem, 5vw, 4.5rem);
  font-size: 15px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.8fr 1.1fr;
  gap: clamp(2rem, 5vw, 4rem);
}

.footer-grid .wordmark { margin-bottom: 1rem; }

.footer-brand {
  display: inline-block;
  line-height: 0;
}
.footer-brand img {
  width: clamp(180px, 22vw, 240px);
  height: auto;
  display: block;
}

.footer-nav {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.65rem;
}

.footer-nav a {
  text-decoration: none;
  opacity: 0.85;
  transition: opacity 0.2s ease, color 0.2s ease;
}

.footer-nav a:hover { opacity: 1; color: var(--gold); }

.footer-office h4 {
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.9rem;
  font-weight: 700;
}

.footer-office p { line-height: 1.85; opacity: 0.9; }
.footer-office a { text-decoration: none; }
.footer-office a:hover { color: var(--gold); }

.footer-legal {
  margin-top: clamp(2.5rem, 5vw, 3.5rem);
  padding-top: 1.75rem;
  border-top: 1px solid rgba(248, 248, 244, 0.18);
  font-size: 13px;
  line-height: 1.75;
  opacity: 0.7;
  max-width: 90ch;
}

.footer-legal p { margin-bottom: 0.6rem; }

/* ---------- Responsive ---------- */

@media (max-width: 900px) {
  .split, .split.reverse { grid-template-columns: 1fr; }
  .split.reverse .split-media { order: 0; }
  .split-media img { max-height: 420px; }
  .contact-grid, .newsletter-inner, .footer-grid { grid-template-columns: 1fr; }
  .band { background-attachment: scroll; }
}

@media (max-width: 780px) {
  .nav-toggle { display: block; }
  .header-inner { flex-wrap: wrap; }
  .nav {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding-top: 1rem;
  }
  .nav.open { display: flex; }
  .nav a {
    width: 100%;
    padding: 0.85rem 0;
    border-bottom: 1px solid rgba(62, 61, 53, 0.15);
  }
  .field-row { grid-template-columns: 1fr; }
}

/* ---------- Scroll reveal + finish ---------- */

h1, h2, h3, .stack-title, .wordmark { text-wrap: balance; }
.hero-lede, .lede, .split-body p, .card p, .quote-body p { text-wrap: pretty; }

/* Hidden state applies ONLY once JS opts in (html.reveal-ready), so if the
   script never runs the content is always visible — never stuck hidden. */
.reveal-ready .reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.85s cubic-bezier(0.2, 0.7, 0.2, 1),
              transform 0.85s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.reveal-ready .reveal.is-visible { opacity: 1; transform: none; }
.reveal-ready .reveal.d1 { transition-delay: 0.09s; }
.reveal-ready .reveal.d2 { transition-delay: 0.18s; }
.reveal-ready .reveal.d3 { transition-delay: 0.27s; }

/* Media reveals with a gentle scale, so images settle rather than pop */
.reveal-ready .split-media.reveal { transform: translateY(26px) scale(1.02); }
.reveal-ready .split-media.reveal.is-visible { transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; animation: none !important; }
  .reveal-ready .reveal { opacity: 1 !important; transform: none !important; }
  .hero::after { animation: none; }
}
