/* =====================================================================
   Caleb Holman — cinematic full-frame · site.css
   ===================================================================== */
:root {
  --black: #000;
  --ink: #f2f2f0;
  --mute: #9a9a96;
  --dim: #55554f;
  --line: rgba(255,255,255,.14);
  --accent: #a6e9ff;           /* cold ice */
  --display: "Anton", Impact, "Arial Narrow", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --sans: "Archivo", Inter, system-ui, -apple-system, sans-serif;
  --pad: clamp(18px, 3.2vw, 48px);
  --ease: cubic-bezier(.19,1,.22,1);
}
* { box-sizing: border-box; }
html { background: var(--black); scroll-snap-type: y proximity; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; scroll-snap-type: none; } }
body { margin: 0; background: var(--black); color: var(--ink); font-family: var(--sans); font-weight: 300; font-size: 16px; line-height: 1.55; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; }
kbd { font-family: var(--mono); font-size: 10px; border: 1px solid var(--line); border-radius: 3px; padding: 1px 5px; color: var(--mute); }
.mono { font-family: var(--mono); font-size: 11.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--mute); }
.skip { position: absolute; left: -999px; top: 10px; z-index: 999; background: var(--accent); color: #000; padding: 6px 12px; font-family: var(--mono); }
.skip:focus { left: 10px; }
::selection { background: var(--accent); color: #000; }

/* ---------- outlined display type ---------- */
.outline {
  font-family: var(--display); font-weight: 400; text-transform: uppercase; margin: 0;
  line-height: .86; letter-spacing: .005em;
  color: transparent; -webkit-text-stroke: 1.2px var(--ink);
}
.outline > span { display: block; }
.outline em { font-style: normal; color: var(--accent); -webkit-text-stroke: 0; }
.outline--hover { transition: color .5s var(--ease); }
.outline--hover:hover { color: var(--ink); }

/* ---------- HUD ---------- */
.hud {
  position: fixed; inset: 0 0 auto 0; z-index: 60;
  display: flex; align-items: flex-start; justify-content: space-between; gap: 20px;
  padding: 18px var(--pad); mix-blend-mode: difference; color: #fff;
  font-family: var(--mono); font-size: 11.5px; letter-spacing: .08em; text-transform: uppercase;
}
.hud__brand { display: flex; flex-direction: column; gap: 3px; font-weight: 500; }
.hud__brand-sub { font-weight: 400; opacity: .55; font-size: 10px; }
.hud__nav { display: flex; gap: clamp(14px, 2vw, 30px); margin-left: auto; }
.hud__nav a { position: relative; opacity: .6; transition: opacity .3s; padding: 2px 0; }
.hud__nav a:hover, .hud__nav a.is-active { opacity: 1; }
.hud__nav a.is-active::before { content: "▸ "; color: var(--accent); }
.hud__btn { display: inline-flex; align-items: center; gap: 8px; font-family: var(--mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; opacity: .8; transition: opacity .3s; }
.hud__btn:hover { opacity: 1; }
.hud__sheet .ico { width: 14px; height: 10px; border: 1px solid currentColor; box-shadow: inset 0 0 0 2px #000, inset 0 0 0 3px currentColor; }
.hud__burger { display: none; flex-direction: column; gap: 6px; width: 36px; height: 36px; align-items: flex-end; justify-content: center; }
.hud__burger span { display: block; width: 22px; height: 1px; background: currentColor; transition: transform .35s var(--ease); }
body.menu-open .hud__burger span:first-child { transform: translateY(3.5px) rotate(45deg); }
body.menu-open .hud__burger span:last-child { transform: translateY(-3.5px) rotate(-45deg); }

.hud__status {
  position: fixed; left: var(--pad); bottom: 18px; z-index: 60; mix-blend-mode: difference; color: #fff;
  display: flex; flex-direction: column; gap: 4px;
  font-family: var(--mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase;
}
.st__chapter { font-weight: 500; }
.st__frame { opacity: .6; }

/* rail */
.rail { position: fixed; right: var(--pad); top: 50%; transform: translateY(-50%); z-index: 60; display: flex; flex-direction: column; gap: 14px; mix-blend-mode: difference; }
.rail a { display: flex; align-items: center; gap: 10px; color: #fff; opacity: .45; transition: opacity .3s; }
.rail a i { display: block; width: 1px; height: 34px; background: rgba(255,255,255,.35); position: relative; overflow: hidden; }
.rail a i::after { content: ""; position: absolute; left: 0; top: 0; width: 100%; height: 100%; background: #fff; transform: scaleY(var(--p, 0)); transform-origin: top; transition: transform .15s linear; }
.rail a.is-active { opacity: 1; }
.rail a .mono { color: #fff; font-size: 10px; }

/* mobile menu */
.menu { position: fixed; inset: 0; z-index: 55; background: var(--black); padding: 100px var(--pad) 36px; display: flex; flex-direction: column; justify-content: space-between; opacity: 0; pointer-events: none; transition: opacity .35s var(--ease); }
body.menu-open .menu { opacity: 1; pointer-events: auto; }
body.menu-open { overflow: hidden; }
.menu__links { display: flex; flex-direction: column; gap: 8px; }
.menu__links a { font-family: var(--display); text-transform: uppercase; font-size: clamp(44px, 12vw, 72px); line-height: 1; display: flex; gap: 16px; align-items: baseline; color: transparent; -webkit-text-stroke: 1px var(--ink); }
.menu__links a span { font-family: var(--mono); font-size: 12px; color: var(--accent); -webkit-text-stroke: 0; }
.menu__foot { display: flex; flex-direction: column; gap: 8px; font-family: var(--mono); font-size: 12px; color: var(--mute); }

@media (max-width: 800px) {
  .hud__nav, .rail { display: none; }
  .hud__burger { display: flex; }
  .hud__sheet span:last-child { display: none; }
}

/* ---------- FRAMES ---------- */
.frame {
  position: sticky; top: 0; height: 100svh; width: 100%; overflow: hidden;
  background: var(--black); scroll-snap-align: start; isolation: isolate;
  opacity: var(--op, 1);
}
.frame__img { position: absolute; inset: 0; width: 100%; height: 100%; transform: scale(var(--sc, 1)); transform-origin: center; }
.frame__img.is-cover { object-fit: cover; object-position: center; }
.frame__img.is-contain { object-fit: contain; padding: 7svh 0; }
.frame__bg { position: absolute; inset: -10%; width: 120%; height: 120%; object-fit: cover; filter: blur(46px) brightness(.32) saturate(1.1); }
.frame__veil { position: absolute; inset: 0; pointer-events: none; background: linear-gradient(180deg, rgba(0,0,0,.28) 0%, transparent 22%, transparent 70%, rgba(0,0,0,.55) 100%); }
.frame__veil--deep { background: rgba(0,0,0,.62); }
.frame__cap { position: absolute; left: var(--pad); right: var(--pad); bottom: 18px; display: flex; justify-content: flex-end; align-items: flex-end; z-index: 2; color: var(--ink); }
.frame__cap .typed { position: absolute; left: 0; bottom: 0; padding-left: 190px; max-width: 60%; color: var(--ink); }
.frame__cap .typed::after { content: "_"; color: var(--accent); animation: blink 1s steps(2) infinite; }
.frame__cap .frame__n { color: var(--mute); }
@keyframes blink { 50% { opacity: 0; } }
@media (max-width: 800px) { .frame__cap .typed { padding-left: 0; bottom: 34px; max-width: 100%; } .frame__cap { bottom: 42px; } .hud__status { bottom: 14px; } }

/* hero */
.frame--hero .frame__veil { background: linear-gradient(180deg, rgba(0,0,0,.35), transparent 30%, transparent 45%, rgba(0,0,0,.82) 100%); }
.hero__type { position: absolute; left: var(--pad); bottom: 9svh; z-index: 2; }
.hero__type .outline { font-size: clamp(76px, 17.5vw, 300px); }
.hero__type .outline > span:nth-child(2) { color: var(--ink); -webkit-text-stroke: 0; }
.hero__meta { position: absolute; right: var(--pad); bottom: 18px; z-index: 2; display: flex; flex-direction: column; align-items: flex-end; gap: 6px; text-align: right; color: var(--ink); }
.hero__meta span:nth-child(2) { color: var(--mute); }
.hero__scroll { margin-top: 14px; display: inline-flex; align-items: center; gap: 10px; color: var(--mute); }
.hero__scroll i { display: block; width: 40px; height: 1px; background: var(--mute); transform-origin: left; animation: sweep 2s var(--ease) infinite; }
@keyframes sweep { 0% { transform: scaleX(0); } 30% { opacity: 1; } 60%, 100% { transform: scaleX(1); opacity: 0; } }
@media (max-width: 800px) { .hero__meta { left: var(--pad); right: auto; align-items: flex-start; text-align: left; bottom: 44px; } .hero__type { bottom: 30svh; } }

/* chapter title slide */
.frame--title .frame__img { filter: grayscale(.2) contrast(1.05); }
.title__type { position: absolute; left: var(--pad); right: var(--pad); bottom: 12svh; z-index: 2; display: grid; gap: 18px; max-width: 1400px; }
.title__num { color: var(--accent); }
.title__type .outline { font-size: clamp(56px, 12vw, 200px); }
.title__lede { max-width: 52ch; color: var(--ink); font-size: 15px; line-height: 1.7; margin: 0; opacity: .85; }
.title__link { color: var(--accent); border-bottom: 1px solid rgba(166,233,255,.35); justify-self: start; padding-bottom: 2px; }

/* ---------- TEXT SECTIONS ---------- */
.text, .contact { position: relative; z-index: 2; background: var(--black); border-top: 1px solid var(--line); }
.text { padding: clamp(90px, 16vh, 200px) var(--pad); }
.text__grid { display: grid; grid-template-columns: 1fr 3fr; gap: var(--pad); max-width: 1500px; }
.text__big { font-size: clamp(22px, 2.6vw, 38px); line-height: 1.3; letter-spacing: -.01em; margin: 0 0 .9em; max-width: 30ch; font-weight: 300; }
.text__meta { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 18px 32px; margin: 48px 0 0; padding-top: 22px; border-top: 1px solid var(--line); max-width: 760px; }
.text__meta dt { color: var(--dim); margin-bottom: 4px; }
.text__meta dd { margin: 0; color: var(--ink); text-transform: none; letter-spacing: .02em; }
@media (max-width: 800px) { .text__grid { grid-template-columns: 1fr; } }

.contact { padding: clamp(90px, 16vh, 200px) var(--pad) 28px; min-height: 100svh; display: flex; flex-direction: column; justify-content: space-between; gap: 48px; scroll-snap-align: start; }
.contact .outline { font-size: clamp(60px, 13vw, 220px); }
.contact__list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); max-width: 900px; }
.contact__list li { border-bottom: 1px solid var(--line); }
.contact__list a { display: grid; grid-template-columns: 40px 1fr 1.4fr; gap: 16px; padding: 18px 0; color: var(--ink); transition: padding-left .4s var(--ease), color .3s; }
.contact__list a span:first-child { color: var(--accent); }
.contact__list a span:nth-child(2) { color: var(--mute); }
.contact__list a:hover { padding-left: 10px; color: var(--accent); }
.foot { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; color: var(--dim); }
@media (max-width: 640px) { .contact__list a { grid-template-columns: 30px 1fr; } .contact__list a span:nth-child(3) { grid-column: 2; } }

/* ---------- CONTACT SHEET ---------- */
.sheet { position: fixed; inset: 0; z-index: 70; background: rgba(0,0,0,.96); display: none; flex-direction: column; }
.sheet.open { display: flex; animation: fadeIn .3s ease both; }
@keyframes fadeIn { from { opacity: 0 } to { opacity: 1 } }
body.sheet-open { overflow: hidden; }
.sheet__head { display: flex; justify-content: space-between; align-items: center; padding: 18px var(--pad); border-bottom: 1px solid var(--line); }
.sheet__body { overflow-y: auto; padding: 24px var(--pad) 60px; }
.sheet__group { margin-bottom: 40px; }
.sheet__group h3 { margin: 0 0 12px; color: var(--accent); }
.sheet__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.sheet__thumb { position: relative; background: #111; overflow: hidden; display: block; }
.sheet__thumb img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(.4) brightness(.8); transition: filter .3s, transform .5s var(--ease); }
.sheet__thumb:hover img, .sheet__thumb.is-current img { filter: none; transform: scale(1.03); }
.sheet__thumb.is-current { outline: 1px solid var(--accent); }
.sheet__thumb .mono { position: absolute; left: 6px; bottom: 4px; color: #fff; text-shadow: 0 1px 6px #000; font-size: 10px; }

/* ---------- TFP PAGE ---------- */
.page-hero { height: 100svh; position: relative; overflow: hidden; }
.page-hero .outline { font-size: clamp(56px, 13vw, 220px); }
.page-hero__type { position: absolute; left: var(--pad); right: var(--pad); bottom: 10svh; z-index: 2; display: grid; gap: 22px; }
.page-hero__lede { max-width: 58ch; margin: 0; font-size: clamp(16px, 1.6vw, 21px); line-height: 1.55; }
.page-hero__lede strong { font-weight: 500; color: var(--accent); }
.wrap { padding: 0 var(--pad); max-width: 1500px; position: relative; z-index: 2; background: var(--black); }
.cols { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 5vw, 80px); padding: clamp(70px, 12vh, 140px) 0 0; }
.cols h3, .h3 { font-family: var(--display); text-transform: uppercase; font-size: clamp(32px, 4vw, 56px); line-height: .95; margin: 0 0 20px; letter-spacing: .01em; }
.cols h3 em, .h3 em { font-style: normal; color: var(--accent); }
.cols p { color: var(--mute); font-size: 15px; line-height: 1.75; margin: 0 0 1em; }
.cols p strong { color: var(--ink); font-weight: 400; }
.steps { list-style: none; margin: 0; padding: 0; counter-reset: step; display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); border-top: 1px solid var(--line); }
.steps li { counter-increment: step; padding: 26px 24px 30px 0; border-bottom: 1px solid var(--line); }
.steps li::before { content: "0" counter(step); font-family: var(--mono); color: var(--accent); font-size: 12px; display: block; margin-bottom: 14px; }
.steps h4 { margin: 0 0 8px; font-weight: 500; font-size: 18px; }
.steps p { margin: 0; color: var(--mute); font-size: 14px; line-height: 1.7; }
.pillars { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: clamp(60px, 9vh, 100px); }
.pillar { border: 1px solid var(--line); padding: 26px; }
.pillar h4 { margin: 0 0 12px; font-family: var(--mono); font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--accent); }
.pillar.--no h4 { color: var(--mute); }
.pillar ul { margin: 0; padding: 0; list-style: none; }
.pillar li { padding: 11px 0; border-top: 1px solid var(--line); color: var(--mute); font-size: 14.5px; }
.pillar li::before { content: "— "; color: var(--dim); }
.form-wrap { margin-top: clamp(70px, 12vh, 140px); border: 1px solid var(--line); padding: clamp(28px, 5vw, 64px); }
.form-wrap__head { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: end; margin-bottom: 34px; }
.form-wrap__note { color: var(--mute); font-size: 14.5px; line-height: 1.7; margin: 0; }
.form-wrap__note em { color: var(--ink); font-style: normal; }
.form-embed { min-height: 520px; background: #f3f0ea; color: #111; padding: clamp(16px, 3vw, 36px); color-scheme: light; }
.form-embed iframe { display: block; width: 100%; }
.form-fallback { margin-top: 18px; font-size: 12.5px; color: var(--dim); }
.form-fallback a { color: var(--mute); border-bottom: 1px solid var(--line); }
@media (max-width: 800px) { .cols, .pillars, .form-wrap__head { grid-template-columns: 1fr; } }

@media (prefers-reduced-motion: reduce) {
  .frame__img { transform: none !important; }
  .frame { opacity: 1 !important; }
  .frame__cap .typed::after, .hero__scroll i { animation: none; }
}

/* =====================================================================
   v2.1 additions — preloader, letter curve, parallax, word reveal, list
   ===================================================================== */

/* hero letters: entry on cosine curve, scroll-out on the same curve */
.hero__type .outline > span { display: block; white-space: nowrap; }
.hero__type .outline .ch { display: inline-block; transform: translateY(var(--y, 0)); opacity: var(--a, 1); will-change: transform; }
.hero__type { opacity: 0; }
body.ready .hero__type { opacity: 1; }

/* parallax */
.frame.is-active .frame__img { transform: translate(var(--px, 0), var(--py, 0)) scale(calc(var(--sc, 1) + .03)); transition: transform .12s linear; }
.hero__motion { font-family: var(--mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); border-bottom: 1px solid rgba(166,233,255,.35); padding-bottom: 2px; margin-top: 6px; }
.hero__motion[hidden] { display: none; }

/* word reveal */
.words .w { color: var(--dim); transition: color .35s; }
.words .w.on { color: var(--ink); }

/* contact sheet list view */
.sheet__tools { display: flex; gap: 22px; align-items: center; }
.sheet__view { opacity: .45; } .sheet__view.is-on { opacity: 1; color: var(--accent); }
.sheet__list { list-style: none; margin: 0; padding: 0; display: none; max-width: 1100px; border-top: 1px solid var(--line); }
.sheet__body[data-view="list"] .sheet__list { display: block; }
.sheet__body[data-view="list"] .sheet__group { display: none; }
.sheet__list li { border-bottom: 1px solid var(--line); }
.sheet__list a { display: grid; grid-template-columns: 48px 1fr auto; gap: 18px; align-items: baseline; padding: 14px 0; transition: padding-left .3s var(--ease); }
.sheet__list a:hover { padding-left: 10px; }
.sheet__list a:hover .row__cap { color: var(--accent); }
.sheet__list a.is-current .row__cap { color: var(--accent); }
.row__cap { font-family: var(--display); text-transform: uppercase; font-size: clamp(22px, 3vw, 40px); line-height: 1; letter-spacing: .01em; color: var(--ink); transition: color .3s; }
.row__ch { color: var(--dim); }
.sheet__peek { position: fixed; z-index: 80; width: 300px; max-height: 300px; object-fit: contain; object-position: right bottom; pointer-events: none; opacity: 0; transform: translate(-50%, -50%) scale(.96); transition: opacity .25s, transform .4s var(--ease); left: 0; top: 0; }
.sheet__peek.on { opacity: 1; transform: translate(-50%, -50%); }
@media (max-width: 800px) { .sheet__peek { display: none; } .sheet__list a { grid-template-columns: 36px 1fr; } .row__ch { grid-column: 2; } }
@media (prefers-reduced-motion: reduce) { .hero__type .outline .ch { transition: none; } .frame.is-active .frame__img { transform: none !important; } }

/* ---------- splash (name travels into the hero) ---------- */
.splash { position: fixed; inset: 0; z-index: 100; background: var(--black); display: block; transition: background-color .9s var(--ease); }
.splash.reveal { background: transparent; pointer-events: none; }
.splash.done { display: none !important; }
body.ready .splash:not(.done) { pointer-events: none; }
body.loading { overflow: hidden; }
.splash__title { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%) translateY(12vh); font-size: clamp(44px, 9vw, 150px); padding: .18em .12em; margin: 0; opacity: 0; filter: blur(14px); will-change: transform; }
.splash__title > span:nth-child(2) { color: var(--ink); -webkit-text-stroke: 0; }
.splash.in .splash__title { opacity: 1; filter: blur(0); transform: translate(-50%, -50%); transition: transform .8s cubic-bezier(.2,.9,.2,1), filter .8s ease-out, opacity .5s ease-out; }
.splash.sharp .splash__title { filter: none; }
.splash.reveal .splash__title { transition: none; }
@media (max-width: 800px) { .splash__title { font-size: clamp(40px, 11vw, 90px); } }
@media (prefers-reduced-motion: reduce) { .splash__title, .splash { transition: none !important; } }
