/* Emergency Nine Design — one stylesheet for every page.
   Palette (enforced by .github/scripts/site_rules.py):
   --black     #0E0E0E  header, heroes, dark sections
   --ink       #141414  body text on light
   --ivory     #F7F3EC  light sections
   --red       #C8102E  buttons and accent lines (from the logo)
   --red-light #FF6B6B  small red text on dark backgrounds
   --red-dark  #B30E29  small red text on light backgrounds
   Red stays small: buttons, labels, thin lines. Never large red areas.
   Type: Playfair Display (headings, one italic accent word), Inter (text). */
@font-face { font-family: "Playfair Display"; font-style: normal; font-weight: 400 700; font-display: swap; src: url(/fonts/playfair-display.woff2) format("woff2"); }
@font-face { font-family: "Playfair Display"; font-style: italic; font-weight: 400; font-display: swap; src: url(/fonts/playfair-display-italic.woff2) format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 400; font-display: swap; src: url(/fonts/inter-regular.woff2) format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 600; font-display: swap; src: url(/fonts/inter-semibold.woff2) format("woff2"); }
:root {
  --black: #0E0E0E;
  --ink: #141414;
  --ivory: #F7F3EC;
  --red: #C8102E;
  --red-light: #FF6B6B;
  --red-dark: #B30E29;
  --muted: #5E5A54;
  --soft: #E9E0D2;
  --line: #E4DED3;
  --max: 1180px;
  --body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --serif: "Playfair Display", Georgia, "Times New Roman", serif;
  --mark: Arial, "Helvetica Neue", Helvetica, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; font: 400 17px/1.7 var(--body); color: var(--ink); background: #fff; -webkit-font-smoothing: antialiased; }
img, svg, picture { display: block; max-width: 100%; height: auto; }
a { color: var(--red-dark); text-underline-offset: 3px; }
a:hover { color: var(--ink); }
h1, h2, h3 { margin: 0 0 .5em; font-weight: 400; }
h1, h2 { font-family: var(--serif); letter-spacing: -.005em; line-height: 1.12; }
h1 { font-size: clamp(2.5rem, 5.6vw, 4.3rem); }
h2 { font-size: clamp(2rem, 3.8vw, 2.9rem); }
h1 em, h2 em { font-style: italic; }
h3 { font-family: var(--serif); font-size: 1.45rem; line-height: 1.25; }
p { margin: 0 0 1em; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 28px; }
.narrow { max-width: 760px; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 12px; top: 12px; background: #fff; padding: 8px 12px; z-index: 99; }

/* Small capitals label with a short rule before it */
.eyebrow { display: flex; align-items: center; gap: 14px; font: 600 11.5px/1.2 var(--body); letter-spacing: .3em; text-transform: uppercase; color: var(--red-dark); margin: 0 0 22px; }
.eyebrow::before { content: ""; width: 32px; height: 1px; background: currentColor; flex: none; }
.center .eyebrow { justify-content: center; }
.center .eyebrow::after { content: ""; width: 32px; height: 1px; background: currentColor; flex: none; }
.on-dark .eyebrow, .dark .eyebrow, .hero .eyebrow, .page-hero .eyebrow, .cta .eyebrow { color: var(--red-light); }
.lead { font-size: 1.12rem; line-height: 1.8; color: var(--muted); max-width: 40em; }
.center .lead { margin-left: auto; margin-right: auto; }
.dark .lead, .hero .lead, .page-hero .lead, .cta .lead { color: rgba(255,255,255,.66); }
.head { margin-bottom: 56px; }
.head h2 { margin-bottom: 18px; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(14,14,14,.97); color: #F4EFE6; border-bottom: 1px solid rgba(255,255,255,.07); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 74px; gap: 20px; }
.brand { font: 700 12.5px/1 var(--mark); letter-spacing: .36em; text-transform: uppercase; color: #F4EFE6; text-decoration: none; white-space: nowrap; }
.brand:hover { color: #fff; }
.nav { display: flex; align-items: center; gap: 34px; }
.nav a { color: rgba(244,239,230,.82); text-decoration: none; font: 400 13px/1 var(--body); letter-spacing: .12em; text-transform: uppercase; }
.nav a:hover, .nav a[aria-current="page"] { color: #fff; }
.nav a[aria-current="page"] { box-shadow: 0 1px 0 var(--red-light); padding-bottom: 6px; margin-bottom: -7px; }
.nav .btn { color: #fff; margin-left: 6px; }
.menu-toggle { display: none; background: none; border: 1px solid rgba(255,255,255,.3); color: #F4EFE6; padding: 9px 14px; font: 600 11px/1 var(--body); letter-spacing: .18em; text-transform: uppercase; }
@media (max-width: 960px) {
  .brand { font-size: 10.5px; letter-spacing: .24em; }
  .menu-toggle { display: block; }
  .nav { display: none; position: absolute; top: 74px; left: 0; right: 0; background: var(--black); flex-direction: column; align-items: stretch; gap: 0; padding: 8px 28px 26px; border-top: 1px solid rgba(255,255,255,.08); }
  .nav.open { display: flex; }
  .nav a { padding: 18px 0; border-bottom: 1px solid rgba(255,255,255,.08); font-size: 13px; }
  .nav a[aria-current="page"] { box-shadow: none; padding-bottom: 18px; margin-bottom: 0; color: var(--red-light); }
  .nav .btn { margin: 20px 0 0; text-align: center; border-bottom: 0; }
}

/* Buttons */
.btn { display: inline-block; background: var(--red); color: #fff; text-decoration: none; font: 600 11.5px/1 var(--body); letter-spacing: .2em; text-transform: uppercase; padding: 18px 30px; border: 1px solid var(--red); cursor: pointer; transition: background .2s, border-color .2s, color .2s; }
.btn:hover { background: var(--red-dark); border-color: var(--red-dark); color: #fff; }
.btn-ghost { background: transparent; color: var(--ink); border-color: rgba(20,20,20,.55); }
.btn-ghost:hover { background: var(--ink); border-color: var(--ink); color: #fff; }
.hero .btn-ghost, .dark .btn-ghost, .page-hero .btn-ghost, .cta .btn-ghost { color: #fff; border-color: rgba(255,255,255,.5); }
.hero .btn-ghost:hover, .dark .btn-ghost:hover, .page-hero .btn-ghost:hover, .cta .btn-ghost:hover { background: #fff; color: var(--ink); border-color: #fff; }
.actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 36px; }
.center .actions, .actions.center { justify-content: center; }
.text-link { display: inline-block; font: 600 11.5px/1 var(--body); letter-spacing: .2em; text-transform: uppercase; text-decoration: none; color: var(--ink); padding-bottom: 8px; border-bottom: 1px solid var(--red); }
.text-link:hover { color: var(--red-dark); }
.dark .text-link { color: #fff; }

/* Sections */
section { padding: clamp(80px, 10vw, 136px) 0; }
.dark { background: var(--black); color: #F4EFE6; }
.dark a:not(.btn):not(.text-link) { color: var(--red-light); }
.ivory { background: var(--ivory); }
.center { text-align: center; }

/* Grain overlay for photo heroes (same treatment as the Revelance site) */
.grain { position: absolute; inset: 0; z-index: 2; opacity: .25; pointer-events: none; background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.03'/%3E%3C/svg%3E"); }

/* Home hero: full screen photo, centered content */
.hero { position: relative; min-height: calc(100vh - 74px); min-height: calc(100svh - 74px); display: flex; align-items: center; justify-content: center; overflow: hidden; background: var(--black); color: #fff; padding: 96px 0 72px; }
.hero-bg, .hero-bg picture, .hero-bg img { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-bg img { object-fit: cover; animation: slowzoom 14s ease-out forwards; }
.hero-overlay { position: absolute; inset: 0; z-index: 1; background: linear-gradient(180deg, rgba(10,10,10,.55) 0%, rgba(10,10,10,.72) 55%, rgba(10,10,10,.92) 100%), radial-gradient(ellipse at center, rgba(10,10,10,.15) 0%, rgba(10,10,10,.6) 100%); }
.hero-content { position: relative; z-index: 3; max-width: 900px; padding: 0 28px; text-align: center; }
.hero-logo { display: inline-block; background: #fff; padding: 12px 15px; margin-bottom: 34px; box-shadow: 0 20px 50px rgba(0,0,0,.45); }
.hero-logo img { width: 128px; }
.hero h1 { margin-bottom: 26px; }
.hero h1 em { color: #F1E6D6; }
.hero .lead { font-size: 1.15rem; max-width: 36em; margin: 0 auto; }
.hero-facts { display: flex; justify-content: center; gap: 56px; margin-top: 64px; padding-top: 36px; border-top: 1px solid rgba(255,255,255,.12); }
.hero-facts div { text-align: center; }
.hero-facts b { display: block; font: 400 1.55rem/1.1 var(--serif); color: #fff; }
.hero-facts span { display: block; margin-top: 8px; font: 600 10.5px/1.3 var(--body); letter-spacing: .2em; text-transform: uppercase; color: rgba(255,255,255,.5); }
.rise { opacity: 0; animation: rise .9s ease forwards; }
.d1 { animation-delay: .15s; } .d2 { animation-delay: .3s; } .d3 { animation-delay: .45s; } .d4 { animation-delay: .6s; } .d5 { animation-delay: .75s; } .d6 { animation-delay: .9s; }
@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes slowzoom { from { transform: scale(1.08); } to { transform: scale(1); } }
@media (prefers-reduced-motion: reduce) { .rise { opacity: 1; animation: none; } .hero-bg img { animation: none; } }
@media (max-width: 760px) {
  .hero { padding: 64px 0 56px; }
  .hero-logo img { width: 100px; }
  .hero-facts { gap: 22px; flex-wrap: wrap; margin-top: 48px; }
  .hero-facts div { flex: 1 1 40%; }
}

/* Inner page heroes: photo band with title */
.page-hero { position: relative; overflow: hidden; background: var(--black); color: #fff; padding: clamp(110px, 14vw, 170px) 0 clamp(72px, 9vw, 110px); }
.page-hero .hero-overlay { background: linear-gradient(90deg, rgba(10,10,10,.9) 0%, rgba(10,10,10,.72) 50%, rgba(10,10,10,.45) 100%); }
.page-hero .wrap { position: relative; z-index: 3; }
.page-hero h1 { max-width: 14em; margin-bottom: 22px; }
.page-hero h1 em { color: #F1E6D6; }
.page-hero .lead { max-width: 36em; }

/* Media */
figure { margin: 0; }
.photo { position: relative; overflow: hidden; background: #1a1a1a; }
.photo picture, .photo img { width: 100%; }
.photo.r43 img { aspect-ratio: 4 / 3; object-fit: cover; }
.photo.r32 img { aspect-ratio: 3 / 2; object-fit: cover; }
.photo.r45 img { aspect-ratio: 4 / 5; object-fit: cover; }
.photo.tall img { aspect-ratio: 5 / 6; object-fit: cover; }
.tag { position: absolute; left: 16px; bottom: 16px; font: 600 9.5px/1 var(--body); letter-spacing: .22em; text-transform: uppercase; background: rgba(14,14,14,.72); color: rgba(255,255,255,.9); padding: 8px 11px; backdrop-filter: blur(4px); }

/* Layout */
.grid { display: grid; gap: 36px; }
.g2 { grid-template-columns: repeat(2, 1fr); }
.g3 { grid-template-columns: repeat(3, 1fr); }
.g4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 960px) { .g3, .g4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .g2, .g3, .g4 { grid-template-columns: 1fr; } }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(40px, 7vw, 104px); align-items: center; }
.split.flip > :first-child { order: 2; }
.split > * { min-width: 0; }
@media (max-width: 880px) { .split { grid-template-columns: 1fr; } .split.flip > :first-child { order: 0; } }
@media (max-width: 600px) { th { white-space: normal; } }

/* Feature cards (image, title, text) */
.feature h3 { margin: 26px 0 10px; }
.feature p { color: var(--muted); margin: 0; }
.dark .feature p { color: rgba(255,255,255,.62); }
.feature .num { display: block; font: 600 10.5px/1 var(--body); letter-spacing: .24em; text-transform: uppercase; color: var(--red-dark); margin-top: 26px; }
.feature .num + h3 { margin-top: 12px; }

/* Lists: short red rules, pixel-aligned so every rule renders the same */
.checks { list-style: none; padding: 0; margin: 28px 0 0; }
.checks li { position: relative; padding: 0 0 0 30px; margin: 0 0 14px; line-height: 28px; }
.checks li::before { content: ""; position: absolute; left: 0; top: 13px; width: 14px; height: 2px; background: var(--red); }
.dark .checks li::before { background: var(--red-light); }

/* Detail tiles (thin rule above, serif title) */
.detail { border-top: 1px solid var(--soft); padding-top: 24px; }
.dark .detail { border-top-color: rgba(255,255,255,.14); }
.detail h3 { font-size: 1.3rem; margin-bottom: 10px; }
.detail p { color: var(--muted); margin: 0; font-size: .98rem; }
.dark .detail p { color: rgba(255,255,255,.62); }

/* Numbered steps */
.steps { counter-reset: s; }
.step { position: relative; border-top: 1px solid var(--soft); padding-top: 28px; }
.step::before { counter-increment: s; content: "0" counter(s); display: block; font: italic 400 1.9rem/1 var(--serif); color: var(--red); margin-bottom: 18px; }
.step h3 { margin-bottom: 10px; }
.step p { color: var(--muted); margin: 0; }
.steps.rows { display: grid; gap: 0; }
.steps.rows .step { display: grid; grid-template-columns: 90px 1fr; gap: 0 24px; padding: 30px 0; }
.steps.rows .step::before { grid-row: span 2; margin: 2px 0 0; }

/* Facts strip */
.facts { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--soft); border-bottom: 1px solid var(--soft); }
.facts div { padding: 34px 28px; border-left: 1px solid var(--soft); }
.facts div:first-child { border-left: 0; padding-left: 0; }
.facts b { display: block; font: 400 1.7rem/1.15 var(--serif); }
.facts span { display: block; margin-top: 10px; font: 600 10.5px/1.4 var(--body); letter-spacing: .2em; text-transform: uppercase; color: var(--muted); }
@media (max-width: 860px) { .facts { grid-template-columns: 1fr 1fr; } .facts div:nth-child(3) { border-left: 0; padding-left: 0; } .facts div { border-top: 1px solid var(--soft); } .facts div:nth-child(-n+2) { border-top: 0; } }

/* Gallery: one large image beside two stacked */
.gallery { display: grid; grid-template-columns: 1.6fr 1fr; gap: 20px; }
.gallery .stack { display: grid; gap: 20px; }
.gallery .big img { height: 100%; aspect-ratio: auto; object-fit: cover; }
.gallery .big, .gallery .big picture { height: 100%; }
.gallery .stack img { aspect-ratio: 3 / 2; object-fit: cover; }
@media (max-width: 760px) { .gallery { grid-template-columns: 1fr; } .gallery .big img { aspect-ratio: 4 / 3; height: auto; } }
.caption { margin-top: 18px; color: var(--muted); font-size: .95rem; }

/* Specs table */
.table-wrap { overflow-x: auto; margin-top: 28px; }
table { width: 100%; border-collapse: collapse; font-size: .97rem; }
th, td { text-align: left; padding: 16px 18px 16px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
th { white-space: nowrap; font: 600 10.5px/1.3 var(--body); letter-spacing: .18em; text-transform: uppercase; color: var(--muted); }

/* FAQ */
.faq details { border-bottom: 1px solid var(--soft); padding: 26px 0; }
.faq details:first-of-type { border-top: 1px solid var(--soft); }
.faq summary { cursor: pointer; list-style: none; position: relative; padding-right: 40px; font: 400 1.3rem/1.35 var(--serif); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; position: absolute; right: 4px; top: 50%; width: 14px; height: 14px; margin-top: -7px; background: linear-gradient(var(--red), var(--red)) center/14px 1.5px no-repeat, linear-gradient(var(--red), var(--red)) center/1.5px 14px no-repeat; transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { margin: 14px 0 0; color: var(--muted); max-width: 44em; }

/* Panel (visit card, contact card) */
.panel { background: var(--ivory); padding: 44px; }
.panel.dark { background: var(--black); }
.panel h3 { margin-bottom: 16px; }
.panel dl { margin: 0; }
.panel dt { font: 600 10.5px/1.3 var(--body); letter-spacing: .2em; text-transform: uppercase; color: var(--red-dark); margin-top: 22px; }
.panel.dark dt { color: var(--red-light); }
.panel dt:first-child { margin-top: 0; }
.panel dd { margin: 8px 0 0; }
.panel dd a { font: 400 1.35rem/1.3 var(--serif); text-decoration: none; color: inherit; }
.panel.dark dd a:not(.btn) { color: #fff; }

/* Form */
form { display: grid; gap: 22px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
@media (max-width: 600px) { .form-row { grid-template-columns: 1fr; } }
label { font: 600 10.5px/1.3 var(--body); letter-spacing: .2em; text-transform: uppercase; display: block; margin-bottom: 10px; color: var(--muted); }
input, select, textarea { width: 100%; font: inherit; font-size: 16px; padding: 14px 0; border: 0; border-bottom: 1px solid #C9C1B3; border-radius: 0; background: transparent; color: var(--ink); -webkit-appearance: none; appearance: none; }
select { background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23141414' stroke-width='1.4'/%3E%3C/svg%3E") right 4px center no-repeat; padding-right: 26px; }
input:focus, select:focus, textarea:focus { outline: none; border-bottom-color: var(--red); box-shadow: 0 1px 0 var(--red); }
textarea { min-height: 120px; resize: vertical; }
.hidden { position: absolute; left: -9999px; }
form .btn { margin-top: 10px; }

/* CTA band */
.cta { position: relative; background: var(--black); color: #fff; overflow: hidden; }
.cta .hero-overlay { background: linear-gradient(180deg, rgba(10,10,10,.78), rgba(10,10,10,.7)); }
.cta .wrap { position: relative; z-index: 3; }

/* Footer */
.site-footer { background: #070707; color: rgba(255,255,255,.55); padding: 80px 0 34px; font-size: .95rem; }
.site-footer a { color: rgba(255,255,255,.85); text-decoration: none; }
.site-footer a:hover { color: #fff; }
.foot-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 44px; }
@media (max-width: 760px) { .foot-grid { grid-template-columns: 1fr; } }
.site-footer h3 { font: 600 10.5px/1.3 var(--body); letter-spacing: .22em; text-transform: uppercase; color: #fff; margin-bottom: 18px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 10px; }
.foot-brand { font: 700 12.5px/1.4 var(--mark); letter-spacing: .34em; text-transform: uppercase; color: #fff; margin-bottom: 16px; }
.foot-base { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; border-top: 1px solid rgba(255,255,255,.08); margin-top: 56px; padding-top: 26px; font-size: .82rem; letter-spacing: .04em; }

/* Mobile call bar */
.mobile-contact { display: none; }
@media (max-width: 760px) {
  .mobile-contact { display: grid; grid-template-columns: 1fr 1fr; position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; background: var(--black); border-top: 1px solid rgba(255,255,255,.1); }
  .mobile-contact a { color: #fff; text-align: center; padding: 17px 0; font: 600 11px/1 var(--body); letter-spacing: .2em; text-transform: uppercase; text-decoration: none; }
  .mobile-contact a + a { background: var(--red); }
  body { padding-bottom: 51px; }
}

/* Even-height numbers in the serif. Kept last: the `font` shorthand above resets it. */
h1, h2, h3, .hero-facts b, .facts b, .panel dd a, .faq summary, .step::before { font-variant-numeric: lining-nums; }

/* Phone refinements */
@media (max-width: 600px) {
  .eyebrow { letter-spacing: .2em; font-size: 10.5px; gap: 10px; }
  .eyebrow::before, .center .eyebrow::after { width: 20px; }
  .facts b { font-size: 1.25rem; }
  .facts div { padding: 24px 16px; }
  .facts div:nth-child(odd) { padding-left: 0; }
  .panel { padding: 32px 26px; }
}

/* Edge-to-edge split: the photo fills its half of the section, text beside it */
section.bleed { padding: 0; }
section.bleed > .wrap.split { max-width: none; padding: 0; gap: 0; align-items: stretch; grid-template-columns: 1fr 1fr; }
section.bleed > .wrap.split > div { padding: clamp(64px, 8vw, 128px) clamp(28px, 6vw, 96px); align-self: center; max-width: 660px; }
section.bleed > .wrap.split:not(.flip) > div { justify-self: end; }
section.bleed > .wrap.split > figure.photo { height: 100%; min-height: 560px; }
section.bleed > .wrap.split > figure.photo picture, section.bleed > .wrap.split > figure.photo img { height: 100%; }
section.bleed > .wrap.split > figure.photo img { aspect-ratio: auto; object-fit: cover; }
.focus-right img { object-position: 64% 50%; }
@media (max-width: 880px) {
  section.bleed > .wrap.split { grid-template-columns: 1fr; }
  section.bleed > .wrap.split > figure.photo { min-height: 0; height: auto; order: -1; }
  section.bleed > .wrap.split > figure.photo img { aspect-ratio: 4 / 3; height: auto; }
  section.bleed > .wrap.split > div { max-width: none; padding: 56px 28px 72px; justify-self: stretch; }
}

/* Phone: home hero and header */
@media (max-width: 600px) {
  .hero { min-height: 0; padding: 48px 0 64px; }
  .hero-logo { padding: 9px 11px; margin-bottom: 26px; }
  .hero-logo img { width: 84px; }
  .hero h1 { font-size: 2.15rem; margin-bottom: 18px; }
  .hero .lead { font-size: 1rem; }
  .hero-facts { display: none; }
  .hero .actions, .page-hero .actions { flex-direction: column; align-items: stretch; }
  .hero .actions .btn, .page-hero .actions .btn { text-align: center; }
  .page-hero { padding: 72px 0 60px; }
  .page-hero h1 { font-size: 2.15rem; }
  h2 { font-size: 1.85rem; }
}
@media (max-width: 380px) {
  .site-header .wrap { padding: 0 18px; }
  .brand { font-size: 9.5px; letter-spacing: .14em; }
  .menu-toggle { padding: 8px 10px; font-size: 10px; letter-spacing: .12em; }
  .wrap { padding: 0 20px; }
  .eyebrow::before, .center .eyebrow::after { display: none; }
  .hero h1, .page-hero h1 { font-size: 1.95rem; }
}
