/* About, Contact and Log in: one centered container, a photo header band cut from the baked
   room-dream image (no live filters), and home-style details. Prefix pg-, scoped to body.theme-dark. */
body.theme-dark {
  --pg-ink: #03061a;
  --pg-panel: #0b1433;
  --pg-phosphor: #a9dcff;
  --pg-cream: #f6f3ec;
  --pg-muted: #a7b3cf;
  --pg-line: rgba(169, 220, 255, 0.16);
  --pg-hud: "VT323", ui-monospace, "SFMono-Regular", Menlo, monospace;
}
body.theme-dark .pg-wrap { width: 100%; max-width: 1180px; margin: 0 auto;
  padding-left: max(20px, env(safe-area-inset-left, 0px)); padding-right: max(20px, env(safe-area-inset-right, 0px)); }

/* ── header band ───────────────────────────────────────── */
body.theme-dark .pg-hero { position: relative; height: 420px; overflow: hidden; display: flex; align-items: flex-end; isolation: isolate; }
body.theme-dark .pg-hero-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -3; }
body.theme-dark .pg-hero::before { /* scanlines + legibility shade + fade into the page */
  content: ""; position: absolute; inset: 0; z-index: -2; pointer-events: none;
  background:
    repeating-linear-gradient(to bottom, rgba(169, 220, 255, 0.06) 0 2px, transparent 2px 4px),
    linear-gradient(90deg, rgba(3, 6, 26, 0.72) 0%, rgba(3, 6, 26, 0.45) 55%, rgba(3, 6, 26, 0.25) 100%),
    linear-gradient(to bottom, rgba(3, 6, 26, 0.2) 0%, rgba(3, 6, 26, 0.35) 45%, rgba(3, 6, 26, 0.82) 82%, #03061a 100%);
}
body.theme-dark .pg-grain { position: absolute; inset: -50%; z-index: -1; pointer-events: none; opacity: 0.22; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.62' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); animation: pg-grain 1s steps(6) infinite; }
@keyframes pg-grain { 0% { transform: translate(0, 0); } 20% { transform: translate(-3%, 2%); } 40% { transform: translate(2%, -3%); }
  60% { transform: translate(-2%, -1%); } 80% { transform: translate(3%, 3%); } 100% { transform: translate(0, 0); } }
body.theme-dark .pg-hero .pg-wrap { padding-bottom: 44px; }
body.theme-dark .pg-eyebrow { margin: 0 0 10px; font-family: var(--pg-hud); font-size: 22px; line-height: 1.2; letter-spacing: 0.06em; color: var(--pg-phosphor); }
body.theme-dark .pg-hero h1 { margin: 0 0 14px; max-width: 18ch; font-size: clamp(34px, 4.6vw, 60px); line-height: 1; letter-spacing: -0.03em; color: var(--pg-cream);
  text-shadow: 0 2px 24px rgba(3, 6, 26, 0.6); }
body.theme-dark .pg-hero .pg-lede { margin: 0; max-width: 54ch; font-size: clamp(16px, 1.4vw, 19px); line-height: 1.55; color: #e3e8f4;
  text-shadow: 0 1px 12px rgba(3, 6, 26, 0.7); }
body.page-about .pg-hero-img { object-position: 72% 40%; }
body.page-contact .pg-hero-img { object-position: 6% 46%; }
body.page-login .pg-hero-img { object-position: 40% 16%; }

/* ── sections ──────────────────────────────────────────── */
body.theme-dark .pg-section { padding: 56px 0 24px; }
body.theme-dark .pg-section:last-child { padding-bottom: 96px; }
body.theme-dark .pg-section h2 { margin: 0 0 22px; font-size: clamp(26px, 3vw, 36px); }
body.theme-dark .pg-num { display: block; margin-bottom: 8px; font-family: var(--pg-hud); font-size: 22px; color: var(--pg-phosphor); }
body.theme-dark .pg-card { padding: 22px; border-radius: 14px; background: var(--pg-panel); border: 1px solid var(--pg-line); }
body.theme-dark .pg-card h3 { margin: 0 0 6px; }
body.theme-dark .pg-card p { margin: 0; color: var(--pg-muted); }

/* About: founders with the lens treatment */
body.page-about .pg-founders { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; margin: 0; padding: 0; list-style: none; }
body.page-about .pg-founder { display: flex; flex-direction: column; gap: 14px; }
body.page-about .pg-founder h3 { margin: 0; font-size: 1.35rem; }
body.page-about .pg-founder > .role { margin: 0; color: var(--pg-muted); }
body.page-about .pg-founder > p { margin: 0; }
/* Headshot: 4:5 frame with the cards' radius and hairline border */
body.page-about .pg-photo { display: block; margin: 0 0 4px; aspect-ratio: 4 / 5; border-radius: 14px; overflow: hidden; border: 1px solid var(--pg-line); background: var(--pg-panel); }
body.page-about .pg-photo img { display: block; width: 100%; height: 100%; object-fit: cover; }
body.page-about .pg-beliefs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; margin: 0; padding: 0; list-style: none; }
body.page-about .pg-closing-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 24px;
  padding-top: 22px; border-top: 1px solid var(--pg-line); }
