/* ==========================================================================
   Eight Octo Capital — site styles
   Edit brand colors and fonts in :root below; everything else derives from them.
   ========================================================================== */

/* ---------- Fonts (self-hosted, SIL Open Font License) ---------- */
@font-face { font-family: "Cardo"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/cardo-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Cardo"; font-style: italic; font-weight: 400; font-display: swap; src: url("../fonts/cardo-400-italic.woff2") format("woff2"); }
@font-face { font-family: "Cardo"; font-style: normal; font-weight: 700; font-display: swap; src: url("../fonts/cardo-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Lato"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/lato-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Lato"; font-style: normal; font-weight: 700; font-display: swap; src: url("../fonts/lato-700-normal.woff2") format("woff2"); }

/* ---------- Brand tokens ---------- */
:root {
  --navy: #192A3A;          /* primary brand navy */
  --navy-deep: #0B1A29;     /* footer */
  --navy-line: rgba(177, 154, 101, 0.28);
  --gold: #B19A65;          /* primary brand gold (decorative + text on navy) */
  --gold-ink: #7A6536;      /* darker gold for small text on light backgrounds (AA contrast) */
  --ivory: #F7F5F0;         /* light section background */
  --white: #FFFFFF;
  --text: #475467;          /* body text on light */
  --heading: #192A3A;       /* headings on light */
  --text-on-dark: #E9E7E2;

  --font-serif: "Cardo", Georgia, "Times New Roman", serif;
  --font-sans: "Lato", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --radius: 9px;
  --header-h: 76px;
  --container: 1160px;
  --gutter: clamp(20px, 5vw, 40px);
  --section-pad: clamp(72px, 10vw, 128px);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-h);
  -webkit-text-size-adjust: 100%;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  margin: 0;
  background: var(--ivory);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; height: auto; }
h1, h2, h3 { font-family: var(--font-serif); font-weight: 700; line-height: 1.15; margin: 0; color: var(--heading); }
p { margin: 0 0 1.1em; }
a { color: inherit; }

:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 2px; }

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  background: var(--gold); color: var(--navy-deep);
  padding: 10px 16px; border-radius: var(--radius); font-weight: 700; text-decoration: none;
}
.skip-link:focus { top: 12px; }

/* ---------- Shared typographic details ---------- */
.eyebrow {
  font-family: var(--font-sans);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold-ink);
  margin: 0 0 1rem;
}
.eyebrow--on-dark { color: var(--gold); }

.rule {
  display: block;
  width: 64px; height: 2px;
  background: var(--gold);
  margin-top: 1.75rem;
}

/* ---------- Header ---------- */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  height: var(--header-h);
  background: rgba(25, 42, 58, 0.82);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--navy-line);
}
.header-inner {
  height: 100%;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
}
.brand img { height: 46px; width: auto; }

.nav { list-style: none; margin: 0; padding: 0; display: flex; gap: clamp(20px, 4vw, 40px); }
.nav a {
  position: relative;
  display: inline-block;
  padding: 8px 0;
  font-size: 0.8rem; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--text-on-dark); text-decoration: none;
  transition: color .2s ease;
}
.nav a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 2px;
  height: 1px; background: var(--gold);
  transform: scaleX(0); transform-origin: left; transition: transform .25s ease;
}
.nav a:hover, .nav a:focus-visible { color: var(--gold); }
.nav a:hover::after, .nav a:focus-visible::after { transform: scaleX(1); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex; align-items: center;
  padding: calc(var(--header-h) + 48px) 0 96px;
  background: var(--navy);
  color: var(--white);
  overflow: hidden;
  isolation: isolate;
}
.hero-bg {
  position: absolute; inset: 0; z-index: -2;
  width: 100%; height: 100%;
  object-fit: cover; object-position: 50% 60%;
}
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(90deg, rgba(11, 26, 41, 0.86) 0%, rgba(25, 42, 58, 0.6) 45%, rgba(25, 42, 58, 0.12) 100%),
    linear-gradient(0deg, rgba(11, 26, 41, 0.5) 0%, rgba(11, 26, 41, 0) 35%);
}
.hero-content { position: relative; }
.hero h1 {
  color: var(--white);
  font-size: clamp(2.4rem, 5.4vw, 4.25rem);
  line-height: 1.08;
  letter-spacing: -0.005em;
  max-width: 15ch;
}
@media (min-width: 900px) {
  .hero h1 { max-width: none; }
  .h1-line { display: block; }
}
.scroll-cue {
  position: absolute; left: 50%; bottom: 28px; transform: translateX(-50%);
  display: grid; place-items: center;
  width: 44px; height: 44px; border-radius: 50%;
  border: 1px solid rgba(177, 154, 101, 0.6);
  color: var(--gold);
  transition: background-color .2s ease, color .2s ease;
}
.scroll-cue:hover { background: var(--gold); color: var(--navy-deep); }

