/* Sapiance Capital — clean static site, styled to match the original.
   No WordPress, no tracking, no third-party JS. Roboto is self-hosted
   (assets/fonts) — the site makes zero external requests. */

@font-face {
  font-family: "Roboto";
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url("assets/fonts/roboto-300.woff2") format("woff2");
}
@font-face {
  font-family: "Roboto";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("assets/fonts/roboto-400.woff2") format("woff2");
}
@font-face {
  font-family: "Roboto";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("assets/fonts/roboto-400-italic.woff2") format("woff2");
}
@font-face {
  font-family: "Roboto";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("assets/fonts/roboto-500.woff2") format("woff2");
}
@font-face {
  font-family: "Roboto";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("assets/fonts/roboto-700.woff2") format("woff2");
}

:root {
  --ink: #4d4d4d;
  --heading: #315271;   /* brand steel-navy */
  --accent: #315271;
  --muted: #8c8c8c;
  --line: #e6e6e6;
  --bg: #ffffff;
  --bg-alt: #f7f7f7;
  --footer-bg: #3d4045;
  --footer-ink: #b9b9bd;
  --maxw: 1100px;
  --content: 900px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

/* Sticky-footer layout: page always fills the viewport, even when thin */
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  font-family: "Roboto", "Helvetica Neue", Arial, sans-serif;
  font-weight: 300;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.8;
  font-size: 17px;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---------- Header (sticky) ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  border-bottom: 1px solid var(--line);
  background: #ffffff;
  transition: box-shadow 0.3s ease;
}
.site-header.scrolled { box-shadow: 0 2px 16px rgba(20, 30, 45, 0.09); }
.site-header .inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 1.1rem 1.5rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.brand img {
  display: block;
  height: 58px;
  width: auto;
  transition: opacity 0.25s ease;
}
.brand:hover img { opacity: 0.82; }
nav ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 1.9rem;
  margin: 0;
  padding: 0;
  font-size: 0.8rem;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.13em;
}
nav a {
  position: relative;
  color: var(--muted);
  padding-bottom: 3px;
  transition: color 0.25s ease;
}
nav a:hover { color: var(--accent); text-decoration: none; }
nav a[aria-current="page"] { color: var(--accent); }
/* animated underline */
nav a::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 100%;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.28s ease;
}
nav a:hover::after,
nav a[aria-current="page"]::after { transform: scaleX(1); }

/* ---------- Hero banner ---------- */
.hero {
  position: relative;
  background-size: cover;
  background-position: center;
  background-attachment: fixed;   /* gentle parallax */
  color: #fff;
  overflow: hidden;
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(24,35,50,0.5) 0%, rgba(24,35,50,0.62) 100%);
}
.hero .inner {
  position: relative;
  z-index: 1;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 6rem 1.5rem;
}
.hero h1 {
  margin: 0;
  font-weight: 300;
  color: #fff;
  line-height: 1.3;
}
.hero.page h1 {
  font-size: 2.5rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.hero.home h1 {
  font-size: 2.05rem;
  max-width: 780px;
  letter-spacing: 0.01em;
}
.breadcrumb {
  position: relative;
  z-index: 1;
  font-size: 0.74rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.78);
  margin-bottom: 0.85rem;
}

/* ---------- Main content ---------- */
main {
  flex: 1 0 auto;              /* pushes footer to the bottom on thin pages */
  width: 100%;
  max-width: var(--content);
  margin: 0 auto;
  padding: 3.75rem 1.5rem 4.75rem;
}
h1, h2, h3 { color: var(--heading); font-weight: 400; }
h1.page-title { font-size: 2rem; margin-top: 0; }
h2 { font-size: 1.4rem; margin-top: 2.75rem; }
h3 { font-size: 1.15rem; margin-bottom: 0.15rem; }
p { margin: 1.15rem 0; }
strong { font-weight: 500; }

/* Intro / lead paragraph */
.lead {
  font-size: 1.5rem;
  line-height: 1.55;
  font-weight: 300;
  color: #2c3947;
  margin: 0 0 1.9rem;
}
.lead + * { margin-top: 0; }

ul.plain { padding-left: 1.25rem; }
ul.plain li { margin: 0.4rem 0; }

.person { margin: 2rem 0; padding-bottom: 1.75rem; border-bottom: 1px solid var(--line); }
.person:last-of-type { border-bottom: none; }
.person h3 { color: var(--heading); }

.facts { list-style: none; padding: 0; margin: 1.75rem 0; }
.facts li { padding: 0.55rem 0; border-bottom: 1px solid var(--line); }
.facts strong {
  display: inline-block; min-width: 11rem; color: var(--muted);
  font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.06em; font-weight: 500;
}

address { font-style: normal; line-height: 2; }

/* ---------- Footer ---------- */
.site-footer {
  flex-shrink: 0;
  background: var(--footer-bg);
  color: var(--footer-ink);
  font-size: 0.85rem;
  border-top: 3px solid var(--accent);
}
.site-footer .inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 2.25rem 1.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  justify-content: space-between;
}
.site-footer a { color: #fff; }

/* ---------- Motion (only when the user hasn't asked to reduce it) ---------- */
@media (prefers-reduced-motion: no-preference) {
  /* Hero content eases up on load */
  .hero .inner > * { animation: heroIn 0.9s ease both; }
  .hero .breadcrumb { animation-delay: 0.05s; }
  .hero h1 { animation-delay: 0.16s; }

  /* Scroll reveal — only active when JS is present (html.js) */
  html.js main > * {
    opacity: 0;
    transform: translateY(22px);
    transition: opacity 0.75s ease, transform 0.75s ease;
    will-change: opacity, transform;
  }
  html.js main > *.in-view { opacity: 1; transform: none; }
}

@keyframes heroIn {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero { background-attachment: scroll; }
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .hero { background-attachment: scroll; }   /* fixed is janky on mobile */
}
@media (max-width: 700px) {
  body { font-size: 16px; }
  .site-header .inner { flex-direction: column; align-items: flex-start; }
  .brand img { height: 50px; }
  .hero .inner { padding: 4rem 1.5rem; }
  .hero.page h1 { font-size: 1.9rem; }
  .hero.home h1 { font-size: 1.55rem; }
  main { padding: 2.75rem 1.5rem 3.5rem; }
  .lead { font-size: 1.22rem; }
}
