/* Aegis Partnerships.
   Homepage: the films do the work; the page stays out of their way.
   Inner pages: the same ink, stone and bronze, set for reading. */
@font-face { font-family: "Marcellus"; font-style: normal; font-weight: 400; font-display: swap; src: url("/assets/fonts/marcellus-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Hanken Grotesk"; font-style: normal; font-weight: 400; font-display: swap; src: url("/assets/fonts/hanken-grotesk-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Hanken Grotesk"; font-style: normal; font-weight: 500; font-display: swap; src: url("/assets/fonts/hanken-grotesk-latin-500-normal.woff2") format("woff2"); }

:root {
  --ink: #0e0a07;
  --ink-2: #17110c;
  --line: rgba(244,236,220,.14);
  --stone: #f4ecdc;
  --dim: rgba(244,236,220,.72);
  --bronze: #e2a04c;
  --display: "Marcellus", "Trajan Pro", Georgia, serif;
  --body: "Hanken Grotesk", system-ui, sans-serif;
  --pad: clamp(1.25rem, 5vw, 5.5rem);
  --ease: cubic-bezier(.16, 1, .3, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { background: var(--ink); scroll-padding-top: 6rem; }
body { margin: 0; color: var(--stone); font: 400 1.0625rem/1.6 var(--body); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
h1, h2, h3, p, ul, ol, figure { margin: 0; }
a { color: inherit; }
img { max-width: 100%; height: auto; display: block; }

.skip { position: absolute; left: -999px; }
.skip:focus { left: 1rem; top: 1rem; z-index: 100; background: var(--stone); color: var(--ink); padding: .6rem 1rem; }
:focus-visible { outline: 2px solid var(--bronze); outline-offset: 4px; }

/* ---------- Films ---------- */
.stage { position: fixed; inset: 0; z-index: 0; background: var(--ink); overflow: hidden; }
.layer { position: absolute; inset: 0; opacity: 0; will-change: opacity; }
.layer:first-child { opacity: 1; }
.layer video, .layer canvas { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
/* The looping ending sits over the finished film. */
.layer video.idle { opacity: 0; }
.layer video.idle.show { opacity: 1; transition: opacity 1.1s ease; }
/* Darken only the side the words sit on. */
.layer::after { content: ""; position: absolute; inset: 0; pointer-events: none; }
.layer[data-side="right"]::after {
  background:
    linear-gradient(90deg, rgba(14,10,7,0) 40%, rgba(14,10,7,.5) 68%, rgba(14,10,7,.74) 100%),
    linear-gradient(180deg, rgba(14,10,7,.45) 0%, rgba(14,10,7,0) 20%);
}
.layer[data-side="left"]::after {
  background:
    linear-gradient(270deg, rgba(14,10,7,0) 40%, rgba(14,10,7,.5) 68%, rgba(14,10,7,.74) 100%),
    linear-gradient(180deg, rgba(14,10,7,.45) 0%, rgba(14,10,7,0) 20%);
}

/* ---------- Top bar ---------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 20;
  display: flex; align-items: center; gap: 1.5rem;
  padding: 1.4rem var(--pad);
}
.brand { font: 400 1.35rem/1 var(--display); letter-spacing: .03em; text-decoration: none; margin-right: auto; }
.links { display: flex; gap: 1.75rem; }
.links a { font: 500 .95rem/1 var(--body); text-decoration: none; padding: .5rem 0; border-bottom: 1px solid transparent; transition: border-color .25s; }
.links a:hover { border-color: var(--bronze); }
.inner .nav { position: sticky; top: 0; background: rgba(14,10,7,.92); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); padding-block: 1rem; }

.btn {
  display: inline-block; font: 500 .95rem/1 var(--body); text-decoration: none; white-space: nowrap;
  padding: .95rem 1.5rem; border: 1px solid rgba(244,236,220,.5);
  transition: background .25s, color .25s, border-color .25s;
}
.btn:hover { background: var(--stone); color: var(--ink); border-color: var(--stone); }
.btn-solid { background: var(--bronze); border-color: var(--bronze); color: #1d1104; }
.btn-solid:hover { background: #f3b866; border-color: #f3b866; color: #1d1104; }
.cta-sub { margin-top: .9rem; font-size: .92rem; color: var(--dim); }

/* ---------- Scenes ---------- */
main { position: relative; z-index: 10; }
.chapter { position: relative; height: 190vh; }
.chapter.last { height: 130vh; }
.pin {
  position: sticky; top: 0; height: 100vh; height: 100svh;
  display: flex; align-items: center; padding: 6rem var(--pad) 4rem;
}
.chapter[data-side="right"] .pin { justify-content: flex-end; }
.chapter[data-side="left"]  .pin { justify-content: flex-start; }
.copy { width: min(42rem, 46vw); }

h1, h2, h3 { font-family: var(--display); font-weight: 400; text-wrap: balance; }
.home h1, .home h2 { text-shadow: 0 2px 28px rgba(14,10,7,.6); }
.home h1 { font-size: clamp(2.5rem, 4.7vw, 5.2rem); line-height: 1.05; }
.home h2 { font-size: clamp(2.4rem, 4.5vw, 5rem); line-height: 1.06; }

/* Headline lines rise out of a mask when their scene arrives. */
.ln { display: block; overflow: hidden; padding-bottom: .08em; }
.ln > span { display: block; transform: translateY(108%); transition: transform 1.2s var(--ease); }
.ln:nth-child(2) > span { transition-delay: .09s; }
.chapter.on .ln > span { transform: none; }

.lede, .copy .btn, .copy .cta-sub, .copy .results-claim { opacity: 0; transition: opacity .9s ease .35s; }
.chapter.on .lede, .chapter.on .copy .btn, .chapter.on .copy .cta-sub, .chapter.on .copy .results-claim { opacity: 1; }
.chapter:not(.on) .ln > span { transition-duration: .5s; transition-delay: 0s; }
.chapter:not(.on) .lede, .chapter:not(.on) .copy .btn, .chapter:not(.on) .copy .cta-sub, .chapter:not(.on) .copy .results-claim { transition-duration: .35s; transition-delay: 0s; }

.home .lede { margin-top: 1.5rem; max-width: 31rem; font-size: clamp(1.08rem, 1.3vw, 1.3rem); line-height: 1.55; text-shadow: 0 1px 18px rgba(14,10,7,.7); }
.home .lede.support { margin-top: 1rem; font-size: 1rem; color: var(--dim); }
.copy .btn { margin-top: 2.2rem; }
.eyebrow { font: 500 .8rem/1 var(--body); letter-spacing: .18em; text-transform: uppercase; color: var(--bronze); }
.home .copy .eyebrow.lede { margin: 0 0 1.4rem; font-size: .8rem; }

/* The 51% block. */
.copy .results-claim { margin-top: 1.6rem; max-width: 31rem; text-shadow: 0 1px 18px rgba(14,10,7,.7); }
.results-claim .stat { font: 400 clamp(4.5rem, 9vw, 8rem)/1 var(--display); color: var(--bronze); }
.results-claim .claim { margin-top: .8rem; font-size: clamp(1.08rem, 1.3vw, 1.3rem); line-height: 1.5; }
.results-claim .fine { display: block; margin-top: .6rem; font-size: .92rem; color: var(--dim); }
.results-claim .method { display: block; margin-top: .5rem; font-size: .85rem; color: var(--dim); }
.prose span.results-claim .fine { display: inline; margin: 0; font-size: inherit; color: inherit; }

/* ---------- Static bands on the homepage ---------- */
.band { position: relative; background: var(--ink); padding: clamp(5rem, 14vh, 10rem) var(--pad); border-block: 1px solid var(--line); }
.band-in { max-width: 46rem; margin: 0 auto; }
.band-in.wide { max-width: 72rem; }
.band h2 { margin-top: 1.4rem; font-size: clamp(2.3rem, 4.6vw, 4.4rem); line-height: 1.06; text-shadow: none; }
.band-body { margin-top: 1.8rem; max-width: 40rem; font-size: clamp(1.08rem, 1.3vw, 1.25rem); line-height: 1.6; color: var(--dim); }
.turn { margin-top: 2rem; max-width: 40rem; padding-left: 1.2rem; border-left: 2px solid var(--bronze); font: 400 clamp(1.3rem, 2vw, 1.7rem)/1.35 var(--display); }
.pillars { list-style: none; padding: 0; margin-top: 3.5rem; display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--line); border: 1px solid var(--line); }
.pillars li { background: var(--ink); padding: clamp(1.6rem, 3vw, 2.6rem); }
.pillars h3 { font-size: clamp(1.3rem, 1.9vw, 1.6rem); line-height: 1.2; }
.pillars h3 a { text-decoration: none; }
.pillars h3 a:hover { color: var(--bronze); }
.pillars p { margin-top: .9rem; color: var(--dim); }

.home-foot { position: absolute; left: var(--pad); right: var(--pad); bottom: 1.6rem; display: flex; gap: 1.5rem; justify-content: space-between; font-size: .85rem; color: var(--dim); }
.foot-links { display: flex; gap: 1.25rem; }
.foot-links a { text-decoration: none; }
.foot-links a:hover { color: var(--stone); text-decoration: underline; }

/* ---------- Inner pages ---------- */
.page { max-width: 47rem; margin: 0 auto; padding: clamp(2.5rem, 6vw, 4.5rem) var(--pad) 3rem; }
.page.index { max-width: 72rem; }
.page.post, .page.post .prose, .page.post .advice { max-width: 65rem; }
.page.post > :not(.post-hero) { max-width: 47rem; margin-inline: auto; }
.page h1 { font-size: clamp(2.1rem, 4.2vw, 3.4rem); line-height: 1.1; }
.page h1 .serif, blockquote.serif { font-style: italic; }
.crumbs { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1.6rem; font-size: .85rem; color: var(--dim); }
.crumbs a { text-decoration: none; }
.crumbs a:hover { color: var(--stone); text-decoration: underline; }
.meta { font: 500 .8rem/1.4 var(--body); letter-spacing: .12em; text-transform: uppercase; color: var(--bronze); }
.page > .meta { margin-bottom: 1rem; }
.page > .lede { margin-top: 1.4rem; font-size: 1.2rem; line-height: 1.55; color: var(--dim); opacity: 1; }
.post-hero { margin-top: 2.2rem; }
.post-hero img { width: 100%; }

.prose { margin-top: 2.2rem; }
.prose > * + * { margin-top: 1.25rem; }
.prose h2, .faq h2, .sources h2 { margin-top: 3rem; font-size: clamp(1.6rem, 2.6vw, 2.1rem); line-height: 1.2; }
.prose h3, .faq h3 { margin-top: 2.2rem; font-size: clamp(1.2rem, 1.8vw, 1.4rem); line-height: 1.3; }
.prose a, .faq a, .sources a, .close-line a, .notfound a { color: var(--bronze); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; overflow-wrap: anywhere; }
.prose a:hover, .faq a:hover, .sources a:hover, .close-line a:hover, .notfound a:hover { color: #f3b866; }
.prose ul, .prose ol, .sources ul { padding-left: 1.3rem; }
.prose li + li, .sources li + li { margin-top: .6rem; }
.prose blockquote { margin: 2.4rem 0; padding-left: 1.3rem; border-left: 2px solid var(--bronze); font: 400 clamp(1.3rem, 2vw, 1.7rem)/1.35 var(--display); }
/* The ported posts carry empty spacer paragraphs; they take no room. */
.prose p:has(> br:only-child) { display: none; }
.post-table { overflow-x: auto; margin-top: 1.8rem; border: 1px solid var(--line); }
.post-table table { width: 100%; border-collapse: collapse; font-size: .95rem; }
.post-table th, .post-table td { padding: .8rem 1rem; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
.post-table th { font-weight: 500; color: var(--bronze); background: var(--ink-2); }
.post-table tr:last-child td { border-bottom: 0; }
.jump { margin-top: 1.6rem; padding: 1rem 1.2rem; border: 1px solid var(--line); background: var(--ink-2); font-size: .95rem; }
.prose span.results-claim { display: block; margin-top: 0; padding: 1rem 1.2rem; border-left: 2px solid var(--bronze); background: var(--ink-2); }
.prose p:has(> span.results-claim:only-child) { margin-top: 1.6rem; }

.cta { margin-top: 2.6rem; padding: 2rem; border: 1px solid var(--line); background: var(--ink-2); text-align: center; }
.faq, .sources { margin-top: 3.5rem; padding-top: .5rem; border-top: 1px solid var(--line); }
.faq p, .sources ul { margin-top: .8rem; }
.sources { font-size: .95rem; color: var(--dim); }
.advice { margin-top: 2.5rem; font-size: .9rem; color: var(--dim); }
.post-tags { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1.6rem; }
.post-tags li { padding: .35rem .7rem; border: 1px solid var(--line); font-size: .8rem; color: var(--dim); }
.byline { display: flex; align-items: center; gap: 1rem; margin-top: 2.2rem; padding-top: 1.6rem; border-top: 1px solid var(--line); }
.byline img { width: 3rem; height: 3rem; border-radius: 50%; object-fit: cover; }
.related-service { margin-top: 1.6rem; padding: 1.4rem 1.5rem; border: 1px solid var(--line); background: var(--ink-2); }
.related-service h2 { margin-top: .6rem; font-size: 1.35rem; line-height: 1.25; }
.related-service h2 a { text-decoration: none; }
.related-service h2 a:hover { color: var(--bronze); }
.related-service .sum { margin-top: .5rem; color: var(--dim); }

.next, .siblings, .post-cta { max-width: 72rem; margin: 0 auto; padding: 1rem var(--pad) 3rem; }
.next > h2, .siblings > h2 { padding-top: 2.5rem; border-top: 1px solid var(--line); font-size: clamp(1.6rem, 2.6vw, 2.1rem); }
.posts { list-style: none; padding: 0; margin-top: 1.8rem; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.8rem; }
.posts a { display: block; text-decoration: none; }
.posts figure { overflow: hidden; aspect-ratio: 16 / 9; background: var(--ink-2); }
.posts img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.posts a:hover img { transform: scale(1.03); }
.posts .meta { margin-top: 1rem; }
.posts h2, .posts h3 { margin-top: .5rem; font-size: 1.3rem; line-height: 1.25; }
.posts a:hover h2, .posts a:hover h3 { color: var(--bronze); }
.posts .sum { margin-top: .5rem; font-size: .95rem; color: var(--dim); }
.posts.all { margin-top: 3rem; }
.close-line { margin-top: 3.5rem; padding-top: 2rem; border-top: 1px solid var(--line); font-size: 1.1rem; }
.siblings > div { margin-top: 1.6rem; }
.siblings ul { list-style: none; padding: 0; margin-top: .5rem; display: grid; grid-template-columns: 1fr 1fr; gap: .4rem 2rem; }
.siblings a { text-decoration: none; }
.siblings a:hover { color: var(--bronze); text-decoration: underline; }
.siblings [aria-current] { color: var(--dim); }
.post-cta .cta { margin-top: 0; }
.notfound { min-height: 55vh; }
.notfound p { margin-top: 1.5rem; }

.foot { border-top: 1px solid var(--line); padding: 2rem var(--pad); font-size: .85rem; color: var(--dim); }
.foot > div { display: flex; gap: 1.5rem; justify-content: space-between; max-width: 72rem; margin: 0 auto; }
.foot .advice { max-width: 72rem; margin: 0 auto 1.2rem; }

/* ---------- Phones: words sit at the bottom ---------- */
@media (max-width: 860px) {
  .nav { flex-wrap: wrap; gap: .6rem 1rem; padding-block: 1rem; }
  .nav .btn { padding: .65rem .8rem; font-size: .8rem; }
  .brand { font-size: 1.12rem; }
  .home h1, .home h2 { font-size: clamp(1.8rem, 8.2vw, 3.2rem); }
  .band h2 { font-size: clamp(1.8rem, 8.2vw, 3.2rem); }
  .links { order: 3; width: 100%; gap: 1.5rem; }
  .links a { font-size: .9rem; }
  .pin { align-items: flex-end; padding: 7.5rem var(--pad) 4.5rem; }
  .copy { width: 100%; }
  .layer[data-side]::after { background: linear-gradient(180deg, rgba(14,10,7,.55) 0%, rgba(14,10,7,0) 22%, rgba(14,10,7,.1) 40%, rgba(14,10,7,.82) 68%, rgba(14,10,7,.95) 100%); }
  .layer video, .layer canvas { object-position: var(--x, 50%) 50%; }
  .layer[data-scene="shield"] { --x: 22%; }
  .layer[data-scene="foundation"] { --x: 74%; }
  .layer[data-scene="keystone"] { --x: 24%; }
  .layer[data-scene="phalanx"] { --x: 78%; }
  .layer[data-scene="seawall"] { --x: 40%; }
  .layer[data-scene="sundial"] { --x: 20%; }
  .layer[data-scene="hall"] { --x: 76%; }
  .layer[data-scene="aegis"] { --x: 16%; }
  .pillars { grid-template-columns: 1fr; }
  .posts { grid-template-columns: 1fr; }
  .siblings ul { grid-template-columns: 1fr; }
  .home-foot, .foot > div { flex-direction: column; gap: .6rem; }
  .results-claim .stat { font-size: 4rem; }
}
@media (min-width: 861px) and (max-width: 1100px) { .posts { grid-template-columns: 1fr 1fr; } }

@media (prefers-reduced-motion: reduce) {
  .ln > span, .lede, .copy .btn, .copy .cta-sub, .copy .results-claim { transition-duration: .01s !important; transition-delay: 0s !important; }
}
