/* ---------- Fonts ---------- */
@font-face {
  font-family: 'Inter';
  src: url('../assets/fonts/inter/Inter-400.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Inter';
  src: url('../assets/fonts/inter/Inter-500.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Inter';
  src: url('../assets/fonts/inter/Inter-600.woff2') format('woff2');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Inter';
  src: url('../assets/fonts/inter/Inter-700.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Inter';
  src: url('../assets/fonts/inter/Inter-800.woff2') format('woff2');
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}

/* ---------- Reset & base ---------- */
:root {
  --nav-height: 60px;
  --card-bg: rgba(255, 255, 255, 0.94);
  --card-radius: 14px;
  --ink: #1a1a2e;
  --ink-soft: #3a3a52;
  --accent: #ff8a3d;
  --max-width: 980px;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--ink);
  line-height: 1.55;
  min-height: 100vh;
  /* Matches the bottom stop of the sunset gradient in js/background.js,
     so any gap left by mobile browser viewport-height quirks reads as
     more sunset instead of a white strip. */
  background-color: hsl(25, 75%, 48%);
}

img { max-width: 100%; display: block; }

a { color: #b4432a; }
a:hover { color: var(--accent); }

section {
  scroll-margin-top: var(--nav-height);
  padding: 4rem 1.25rem;
}

.wrap {
  max-width: var(--max-width);
  margin: 0 auto;
}

h1, h2, h3 { font-weight: 700; line-height: 1.2; }
h2 { font-size: 1.9rem; margin: 0 0 1rem; }
h3 { font-size: 1.2rem; margin: 1.5rem 0 0.4rem; }
p { margin: 0 0 1rem; }

.card {
  background: var(--card-bg);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  border-radius: var(--card-radius);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.18);
  padding: 1.75rem 2rem;
  margin-bottom: 1.5rem;
}

/* ---------- Background canvas ---------- */
#bg-svg {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  z-index: -1;
  display: block;
}

/* ---------- Nav ---------- */
#site-nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--nav-height);
  background: #0a0a0a;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1rem;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.nav-brand svg { height: 34px; width: 34px; flex-shrink: 0; }
.nav-brand span { white-space: nowrap; }

.nav-links {
  display: flex;
  gap: 1.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  color: rgba(255, 255, 255, 0.75);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  transition: color 0.15s ease;
}

.nav-links a:hover,
.nav-links a.active {
  color: #fff;
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: #fff;
  font-size: 1.6rem;
  cursor: pointer;
  padding: 0.25rem 0.5rem;
  line-height: 1;
}

@media (max-width: 640px) {
  .nav-toggle { display: block; }

  .nav-links {
    position: absolute;
    top: var(--nav-height);
    left: 0;
    right: 0;
    background: #0a0a0a;
    flex-direction: column;
    gap: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.25s ease;
  }

  .nav-links.open { max-height: 240px; }

  .nav-links a {
    display: block;
    padding: 0.9rem 1.25rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
  }

  .nav-brand span { display: none; }
}

/* ---------- Hero ---------- */
#top {
  padding-top: calc(var(--nav-height) + 3rem);
  text-align: center;
}

.hero-title {
  color: #fff;
  font-size: clamp(2rem, 5vw, 3.2rem);
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.45);
  margin: 0 0 0.6rem;
}

.hero-sub {
  color: rgba(255, 255, 255, 0.92);
  font-size: 1.15rem;
  max-width: 640px;
  margin: 0 auto 2rem;
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.4);
}

.hero-img {
  border-radius: var(--card-radius);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
  margin: 0 auto 2rem;
  width: 720px;
  max-width: 100%;
}

.event-card {
  display: inline-block;
  text-align: left;
  max-width: 520px;
}

.event-card .eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 0.4rem;
}

.event-card h3 { margin-top: 0; font-size: 1.35rem; }

.event-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  color: var(--ink-soft);
  font-size: 0.95rem;
  margin-bottom: 1rem;
}

.btn {
  display: inline-block;
  background: var(--ink);
  color: #fff;
  text-decoration: none;
  padding: 0.65rem 1.3rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.95rem;
}

.btn:hover { background: var(--accent); color: #fff; }

.btn-outline {
  display: inline-block;
  background: rgba(255, 255, 255, 0.95);
  color: var(--ink);
  text-decoration: none;
  padding: 0.6rem 1.2rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.9rem;
  border: 1.5px solid var(--ink);
}

.btn-outline:hover { border-color: var(--accent); color: var(--accent); }

/* ---------- About ---------- */
.partner-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.25rem;
}

.photo-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin: 1.25rem 0;
}

.photo-grid img {
  border-radius: 10px;
  width: 100%;
  height: 220px;
  object-fit: cover;
}

@media (max-width: 640px) {
  .photo-grid { grid-template-columns: 1fr; }
  .photo-grid img { height: auto; }
}

.photo-caption {
  font-size: 0.85rem;
  color: var(--ink-soft);
  text-align: center;
  margin-top: -0.75rem;
  margin-bottom: 1.25rem;
}

/* ---------- Info sheet ---------- */
.pdf-link-row {
  display: flex;
  justify-content: center;
  margin: 1.5rem 0;
}

.spec-card h3:first-child { margin-top: 0; }

.spec-card ul { margin: 0.5rem 0 1rem; padding-left: 1.3rem; }
.spec-card li { margin-bottom: 0.3rem; }

.spec-topic {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.spec-topic:last-child { margin-bottom: 0; }

.spec-topic-body { flex: 1; min-width: 0; }
.spec-topic-body h3 { margin-top: 0; }

.part-thumb {
  flex-shrink: 0;
  width: 84px;
  height: 84px;
  padding: 0;
  border: none;
  border-radius: 10px;
  overflow: hidden;
  cursor: zoom-in;
  background: var(--card-bg);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.part-thumb:hover, .part-thumb:focus-visible {
  transform: scale(1.05);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
}

.part-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

@media (max-width: 560px) {
  .spec-topic { gap: 0.75rem; }
  .part-thumb { width: 60px; height: 60px; }
}

/* ---------- Lightbox ---------- */
.lightbox[hidden] { display: none; }

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 2rem;
  background: rgba(26, 26, 46, 0.92);
}

.lightbox img {
  max-width: 90vw;
  max-height: 80vh;
  border-radius: 8px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
}

.lightbox #lightbox-caption {
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.95rem;
  text-align: center;
  max-width: 640px;
  margin: 0;
}

.lightbox-close {
  position: absolute;
  top: 1.25rem;
  right: 1.5rem;
  background: none;
  border: none;
  color: #fff;
  font-size: 2.2rem;
  line-height: 1;
  cursor: pointer;
  padding: 0.25rem 0.5rem;
}

.lightbox-close:hover, .lightbox-close:focus-visible { color: var(--accent); }

.table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

table {
  border-collapse: collapse;
  width: 100%;
  min-width: 560px;
  font-size: 0.92rem;
}

caption {
  text-align: left;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

th, td {
  border: 1px solid rgba(0, 0, 0, 0.12);
  padding: 0.6rem 0.75rem;
  text-align: left;
  vertical-align: top;
}

thead th {
  background: rgba(26, 26, 46, 0.06);
  font-weight: 700;
}

tbody th {
  font-weight: 600;
  white-space: nowrap;
}

/* ---------- Footer ---------- */
#footer {
  padding-bottom: 3rem;
}

.footer-card {
  text-align: center;
  font-size: 0.9rem;
  color: var(--ink-soft);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem 1.25rem;
  margin-bottom: 1rem;
}

.footer-links a { font-weight: 600; }
