:root {
  --bg: #111827;
  --panel: #ffffff;
  --text: #1f2937;
  --brand: #b91c1c;
  --brand-dark: #7f1d1d;
  --shadow: 0 20px 45px rgba(15, 23, 42, 0.08);
  --radius: 18px;
  --max: 1120px;
}

/* Focus ring — visible on any background, respects reduced motion */
:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
  border-radius: 4px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--text);
  background: linear-gradient(180deg, #f9fafb 0%, #eef2ff 100%);
  line-height: 1.6;
}

a {
  color: var(--brand-dark);
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.15em;
}

a:hover {
  color: var(--brand);
}

.container {
  width: min(calc(100% - 2rem), var(--max));
  margin: 0 auto;
}

.site-header {
  background: var(--panel);
  position: relative;
  z-index: 10;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
}

.header-inner {
  display: flex;
  gap: 1.2rem;
  justify-content: space-between;
  align-items: flex-start;
  padding: 0.6rem 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.brand-logo {
  width: 10.5rem;
  height: auto;
  transition: width 250ms ease-out;
}

.site-nav {
  display: flex;
  gap: 0.45rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.nav-link {
  color: var(--text);
  text-decoration: none;
  padding: 0.5rem 0.8rem;
  border-radius: 999px;
  font-size: 0.92rem;
  font-weight: 500;
}

.nav-link:hover,
.nav-link.active {
  color: var(--brand);
  background: rgba(185, 28, 28, 0.08);
}

.hamburger {
  display: none;
}

.hero {
  background: var(--hero-bg, radial-gradient(circle at top left, rgba(248, 113, 113, 0.24), transparent 30%), linear-gradient(135deg, #111827, #1f2937 65%, #7f1d1d));
  color: #fff;
  padding: 4rem 0 3rem;
  position: relative;
  overflow: hidden;
}

/* Site-wide hero overlay for improved text legibility */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.60), rgba(0,0,0,0.35));
  z-index: 1;
  pointer-events: none;
}

.hero .hero-inner { position: relative; z-index: 2; }

/* Semi-opaque panel behind hero text for improved separation from image */
.hero-panel {
  display: inline-block;
  background: rgba(0,0,0,0.42);
  padding: 1rem 1.25rem;
  border-radius: 12px;
  max-width: 60ch;
}

.hero-panel .eyebrow { margin: 0 0 0.6rem; color: #fca5a5; font-weight:700; }
.hero-panel h1 { margin: 0; text-shadow: 0 6px 18px rgba(0,0,0,0.6); }
.hero-panel .intro { margin-top: 0.75rem; text-shadow: 0 4px 14px rgba(0,0,0,0.45); }

.hero-inner {
  max-width: min(calc(100% - 2rem), var(--max));
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.78rem;
  font-weight: 700;
  color: #fca5a5;
  margin: 0 0 0.85rem;
}

.hero h1 {
  margin: 0;
  font-size: clamp(2.2rem, 6vw, 4rem);
  line-height: 1.08;
}

.intro {
  margin: 1rem 0 0;
  font-size: 1.1rem;
  color: rgba(255, 255, 255, 0.88);
}

.meta-line,
.meta-inline {
  color: var(--brand-dark);
  font-size: 0.92rem;
  font-weight: 700;
}

.meta-line {
  margin-bottom: 0.75rem;
}

.main-content {
  padding: 2rem 0 4rem;
}

/* Universal section spacing — applies to every child of main except the first */
main > :not(:first-child) {
  margin-top: 1.35rem;
}

/* Grid cards — spacing and margin reset for first-child grids */
.grid {
  display: grid;
  gap: 1.5rem;
  margin-bottom: 0;
  margin-top: 0;
}

@media (max-width: 560px) {
   main > :not(:first-child) {
    margin-top: 1rem;
   }
}

.two-up {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.thirds {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.card {
  background: var(--panel);
  border: 1px solid rgba(209, 213, 219, 0.8);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
  transition: transform 200ms ease-out, box-shadow 200ms ease-out;
}
 
.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 25px 50px rgba(15, 23, 42, 0.12);
}

.card-feature {
  background: linear-gradient(180deg, #ffffff, #f8fafc);
}

.card-accent {
  background: linear-gradient(180deg, #fee2e2, #fff7ed);
}

.card h2,
.card h3 {
  margin-top: 0;
  line-height: 1.2;
}

/* Card vertical alignment — flex column pushes button to bottom */
.card-v {
  display: flex;
  flex-direction: column;
  min-height: 100%;
}
.card-v .btn-fill {
  margin-top: auto;
  padding-top: 0.75rem;
}

.media-card {
  overflow: hidden;
  position: relative;
}

.media-image {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 12px;
  margin-bottom: 1rem;
  object-fit: cover;
}

.media-tall {
  max-height: 28rem;
}

.media-inline {
  display: grid;
  grid-template-columns: minmax(0, 180px) minmax(0, 1fr);
  gap: 1rem;
  align-items: center;
  margin: 1rem 0;
}

.media-logo {
  display: block;
  width: 100%;
  max-width: 180px;
  height: auto;
}

.video-frame {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%;
  border-radius: 12px;
  overflow: hidden;
  background: #000;
}

.video-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin-bottom: 0;
}

.gallery-image {
  width: 100%;
  height: 16rem;
  object-fit: cover;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  background: var(--panel);
  transition: transform 200ms ease-out;
}
 
.gallery-image:hover {
  transform: scale(1.02);
}

.prose > :first-child {
  margin-top: 0;
}

.prose > :last-child {
  margin-bottom: 0;
}

.detail-list,
.link-list {
  padding-left: 1.2rem;
  margin: 0;
}

.detail-list li,
.link-list li {
  margin-bottom: 0.65rem;
}

.split-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.5rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.25rem;
  border-radius: 999px;
  background: var(--brand);
  color: var(--panel);
  font-weight: 700;
  text-decoration: none;
  transition: background-color 200ms ease-out;
}
 
.button:hover {
  background: var(--brand-dark);
  color: var(--panel);
}
 
.button-secondary {
  background: var(--bg);
}
 
.button-secondary:hover {
  background: var(--brand);
}
 
.button-secondary,
.button {
  transition: background-color 200ms ease-out;
}

.site-footer {
  background: var(--bg);
  color: rgba(255, 255, 255, 0.88);
  padding: 2rem 0;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 1.5rem;
  align-items: start;
}

.footer-inner p {
  margin-bottom: 0;
  max-width: 34rem;
  color: rgba(255, 255, 255, 0.64);
}

.footer-links {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.footer-links a {
  color: #fca5a5;
}



@media (max-width: 820px) {
   .header-inner,
   .footer-inner {
  flex-direction: column;
  align-items: flex-start;
  }

  .split-list,
  .two-up,
  .thirds,
  .gallery-grid {
  grid-template-columns: 1fr;
  }

  .media-inline {
  grid-template-columns: 1fr;
  }

  .site-nav {
  display: none;
  }

  .site-nav.nav-open {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  position: fixed;
  inset: 0;
  background: var(--panel);
  z-index: 9;
  gap: 0.5rem;
  padding: 2rem 1rem;
  }

  .nav-link {
  font-size: 1.1rem;
  padding: 0.7rem 1.2rem;
  width: 100%;
  text-align: center;
  }

  .hamburger {
  display: flex;
  flex-direction: column;
  gap: 4px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.4rem;
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  z-index: 11;
  }

  .hamburger span {
  display: block;
  width: 24px;
  height: 2.5px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 200ms ease-out, opacity 200ms ease-out;
  }

  .hamburger[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(6.5px) rotate(45deg);
  }

  .hamburger[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
  }

  .hamburger[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-6.5px) rotate(-45deg);
  }

  .hero ~ .container {
  transition: filter 250ms ease-out;
  }

  body.nav-open > .hero ~ .container {
  filter: blur(2px) brightness(0.95);
  }

  body.nav-open {
  overflow: hidden;
  }

  body.scrolled .brand-logo {
  width: 7rem;
  transition: width 250ms ease-out;
  }

  .site-header {
  position: sticky;
  top: 0;
  }

  .footer-links {
  justify-content: flex-start;
  }
}

@media (max-width: 560px) {
  .container {
   width: min(calc(100% - 1.2rem), var(--max));
  }

  .card {
   padding: 1.15rem;
  }

  .brand-logo {
   width: 5rem;
   transition: width 250ms ease-out;
  }

  body.scrolled .brand-logo {
   width: 3.5rem;
  }

  .header-inner {
   padding: 0.4rem 0;
   gap: 0.5rem;
   transition: padding 250ms ease-out;
  }

  .hamburger span {
   width: 20px;
   height: 2px;
  }
}
