/* ==========================================================================
   Sivity — Site Stylesheet
   Palette: navy #1C2B3A · cream #F7F5F1 · amber #CC7A3D
   Type: Fraunces (headlines) + Inter (body/UI)
   ========================================================================== */

:root {
  --navy: #1c2b3a;
  --navy-soft: #2c3e52;
  --cream: #f7f5f1;
  --cream-dim: #efece4;
  --amber: #cc7a3d;
  --amber-soft: #e2a874;
  --line: rgba(28, 43, 58, 0.14);
  --line-on-navy: rgba(247, 245, 241, 0.18);

  --font-head: "Fraunces", "Iowan Old Style", Georgia, serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --max: 1180px;
  --gutter: clamp(24px, 5vw, 72px);

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---- Reset / base ---- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}

body {
  margin: 0;
  background: var(--cream);
  color: var(--navy);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3, h4 {
  font-family: var(--font-head);
  font-weight: 500;
  line-height: 1.15;
  margin: 0 0 0.5em;
  letter-spacing: -0.01em;
}

p { margin: 0 0 1.2em; }
a { color: inherit; }
img, svg { display: block; max-width: 100%; }

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

.eyebrow {
  font-family: var(--font-body);
  font-size: 12.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--amber);
  font-weight: 600;
  margin-bottom: 0.9em;
  display: block;
}

/* ==========================================================================
   Fixed watermark — the "sizzle": a huge, faint brand mark pinned to the
   viewport. Page content scrolls normally on top of it, so it reads as a
   background that stays put while the copy moves past — no photography
   required. Respects prefers-reduced-motion for the drift layer only
   (the mark itself still shows; only the extra motion is removed).
   ========================================================================== */
.bg-mark {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}
.bg-mark__icon {
  position: absolute;
  top: 50%;
  left: 50%;
  width: min(1400px, 170vw);
  height: auto;
  opacity: 0.05;
  transform: translate3d(-50%, -50%, 0) rotate(-6deg);
  will-change: transform;
}
body.is-dark .bg-mark__icon { opacity: 0.07; }

main, footer.site-footer {
  position: relative;
  z-index: 1;
}

/* ---- Header / nav ---- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  padding: 22px 0;
  background: transparent;
  transition: background-color 0.35s var(--ease), box-shadow 0.35s var(--ease), padding 0.35s var(--ease);
}
/* The frosted "scrolled" background lives on a pseudo-element, NOT on the
   header itself. A backdrop-filter on the header would turn it into the
   containing block for the position:fixed mobile menu, shrinking the menu
   to header height once the page is scrolled. */
.site-header::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: rgba(247, 245, 241, 0.92);
  backdrop-filter: saturate(140%) blur(10px);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  box-shadow: 0 1px 0 var(--line);
  opacity: 0;
  transition: opacity 0.35s var(--ease);
  pointer-events: none;
}
.site-header.is-scrolled::before { opacity: 1; }
.site-header.is-scrolled {
  padding: 14px 0;
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex-shrink: 0;
}
.brand img { height: 30px; width: auto; }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  color: var(--navy);
}
.nav-toggle svg { width: 24px; height: 24px; }

.site-nav ul {
  list-style: none;
  display: flex;
  gap: clamp(20px, 3vw, 40px);
  margin: 0;
  padding: 0;
}
.site-nav a {
  text-decoration: none;
  font-size: 14.5px;
  letter-spacing: 0.03em;
  color: var(--navy);
  position: relative;
  padding: 4px 0;
}
.site-nav a::after {
  content: "";
  position: absolute;
  left: 0; right: 100%;
  bottom: -2px;
  height: 1px;
  background: var(--amber);
  transition: right 0.3s var(--ease);
}
.site-nav a:hover::after,
.site-nav a[aria-current="page"]::after { right: 0; }
.site-nav a[aria-current="page"] { color: var(--amber); }

.nav-cta {
  border: 1px solid var(--navy);
  padding: 9px 20px;
  border-radius: 2px;
  font-size: 13.5px;
  letter-spacing: 0.04em;
  text-decoration: none;
  color: var(--navy);
  transition: background-color 0.25s var(--ease), color 0.25s var(--ease), border-color 0.25s var(--ease);
  white-space: nowrap;
}
.nav-cta:hover { background: var(--navy); color: var(--cream); }

/* ---- Hero ---- */
.hero {
  padding: clamp(72px, 16vw, 168px) 0 clamp(56px, 10vw, 120px);
  min-height: 78vh;
  display: flex;
  align-items: center;
}
.hero-inner { max-width: 760px; }
.hero h1 {
  font-size: clamp(38px, 6vw, 68px);
  font-style: italic;
  font-weight: 400;
}
.hero .lede {
  font-size: clamp(17px, 1.6vw, 20px);
  color: var(--navy-soft);
  max-width: 620px;
  margin-bottom: 1.8em;
}
.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; }

/* ---- Buttons / links ---- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 28px;
  border-radius: 2px;
  text-decoration: none;
  font-size: 14px;
  letter-spacing: 0.04em;
  font-weight: 500;
  transition: transform 0.25s var(--ease), background-color 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.btn-primary { background: var(--navy); color: var(--cream); }
.btn-primary:hover { background: #12202c; transform: translateY(-1px); box-shadow: 0 8px 24px rgba(28,43,58,0.22); }
.btn-ghost { border: 1px solid var(--line); color: var(--navy); }
.btn-ghost:hover { border-color: var(--navy); }

.text-link {
  text-decoration: none;
  border-bottom: 1px solid var(--amber);
  padding-bottom: 2px;
  font-weight: 500;
  transition: opacity 0.2s var(--ease);
}
.text-link:hover { opacity: 0.65; }

/* ---- Sections ---- */
section { padding: clamp(56px, 9vw, 108px) 0; }
.section-border-top { border-top: 1px solid var(--line); }

