/* =========================================================================
   Trek Dinner — "Deep Space" dark theme
   Drop-in alternative to style.css. Same markup / class names.
   To use it, swap the stylesheet link in index.html:
       <link rel="stylesheet" href="style-space.css">
   Mood: dark, high-contrast — space, galaxies, nebulae. Blue + gold + violet.
   ========================================================================= */

/* 1. Design tokens ------------------------------------------------------- */
:root {
  /* Deep space blues */
  --blue-900: #05070f;   /* void — page background */
  --blue-700: #0c1226;   /* panels / muted sections */
  --blue-500: #4f8bff;   /* primary blue (glowing) */
  --blue-300: #8fb4ff;
  --blue-100: #16203f;   /* subtle borders / washes (dark) */

  /* Gold — starlight accent */
  --gold-600: #d8a72a;
  --gold-500: #f5c451;   /* primary gold */
  --gold-300: #ffe08a;
  --gold-100: #2a2410;   /* dark gold wash */

  /* Nebula violet — extra accent */
  --violet-500: #9b6cff;
  --violet-300: #c3a6ff;

  --ink:      #dde6f5;   /* body text (light on dark) */
  --ink-soft: #9fb0cf;   /* muted text */
  --paper:    #05070f;   /* page background */
  --surface:  #101a35;   /* cards / header panels */

  /* Semantic roles */
  --color-bg:        var(--paper);
  --color-text:      var(--ink);
  --color-heading:   #f2f6ff;
  --color-primary:   var(--blue-500);
  --color-accent:    var(--gold-500);
  --color-link:      var(--blue-300);
  --color-link-hover:var(--gold-300);

  /* Typography (matches index.html font links) */
  --font-sans: "Exo 2", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-display: "Orbitron", "Exo 2", var(--font-sans);
  --text-base: 1.125rem;
  --leading: 1.65;
  --measure: 68ch;

  /* Spacing & shape */
  --space: 1rem;
  --radius: 4px;
  --shadow: 0 8px 30px rgba(0, 0, 0, 0.55);
  --glow-blue: 0 0 24px rgba(79, 139, 255, 0.45);
  --glow-gold: 0 0 20px rgba(245, 196, 81, 0.35);
  --container: 1100px;
}

/* 2. Reset & base -------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: var(--leading);
  color: var(--color-text);
  background-color: var(--color-bg);
  /* Starfield: layered pinpoint radial gradients over a deep nebula wash */
  background-image:
    radial-gradient(1.5px 1.5px at 20% 30%, rgba(255,255,255,0.9), transparent 60%),
    radial-gradient(1.5px 1.5px at 70% 20%, rgba(255,255,255,0.8), transparent 60%),
    radial-gradient(1px 1px at 40% 70%, rgba(255,255,255,0.7), transparent 60%),
    radial-gradient(1px 1px at 85% 60%, rgba(255,255,255,0.6), transparent 60%),
    radial-gradient(2px 2px at 55% 45%, rgba(195,166,255,0.7), transparent 60%),
    radial-gradient(1200px 700px at 80% -10%, rgba(155,108,255,0.18), transparent 60%),
    radial-gradient(1000px 600px at 0% 100%, rgba(79,139,255,0.15), transparent 60%);
  background-attachment: fixed;
  background-repeat: repeat, repeat, repeat, repeat, repeat, no-repeat, no-repeat;
  background-size: 320px 320px, 420px 420px, 260px 260px, 500px 500px, 600px 600px, cover, cover;
  -webkit-font-smoothing: antialiased;
}

main { flex: 1 0 auto; }

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

a {
  color: var(--color-link);
  text-decoration-color: var(--gold-600);
  text-underline-offset: 0.15em;
}
a:hover { color: var(--color-link-hover); }

/* 3. Typography ---------------------------------------------------------- */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--color-heading);
  line-height: 1.2;
  margin: 0 0 0.5em;
  text-wrap: balance;
}
h1 {
  font-size: clamp(2rem, 5vw, 3.25rem);
  text-shadow: var(--glow-blue);
}
h2 { font-size: clamp(1.6rem, 3.5vw, 2.25rem); }
h3 { font-size: 1.35rem; }
h4 { font-size: 1.1rem; }

