/* Shared look — taken from ~/Projects/portfolio (pill nav, navy halftone hero, type) */
:root {
  --page: #f6f3ee;
  --ink: #16141a;
  --muted: #6b6560;
  --line: rgba(22, 20, 26, 0.1);
  --navy: #142448;
  --navy-dark: #0a142c;
  --navy-soft: #b9cdf0;
  --red: #7b1e26;
  --card: #fff;
  --ok: #1f7a4d;
  --warn: #b4532a;
  --ease: cubic-bezier(.65, 0, .35, 1);
  --ease-out: cubic-bezier(.22, .8, .24, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  color: var(--ink); line-height: 1.5; background: var(--page);
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
em { font-style: italic; }
h1, h2, h3 {
  font-family: 'Fraunces', Georgia, serif; font-weight: 500; letter-spacing: -0.02em; line-height: 1.08;
  font-variation-settings: 'opsz' 96, 'SOFT' 50;
}
h1 em, h2 em, h3 em { font-weight: 400; }
[hidden] { display: none !important; }

/* ---------- Floating glass pill nav ---------- */
.pill-nav {
  isolation: isolate; --glass-ink: #16141a; --glass-tint: rgba(255, 255, 255, .08);
  position: fixed; top: 14px; left: 0; right: 0; margin: 0 auto; z-index: 50;
  width: min(560px, calc(100% - 28px));
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 7px 7px 7px 10px; border-radius: 22px; color: var(--glass-ink); transition: color .4s ease;
  backdrop-filter: blur(20px) saturate(180%); -webkit-backdrop-filter: blur(20px) saturate(180%);
}
.pill-nav::before {
  content: ''; position: absolute; inset: 0; z-index: -1; border-radius: inherit;
  background: linear-gradient(180deg, rgba(255,255,255,.3) 0%, rgba(255,255,255,.04) 46%, rgba(255,255,255,0) 54%, rgba(255,255,255,.1) 100%), var(--glass-tint);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.75), inset 0 -1px 0 rgba(255,255,255,.18), inset 1px 0 0 rgba(255,255,255,.28), inset -1px 0 0 rgba(255,255,255,.28),
    inset 0 0 18px rgba(255,255,255,.14), 0 0 0 .5px rgba(0,0,0,.08), 0 10px 30px -10px rgba(0,0,0,.22), 0 1px 2px rgba(0,0,0,.06);
}
.pill-nav::after {
  content: ''; position: absolute; inset: 0; z-index: -1; border-radius: inherit; padding: 1px; pointer-events: none;
  background: linear-gradient(135deg, rgba(255,255,255,.9), rgba(255,255,255,.15) 40%, rgba(255,255,255,.05) 60%, rgba(255,255,255,.6));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude;
}
.pill-nav.on-dark { --glass-ink: #fff; --glass-tint: rgba(255, 255, 255, .1); }
.pill-brand { display: inline-flex; align-items: center; gap: 10px; padding-left: 6px; font-weight: 700; font-size: 14px; font-family: 'Inter Tight', 'Inter', sans-serif; white-space: nowrap; }
.pill-brand img { width: 22px; height: 22px; border-radius: 5px; }
.pill-tag { font-size: 12px; font-weight: 600; opacity: .7; padding-right: 10px; white-space: nowrap; }
.pill-links { display: flex; align-items: center; gap: 2px; min-width: 0; overflow-x: auto; scrollbar-width: none; }   /* too many links for the pill: they scroll inside it */
.pill-links::-webkit-scrollbar { display: none; }
.pill-links > * { flex: none; }
.pill-links a, .pill-links button {
  border: 0; background: none; cursor: pointer; padding: 7px 12px; border-radius: 14px;
  font-family: 'Inter Tight', 'Inter', sans-serif; font-size: 14px; font-weight: 600; white-space: nowrap; transition: background .2s;
}
.pill-links a:hover, .pill-links button:hover, .pill-links a.on { background: rgba(255,255,255,.35); }
.pill-nav.on-dark .pill-links a:hover, .pill-nav.on-dark .pill-links a.on { background: rgba(255,255,255,.14); }

/* ---------- Navy halftone hero window ---------- */
.intro {
  position: relative; overflow: hidden; margin: 12px 12px 0; border-radius: 28px;
  min-height: 640px; height: calc(100svh - 24px); background: var(--navy); color: #fff;
}
.intro-dots { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.intro::after { content: ''; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(34% 34% at 50% 58%, rgba(10, 20, 44, .72), rgba(10, 20, 44, 0) 100%); transition: opacity 2.4s ease-in-out; }
.intro.is-mono { background: var(--page); }
.intro.is-mono::after { opacity: 0; }
.intro-inner {
  position: relative; z-index: 2; height: 100%;
  display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center;
  padding: 90px clamp(20px, 5vw, 72px) 70px;
}
.mega {
  position: relative; font-family: 'Fraunces', Georgia, serif; font-weight: 400;
  font-variation-settings: 'opsz' 144, 'SOFT' 100, 'WONK' 0;
  letter-spacing: -.03em; line-height: .9; font-size: clamp(3rem, 8vw, 7.6rem);
}
.mega em { font-style: italic; font-weight: 300; }
.mega-line { display: block; overflow: hidden; padding: .12em 0 .2em; margin: -.12em 0 -.2em; }
.mega-line > span {
  display: inline-block; color: transparent;
  background: linear-gradient(180deg, #ffffff 30%, #d6e2f6 100%); -webkit-background-clip: text; background-clip: text;
  padding: .12em .14em .28em; margin: -.12em -.14em -.28em;
}
.intro-lede { margin-top: 22px; max-width: 30em; font-size: clamp(16px, 1.5vw, 19px); opacity: .9; }
.intro-lede em { font-family: 'Fraunces', Georgia, serif; font-style: italic; color: var(--navy-soft); }
.intro-foot { pointer-events: none; position: absolute; left: clamp(20px, 5vw, 72px); right: clamp(20px, 5vw, 72px); bottom: 26px; display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; }
.intro-year { font-family: 'Fraunces', Georgia, serif; font-weight: 400; font-variation-settings: 'opsz' 144, 'SOFT' 100; font-size: clamp(1.8rem, 3.2vw, 2.8rem); letter-spacing: -.01em; }
.intro-meta { font-size: 13px; font-weight: 600; letter-spacing: .04em; opacity: .85; text-align: right; }
.intro-lede, .intro-foot { text-shadow: 0 2px 2px rgba(4, 8, 22, .8), 0 6px 20px rgba(4, 8, 22, .7); }

/* the live logo tile (canvas): navy halftone + white stripes, revealed like blinds */
.logo-tile { display: block; width: 100%; aspect-ratio: 1; border-radius: 8.4%; box-shadow: 0 0 0 3px rgba(255,255,255,.45), 0 40px 80px -36px rgba(10, 20, 44, .6); }

/* ---------- Buttons + fields ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; white-space: nowrap;
  padding: 12px 22px; border-radius: 999px; border: 0; cursor: pointer;
  background: var(--ink); color: #fff; font-weight: 700; font-size: 15px; transition: transform .2s, box-shadow .2s, background .2s;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: scale(.97); }
.btn--light { background: #fff; color: var(--navy); box-shadow: 0 8px 24px -8px rgba(6, 12, 30, .7); }
.btn--navy { background: var(--navy); color: #fff; }
.btn--ghost { background: transparent; color: inherit; box-shadow: inset 0 0 0 1.5px var(--line); }
.btn--sm { padding: 8px 14px; font-size: 13px; }
.btn--danger { background: transparent; color: var(--red); box-shadow: inset 0 0 0 1.5px rgba(123,30,38,.3); }
.btn-link { white-space: nowrap; background: none; border: 0; border-bottom: 1.5px solid currentColor; cursor: pointer; padding: 0 0 2px; font-weight: 600; font-size: 15px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}

/* ============ PAGE TRANSITIONS (browser-native, cross-document — same idea as the portfolio) ============
 * Every page is one continuous surface: the nav stays put, the navy panel reshapes into the next page's
 * panel (its dots keep moving — see the shared clock in halftone.js), the title slides and the content
 * glides in the direction you travel: deeper = left, back = right, same page (form saved) = soft fade.
 * The direction type is set in partials/head.ejs.
 */
@view-transition { navigation: auto; }
.pill-nav { view-transition-name: site-nav; }
.intro, .band { view-transition-name: hero-panel; }
.band h1, .intro .mega { view-transition-name: page-title; }
.band .crumbs { view-transition-name: page-crumbs; }
.wrap, .client-wrap { view-transition-name: page-body; }

::view-transition-group(*) { animation-duration: .8s; animation-timing-function: cubic-bezier(.65, 0, .35, 1); }

/* navy panel: one shape morphing between pages; old and new contents cross-fade inside it */
::view-transition-group(hero-panel) { background: #142448; border-radius: 28px; overflow: hidden; }
::view-transition-old(hero-panel), ::view-transition-new(hero-panel) { height: 100%; object-fit: cover; object-position: top left; }
::view-transition-old(hero-panel) { animation: .45s ease both vt-fade-out; }
::view-transition-new(hero-panel) { animation: .5s .05s ease both vt-fade-in; }

/* the nav is the same on every page: no blink */
::view-transition-old(site-nav) { animation: none; opacity: 0; }
::view-transition-new(site-nav) { animation: none; }

/* default (no direction known): old drifts up, new rises in */
::view-transition-old(page-body), ::view-transition-old(page-title), ::view-transition-old(page-crumbs) { animation: .35s cubic-bezier(.65, 0, .35, 1) both vt-out-up; }
::view-transition-new(page-body), ::view-transition-new(page-title), ::view-transition-new(page-crumbs) { animation: .7s .12s cubic-bezier(.22, .8, .24, 1) both vt-in-up; }
::view-transition-old(root) { animation: .3s ease both vt-fade-out; }
::view-transition-new(root) { animation: .45s .1s ease both vt-fade-in; }

/* going deeper (dashboard → client → project): everything travels left */
html:active-view-transition-type(forward)::view-transition-old(page-body),
html:active-view-transition-type(forward)::view-transition-old(page-title),
html:active-view-transition-type(forward)::view-transition-old(page-crumbs) { animation: .4s cubic-bezier(.65, 0, .35, 1) both vt-out-left; }
html:active-view-transition-type(forward)::view-transition-new(page-body),
html:active-view-transition-type(forward)::view-transition-new(page-title),
html:active-view-transition-type(forward)::view-transition-new(page-crumbs) { animation: .75s .1s cubic-bezier(.22, .8, .24, 1) both vt-in-right; }
html:active-view-transition-type(forward)::view-transition-new(page-body) { animation-delay: .18s; }

/* going back up: everything travels right */
html:active-view-transition-type(back)::view-transition-old(page-body),
html:active-view-transition-type(back)::view-transition-old(page-title),
html:active-view-transition-type(back)::view-transition-old(page-crumbs) { animation: .4s cubic-bezier(.65, 0, .35, 1) both vt-out-right; }
html:active-view-transition-type(back)::view-transition-new(page-body),
html:active-view-transition-type(back)::view-transition-new(page-title),
html:active-view-transition-type(back)::view-transition-new(page-crumbs) { animation: .75s .1s cubic-bezier(.22, .8, .24, 1) both vt-in-left; }
html:active-view-transition-type(back)::view-transition-new(page-body) { animation-delay: .18s; }

/* same page again (a form was saved): no travel, a quick soft fade; the panel doesn't move */
html:active-view-transition-type(same)::view-transition-group(*) { animation-duration: .35s; }
html:active-view-transition-type(same)::view-transition-old(page-body),
html:active-view-transition-type(same)::view-transition-old(page-title),
html:active-view-transition-type(same)::view-transition-old(page-crumbs) { animation: .2s ease both vt-fade-out; }
html:active-view-transition-type(same)::view-transition-new(page-body),
html:active-view-transition-type(same)::view-transition-new(page-title),
html:active-view-transition-type(same)::view-transition-new(page-crumbs) { animation: .35s ease both vt-fade-in; }

/* signing in: the full-screen hero shrinks into the dashboard panel, the big title glides into the page title */
html:active-view-transition-type(enter)::view-transition-group(hero-panel),
html:active-view-transition-type(enter)::view-transition-group(page-title) { animation-duration: 1.05s; animation-timing-function: cubic-bezier(.76, 0, .24, 1); }
html:active-view-transition-type(enter)::view-transition-old(page-title) { animation: .5s ease both vt-fade-out; }
html:active-view-transition-type(enter)::view-transition-new(page-title) { animation: .6s .4s ease both vt-fade-in; }
html:active-view-transition-type(enter)::view-transition-new(page-body) { animation: .9s .45s cubic-bezier(.22, .8, .24, 1) both vt-in-up; }

@keyframes vt-fade-out { to { opacity: 0; } }
@keyframes vt-fade-in { from { opacity: 0; } }
@keyframes vt-out-up { to { opacity: 0; transform: translateY(-40px); } }
@keyframes vt-in-up { from { opacity: 0; transform: translateY(60px); } }
@keyframes vt-out-left { to { opacity: 0; transform: translateX(-80px); } }
@keyframes vt-in-right { from { opacity: 0; transform: translateX(120px); } }
@keyframes vt-out-right { to { opacity: 0; transform: translateX(80px); } }
@keyframes vt-in-left { from { opacity: 0; transform: translateX(-120px); } }
@media (prefers-reduced-motion: reduce) {
  ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation: none !important; }
}

/* phones: nothing may push the page sideways (iPhone pans the whole page otherwise; clip keeps sticky elements working) */
html, body { overflow-x: clip; }
@media (max-width: 480px) {
  .pill-brand { font-size: 0; gap: 0; }                  /* just the logo */
  .pill-links a, .pill-links button { padding: 7px 9px; font-size: 13px; }
}
