@import url("fonts.css");

:root {
  --navy: #142b46;
  --navy-2: #1c3a5a;
  --navy-deep: #0e1f33;
  --gold: #b8944f;
  --gold-soft: #d4be8a;
  --cream: #f6f3ed;
  --sand: #f7f1e6;
  --ink: #1f2937;
  --muted: #5a6472;
  --line: #d6dbe1;
  --white: #ffffff;
  --max: 72rem;
  --wide: 80rem;
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "Source Sans 3", "Segoe UI", Calibri, sans-serif;
  --header: 4.5rem;
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--ink);
  background: var(--cream);
  font-family: var(--sans);
  font-size: 1.125rem;
  line-height: 1.65;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }

.skip {
  position: absolute;
  left: 1rem;
  top: -4rem;
  background: var(--gold);
  color: var(--navy);
  padding: 0.5rem 1rem;
  z-index: 100;
}
.skip:focus { top: 1rem; }

/* ---------- header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  min-height: var(--header);
  padding: 0 6vw;
  background: rgba(246, 243, 237, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
}
.site-header.is-solid { border-bottom-color: var(--line); }
body.theme-dark .site-header {
  background: rgba(14, 31, 51, 0.88);
  color: var(--cream);
}

.wordmark {
  text-decoration: none;
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.15rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--navy);
  flex-shrink: 0;
}
body.theme-dark .wordmark { color: var(--cream); }
.wordmark span { color: var(--gold); }

.nav {
  display: flex;
  align-items: center;
  gap: 1.55rem;
}
.nav a {
  text-decoration: none;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  color: var(--muted);
}
.nav a:hover,
.nav a[aria-current="page"] { color: var(--navy); }
body.theme-dark .nav a:hover,
body.theme-dark .nav a[aria-current="page"] { color: var(--cream); }

.lang {
  font-size: 0.78rem !important;
  letter-spacing: 0.14em !important;
  text-transform: uppercase;
  border: 1px solid var(--line);
  padding: 0.28rem 0.5rem;
  color: var(--muted) !important;
}
body.theme-dark .lang { border-color: #2a4564; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  background: var(--navy);
  color: var(--cream) !important;
  padding: 0.7rem 1.15rem;
  font-size: 0.92rem !important;
  letter-spacing: 0.02em;
  border: 1px solid var(--navy);
  transition: background 0.25s ease, color 0.25s ease, transform 0.25s ease;
}
.btn:hover { background: var(--navy-deep); transform: translateY(-1px); }
.btn-gold {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--navy) !important;
}
.btn-gold:hover { background: var(--gold-soft); }
.btn-ghost {
  background: transparent;
  border: 1px solid currentColor;
  color: inherit !important;
}
.btn-ghost:hover { background: rgba(255,255,255,0.06); }

.nav-toggle {
  display: none;
  background: none;
  border: 0;
  padding: 0.4rem;
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  width: 1.35rem;
  height: 1.5px;
  background: currentColor;
  margin: 0.28rem 0;
}

@media (max-width: 920px) {
  .nav-toggle { display: block; }
  .nav {
    display: none;
    position: absolute;
    left: 0; right: 0; top: 100%;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    background: var(--cream);
    border-bottom: 1px solid var(--line);
    padding: 0.5rem 6vw 1.25rem;
  }
  body.theme-dark .nav { background: var(--navy-deep); }
  .site-header.is-open .nav { display: flex; }
  .nav a { padding: 0.7rem 0; width: 100%; }
}

/* ---------- layout ---------- */
.wrap { width: min(var(--max), calc(100% - 12vw)); margin: 0 auto; }
.wrap-wide { width: min(var(--wide), calc(100% - 12vw)); margin: 0 auto; }

.kicker {
  font-family: var(--sans);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0 0 0.85rem;
}
.rule {
  width: 3.2rem;
  height: 2px;
  background: var(--gold);
  border: 0;
  margin: 1.25rem 0 1.5rem;
}

h1, h2, h3, .display {
  font-family: var(--serif);
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: var(--navy);
}
h1, .display {
  font-size: clamp(2.35rem, 5.4vw, 4.6rem);
  margin: 0 0 1.2rem;
}
h2 { font-size: clamp(1.8rem, 3.2vw, 2.6rem); margin: 0 0 0.9rem; }
h3 { font-size: 1.35rem; margin: 0 0 0.5rem; }
.lede {
  font-size: 1.28rem;
  line-height: 1.55;
  color: var(--muted);
  max-width: 38rem;
}
p { margin: 0 0 1rem; }
.muted { color: var(--muted); }