.section h2 {
  position: relative;
  padding-bottom: 0.35em;
}
.section h2::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 3rem; height: 4px;
  background: var(--color-accent);
  border-radius: 4px;
  box-shadow: var(--glow-gold);
}

p { margin: 0 0 1.1em; max-width: var(--measure); }

.lead {
  font-size: 1.3rem;
  line-height: 1.5;
  color: var(--ink-soft);
}

.small { font-size: 0.9rem; color: var(--ink-soft); }

ul, ol { max-width: var(--measure); padding-left: 1.25em; margin: 0 0 1.1em; }
li { margin-bottom: 0.4em; }
::marker { color: var(--gold-500); }

blockquote {
  margin: 1.5em 0;
  padding: 1em 1.25em;
  border-left: 4px solid var(--color-accent);
  background: rgba(245, 196, 81, 0.06);
  border-radius: 0 var(--radius) var(--radius) 0;
  max-width: var(--measure);
}
blockquote p { margin-bottom: 0.4em; font-size: 1.15rem; color: var(--gold-300); }
blockquote cite { color: var(--ink-soft); font-style: normal; }

/* 4. Layout helpers ------------------------------------------------------ */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: clamp(1rem, 4vw, 2rem);
}

.section { padding-block: clamp(2.5rem, 6vw, 5rem); }
.section--muted {
  background: rgba(12, 18, 38, 0.75);
  border-block: 1px solid var(--blue-100);
}

/* 5. Header & navigation ------------------------------------------------- */
.site-header {
  background: rgba(8, 12, 28, 0.85);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--blue-100);
  position: sticky;
  top: 0;
  z-index: 100;
}
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 72px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.4rem;
  color: var(--color-heading);
  text-decoration: none;
}
.logo__mark { color: var(--color-accent); font-size: 1.5rem; text-shadow: var(--glow-gold); }

.site-nav ul {
  list-style: none;
  display: flex;
  gap: 0.35rem;
  margin: 0;
  padding: 0;
  max-width: none;
}
.site-nav a {
  display: block;
  padding: 0.5rem 0.85rem;
  border-radius: 4px;
  text-decoration: none;
  font-weight: 600;
  color: var(--blue-300);
}
.site-nav a:hover { background: var(--blue-100); color: #fff; }
.site-nav a[aria-current="page"] {
  background: var(--color-primary);
  color: #06122c;
  box-shadow: var(--glow-blue);
}
.site-nav a[aria-current="page"]:hover {
  background: var(--blue-300);
  color: #06122c;
}

/* --- Optional mobile nav (CSS-only, checkbox toggle) --- */
.nav-toggle__btn { display: none; }

@media (max-width: 720px) {
  .nav-toggle__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px; height: 44px;
    cursor: pointer;
    border-radius: 4px;
  }
  .nav-toggle__btn:hover { background: var(--blue-100); }
  .nav-toggle__bar,
  .nav-toggle__bar::before,
  .nav-toggle__bar::after {
    content: "";
    display: block;
    width: 24px; height: 3px;
    background: var(--blue-300);
    border-radius: 4px;
    transition: transform 0.2s ease, opacity 0.2s ease;
  }
  .nav-toggle__bar { position: relative; }
  .nav-toggle__bar::before { position: absolute; top: -8px; }
  .nav-toggle__bar::after  { position: absolute; top:  8px; }

  .site-nav {
    position: absolute;
    top: 100%; left: 0; right: 0;
    background: rgba(8, 12, 28, 0.97);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--blue-100);
    box-shadow: var(--shadow);
    display: none;
  }
  .site-nav ul { flex-direction: column; padding: 0.5rem; gap: 0.15rem; }
  .site-nav a { padding: 0.75rem 1rem; }

  .nav-toggle:checked ~ .site-nav { display: block; }
  .nav-toggle:checked ~ .nav-toggle__btn .nav-toggle__bar { background: transparent; }
  .nav-toggle:checked ~ .nav-toggle__btn .nav-toggle__bar::before { transform: translateY(8px) rotate(45deg); }
  .nav-toggle:checked ~ .nav-toggle__btn .nav-toggle__bar::after  { transform: translateY(-8px) rotate(-45deg); }
}

/* 6. Components ---------------------------------------------------------- */

