*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #0e1612;
  --bg-dark: #0a100d;
  --surface: #162019;
  --surface-light: #f4f2ec;
  --red: #d91f27;
  --red-hover: #b81920;
  --yellow: #e8b820;
  --yellow-hover: #d4a610;
  --green: #2a5c38;
  --green-light: #3d7a4f;
  --text: #f2f0ea;
  --text-dark: #142018;
  --muted: #8fa193;
  --line: rgba(242, 240, 234, 0.14);
  --line-dark: rgba(20, 32, 24, 0.15);
  --font-display: 'Barlow Condensed', 'Arial Narrow', sans-serif;
  --font-body: 'Source Sans 3', 'Segoe UI', sans-serif;
  --wrap: 1100px;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  font-size: 1rem;
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body.menu-open { overflow: hidden; }

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: none; background: none; }
ul { list-style: none; }

.wrap {
  width: min(var(--wrap), 100% - 2.5rem);
  margin-inline: auto;
}

/* ── Header ── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.35rem 1.25rem;
  background: var(--bg-dark);
  border-bottom: 1px solid var(--line);
  min-height: 0;
}

.logo { display: flex; align-items: center; flex-shrink: 0; line-height: 0; }

/* Square PNG has heavy padding — cover crops to the logo band on dark surfaces */
.logo-on-dark .logo-img,
.logo-on-dark .hero-logo {
  mix-blend-mode: screen;
  filter: brightness(1.06) contrast(1.1) drop-shadow(0 1px 3px rgba(0, 0, 0, 0.45));
}

.logo-img {
  display: block;
  object-fit: cover;
  object-position: center;
}

.logo-img-nav {
  height: 46px;
  width: 250px;
  max-width: min(250px, 56vw);
}

.nav .nav-register-btn {
  padding: 0.5rem 1.15rem;
  font-size: 0.92rem;
}

.logo-img-footer {
  height: 56px;
  width: 240px;
  max-width: min(240px, 54vw);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.75rem;
}

.nav-links a {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  transition: color 0.15s;
}

.nav-links a:hover { color: var(--text); }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  width: 38px;
  height: 38px;
  padding: 8px;
  border: 1px solid var(--line);
  background: var(--surface);
}

.nav-toggle-bar {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--text);
  transition: transform 0.2s, opacity 0.2s;
}

.nav-open .nav-toggle-bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-open .nav-toggle-bar:nth-child(2) { opacity: 0; }
.nav-open .nav-toggle-bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.nav-menu {
  display: flex;
  align-items: center;
  gap: 2rem;
  margin-left: auto;
}

/* Event strip — from poster footer */
.event-strip {
  background: var(--surface-light);
  color: var(--text-dark);
  border-bottom: 3px solid var(--red);
}

.event-strip-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  padding: 0.65rem 1rem;
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-align: center;
}

.event-strip-divider {
  width: 1px;
  height: 14px;
  background: var(--line-dark);
}

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border: 2px solid transparent;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.btn-red {
  background: var(--red);
  color: #fff;
}

.btn-red:hover { background: var(--red-hover); }

.btn-yellow {
  background: var(--yellow);
  color: var(--text-dark);
}

.btn-yellow:hover { background: var(--yellow-hover); }

.btn-outline {
  border-color: var(--line);
  color: var(--text);
}

.btn-outline:hover {
  border-color: var(--text);
  background: rgba(255, 255, 255, 0.04);
}

/* ── Hero ── */
.hero {
  position: relative;
  padding: 3rem 0 4rem;
  border-bottom: 1px solid var(--line);
  background-color: var(--bg);
  background-image:
    linear-gradient(105deg, rgba(10, 16, 13, 0.94) 0%, rgba(10, 16, 13, 0.78) 48%, rgba(10, 16, 13, 0.55) 100%),
    var(--hero-image);
  background-size: cover;
  background-position: center;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 60%, rgba(10, 16, 13, 0.85) 100%);
  pointer-events: none;
}

.hero .wrap {
  position: relative;
  z-index: 1;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 3rem;
  align-items: center;
}

.eyebrow {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--yellow);
  margin-bottom: 0.75rem;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 5vw, 3.6rem);
  font-weight: 800;
  font-style: italic;
  line-height: 1.05;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  margin-bottom: 1rem;
}