body.page-about .pg-closing-row p { margin: 0; font-family: var(--pg-hud); font-size: 20px; color: var(--pg-muted); }
body.page-about .pg-inspo .prose { max-width: 64ch; }

/* Contact: CRT panel around the form */
body.page-contact .pg-contact { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr); gap: 32px; align-items: start; }
body.page-contact .pg-crt { position: relative; padding: 28px; border-radius: 22px / 26px; background: radial-gradient(120% 90% at 50% 40%, #0e1d52, #0a1440 70%);
  border: 1px solid rgba(169, 220, 255, 0.4); box-shadow: inset 0 0 60px rgba(120, 180, 255, 0.12), inset 0 0 0 1px rgba(3, 6, 26, 0.6), 0 24px 60px rgba(0, 0, 0, 0.35); overflow: hidden; }
body.page-contact .pg-crt::before { content: ""; position: absolute; inset: 0; pointer-events: none; border-radius: inherit;
  background: repeating-linear-gradient(to bottom, rgba(169, 220, 255, 0.045) 0 2px, transparent 2px 4px); }
body.page-contact .pg-crt > * { position: relative; }
body.page-contact .pg-crt .contact-form { max-width: none; }
body.page-contact .pg-aside { display: flex; flex-direction: column; gap: 16px; }
body.page-contact .pg-aside h2 { margin: 0 0 8px; font-size: 1.25rem; letter-spacing: -0.01em; }
body.page-contact .pg-aside .pg-card p + p { margin-top: 12px; }
body.page-contact .pg-aside a { font-weight: 600; }
body.page-contact .pg-sent { display: flex; align-items: center; justify-content: center; gap: 10px; text-align: center; font-weight: 600; color: var(--pg-cream);
  animation: pg-in 0.3s ease-out both; outline: none; }
body.page-contact .pg-sent svg { flex: none; color: var(--pg-phosphor); }
body.page-contact .pg-form-error { margin: 0; font-size: 0.92rem; color: #ffc4dd; }
@keyframes pg-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* Log in: the card powers on like the home CRT (.crt-on, in site.css) */
body.page-login .pg-login { display: flex; justify-content: flex-start; }
body.page-login .pg-login-card { position: relative; width: min(28rem, 100%); padding: 28px; border-radius: 18px; background: var(--pg-panel);
  border: 1px solid rgba(169, 220, 255, 0.3); box-shadow: inset 0 0 50px rgba(120, 180, 255, 0.1), 0 24px 60px rgba(0, 0, 0, 0.35); }
body.page-login .pg-login-card .login-form { max-width: none; }
/* The card has always held its last frame (fill both); keep that so it renders exactly as before. */
body.page-login .pg-login-card { --crt-fill: both; }

@media (max-width: 860px) {
  body.page-contact .pg-contact { grid-template-columns: minmax(0, 1fr); }
  body.page-about .pg-beliefs { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
  body.theme-dark .pg-hero { height: 300px; }
  body.theme-dark .pg-hero .pg-wrap { padding-bottom: 28px; }
  body.page-about .pg-founders { grid-template-columns: minmax(0, 360px); justify-content: center; }
}
@media (prefers-reduced-motion: reduce) {
  body.theme-dark .pg-grain { animation: none; }
}
