/* =========================================================================
   Rook — Institutional Underwriting
   Stylesheet v01 — 2026-04-28
   Theme: Onyx + Institutional Gold
   ========================================================================= */

/* -- Theme tokens ---------------------------------------------------------- */
:root,
[data-theme="dark"] {
  --bg:            #0a0a0a;
  --bg-elev:       #121212;
  --surface:       #161616;
  --border:        rgba(201, 169, 97, 0.18);
  --border-strong: rgba(201, 169, 97, 0.42);
  --text:          #f3eedd;
  --text-muted:    #a39d8c;
  --gold:          #c9a961;
  --gold-bright:   #f4d676;
  --gold-deep:     #8a7330;
  --shadow:        0 1px 0 rgba(255,255,255,0.02), 0 30px 60px -30px rgba(0,0,0,0.6);
  --nav-bg:        rgba(10, 10, 10, 0.78);
}

[data-theme="light"] {
  --bg:            #faf7f0;
  --bg-elev:       #ffffff;
  --surface:       #ffffff;
  --border:        rgba(138, 115, 48, 0.20);
  --border-strong: rgba(138, 115, 48, 0.45);
  --text:          #14110a;
  --text-muted:    #5e5747;
  --gold:          #8a7330;
  --gold-bright:   #b8860b;
  --gold-deep:     #5c4d20;
  --shadow:        0 1px 0 rgba(0,0,0,0.02), 0 30px 60px -30px rgba(0,0,0,0.18);
  --nav-bg:        rgba(250, 247, 240, 0.82);
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 17px;
  line-height: 1.65;
  font-weight: 400;
  letter-spacing: 0.005em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color 0.3s ease, color 0.3s ease;
}

img { display: block; max-width: 100%; height: auto; }

/* -- Typography ------------------------------------------------------------ */
h1, h2, h3, h4 {
  font-family: 'Cormorant Garamond', 'Times New Roman', serif;
  font-weight: 500;
  letter-spacing: 0.005em;
  margin: 0 0 0.4em;
  color: var(--text);
}
h1 { font-size: clamp(2.5rem, 5.2vw, 4.2rem); line-height: 1.05; font-weight: 400; }
h2 { font-size: clamp(1.9rem, 3.6vw, 2.75rem); line-height: 1.15; }
h3 { font-size: 1.45rem; line-height: 1.25; }
h4 { font-size: 1.05rem; line-height: 1.3;  letter-spacing: 0.06em; text-transform: uppercase; font-family: 'Inter', sans-serif; font-weight: 500; color: var(--gold); }

p { margin: 0 0 1em; color: var(--text-muted); }
p.lead { color: var(--text); font-size: 1.18rem; max-width: 60ch; line-height: 1.6; }

a {
  color: var(--text);
  text-decoration: none;
  transition: color 0.25s ease;
}
a:hover, a:focus-visible { color: var(--gold-bright); }
a:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

/* -- Layout primitives ----------------------------------------------------- */
.container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 clamp(1.25rem, 4vw, 2.5rem);
}

section {
  padding: clamp(4rem, 9vw, 7rem) 0;
  border-top: 1px solid var(--border);
}
section:first-of-type { border-top: 0; }

.eyebrow {
  display: inline-block;
  font-family: 'Inter', sans-serif;
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1.25rem;
}

.divider {
  width: 48px;
  height: 1px;
  background: var(--gold);
  margin: 2rem 0;
  border: 0;
}

/* -- Navigation ------------------------------------------------------------ */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem clamp(1.25rem, 4vw, 2.5rem);
  background: var(--nav-bg);
  backdrop-filter: saturate(140%) blur(12px);
  -webkit-backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid var(--border);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
  color: var(--text);
}
.brand-mark {
  width: 36px;
  height: 36px;
  object-fit: contain;
  flex-shrink: 0;
}
.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1;
}
.brand-name {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.5rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--text);
}
.brand-desc {
  font-family: 'Inter', sans-serif;
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--gold);
  margin-top: 4px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 2.5vw, 2.25rem);
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-links a {
  position: relative;
  font-size: 0.92rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text);
  padding: 0.4rem 0;
}
.nav-links a::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 100%;
  height: 1px;
  background: var(--gold-bright);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.3s ease;
}
.nav-links a:hover::after,
.nav-links a:focus-visible::after,
.nav-links a[aria-current="page"]::after { transform: scaleX(1); }
.nav-links a[aria-current="page"] { color: var(--gold-bright); }

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--border-strong);
  background: transparent;
  color: var(--text);
  border-radius: 999px;
  cursor: pointer;
  transition: border-color 0.25s ease, color 0.25s ease, background 0.25s ease;
}
.theme-toggle:hover { color: var(--gold-bright); border-color: var(--gold); background: rgba(201,169,97,0.06); }
.theme-toggle svg { width: 16px; height: 16px; }
.theme-toggle .icon-sun  { display: none; }
[data-theme="dark"]  .theme-toggle .icon-moon { display: block; }
[data-theme="light"] .theme-toggle .icon-moon { display: none; }
[data-theme="light"] .theme-toggle .icon-sun  { display: block; }