.hero-title::after {
  content: '';
  display: block;
  width: 72px;
  height: 3px;
  background: var(--red);
  margin-top: 1rem;
}

.hero-lead {
  max-width: 34rem;
  color: var(--muted);
  font-size: 1.05rem;
  margin-bottom: 1.75rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 2rem;
}

.hero-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
  font-size: 0.9rem;
  color: var(--muted);
}

.hero-facts strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text);
  line-height: 1.2;
}

.hero-brand {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.hero-photo {
  margin: 0;
  border: 1px solid var(--line);
  overflow: hidden;
  aspect-ratio: 4 / 3;
}

.hero-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.hero-logo-wrap {
  line-height: 0;
  text-align: center;
}

.hero-logo {
  width: min(100%, 380px);
  height: 110px;
  object-fit: cover;
  object-position: center;
  margin: 0 auto;
  display: block;
}

.hero-details {
  display: grid;
  gap: 0.85rem;
  text-align: left;
  padding: 1.25rem;
  background: var(--surface);
  border: 1px solid var(--line);
}

.hero-details dt {
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--yellow);
  margin-bottom: 0.15rem;
}

.hero-details dd {
  font-size: 0.95rem;
  color: var(--text);
}

.hero-details .muted { color: var(--muted); font-size: 0.85rem; }

/* ── Sections ── */
.section {
  padding: 4rem 0;
  border-bottom: 1px solid var(--line);
}

.section-dark { background: var(--bg-dark); }
.section-muted { background: var(--surface); }

.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 3.5vw, 2.5rem);
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}

.section-lead {
  color: var(--muted);
  max-width: 36rem;
  margin-bottom: 2rem;
}

/* ── Sylhet gallery ── */
.section-gallery {
  padding-top: 3.5rem;
}

.photo-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: 220px;
  gap: 0.75rem;
}

.photo-item {
  margin: 0;
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--surface);
}

.photo-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.photo-item figcaption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 2rem 0.85rem 0.75rem;
  font-size: 0.8rem;
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #fff;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.82));
}

.photo-item-featured {
  grid-column: span 2;
  grid-row: span 2;
}

/* ── Photo band ── */
.section-photo-band {
  padding: 0;
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}

.photo-band-track {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.photo-band-track::-webkit-scrollbar { display: none; }

.photo-band-item {
  flex: 0 0 min(72vw, 420px);
  margin: 0;
  scroll-snap-align: start;
  aspect-ratio: 16 / 10;
  overflow: hidden;
}

.photo-band-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ── Register / fees ── */
.register-layout {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 3rem;
  align-items: start;
}

.table-wrap {
  overflow-x: auto;
  margin-bottom: 1rem;
  border: 1px solid var(--line);
}

.fees-table {
  width: 100%;
  min-width: 320px;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.fees-table th,
.fees-table td {
  padding: 0.85rem 1rem;
  text-align: center;
  border-bottom: 1px solid var(--line);
}

.fees-table thead th {
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: var(--green);
  color: #fff;
}

.fees-table tbody th {
  text-align: left;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.03);
}

.fees-table tbody tr:last-child th,
.fees-table tbody tr:last-child td { border-bottom: none; }

.fees-note {
  font-size: 0.9rem;
  color: var(--muted);
  margin-bottom: 1.5rem;
}

.qr-block {
  text-align: center;
}

.qr-frame {
  padding: 0.75rem;
  background: #fff;
  border: 1px solid var(--line-dark);
}

.qr-img {
  width: 240px;
  height: auto;
  margin: 0 auto;
}

.qr-label {
  margin-top: 0.75rem;
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ── Posters ── */
.poster-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

.poster-item img {
  width: 100%;
  border: 1px solid var(--line);
}

.poster-item figcaption {
  margin-top: 0.6rem;
  font-size: 0.85rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-family: var(--font-display);
  font-weight: 600;
}

/* ── Distances ── */
.distance-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.distance-card {
  padding: 1.25rem;
  background: var(--bg);
  border: 1px solid var(--line);
  border-top: 3px solid var(--red);
}

.distance-km {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 800;
  line-height: 1;
  color: var(--yellow);
}

.distance-name {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  text-transform: uppercase;
  margin: 0.35rem 0 1rem;
}

.distance-meta {
  font-size: 0.88rem;
  color: var(--muted);
  display: grid;
  gap: 0.35rem;
}

/* ── Event details ── */
.details-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-bottom: 2rem;
}

.details-card {
  padding: 1.15rem;
  background: var(--bg);
  border: 1px solid var(--line);
  border-top: 3px solid var(--yellow);
}

.details-label {
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.35rem;
}

.details-value {
  font-size: 0.98rem;
  color: var(--text);
  line-height: 1.4;
}

.details-table-wrap {
  overflow-x: auto;
  margin-bottom: 1.5rem;
  border: 1px solid var(--line);
}

.details-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}

