/* Orlando Nell — night-field edition. Loaded after the legacy page styles. */
:root {
  color-scheme: dark;
  --paper: #101716;
  --panel: #18211f;
  --ink: #e8e8dc;
  --muted: #a6b2aa;
  --line: #35413d;
  --route: #d4a66a;
  --route-text: #efc48e;
  --kraft: #202b27;
  --grid: rgb(179 193 181 / .06);
  --bg: var(--paper);
  --bg-card: var(--panel);
  --text: var(--ink);
  --text-muted: var(--muted);
  --font-display: "Reference Archivo", "Public Sans", sans-serif;
  --font-body: "Public Sans Local", "Public Sans", ui-sans-serif, system-ui, sans-serif;
  --font-mono: "Reference Mono", ui-monospace, monospace;
}
html { color-scheme: dark; scroll-behavior: smooth; scroll-padding-top: 78px; }
body, html[data-theme="dark"] body {
  background: #101716 !important; color: #e8e8dc !important;
  background-image: radial-gradient(ellipse at 50% -20%, #25332e 0, transparent 47%) !important;
}
body::after { opacity: .06 !important; mix-blend-mode: screen !important; }
body::before { opacity: .18 !important; }
a { color: inherit; }
.navbar {
  height: 64px; min-height: 64px; padding-inline: max(20px, calc((100vw - 1280px)/2 + 24px));
  gap: 20px; border-bottom: 1px solid rgb(230 230 215 / .12);
  background: rgb(15 22 20 / .74) !important; backdrop-filter: blur(16px);
  box-shadow: none !important;
}
.navbar .logo { color: #f0eee3; font-size: 17px; letter-spacing: .04em; text-transform: none; }
.navbar .logo::before { background-color: #d4a66a; border-radius: 50%; width: 8px; height: 8px; margin-right: 3px; }
.navbar .nav-links a { color: #b8c1bb; transition: color .2s ease; }
.navbar .nav-links a:hover, .navbar .nav-links a[aria-current="page"] { color: #f1c58e; }
.navbar .menu-btn { color: #e8e8dc; }
body .hero, body .page-header, body .sf911-hero, body .records-hero,
body.contact-page .hero, body.page-legal .page-header {
  background-color: #141c19; background-image: none; border-color: var(--line);
}
body:not(.home-page) .hero, body.contact-page .hero, body .page-header {
  color: var(--ink); padding: clamp(52px, 9vw, 110px) max(20px, calc((100vw - 1200px)/2 + 24px)) 60px;
}
body .hero h1, body.contact-page .hero h1, body .page-header h1, body .sf911-hero h1, body .records-hero h1 {
  color: #efeee4; font-family: var(--font-display); font-stretch: 85%; font-weight: 600;
  text-transform: none; letter-spacing: -.055em; line-height: .98;
}
body .hero h1 em, body .page-header h1 em, body .sf911-hero h1 em, body .records-hero h1 em {
  color: #e0b77f !important; background: transparent; padding: 0; font-weight: 400;
}
.hero-eyebrow, .sf911-hero .section-eyebrow, .records-hero .section-eyebrow {
  border: 0; background: transparent; color: #d7b987; padding: 0; transform: none;
}
.section, body .section { background: transparent !important; color: var(--ink); }
.section-title, h1, h2, h3, h4 { color: #e9e8df; }
.section-title { font-weight: 500; letter-spacing: -.045em; text-transform: none; }
.section-eyebrow { color: #d3b27f; }
.card, .content-section, .slot, .faq, .notice {
  border: 1px solid #34403b !important; border-radius: 2px !important;
  background: #18211f !important; color: var(--ink) !important;
  box-shadow: none !important;
}
.card:hover { border-color: #8f7859 !important; transform: translateY(-3px); }
.card-body p, .lead, .muted, .list li { color: #b1bcb5 !important; }
body .hero p, body .page-header p,
body .sf911-hero p, body .records-hero p {
  color: var(--muted) !important;
}
.card-body figcaption {
  background: var(--panel);
  color: var(--muted) !important;
}
.contact-page .support-sidebar {
  border-color: var(--line);
  background: var(--panel);
  color: var(--ink);
  box-shadow: none;
}
.contact-page .support-sidebar > h3 { color: var(--ink); }
.card-header h3, .content-section h2 { color: #ebe9df; }
.btn, .hero-btn, .cta-button, .primary {
  border: 1px solid #d2aa73 !important; border-radius: 2px !important;
  background: #d2aa73 !important; color: #18201d !important;
  box-shadow: none !important; transition: background .2s ease, color .2s ease, transform .2s ease;
}
.btn:hover, .hero-btn:hover, .cta-button:hover, .primary:hover {
  background: #edc58e !important; color: #101716 !important; transform: translateY(-2px);
}
button, input, select, textarea { font: inherit; }
input, select, textarea {
  background: #101816 !important; color: #ecece2 !important; border-color: #53615a !important;
}
input::placeholder, textarea::placeholder { color: #9ca8a0; }
.legal-section a:not(.btn), .breadcrumb a, .breadcrumbs a,
#contactForm a:not(.btn), #contactForm label[for^="security"] { color: #e2b97f !important; }
.footer, footer { background: #0b100f !important; color: #d8d9ce !important; border-color: #35413d !important; }
.footer a, footer a { color: #c5c9be; }
.field-strip { color: #d9d9cd; background: #17201d; border-color: #34403b; }
.skip-link { background: #edc58e; color: #101716; }
:focus-visible { outline: 3px solid #e5ba7c !important; outline-offset: 4px !important; }
#main-content:focus-visible { outline-color: #e5ba7c; }
.reveal { transition: opacity .7s ease, transform .7s cubic-bezier(.2,.7,.2,1); }
.reveal:not(.visible) { opacity: 0; transform: translateY(18px); }
.visible { opacity: 1; transform: translateY(0); }

/* Original editorial homepage */
.home-page { padding-top: 64px; background: #101716 !important; }
.home-page .hero {
  min-height: min(800px, calc(100svh - 64px)); margin: 0; padding: 0;
  display: grid; align-items: end; position: relative; overflow: hidden; isolation: isolate;
  border: 0; background: #111a18;
}
.home-page .hero::before {
  content: ""; position: absolute; inset: 0; z-index: -2;
  background: linear-gradient(90deg, rgb(8 14 13 / .92) 0%, rgb(8 14 13 / .62) 48%, rgb(8 14 13 / .12) 100%),
    linear-gradient(0deg, #101716 0%, transparent 44%), url("night-field.svg") center / cover no-repeat;
  animation: scene-arrive 1.4s ease both;
}
.home-page .hero::before,
.home-page .hero::after {
  display: block;
  inset: 0;
  width: 100%;
  height: 100%;
  clip-path: none;
  border: 0;
  border-radius: 0;
}
.home-page .hero::after {
  content: ""; position: absolute; inset: 0; z-index: -1; opacity: .4; pointer-events: none;
  background: linear-gradient(180deg, rgb(8 14 13 / .42), transparent 30%, transparent 75%, #101716);
}
.home-page .hero-route { display: none; }
.home-page .hero-main { width: min(1280px, 100%); padding: clamp(100px, 14vh, 150px) 24px 80px; margin: 0 auto; }
.home-page .hero-copy { max-width: 780px; }
.home-page .hero-label { display: flex; justify-content: space-between; gap: 16px; margin: 0 0 28px; }
.home-page .hero-eyebrow { color: #e3c28e; font: 500 10px/1.5 var(--font-mono); letter-spacing: .18em; }
.home-page .log-number { color: #b1b9af; font: 400 10px/1.5 var(--font-mono); letter-spacing: .16em; }
.home-page .hero h1 {
  max-width: 760px; margin: 0; color: #f1f0e7; font-size: clamp(58px, 10vw, 126px);
  font-weight: 400; line-height: .91; letter-spacing: -.07em; text-transform: none;
  animation: copy-arrive .95s .12s both;
}
.home-page .hero h1 span { display: block; font-stretch: 100%; }
.home-page .hero h1 em {
  display: block; margin: 15px 0 0; padding: 0; width: auto; color: #d8b77e !important;
  background: transparent; font-style: normal; font-size: .35em; font-weight: 400;
  line-height: 1.3; letter-spacing: .03em; text-transform: uppercase;
}
.home-page .hero p { max-width: 500px; margin: 24px 0 0; color: #d4d7cd; font-size: clamp(16px, 2vw, 19px); line-height: 1.7; }
.home-page .hero-buttons { display: flex; flex-wrap: wrap; align-items: center; gap: 24px; margin-top: 32px; }
.home-page .hero-btn { min-height: 48px; padding: 13px 19px; font-size: 12px; letter-spacing: .12em; text-transform: uppercase; }
.home-page .hero-btn::before { content: none; }
.home-page .hero-caption { color: #abb4ab; font: 400 10px/1.5 var(--font-mono); letter-spacing: .14em; }
.home-page .hero-scroll {
  position: absolute; right: max(24px, calc((100vw - 1232px)/2)); bottom: 34px;
  color: #b7beb5; font: 10px/1.4 var(--font-mono); letter-spacing: .16em; text-transform: uppercase;
  writing-mode: vertical-rl; text-decoration: none;
}
.home-page .hero-scroll::after { content: ""; display: inline-block; width: 1px; height: 48px; margin: 12px auto 0; background: #d2aa73; }
.home-page .field-strip {
  min-height: 58px; justify-content: flex-start; gap: 18px; padding: 16px max(24px, calc((100vw - 1232px)/2));
  border: 0; border-top: 1px solid #34403b; border-bottom: 1px solid #34403b; background: #121a18;
  color: #c3c8bd; font-size: 9px; letter-spacing: .16em;
}
.home-page .field-strip i { width: 3px; height: 3px; background: #d2aa73; }
.home-page .section { padding: clamp(72px, 10vw, 132px) 0; }
.home-page .container { max-width: 1232px; }
.home-page .section-title { max-width: 800px; margin: 10px 0 26px; font-size: clamp(38px, 6vw, 68px); line-height: .98; }
.home-page .section-intro { max-width: 620px; margin: 0; color: #aeb9b1; font-size: 17px; line-height: 1.75; }
.home-page #dispatch { padding-top: clamp(82px, 11vw, 144px); background: transparent !important; }
.home-page .dispatch-layout { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); gap: clamp(40px, 9vw, 130px); align-items: start; }
.home-page .dispatch-aside { position: sticky; top: 112px; }
.home-page .dispatch-aside .section-title { font-size: clamp(42px, 6vw, 76px); }
.home-page .dispatch-list { border-top: 1px solid #39433e; }
.home-page .dispatch-item {
  display: grid; grid-template-columns: 42px 1fr; gap: 18px; padding: 25px 0;
  border-bottom: 1px solid #39433e; color: inherit; text-decoration: none;
  transition: padding .25s ease, color .25s ease;
}
.home-page .dispatch-item:hover { padding-inline: 8px; color: #f0c68c; }
.home-page .dispatch-num { padding-top: 4px; color: #c9a879; font: 10px/1.6 var(--font-mono); }
.home-page .dispatch-item h3 { margin: 0 0 8px; font-size: clamp(22px, 2.8vw, 31px); font-weight: 400; letter-spacing: -.04em; text-transform: none; }
.home-page .dispatch-item p { max-width: 460px; margin: 0; color: #aab5ad; font-size: 14px; line-height: 1.7; }
.home-page .dispatch-arrow { display: block; margin-top: 16px; color: #d1ae79; font: 10px/1.4 var(--font-mono); letter-spacing: .12em; text-transform: uppercase; }
.home-page .dispatch-arrow::after { content: "  ↗"; }
.home-page .night-note {
  position: relative; overflow: hidden; padding: clamp(34px, 6vw, 74px);
  border-block: 1px solid #35413d; background: linear-gradient(120deg, #19231f, #111917 75%);
}
.home-page .night-note::after {
  content: ""; position: absolute; right: -6%; top: -25%; width: min(48vw, 580px); aspect-ratio: 1;
  border: 1px solid rgb(210 170 115 / .18); border-radius: 50%;
  box-shadow: 0 0 0 38px rgb(210 170 115 / .025), 0 0 0 90px rgb(210 170 115 / .02);
  pointer-events: none;
}
.home-page .night-note blockquote { position: relative; z-index: 1; max-width: 850px; margin: 0; color: #ebe9dd; font-size: clamp(30px, 5.2vw, 62px); line-height: 1.12; letter-spacing: -.045em; }
.home-page .night-note p { position: relative; z-index: 1; max-width: 510px; margin: 26px 0 0; color: #afbab1; line-height: 1.8; }
.home-page .project-section { padding-top: clamp(76px, 9vw, 116px); }
.home-page .project-heading { display: flex; justify-content: space-between; align-items: end; gap: 30px; margin-bottom: 38px; }
.home-page .project-heading .section-title { margin-bottom: 0; }
.home-page .project-heading p { max-width: 360px; color: #aab5ad; line-height: 1.7; }
.home-page .project-grid { display: grid; grid-template-columns: 1.2fr .8fr; gap: 18px; }
.home-page .project-panel {
  position: relative; min-height: 310px; padding: clamp(24px, 4vw, 44px); overflow: hidden;
  border: 1px solid #35413d; background: #18211f; display: flex; flex-direction: column; justify-content: end;
}
.home-page .project-panel:first-child { min-height: 420px; background: linear-gradient(0deg, rgb(13 19 17 / .95), rgb(13 19 17 / .08) 90%), url("rail-yard.svg") center / cover no-repeat; }
.home-page .project-panel:nth-child(2) { background: linear-gradient(145deg, #202823, #131a18 70%); }
.home-page .project-panel .project-mark { position: absolute; top: 25px; left: 26px; color: #d5b681; font: 10px/1.5 var(--font-mono); letter-spacing: .15em; text-transform: uppercase; }
.home-page .project-panel h3 { margin: 0 0 10px; font-size: clamp(26px, 3.4vw, 42px); font-weight: 400; letter-spacing: -.04em; text-transform: none; }
.home-page .project-panel p { max-width: 440px; margin: 0; color: #b0bbb2; line-height: 1.7; }
.home-page .project-panel a { display: inline-block; width: fit-content; margin-top: 20px; color: #e2bd86; font: 10px/1.5 var(--font-mono); letter-spacing: .14em; text-decoration: none; text-transform: uppercase; }
.home-page .project-panel a:hover { color: #f5d7a8; }
.home-page .service-band { display: grid; grid-template-columns: 1fr auto; gap: 30px; align-items: center; padding: 38px 0; border-block: 1px solid #35413d; }
.home-page .service-band h3 { margin: 0; font-size: clamp(26px, 4vw, 42px); font-weight: 400; letter-spacing: -.04em; text-transform: none; }
.home-page .service-band p { max-width: 580px; margin: 12px 0 0; color: #abb6ae; line-height: 1.7; }
.home-page .service-band .btn { white-space: nowrap; }
.home-page .explore-links { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 32px; }
.home-page .explore-links a { padding: 12px 15px; border: 1px solid #3b4640; color: #c6cdc2; font: 10px/1.5 var(--font-mono); letter-spacing: .1em; text-decoration: none; text-transform: uppercase; transition: border-color .2s ease, color .2s ease; }
.home-page .explore-links a:hover { border-color: #d2aa73; color: #e3bd86; }
.home-page .footer { border-top: 1px solid #34403b; }
.home-page .footer .logo { color: #f0eee3; }
@keyframes scene-arrive { from { opacity: .4; transform: scale(1.025); } to { opacity: 1; transform: scale(1); } }
@keyframes copy-arrive { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: translateY(0); } }

/* Supporting pages retain their original structure, forms, map controls and legal copy. */
body:not(.home-page) .navbar .nav-links a { color: #b8c1bb; }
body:not(.home-page) .navbar .nav-links a:hover { color: #f1c58e; }
.mobile-menu.active, .navbar.mobile-open .nav-links { background: #141c19 !important; border-color: #35413d !important; }
.mobile-menu a { color: #e4e5da !important; }
.content-section, .legal-section, .form-section { color: var(--ink); }
table { color: var(--ink); }
th, td { border-color: #3b4741 !important; }
pre, code { background: #0c1210 !important; color: #dfc18e !important; }
.september11-memorial { background: #101716; color: var(--ink); }
.september11-memorial h1, .september11-memorial h2 { color: var(--ink); }

/* Dark is the default; explicit legacy light-theme choices remain functional. */
html[data-theme="light"] {
  color-scheme: light;
  --paper: #efeee6;
  --panel: #f8f6ee;
  --ink: #293831;
  --muted: #58655d;
  --text: #293831;
  --text-muted: #58655d;
  --line: #c8cbbd;
  --route: #956b3c;
  --route-text: #704c27;
  --kraft: #e3dfd2;
  --bg: var(--paper);
  --bg-card: var(--panel);
  --fg: var(--ink);
  --fg-muted: var(--muted);
  --chip: var(--kraft);
  --chip-bg: var(--kraft);
  --hover: #e8e3d5;
  --hover-bg: #e8e3d5;
  --accent: var(--route);
  --focus-outline: var(--route);
}
html[data-theme="light"] body {
  color-scheme: light;
  background: #efeee6 !important;
  background-image: linear-gradient(145deg, #f4f2e9, #ebeae1 72%) !important;
  color: #293831 !important;
}
html[data-theme="light"] body::after { opacity: .035 !important; mix-blend-mode: multiply !important; }
html[data-theme="light"] .navbar {
  border-bottom-color: rgb(41 56 49 / .16);
  background: rgb(239 238 230 / .83) !important;
}
html[data-theme="light"] .navbar .logo,
html[data-theme="light"] .navbar .menu-btn { color: #293831; }
html[data-theme="light"] .navbar .nav-links a { color: #536159; }
html[data-theme="light"] .navbar .nav-links a:hover,
html[data-theme="light"] .navbar .nav-links a[aria-current="page"] { color: #805a31; }
html[data-theme="light"] body:not(.home-page) .hero,
html[data-theme="light"] body:not(.home-page) .page-header,
html[data-theme="light"] body.contact-page .hero,
html[data-theme="light"] body .sf911-hero,
html[data-theme="light"] body .records-hero {
  background-color: #e5e4d9 !important;
  background-image: linear-gradient(135deg, #eeece2, #dfe3d9) !important;
  color: #293831 !important;
}
html[data-theme="light"] body .hero h1,
html[data-theme="light"] body .page-header h1,
html[data-theme="light"] body .sf911-hero h1,
html[data-theme="light"] body .records-hero h1,
html[data-theme="light"] h1,
html[data-theme="light"] h2,
html[data-theme="light"] h3,
html[data-theme="light"] h4,
html[data-theme="light"] .section-title { color: #293831 !important; }
html[data-theme="light"] body .hero h1 em,
html[data-theme="light"] body .page-header h1 em,
html[data-theme="light"] body .sf911-hero h1 em,
html[data-theme="light"] body .records-hero h1 em { color: #805a31 !important; }
html[data-theme="light"] .section,
html[data-theme="light"] body .section { color: #293831; }
html[data-theme="light"] .card,
html[data-theme="light"] .content-section,
html[data-theme="light"] .slot,
html[data-theme="light"] .faq,
html[data-theme="light"] .notice {
  border-color: #c8cbbd !important;
  background: #f8f6ee !important;
  color: #293831 !important;
  box-shadow: 0 8px 24px rgb(37 49 41 / .055) !important;
}
html[data-theme="light"] .card-body p,
html[data-theme="light"] .lead,
html[data-theme="light"] .muted,
html[data-theme="light"] .list li { color: #58655d !important; }
html[data-theme="light"] .btn,
html[data-theme="light"] .cta-button,
html[data-theme="light"] .primary {
  border-color: #956b3c !important;
  background: #956b3c !important;
  color: #fffaf0 !important;
}
html[data-theme="light"] input,
html[data-theme="light"] select,
html[data-theme="light"] textarea {
  border-color: #b9bcae !important;
  background: #fbf9f2 !important;
  color: #293831 !important;
}
html[data-theme="light"] input::placeholder,
html[data-theme="light"] textarea::placeholder { color: #657269; }
html[data-theme="light"] table { color: #39483f; }
html[data-theme="light"] th,
html[data-theme="light"] td { border-color: #c8cbbd !important; }
html[data-theme="light"] .footer,
html[data-theme="light"] footer { background: #25332d !important; color: #e6e5da !important; }
html[data-theme="light"] .footer a,
html[data-theme="light"] footer a { color: #ded7c7; }
html[data-theme="light"] .mobile-menu.active,
html[data-theme="light"] .navbar.mobile-open .nav-links {
  border-color: #c8cbbd !important;
  background: #f1efe6 !important;
}
html[data-theme="light"] .mobile-menu a { color: #293831 !important; }
html[data-theme="light"] .scam-notice {
  border-color: #d9c89f;
  border-left-color: #a47532;
  background: #f5eedb;
  color: #554c39;
}
html[data-theme="light"] .support-address-preview { color: #58655d !important; }
html[data-theme="light"] .support-sidebar {
  border-color: #c8cbbd;
  background: #293831;
  color: #efeee6;
}
html[data-theme="light"] .support-sidebar > h3 { color: #efeee6 !important; }

/* The San Francisco map has no theme switch; keep its controls legible on dark chrome. */
body.page-sf911 #sfCallsMap .leaflet-control-zoom a {
  border-color: #47534c;
  background: #202a26;
  color: #e8e8dc;
}
body.page-sf911 .map-shell,
body.page-sf911 #sfCallsMap {
  background: #141c19;
  border-color: #47534c;
}
body.page-sf911 #sfCallsMap .leaflet-control-zoom a:hover {
  background: #2a3731;
  color: #edc58e;
}
body.page-sf911 #sfCallsMap .leaflet-control-attribution {
  background: rgb(18 25 22 / .94);
  color: #d7d9ce;
}
body.page-sf911 #sfCallsMap .leaflet-control-attribution a { color: #e2bd86; }
body.page-sf911 .leaflet-popup-content-wrapper,
body.page-sf911 .leaflet-popup-tip {
  border-color: #47534c;
  background: #18211f;
  color: #e8e8dc;
}
body.page-sf911 .call-popup h3 { color: #e8e8dc; }
body.page-sf911 .sf911-notice { color: #554c39; }
body.page-sf911 .sf911-notice strong { color: #293831; }
body.page-sf911 .map-legend {
  border-color: #47534c;
  background: rgb(24 33 31 / .96);
  color: #e8e8dc;
  box-shadow: 3px 3px 0 rgb(0 0 0 / .28);
}
body.page-sf911 .map-legend i { border-color: #839087; }
body.page-sf911 .call-popup p { color: #b7c0b8; }
body.page-sf911 .call-cad,
body.page-sf911 .record-request-link,
body.page-sf911 .data-credit a { color: #dfbb84; }
body.page-sf911 .priority-pill {
  border-color: #536159;
  background: #26312c;
  color: #e8e8dc;
}
body.page-sf911 .empty-state {
  border-color: #536159;
  background: #18211f;
  color: #b7c0b8;
}

@media (min-width: 768px) {
  .navbar { padding-inline: max(32px, calc((100vw - 1280px)/2 + 32px)); }
}
@media (max-width: 760px) {
  .home-page .hero { min-height: min(740px, calc(100svh - 64px)); }
  .home-page .hero-main { padding: 110px 22px 75px; }
  .home-page .hero h1 { font-size: clamp(58px, 15vw, 90px); }
  .home-page .hero-scroll { display: none; }
  .home-page .dispatch-layout, .home-page .project-grid { grid-template-columns: 1fr; }
  .home-page .dispatch-aside { position: static; }
  .home-page .project-panel:first-child { min-height: 360px; }
  .home-page .project-heading { display: block; }
  .home-page .project-heading p { margin-top: 18px; }
  .home-page .service-band { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  .home-page .field-strip { gap: 10px; font-size: 8px; }
  .home-page .hero-label { display: block; }
  .home-page .log-number { display: block; margin-top: 8px; }
  .home-page .hero-buttons { align-items: flex-start; flex-direction: column; gap: 14px; }
  .home-page .night-note::after { right: -35%; width: 75vw; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .reveal:not(.visible) { opacity: 1; transform: none; }
}
@media print {
  body, html[data-theme="dark"] body { background: #fff !important; color: #111 !important; }
  body::after { display: none; }
}