/* Mobile nav */
.nav-toggle {
  display: none;
  background: transparent;
  border: 0;
  color: var(--text);
  cursor: pointer;
}
@media (max-width: 720px) {
  .nav-links { display: none; }
  .nav-links.open {
    display: flex;
    position: absolute;
    inset: 100% 0 auto 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.25rem clamp(1.25rem, 4vw, 2.5rem) 1.5rem;
    background: var(--nav-bg);
    backdrop-filter: saturate(140%) blur(12px);
    border-bottom: 1px solid var(--border);
  }
  .nav-toggle { display: inline-flex; }
}

/* -- Hero ------------------------------------------------------------------ */
.hero {
  position: relative;
  min-height: 92vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6rem 0 4rem;
  overflow: hidden;
  border-top: 0;
  text-align: center;
}
/* hero section background ambient gradient removed in v03 to preserve logo strength */
.hero-inner {
  position: relative;
  max-width: 880px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.hero-mark-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 2.75rem;
}
.hero-mark {
  width: clamp(180px, 22vw, 280px);
  height: auto;
}
.hero h1 {
  font-size: clamp(2.4rem, 5.6vw, 4.6rem);
  font-weight: 300;
  line-height: 1.05;
  letter-spacing: -0.005em;
  max-width: 18ch;
}
.hero h1 .accent { color: var(--gold-bright); font-style: italic; font-weight: 400; }
.hero p.lead {
  margin-top: 1.5rem;
  font-size: clamp(1.05rem, 1.6vw, 1.2rem);
  max-width: 64ch;
  text-align: center;
}
.hero .cta-row { justify-content: center; }
.hero .eyebrow { margin-bottom: 1.5rem; }

/* -- Buttons --------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.95rem 1.75rem;
  font-family: 'Inter', sans-serif;
  font-size: 0.88rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-decoration: none;
  border-radius: 0;
  border: 1px solid var(--gold);
  color: var(--text);
  background: transparent;
  cursor: pointer;
  transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease, transform 0.2s ease;
}
.btn:hover, .btn:focus-visible {
  background: var(--gold);
  color: #0a0a0a;
  border-color: var(--gold-bright);
}
.btn .arrow { transition: transform 0.25s ease; }
.btn:hover .arrow { transform: translateX(4px); }

.btn-ghost { border-color: var(--border-strong); }
.btn-ghost:hover { background: transparent; color: var(--gold-bright); border-color: var(--gold); }

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 2.25rem;
}

/* -- Service grid ---------------------------------------------------------- */
.service-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  margin-top: 3rem;
  background: var(--border);
  border: 1px solid var(--border);
}
@media (max-width: 880px) { .service-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .service-grid { grid-template-columns: 1fr; } }
.service-card {
  background: var(--bg-elev);
  padding: 2rem 1.75rem;
  display: flex;
  flex-direction: column;
  min-height: 220px;
  transition: background 0.3s ease, transform 0.3s ease;
}
.service-card:hover {
  background: var(--surface);
  transform: translateY(-2px);
}
.service-card .num {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1rem;
  letter-spacing: 0.18em;
  color: var(--gold);
  margin-bottom: 1.2rem;
}
.service-card h3 {
  font-size: 1.6rem;
  margin-bottom: 0.75rem;
}
.service-card p {
  font-size: 1rem;
  margin: 0;
  color: var(--text-muted);
  line-height: 1.55;
}
.service-card .underline {
  width: 32px;
  height: 1px;
  background: var(--gold);
  margin: 1rem 0 1.25rem;
  transition: width 0.3s ease, background 0.3s ease;
}
.service-card:hover .underline { width: 64px; background: var(--gold-bright); }

/* -- Two-column / about ---------------------------------------------------- */
.split {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: start;
}
@media (max-width: 820px) {
  .split { grid-template-columns: 1fr; }
}

.tenets {
  list-style: none;
  margin: 1.5rem 0 0;
  padding: 0;
}
.tenets li {
  padding: 1rem 0;
  border-bottom: 1px solid var(--border);
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1.25rem;
  align-items: baseline;
}
.tenets li:last-child { border-bottom: 0; }
.tenets .k {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  color: var(--gold);
  font-size: 1.2rem;
}
.tenets .v {
  color: var(--text);
  font-size: 1rem;
}

/* -- Contact CTA section --------------------------------------------------- */
.cta-band {
  text-align: center;
  padding: clamp(5rem, 10vw, 8rem) 0;
}
.cta-band h2 {
  max-width: 22ch;
  margin: 0 auto 1.5rem;
  font-size: clamp(2rem, 4vw, 3.2rem);
}
.cta-band p { max-width: 56ch; margin: 0 auto 2rem; }