/* Hero — deep nebula glow */
.hero {
  background:
    radial-gradient(900px 400px at 85% -20%, rgba(155,108,255,0.30), transparent 60%),
    radial-gradient(900px 500px at 10% 120%, rgba(79,139,255,0.25), transparent 60%),
    linear-gradient(160deg, #0a1122, #05070f);
  border-bottom: 1px solid var(--blue-100);
  padding-block: clamp(3rem, 8vw, 6rem);
}
.hero .lead { max-width: var(--measure); }

/* Buttons */
.button {
  display: inline-block;
  padding: 0.7rem 1.4rem;
  margin: 0.25rem 0.35rem 0.25rem 0;
  border-radius: 4px;
  font-family: "Antonio", var(--font-sans);
  font-size: 20px;
  font-weight: 700;
  text-decoration: none;
  text-transform: uppercase;
  background: var(--color-primary);
  color: #06122c;
  border: 2px solid var(--color-primary);
  transition: background 0.15s ease, transform 0.05s ease;
}
.button:hover { background: var(--blue-300); border-color: var(--blue-300); color: #06122c; }
.button:active { transform: translateY(1px); }
.button--ghost {
  background: var(--gold-500);
  color: #06122c;
  border-color: var(--gold-500);
}
.button--ghost:hover { background: var(--gold-300); border-color: var(--gold-300); color: #06122c; }

/* Card grid */
.grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  margin-top: 1.5rem;
}
.card {
  background: var(--surface);
  border: 1px solid var(--blue-100);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.card:hover { border-color: var(--blue-500); transform: translateY(-3px); }
.card__title { color: var(--blue-300); margin-top: 0; }
.card p:last-child { margin-bottom: 0; }

/* Image gallery */
.gallery {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  margin-top: 1.5rem;
  padding: 0;
  list-style: none;
  max-width: none;
}
.gallery li { margin: 0; }
.gallery figure {
  margin: 0;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--blue-700);
  border: 1px solid var(--gold-500);
}
.gallery img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}
.gallery figcaption {
  padding: 0.6rem 0.8rem;
  font-size: 0.9rem;
  color: var(--ink-soft);
}

/* Full-width landscape image */
.fullwidth-image {
  margin: clamp(2rem, 5vw, 3.5rem) 0;
  position: relative;
}
.fullwidth-image img {
  width: 100%;
  height: auto;
}
.fullwidth-image figcaption {
  max-width: var(--container);
  margin-inline: auto;
  padding: 0.75rem clamp(1rem, 4vw, 2rem) 0;
  color: var(--ink-soft);
  font-size: 0.9rem;
}

/* 7. Footer -------------------------------------------------------------- */
.site-footer {
  background: #03050c;
  color: var(--ink-soft);
  padding-block: 2.5rem;
  margin-top: 2rem;
  border-top: 1px solid var(--blue-100);
}
.site-footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.site-footer__brand { font-family: var(--font-display); font-weight: 700; color: var(--gold-300); margin: 0; text-shadow: var(--glow-gold); }
.site-footer a { color: var(--blue-300); text-decoration-color: var(--gold-600); }
.site-footer a:hover { color: #fff; }
.site-footer nav ul {
  list-style: none; display: flex; gap: 1.25rem; margin: 0; padding: 0; max-width: none;
}
.site-footer__copy { margin: 0; color: var(--ink-soft); font-size: 0.9rem; }

/* 8. Utilities & accessibility ------------------------------------------ */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--gold-500);
  color: var(--blue-900);
  padding: 0.6rem 1rem;
  font-weight: 700;
  border-radius: 0 0 4px 0;
  z-index: 200;
}
.skip-link:focus { left: 0; }

:focus-visible {
  outline: 3px solid var(--gold-500);
  outline-offset: 2px;
  border-radius: 4px;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}

.fullwidth-image img.top-spinner {
  position: absolute;
  transform: rotateY(45deg);
	animation: rotateAnimation 6s linear infinite;
  width: 200px;
  height: 300px;
  z-index: 1;
  left: 0;
  top: 0;
  object-fit: scale-down;
  left: calc(50% - 100px);
  top: calc(50% - 150px);
}
@media (max-width: 720px) {
  .fullwidth-image img.top-spinner {
    width: 100px;
    height: 150px;
    left: calc(50% - 50px);
    top: calc(50% - 75px);
  }
}

@keyframes rotateAnimation {
	from {transform: rotateY(0deg);}
	to {transform: rotateY(359deg);}
}