.section-head { max-width: 640px; margin-bottom: clamp(32px, 5vw, 56px); }
.section-head h2 { font-size: clamp(28px, 3.6vw, 42px); }

/* ---- What We Build / card grid ---- */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(24px, 4vw, 56px);
}
.build-card {
  padding: clamp(28px, 3vw, 40px);
  background: var(--cream-dim);
  border: 1px solid var(--line);
}
.build-card h3 {
  font-size: 22px;
  font-style: italic;
  margin-bottom: 0.5em;
}
.build-card p { margin-bottom: 0; color: var(--navy-soft); }

/* ---- Quote / pull statement ---- */
.pull {
  font-family: var(--font-head);
  font-style: italic;
  font-size: clamp(24px, 3.2vw, 36px);
  line-height: 1.4;
  max-width: 900px;
  color: var(--navy);
}
.pull .amber { color: var(--amber); }

/* ---- Process steps ---- */
.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 28px;
}
.steps li {
  border-top: 2px solid var(--amber);
  padding-top: 18px;
}
.steps .num {
  font-family: var(--font-head);
  font-style: italic;
  color: var(--amber);
  font-size: 15px;
  display: block;
  margin-bottom: 10px;
}
.steps h4 { font-size: 17px; margin-bottom: 0.4em; }
.steps p { font-size: 15px; color: var(--navy-soft); margin: 0; }

/* ---- CTA band ---- */
.cta-band {
  background: var(--navy);
  color: var(--cream);
}
.cta-band .eyebrow { color: var(--amber-soft); }
.cta-band h2 { color: var(--cream); }
.cta-band .btn-primary { background: var(--amber); color: var(--navy); }
.cta-band .btn-primary:hover { background: var(--amber-soft); }
.cta-band .btn-ghost { border-color: var(--line-on-navy); color: var(--cream); }
.cta-band .btn-ghost:hover { border-color: var(--cream); }

/* ---- About / leadership ---- */
.leader {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: clamp(28px, 4vw, 56px);
  align-items: start;
}
.leader-mark {
  width: 100%;
  aspect-ratio: 1;
  background: var(--cream-dim);
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
}
.leader-mark img { width: 46%; opacity: 0.85; }
.leader h3 { font-size: 26px; font-style: italic; }
.leader .role {
  display: block;
  font-family: var(--font-body);
  font-style: normal;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--amber);
  margin-bottom: 0.6em;
}

/* ---- Contact ---- */
.contact-layout {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: clamp(32px, 5vw, 72px);
}
.contact-layout--solo {
  grid-template-columns: 1fr;
  max-width: 620px;
}
/* Contact page: tighter gap between the headline and the form */
.page-hero.page-hero--contact { padding-bottom: clamp(28px, 3.5vw, 40px); }
.contact-section { padding-top: clamp(32px, 4vw, 48px); }
.field {
  margin-bottom: 22px;
}
.field label {
  display: block;
  font-size: 13px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--navy-soft);
  margin-bottom: 8px;
}
.field input,
.field textarea {
  width: 100%;
  padding: 13px 14px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--navy);
  font-family: var(--font-body);
  font-size: 15.5px;
  border-radius: 2px;
  transition: border-color 0.2s var(--ease);
}
.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--amber);
}
.field textarea { resize: vertical; min-height: 140px; }
.field-optional { color: var(--navy-soft); font-weight: 400; text-transform: none; letter-spacing: 0; }
.hp-field { position: absolute; left: -9999px; top: -9999px; }

/* ---- Footer ---- */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 32px 0;
  font-size: 13.5px;
  color: var(--navy-soft);
}
.site-footer .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.site-footer a { text-decoration: none; border-bottom: 1px solid transparent; }
.site-footer a:hover { border-bottom-color: currentColor; }
.footer-links { display: flex; gap: 20px; flex-wrap: wrap; }

/* ---- Scroll reveal ---- */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---- Simple page hero (non-home pages) ---- */
.page-hero {
  padding: clamp(64px, 12vw, 120px) 0 clamp(40px, 6vw, 64px);
}
.page-hero h1 {
  font-size: clamp(32px, 5vw, 54px);
  font-style: italic;
  font-weight: 400;
  max-width: 780px;
}
.page-hero .lede {
  max-width: 640px;
  color: var(--navy-soft);
  font-size: 17px;
}

/* ---- Legal page ---- */
.legal h2 { font-size: 20px; margin-top: 1.8em; }
.legal p, .legal li { color: var(--navy-soft); font-size: 15.5px; }

/* ---- Responsive ---- */
@media (max-width: 880px) {
  .grid-2 { grid-template-columns: 1fr; }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .leader { grid-template-columns: 1fr; }
  .leader-mark { display: none; } /* image only shows beside the bio, never stacked above it */
  .contact-layout { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .site-nav { position: fixed; inset: 0; top: 0; background: var(--cream); z-index: 30; display: none; flex-direction: column; padding: 100px 32px 32px; }
  .site-nav.is-open { display: flex; }
  .site-nav ul { flex-direction: column; gap: 22px; }
  .site-nav a { font-size: 20px; }
  .nav-toggle { display: inline-flex; }
  .nav-cta { display: none; }
  /* keep the logo and the menu button above the open menu so it can be closed */
  .brand, .nav-toggle { position: relative; z-index: 35; }
  .steps { grid-template-columns: 1fr; }
  .site-footer .container { flex-direction: column; align-items: flex-start; }
}