/* -- Footer ---------------------------------------------------------------- */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 3rem 0 2rem;
  font-size: 0.92rem;
}
.footer-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  align-items: center;
  justify-content: space-between;
}
.footer-brand { display: flex; align-items: center; gap: 0.75rem; }
.footer-brand img { width: 28px; height: 28px; object-fit: contain; }
.footer-brand .text { font-family: 'Cormorant Garamond', serif; font-size: 1.1rem; letter-spacing: 0.04em; }
.footer-links { display: flex; gap: 1.5rem; align-items: center; list-style: none; margin: 0; padding: 0; }
.footer-links a { color: var(--text-muted); }
.footer-links a:hover { color: var(--gold-bright); }
.icon-link {
  display: inline-flex;
  width: 34px; height: 34px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  color: var(--text-muted);
  transition: color 0.25s ease, border-color 0.25s ease;
}
.icon-link:hover { color: var(--gold-bright); border-color: var(--gold); }
.icon-link svg { width: 14px; height: 14px; }

.footer-meta {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.85rem;
  line-height: 1.65;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: space-between;
}
.disclaimer {
  max-width: 78ch;
  font-size: 0.82rem;
  color: var(--text-muted);
  letter-spacing: 0.01em;
  line-height: 1.6;
}

/* -- Reveal-on-scroll ------------------------------------------------------ */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.8s ease, transform 0.8s ease;
  will-change: opacity, transform;
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
  .reveal { opacity: 1; transform: none; }
}

/* -- How We Work (3-step strip) ------------------------------------------- */
.process-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  margin-top: 3rem;
  background: var(--border);
  border: 1px solid var(--border);
}
@media (max-width: 720px) { .process-grid { grid-template-columns: 1fr; } }

.process-step {
  background: var(--bg-elev);
  padding: 2.25rem 1.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  transition: background 0.3s ease;
}
.process-step:hover { background: var(--surface); }
.process-step .step-num {
  font-family: 'Cormorant Garamond', serif;
  font-size: 2.4rem;
  font-style: italic;
  color: var(--gold);
  line-height: 1;
  margin-bottom: 0.5rem;
}
.process-step h3 {
  font-size: 1.45rem;
  margin: 0 0 0.4rem;
}
.process-step p {
  margin: 0;
  font-size: 1rem;
  color: var(--text-muted);
  line-height: 1.55;
}

/* -- Engagement Parameters strip ------------------------------------------ */
.engagement-panel {
  margin-top: 3rem;
  border: 1px solid var(--border-strong);
  background: var(--bg-elev);
  padding: clamp(1.75rem, 3.5vw, 2.5rem);
  display: grid;
  grid-template-columns: 1.1fr 1fr 1.1fr;
  gap: 0;
  position: relative;
}
.engagement-panel > div {
  padding: 0 clamp(1rem, 2.5vw, 1.85rem);
  border-right: 1px solid var(--border);
}
.engagement-panel > div:first-child { padding-left: 0; }
.engagement-panel > div:last-child  { padding-right: 0; border-right: 0; }
.engagement-panel h4 {
  font-family: 'Inter', sans-serif;
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.85rem;
}
.engagement-panel .value {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(1.4rem, 2.1vw, 1.7rem);
  color: var(--text);
  line-height: 1.25;
  margin-bottom: 0.4rem;
}
.engagement-panel .note {
  font-size: 0.92rem;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.6;
}
@media (max-width: 820px) {
  .engagement-panel { grid-template-columns: 1fr; }
  .engagement-panel > div {
    padding: 1.25rem 0;
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }
  .engagement-panel > div:last-child { border-bottom: 0; padding-bottom: 0; }
  .engagement-panel > div:first-child { padding-top: 0; }
}

/* -- Page header (services / contact) -------------------------------------- */
.page-header {
  padding: 8rem 0 4rem;
  border-top: 0;
}
.page-header h1 { font-weight: 300; font-size: clamp(2.5rem, 5vw, 4.2rem); }
.page-header p.lead { margin-top: 1rem; }

/* -- Pillar list (services page) ------------------------------------------ */
.pillar {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 2rem;
  padding: 2.5rem 0;
  border-top: 1px solid var(--border);
  align-items: start;
}
.pillar:last-of-type { border-bottom: 1px solid var(--border); }
.pillar .num {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.6rem;
  color: var(--gold);
  font-style: italic;
}
.pillar h3 { font-size: 1.95rem; margin-bottom: 0.5rem; }
.pillar p  { max-width: 64ch; margin: 0; font-size: 1.05rem; line-height: 1.6; }
@media (max-width: 640px) {
  .pillar { grid-template-columns: 1fr; gap: 0.5rem; }
}

/* -- Contact page ---------------------------------------------------------- */
.contact-card {
  margin-top: 3rem;
  padding: clamp(2rem, 5vw, 3.5rem);
  background: var(--bg-elev);
  border: 1px solid var(--border);
}
.contact-card h2 { font-size: 2rem; margin-bottom: 1rem; }
.contact-card .email-link {
  display: inline-block;
  margin: 1.5rem 0;
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  color: var(--gold-bright);
  letter-spacing: 0.01em;
  border-bottom: 1px solid var(--border-strong);
  padding-bottom: 0.25rem;
  transition: border-color 0.25s ease;
}
.contact-card .email-link:hover { border-color: var(--gold-bright); }