.details-table th,
.details-table td {
  padding: 0.85rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--line);
}

.details-table thead th {
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
  background: var(--surface);
}

.details-table tbody th {
  font-weight: 600;
  color: var(--text);
  background: var(--bg);
}

.details-table tbody td {
  color: var(--muted);
  background: var(--bg);
}

.details-table tbody tr:last-child th,
.details-table tbody tr:last-child td {
  border-bottom: none;
}

.details-sub {
  display: block;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--muted);
  text-transform: none;
  letter-spacing: 0;
}

.details-charity-row th,
.details-charity-row td {
  background: var(--surface);
}

.details-organizers {
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.6;
}

.details-organizers strong {
  color: var(--text);
  font-weight: 600;
}

/* ── Race day ── */
.race-day-layout {
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  gap: 2.5rem;
  align-items: start;
}

.race-day-photo {
  margin: 0;
  border: 1px solid var(--line);
  overflow: hidden;
}

.race-day-photo img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  display: block;
}

.race-day-photo figcaption {
  padding: 0.65rem 0.85rem;
  font-size: 0.8rem;
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
  background: var(--surface);
  border-top: 1px solid var(--line);
}

.race-day-content .section-lead {
  margin-bottom: 1.25rem;
}

.subsection-title {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--yellow);
  margin: 1.75rem 0 0.85rem;
}

.benefits-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.benefits-list li {
  font-size: 0.88rem;
  color: var(--text);
  padding: 0.4rem 0.75rem;
  background: var(--surface);
  border: 1px solid var(--line);
}

.podium-dl {
  display: grid;
  gap: 0.65rem;
  padding: 1rem 1.15rem;
  background: var(--surface);
  border: 1px solid var(--line);
}

.podium-dl div {
  display: grid;
  grid-template-columns: 8.5rem 1fr;
  gap: 0.75rem;
  font-size: 0.92rem;
}

.podium-dl dt {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--muted);
}

.podium-dl dd {
  color: var(--text);
  margin: 0;
}

.note-callout {
  margin-top: 1rem;
  padding: 0.85rem 1rem;
  font-size: 0.88rem;
  color: var(--muted);
  background: rgba(217, 31, 39, 0.08);
  border-left: 3px solid var(--red);
  line-height: 1.5;
}

.info-list {
  display: grid;
  gap: 0;
  border: 1px solid var(--line);
}

.info-list li {
  padding: 1rem 1.15rem;
  border-bottom: 1px solid var(--line);
  font-size: 0.95rem;
  color: var(--muted);
}

.info-list li:last-child { border-bottom: none; }

.info-list li::before {
  content: '—';
  color: var(--red);
  margin-right: 0.5rem;
  font-weight: 700;
}

/* ── Register banner ── */
.register-banner {
  position: relative;
  border-bottom: 1px solid var(--line);
  background-color: var(--green);
  background-image:
    linear-gradient(90deg, rgba(20, 48, 28, 0.94) 0%, rgba(20, 48, 28, 0.72) 55%, rgba(20, 48, 28, 0.45) 100%),
    var(--banner-image);
  background-size: cover;
  background-position: center;
}

.register-banner-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.15);
  pointer-events: none;
}

.register-banner .wrap {
  position: relative;
  z-index: 1;
}

.register-banner-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 2.5rem 0;
}

.banner-kicker {
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.75);
  margin-bottom: 0.35rem;
}

.banner-title {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  font-weight: 800;
  text-transform: uppercase;
  color: #fff;
}