/* ---------- Sections ---------- */
.section { padding-block: var(--section-pad); }
.section--light { background: var(--ivory); }
.section--dark { background: var(--navy); color: var(--text-on-dark); }
.section--dark h2, .section--dark h3 { color: var(--white); }

.section h2 { font-size: clamp(2rem, 4vw, 3rem); margin-bottom: 1.5rem; }

/* Who We Are: centered, stacked statement + family photo */
.purpose-inner { text-align: center; }
.purpose h2 { margin-bottom: 0; }
.rule--center { margin: 1.75rem auto 2.25rem; }
.statement-text {
  margin: 0 auto;
  max-width: 34ch;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: clamp(1.4rem, 2.4vw, 1.9rem);
  line-height: 1.5;
  color: var(--heading);
  text-wrap: balance;
}
.purpose-media {
  /* offset by half the frame shift so frame + photo read as centered */
  position: relative; left: -9px;
  width: calc(100% - 18px);
  max-width: 680px;
  margin: clamp(48px, 6vw, 72px) auto 0;
}
.purpose-media img {
  width: 100%;
  border-radius: var(--radius);
  aspect-ratio: 3 / 2; object-fit: cover; object-position: 50% 55%;
}

/* Two-column text + image */
.split {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(48px, 7vw, 96px);
  align-items: center;
}
.split-text { max-width: 600px; }
.split-media { margin: 0; }
.split-media img { width: 100%; border-radius: var(--radius); }

@media (min-width: 700px) {
  .split--founder { grid-template-columns: 0.75fr 1.25fr; }
}

/* Gold offset frame behind photos */
.framed { position: relative; isolation: isolate; }
.framed::before {
  content: ""; position: absolute; z-index: -1;
  inset: 18px -18px -18px 18px;
  border: 1px solid var(--gold);
  border-radius: var(--radius);
}
.framed--left::before { inset: 18px 18px -18px -18px; }
.split-media.framed { max-width: 420px; margin-inline: auto; width: 100%; }
.founder-media.framed { max-width: 360px; }
.founder-media img { aspect-ratio: 4 / 5; object-fit: cover; object-position: 50% 20%; }
.split--founder .split-text > p:not(.eyebrow):not(.role) { font-size: 1.1rem; }

/* About (on navy) */
.section--dark p { color: rgba(233, 231, 226, 0.84); }
.role {
  font-size: 0.8rem; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase;
  margin: -0.75rem 0 1.75rem;
}
.section--dark .role { color: var(--gold); }
.split--founder .split-text > p:last-child { margin-bottom: 0; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--navy-deep);
  color: var(--text-on-dark);
  padding-top: 56px;
  border-top: 1px solid var(--navy-line);
}
.footer-inner {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 24px 40px;
  padding-bottom: 40px;
  border-bottom: 1px solid var(--navy-line);
}
.footer-brand img { height: 52px; width: auto; }
.footer-email {
  font-family: var(--font-serif); font-size: 1.25rem;
  color: var(--white); text-decoration: none;
  border-bottom: 1px solid var(--navy-line);
  padding-bottom: 2px;
  transition: color .2s ease, border-color .2s ease;
}
.footer-email:hover { color: var(--gold); border-color: var(--gold); }
.to-top {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 0.78rem; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--gold); text-decoration: none;
}
.to-top:hover { color: var(--white); }
.footer-legal { padding-block: 24px 32px; }
.footer-legal p { margin: 0; font-size: 0.85rem; color: rgba(233, 231, 226, 0.6); }

/* ---------- 404 page ---------- */
.notfound {
  min-height: 100vh; min-height: 100svh;
  display: flex; flex-direction: column; justify-content: center;
  padding: 48px var(--gutter);
  max-width: var(--container); margin-inline: auto;
}
body:has(.notfound) { background: var(--navy); }
.notfound-logo img { height: 52px; width: auto; margin-bottom: 64px; }
.notfound h1 { color: var(--white); font-size: clamp(2rem, 4.5vw, 3.25rem); max-width: 20ch; }
.notfound .rule { margin-bottom: 2rem; }

/* ---------- Small screens ---------- */
@media (max-width: 599px) {
  :root { --header-h: 64px; }
  .brand img { height: 36px; }
  .nav { gap: 22px; }
  .nav a { font-size: 0.74rem; letter-spacing: 0.14em; }
  .hero { align-items: flex-end; padding-bottom: 120px; }
  .hero::before {
    background: linear-gradient(0deg, rgba(11, 26, 41, 0.95) 0%, rgba(25, 42, 58, 0.7) 55%, rgba(25, 42, 58, 0.45) 100%);
  }
  .hero-bg { object-position: 55% 50%; }
  .split { gap: 56px; }
  .purpose-media img { aspect-ratio: 4 / 3; }
  .founder-media.framed { max-width: 260px; margin-inline: 18px auto; }
  .founder-media img { aspect-ratio: 1 / 1; object-position: 50% 15%; }
  .footer-inner { flex-direction: column; align-items: flex-start; }
}