/* ---------- hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  background-color: var(--navy);
  color: var(--cream);
  min-height: calc(100vh - var(--header));
  display: flex;
  align-items: flex-end;
  padding: 4.5rem 0 5rem;
}
.hero::before {
  content: "";
  position: absolute;
  top: 0; right: 0; bottom: 0; left: 0;
  background: linear-gradient(90deg, #142b46 0%, rgba(20,43,70,0.82) 46%, rgba(20,43,70,0.28) 100%);
  z-index: 0;
  pointer-events: none;
}
.hero::after {
  content: "";
  position: absolute;
  top: 0; right: 0; bottom: 0; left: 0;
  background-image:
    linear-gradient(rgba(184,148,79,0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(184,148,79,0.07) 1px, transparent 1px);
  background-size: 56px 56px;
  opacity: 0.35;
  z-index: 0;
  pointer-events: none;
  animation: gridshift 32s linear infinite;
}
.hero .wrap,
.hero .wrap-wide { position: relative; z-index: 1; }
.hero h1, .hero .display { color: var(--cream); }
.hero .lede { color: #c9d4e0; max-width: 36rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.8rem; margin-top: 2.1rem; }
.hero-foot {
  margin-top: 4.5rem;
  padding-top: 1.4rem;
  border-top: 1px solid #2a4564;
  display: flex;
  flex-wrap: wrap;
  gap: 2rem 3rem;
  font-size: 0.92rem;
  color: #9aa3ad;
}
.hero-foot strong { display: block; color: var(--gold-soft); font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; font-size: 0.72rem; margin-bottom: 0.25rem; }

/* ---------- sections ---------- */
section { padding: 5.2rem 0; position: relative; }
.band-navy { background-color: var(--navy); color: #f6f3ed; overflow: hidden; }
.band-navy h1,
.band-navy h2,
.band-navy h3 { color: #f6f3ed; }
.band-navy .kicker { color: var(--gold-soft); }
.band-navy .lede { color: #d5dee7; }
.band-sand { background-color: var(--sand); overflow: hidden; }
.band-white { background-color: var(--white); }

.band-navy.has-visual::before,
.band-sand.has-visual::before {
  content: "";
  position: absolute;
  top: 0; right: 0; bottom: 0; left: 0;
  z-index: 0;
  pointer-events: none;
}
.band-navy.has-visual::before {
  background: rgba(14, 31, 51, 0.55);
  opacity: 1;
}
.band-sand.has-visual::before {
  background: linear-gradient(90deg, var(--sand) 0%, rgba(247,241,230,0.90) 48%, rgba(247,241,230,0.38) 100%);
}
.hero > *,
.band-navy > *,
.band-sand > * { position: relative; z-index: 1; }

.site-footer { position: relative; overflow: hidden; }
.site-footer::before {
  content: "";
  position: absolute;
  right: 0; top: 0; bottom: 0;
  width: min(42%, 28rem);
  background:
    linear-gradient(90deg, var(--navy-deep) 0%, rgba(14,31,51,0.55) 40%, transparent 100%),
    url("/assets/img/flow-navy.jpg") center / cover no-repeat;
  opacity: 0.28;
  pointer-events: none;
}
.site-footer > * { position: relative; z-index: 1; }

.grid-3, .grid-2, .grid-4 {
  display: grid;
  gap: 1.4rem;
}
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) {
  .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
}

.card {
  background: var(--white);
  padding: 1.7rem 1.6rem 1.8rem;
  border-top: 3px solid var(--gold);
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 40px rgba(20, 43, 70, 0.08);
}
.band-navy .card { background: var(--navy-2); }
.num {
  font-family: var(--serif);
  color: var(--gold);
  font-size: 1.35rem;
  margin-bottom: 0.7rem;
}
.card p:last-child { margin-bottom: 0; }
.card .result {
  margin-top: 1.2rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
  font-size: 1.02rem;
  color: var(--navy);
  font-weight: 600;
}
.band-navy .card .result { color: var(--gold-soft); border-top-color: #2a4564; }

/* phases */
.phases {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.6rem;
}
.phase {
  background: var(--navy);
  color: var(--cream);
  padding: 1.15rem 0.9rem 1.2rem;
  min-height: 8.2rem;
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}
.phase:hover { transform: translateY(-4px); }
.phase:last-child { background: var(--gold); color: var(--navy); }
.phase .code { font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--gold-soft); }
.phase:last-child .code { color: var(--navy); }
.phase h3 { color: inherit; margin: 0.35rem 0 0.3rem; font-size: 1.35rem; }
.phase p { margin: 0; font-size: 0.92rem; opacity: 0.88; }
@media (max-width: 800px) { .phases { grid-template-columns: 1fr; } }

/* page intro */
.page-intro { padding: 4.2rem 0 2.4rem; }
.page-intro h1 { font-size: clamp(2.1rem, 4.4vw, 3.5rem); max-width: 18ch; }

/* beliefs */
.belief {
  display: grid;
  grid-template-columns: 6rem 1fr;
  gap: 1.2rem;
  padding: 1.7rem 0;
  border-top: 1px solid var(--line);
}
.belief:last-child { border-bottom: 1px solid var(--line); }
.belief h3 { margin-bottom: 0.35rem; }
@media (max-width: 640px) { .belief { grid-template-columns: 1fr; gap: 0.3rem; } }

/* stairs */
.stairs {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  align-items: end;
  gap: 0.55rem;
  margin-top: 1.5rem;
}
.stair {
  background: var(--line);
  color: var(--navy);
  padding: 0.9rem 0.7rem;
}
.stair.is-here { background: var(--navy); color: var(--cream); }
.stair.is-target { background: var(--gold); color: var(--navy); }
.stair .n { display: block; font-family: var(--serif); font-size: 1.3rem; margin-bottom: 0.3rem; }
.stair span { font-size: 0.88rem; }
@media (max-width: 800px) { .stairs { grid-template-columns: 1fr; } }

/* split */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3.5rem;
  align-items: stretch;
}
@media (max-width: 800px) { .split { grid-template-columns: 1fr; gap: 1.5rem; } }

.quote {
  font-family: var(--serif);
  font-size: clamp(1.45rem, 2.4vw, 1.9rem);
  line-height: 1.45;
  color: var(--navy);
  margin: 0 0 1rem;
}
.quote cite {
  display: block;
  margin-top: 1rem;
  font-family: var(--sans);
  font-style: normal;
  font-size: 0.95rem;
  color: var(--muted);
}
.quote-col {
  background: transparent;
  padding: 0;
  height: 100%;
  box-sizing: border-box;
}
.band-navy .quote,
.band-navy .quote-col .quote,
.band-navy .quote-panel {
  color: #f6f3ed !important;
  background: transparent !important;
  margin: 0;
  padding: 0 0 0 1.15rem;
  border-left: 3px solid #b8944f;
}
.band-navy .quote cite,
.band-navy .quote-col .quote cite,
.band-navy .quote-panel cite { color: #d4be8a !important; }
.band-navy p { color: #f6f3ed; }
.band-navy a { color: #d4be8a; }
.band-navy .split > div:first-child,
.band-navy .split > div:first-child h2,
.band-navy .split > div:first-child p {
  color: #f6f3ed;
}

/* lists */
.plain { list-style: none; padding: 0; margin: 0; }
.plain li {
  padding: 0.7rem 0 0.7rem 1.2rem;
  border-top: 1px solid var(--line);
  position: relative;
}
.plain li::before {
  content: "";
  position: absolute;
  left: 0; top: 1.15rem;
  width: 0.5rem; height: 1.5px;
  background: var(--gold);
}
.plain.tight li { border: 0; padding: 0.25rem 0 0.25rem 1.2rem; }
.plain.tight li::before { top: 0.85rem; }

/* form */
.form { display: grid; gap: 1rem; max-width: 36rem; }
label { display: grid; gap: 0.35rem; font-size: 0.92rem; color: var(--muted); }
input, textarea, select {
  background: var(--white);
  border: 1px solid var(--line);
  padding: 0.75rem 0.85rem;
  width: 100%;
}
input:focus, textarea:focus, select:focus {
  outline: 2px solid var(--gold);
  outline-offset: 1px;
}
textarea { min-height: 8rem; resize: vertical; }
.form-note { font-size: 0.9rem; color: var(--muted); }
.form-ok,
.form-err {
  display: none;
  padding: 1.2rem 1.3rem;
}
.form-ok {
  background: var(--navy);
  color: var(--cream);
}
.form-err {
  background: #f3e6e6;
  color: #6b2a2a;
}
.form-ok.is-on,
.form-err.is-on { display: block; }
.hp {
  position: absolute;
  left: -9999px;
  height: 0;
  overflow: hidden;
}

/* footer */
.site-footer {
  background: var(--navy-deep);
  color: #c9d4e0;
  padding: 3.2rem 0 2rem;
  font-size: 0.95rem;
}
.site-footer a { color: var(--cream); text-decoration: none; }
.site-footer a:hover { color: var(--gold-soft); }
.foot-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid #2a4564;
}
.site-footer .wordmark { color: var(--cream); display: inline-block; margin-bottom: 0.8rem; }
.foot-col h4 {
  margin: 0 0 0.7rem;
  font-family: var(--sans);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 600;
}
.foot-col ul { list-style: none; padding: 0; margin: 0; }
.foot-col li { margin: 0.35rem 0; }
.foot-base {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.6rem 1.5rem;
  padding-top: 1.2rem;
  color: #8b95a1;
  font-size: 0.85rem;
}
@media (max-width: 800px) { .foot-grid { grid-template-columns: 1fr; } }

/* utilities */
.mb0 { margin-bottom: 0; }
.mt2 { margin-top: 2rem; }
.max40 { max-width: 40rem; }
.max46 { max-width: 46rem; }
.center { text-align: center; }
.cta-row { display: flex; flex-wrap: wrap; gap: 0.8rem; margin-top: 1.6rem; }

/* ---------- motion ---------- */
@keyframes drift {
  from { transform: scale(1.06) translate3d(0, 0, 0); }
  to { transform: scale(1.12) translate3d(-1.8%, 1.2%, 0); }
}
@keyframes gridshift {
  from { background-position: 0 0; }
  to { background-position: 56px 56px; }
}
@keyframes rise {
  from { opacity: 0; transform: translateY(22px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes line-in {
  from { width: 0; opacity: 0; }
  to { width: 3.2rem; opacity: 1; }
}

.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.is-in {
  opacity: 1;
  transform: none;
}
.hero .kicker,
.hero h1,
.hero .lede,
.hero-actions,
.hero-foot {
  animation: rise 0.9s ease both;
}
.hero h1 { animation-delay: 0.12s; }
.hero .lede { animation-delay: 0.24s; }
.hero-actions { animation-delay: 0.36s; }
.hero-foot { animation-delay: 0.5s; }

.page-intro h1,
.page-intro .lede { animation: rise 0.75s ease both; }
.page-intro .lede { animation-delay: 0.1s; }

.cta-row a:not(.btn) {
  color: var(--navy);
  text-decoration: none;
  border-bottom: 1px solid var(--gold);
  transition: color 0.2s ease, border-color 0.2s ease;
}
.cta-row a:not(.btn):hover { color: var(--gold); }

@media (max-width: 720px) {
  .hero {
    min-height: auto;
    padding: 3rem 0 2.8rem;
  }
  .hero::after { opacity: 0.16; }
  section { padding: 3.2rem 0; }
  .page-intro { padding: 2.6rem 0 1.4rem; }
  .page-intro h1 { max-width: none; }
  .wrap, .wrap-wide { width: min(var(--max), calc(100% - 10vw)); }
  .site-header { padding: 0 5vw; }
  .btn { min-height: 44px; padding: 0.8rem 1.1rem; }
  input, textarea, select { font-size: 16px; }
  .band-navy .quote,
  .band-navy .quote-panel,
  .band-navy .quote-col .quote {
    font-size: 1.22rem;
    color: #f6f3ed !important;
    background: transparent !important;
    padding: 0 0 0 1.1rem;
  }
  .quote-col { padding: 0; background: transparent; }
  .split { gap: 1.5rem; }
  .hero-foot { margin-top: 2.4rem; gap: 1.1rem 1.6rem; }
  .nav a { min-height: 44px; display: flex; align-items: center; }
}

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