/* ── Footer ── */
.event-strip-footer { border-bottom: none; }

.footer-bottom {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 1rem 2rem;
  padding: 2rem 0;
}

.footer-hashtag {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-align: center;
}

.footer-copy {
  font-size: 0.85rem;
  color: var(--muted);
  text-align: right;
}

.footer-copy a:hover { color: var(--text); }

/* ── Tablet ── */
@media (max-width: 1024px) {
  .hero-grid { grid-template-columns: 1fr; gap: 2rem; }
  .hero-brand { order: -1; }
  .photo-grid {
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: 200px;
  }
  .photo-item-featured {
    grid-column: span 2;
    grid-row: span 1;
    grid-auto-rows: 260px;
  }
  .register-layout { grid-template-columns: 1fr; }
  .qr-block { justify-self: start; }
  .distance-row { grid-template-columns: 1fr; }
  .details-grid { grid-template-columns: repeat(2, 1fr); }
  .podium-dl div { grid-template-columns: 1fr; gap: 0.2rem; }
  .race-day-layout { grid-template-columns: 1fr; }
  .poster-row { grid-template-columns: 1fr; }
}

/* ── Mobile ── */
@media (max-width: 900px) {
  .nav-toggle { display: flex; position: relative; z-index: 101; }

  .nav-menu {
    position: fixed;
    top: 0;
    right: 0;
    width: min(300px, 88vw);
    height: 100dvh;
    margin-left: 0;
    padding: 5rem 1.25rem 1.5rem;
    background: var(--bg-dark);
    border-left: 1px solid var(--line);
    transform: translateX(100%);
    transition: transform 0.22s ease;
    z-index: 99;
    flex-direction: column;
    align-items: stretch;
    gap: 1.5rem;
    overflow-y: auto;
  }

  .nav-open .nav-menu { transform: translateX(0); }

  .nav::after {
    content: '';
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.22s;
    z-index: 98;
  }

  .nav-open::after {
    opacity: 1;
    pointer-events: auto;
  }

  .nav-links {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }

  .nav-links a {
    display: block;
    padding: 0.85rem 0;
    border-bottom: 1px solid var(--line);
  }

  .nav-register-btn {
    width: 100%;
    margin-top: auto;
  }

  .logo-img-nav { height: 42px; width: min(220px, 58vw); }
  .logo-img-footer { height: 48px; width: min(210px, 58vw); }

  .event-strip-inner { font-size: 0.8rem; gap: 0.5rem 0.85rem; }

  .hero { padding: 2rem 0 3rem; }
  .hero-actions { flex-direction: column; }
  .hero-actions .btn { width: 100%; max-width: 320px; }
  .hero-facts { gap: 1rem; }

  .section { padding: 2.75rem 0; }

  .details-grid { grid-template-columns: 1fr; }

  .details-table { font-size: 0.82rem; }
  .details-table th,
  .details-table td { padding: 0.65rem 0.75rem; }

  .photo-grid {
    grid-template-columns: 1fr;
    grid-auto-rows: auto;
  }

  .photo-item,
  .photo-item-featured {
    grid-column: auto;
    grid-row: auto;
    aspect-ratio: 4 / 3;
  }

  .photo-item img {
    height: auto;
    aspect-ratio: 4 / 3;
  }

  .race-day-photo img { aspect-ratio: 16 / 10; }

  .register-banner-inner {
    flex-direction: column;
    align-items: flex-start;
    padding: 2rem 0;
  }

  .register-banner-inner .btn { width: 100%; }

  .footer-bottom {
    grid-template-columns: 1fr;
    text-align: center;
    justify-items: center;
  }

  .footer-copy { text-align: center; }
}

@media (max-width: 480px) {
  .wrap { width: min(var(--wrap), 100% - 1.5rem); }
  .logo-img-nav { height: 38px; width: min(190px, 64vw); }
  .logo-img-footer { height: 42px; width: min(180px, 65vw); }
  .hero-logo { height: 88px; width: min(100%, 320px); }
  .hero-title { font-size: 2rem; }
  .event-strip-footer .event-strip-inner { font-size: 0.72rem; }
  .qr-img { width: 200px; }
}
