
/* Hide initial render until event.txt values applied (prevents flash of defaults).
   If event.txt can't be loaded, JS will reveal the page after a short timeout. */
html.boot body{ opacity: 0; }
html.ready body{ opacity: 1; transition: opacity .25s ease; }


/* Level 18 — modern F1/gaming vibe (no external deps) */

:root{
  --bg: #05070c;
  --ink: #eef2ff;
  --muted: rgba(238, 242, 255, 0.72);
  --muted2: rgba(238, 242, 255, 0.54);
  --card: rgba(255,255,255,0.06);
  --card2: rgba(255,255,255,0.09);
  --stroke: rgba(255,255,255,0.12);

  --teal: #14f1d9;
  --amber: #ffb020;
  --hot: #ff3b3b;

  --radius: 18px;
  --shadow: 0 20px 60px rgba(0,0,0,0.55);
}

*{box-sizing:border-box}
html{scroll-behavior:smooth}

/* ===== Lights bar ===== */
.lights-bar{
  position: relative;       /* scrolls with page (not fixed) */
  width: 100%;
  z-index: 20;
  pointer-events: none;

  /* a touch of breathing room */
  padding: 10px 0 6px;

  display:flex;
  justify-content:center;
  align-items:flex-start;

  filter: drop-shadow(0 18px 20px rgba(0,0,0,0.8));
}
.lights-bar img{
  width: 100%;
  max-width: 1536px;        /* do not scale larger than the PNG */
  height: auto;             /* preserve aspect ratio */
  display:block;
  margin: 0 auto;           /* center on wide screens */
  opacity: 0.98;
}


body{
  margin:0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji","Segoe UI Emoji";
  background: radial-gradient(1200px 700px at 40% -10%, rgba(20,241,217,0.14), transparent 55%),
              radial-gradient(900px 600px at 80% 0%, rgba(255,176,32,0.12), transparent 50%),
              var(--bg);
  color: var(--ink);
  overflow-x:hidden;
}

a{color:inherit}
.container{
  width:min(1100px, calc(100% - 40px));
  margin:0 auto;
}

/* ===== Lights bar (fixed, static) ===== */
/* ===== Hero ===== */
.hero{
  position:relative;
  min-height: 100vh;
  padding-top: 24px; /* leave room for the fixed lights */
  display:grid;
  place-items:center;
  isolation:isolate;
}

.hero-bg{
  position:absolute;
  inset:0;
  background-image: url("assets/background.png");
  background-size: cover;
  background-position: center;
  transform: translate3d(0,0,0) scale(1.08);
  z-index:-3;
}

.hero-overlay{
  position:absolute;
  inset:0;
  background:
    radial-gradient(900px 600px at 30% 25%, rgba(20,241,217,0.18), transparent 55%),
    radial-gradient(800px 500px at 70% 40%, rgba(255,176,32,0.12), transparent 55%),
    linear-gradient(to bottom, rgba(5,7,12,0.35), rgba(5,7,12,0.80) 70%, rgba(5,7,12,1));
  z-index:-2;
}

.hero-car{
  position:absolute;
  width: min(900px, 92vw);
  height:auto;
  bottom: -9vh;
  opacity: 0.92;
  filter: drop-shadow(0 25px 45px rgba(0,0,0,0.75));
  z-index:-1;
  pointer-events:none;
}

.car-blue{
  left: -12vw;
  transform: translate3d(0,0,0) rotate(-2deg);
}
.car-green{
  right: -12vw;
  transform: translate3d(0,0,0) rotate(2deg);
  opacity:0.88;
}

/* subtle sparks overlay (CSS only) */
.hero::after{
  content:"";
  position:absolute;
  inset:0;
  background:
    radial-gradient(2px 2px at 12% 58%, rgba(255,176,32,0.75), transparent 55%),
    radial-gradient(2px 2px at 18% 64%, rgba(255,59,59,0.65), transparent 55%),
    radial-gradient(2px 2px at 22% 61%, rgba(255,176,32,0.65), transparent 55%),
    radial-gradient(2px 2px at 73% 66%, rgba(20,241,217,0.55), transparent 55%),
    radial-gradient(2px 2px at 78% 62%, rgba(255,176,32,0.55), transparent 55%),
    radial-gradient(2px 2px at 84% 67%, rgba(255,59,59,0.55), transparent 55%);
  opacity: 0.40;
  mix-blend-mode: screen;
  animation: drift 8s ease-in-out infinite alternate;
  z-index: 0;
  pointer-events:none;
}
@keyframes drift{
  from{transform: translateY(0px)}
  to{transform: translateY(-18px)}
}

.hero-content{
  text-align:center;
  padding: 24px 0 40px;
  width:min(920px, calc(100% - 40px));
  z-index:1;
}

.hero-title{
  width:min(820px, 92vw);
  height:auto;
  display:block;
  margin: 0 auto 14px;
  filter: drop-shadow(0 14px 20px rgba(0,0,0,0.7));
}

.hero-sub{
  margin: 0 auto 18px;
  font-size: clamp(1.02rem, 2.2vw, 1.20rem);
  line-height: 1.6;
  color: var(--muted);
  max-width: 62ch;
}

.accent{ color: var(--teal); text-shadow: 0 0 18px rgba(20,241,217,0.18); }
.accent2{ color: var(--amber); text-shadow: 0 0 18px rgba(255,176,32,0.14); }

.hero-meta{
  display:flex;
  flex-wrap:wrap;
  gap: 10px;
  justify-content:center;
  margin: 18px 0 22px;
}

.pill{
  display:inline-flex;
  align-items:center;
  gap:10px;
  padding: 10px 12px;
  border-radius: 999px;
  background: rgba(0,0,0,0.28);
  border: 1px solid rgba(255,255,255,0.10);
  backdrop-filter: blur(10px);
  box-shadow: 0 12px 30px rgba(0,0,0,0.35);
  font-size: 0.95rem;
}

.dot{
  width:10px; height:10px; border-radius:50%;
  background: radial-gradient(circle at 30% 30%, #fff, var(--hot));
  box-shadow: 0 0 16px rgba(255,59,59,0.5);
}

.hero-cta{
  display:flex;
  gap: 12px;
  justify-content:center;
  flex-wrap:wrap;
}

.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding: 12px 16px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(255,255,255,0.06);
  color: var(--ink);
  text-decoration:none;
  font-weight: 700;
  letter-spacing: 0.2px;
  box-shadow: 0 12px 24px rgba(0,0,0,0.28);
  transition: transform .12s ease, background .12s ease, border-color .12s ease;
}
.btn:hover{ transform: translateY(-1px); border-color: rgba(255,255,255,0.24); background: rgba(255,255,255,0.10);}
.btn:active{ transform: translateY(0px); }

.btn.primary{
  border-color: rgba(20,241,217,0.35);
  background:
    linear-gradient(135deg, rgba(20,241,217,0.22), rgba(255,176,32,0.14)),
    rgba(255,255,255,0.06);
}
.btn.primary:hover{
  border-color: rgba(20,241,217,0.55);
  background:
    linear-gradient(135deg, rgba(20,241,217,0.28), rgba(255,176,32,0.18)),
    rgba(255,255,255,0.08);
}

.btn.ghost{
  background: rgba(0,0,0,0.18);
}

.btn-row{display:flex; gap:12px; flex-wrap:wrap; align-items:center}

.scroll-hint{
  display:flex;
  gap: 10px;
  justify-content:center;
  align-items:center;
  margin-top: 26px;
  opacity: 0.9;
}
.mouse{
  width: 22px; height: 34px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.35);
  position:relative;
}
.mouse::after{
  content:"";
  width:4px; height:8px;
  border-radius: 999px;
  background: rgba(255,255,255,0.6);
  position:absolute;
  left:50%; top: 7px;
  transform: translateX(-50%);
  animation: wheel 1.2s ease-in-out infinite;
}
@keyframes wheel{
  0%{ transform: translate(-50%, 0); opacity: .9;}
  70%{ transform: translate(-50%, 10px); opacity: .0;}
  100%{ opacity: 0;}
}
.scroll-hint .text{ color: var(--muted2); font-size: 0.9rem; }

/* ===== Sections ===== */
.section{
  padding: 82px 0;
  position:relative;
}
.section.alt{
  background:
    radial-gradient(700px 400px at 30% 0%, rgba(20,241,217,0.10), transparent 55%),
    radial-gradient(700px 400px at 70% 0%, rgba(255,176,32,0.08), transparent 55%),
    rgba(255,255,255,0.02);
  border-top: 1px solid rgba(255,255,255,0.06);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.section-head{
  margin-bottom: 22px;
}
h2{
  margin:0 0 6px;
  font-size: clamp(1.55rem, 3vw, 2.1rem);
  letter-spacing: -0.02em;
}
h3{
  margin: 0 0 10px;
  font-size: 1.12rem;
}
p{margin: 0 0 12px;}
.muted{ color: var(--muted); }
.small{ font-size: 0.92rem; }
code{
  background: rgba(255,255,255,0.06);
  padding: 2px 6px;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.10);
}

.grid{
  display:grid;
  gap: 14px;
}
.grid.cards{
  grid-template-columns: repeat(3, 1fr);
}
.grid.rsvp{
  grid-template-columns: repeat(3, 1fr);
}

.card{
  background: linear-gradient(180deg, rgba(255,255,255,0.06), rgba(255,255,255,0.03));
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
}
.card:hover{
  border-color: rgba(255,255,255,0.18);
  background: linear-gradient(180deg, rgba(255,255,255,0.08), rgba(255,255,255,0.04));
}

.list{
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
}
.list li{ margin: 6px 0; }

.timeline{
  display:grid;
  gap: 12px;
}
.time-item{
  display:grid;
  grid-template-columns: 120px 1fr;
  gap: 14px;
  align-items:start;
  padding: 14px 16px;
  border-radius: var(--radius);
  background: rgba(0,0,0,0.22);
  border: 1px solid rgba(255,255,255,0.08);
}
.time{
  font-weight: 800;
  letter-spacing: .2px;
  color: rgba(255,255,255,0.86);
}
.time-item .content p{ margin: 0; }

.split{
  display:grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 16px;
  align-items:start;
}

.kv{
  margin-top: 14px;
  border-radius: var(--radius);
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(0,0,0,0.20);
  overflow:hidden;
}
.kv-row{
  display:flex;
  justify-content:space-between;
  gap: 18px;
  padding: 12px 14px;
  border-top: 1px solid rgba(255,255,255,0.08);
}
.kv-row:first-child{ border-top:none; }
.k{ color: var(--muted2); font-weight:700; }
.v{ color: var(--muted); text-align:right; }

.map{
  padding: 0;
  overflow:hidden;
}
.map-inner{
  min-height: 260px;
  display:grid;
  place-items:center;
  text-align:center;
  padding: 18px;
  background:
    radial-gradient(500px 260px at 50% 10%, rgba(20,241,217,0.12), transparent 60%),
    radial-gradient(500px 260px at 50% 90%, rgba(255,176,32,0.10), transparent 60%),
    rgba(0,0,0,0.30);
}

/* ===== Footer ===== */
.footer{
  padding: 32px 0 46px;
}
.footer .container{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap: 14px;
  border-top: 1px solid rgba(255,255,255,0.08);
  padding-top: 18px;
}
.footer a{
  color: var(--muted);
  text-decoration:none;
}
.footer a:hover{ text-decoration:underline; }

/* ===== Reveal on scroll =====
   IMPORTANT: content should still be visible if script.js fails to load on the server.
   We only hide .reveal elements when JS is confirmed (html.js). */
.reveal{
  opacity: 1;
  transform: none;
}
html.js .reveal{
  opacity: 0;
  transform: translateY(14px);
  transition: opacity .55s ease, transform .55s ease;
}
html.js .reveal.is-visible{
  opacity: 1;
  transform: translateY(0);
}


/* ===== Countdown ===== */
.countdown-wrap{
  margin: 14px auto 18px;
  width: min(760px, 96%);
  padding: 14px 14px 12px;
  border-radius: 20px;
  background: rgba(0,0,0,0.28);
  border: 1px solid rgba(255,255,255,0.12);
  backdrop-filter: blur(10px);
  box-shadow: 0 18px 46px rgba(0,0,0,0.55);
  position: relative;
  overflow: hidden;
}
.countdown-wrap::before{
  content:"";
  position:absolute;
  inset:-1px;
  background:
    radial-gradient(600px 180px at 18% 0%, rgba(20,241,217,0.22), transparent 55%),
    radial-gradient(600px 180px at 82% 0%, rgba(255,176,32,0.18), transparent 55%),
    linear-gradient(90deg, rgba(255,255,255,0.06), rgba(255,255,255,0.02));
  opacity: 0.6;
  pointer-events:none;
}
.countdown-wrap > *{ position: relative; z-index: 1; }

.countdown-title{
  display:flex;
  justify-content:center;
  align-items:center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 10px;
  letter-spacing: .2px;
}

.badge{
  font-weight: 900;
  font-size: 0.82rem;
  letter-spacing: .08em;
  padding: 8px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.18);
  background: rgba(255,255,255,0.06);
  box-shadow: 0 10px 22px rgba(0,0,0,0.35);
  cursor: pointer;
  user-select: none;
}
.badge:hover{
  border-color: rgba(255,255,255,0.28);
  background: rgba(255,255,255,0.10);
}

.countdown{
  display:flex;
  justify-content:center;
  align-items:stretch;
  gap: 10px;
  flex-wrap: wrap;
}
.cd-box{
  width: 118px;
  padding: 12px 10px;
  border-radius: 16px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  box-shadow: inset 0 0 0 1px rgba(0,0,0,0.25);
}
.cd-box.hot{
  border-color: rgba(255,59,59,0.28);
  box-shadow: inset 0 0 0 1px rgba(0,0,0,0.25), 0 0 24px rgba(255,59,59,0.18);
}
.cd-num{
  font-variant-numeric: tabular-nums;
  font-weight: 950;
  font-size: 2.2rem;
  line-height: 1;
  text-shadow: 0 0 18px rgba(20,241,217,0.14);
}
.cd-lbl{
  margin-top: 6px;
  font-size: 0.82rem;
  color: rgba(238,242,255,0.70);
  letter-spacing: .08em;
  text-transform: uppercase;
}
.countdown-note{
  margin-top: 10px;
  text-align:center;
}

.countdown-wrap.pulse{
  animation: pulseGlow 1.1s ease-in-out;
}
@keyframes pulseGlow{
  0%{ box-shadow: 0 18px 46px rgba(0,0,0,0.55); }
  35%{ box-shadow: 0 18px 46px rgba(0,0,0,0.55), 0 0 34px rgba(255,59,59,0.22), 0 0 34px rgba(20,241,217,0.18); }
  100%{ box-shadow: 0 18px 46px rgba(0,0,0,0.55); }
}

@media (max-width: 520px){
  .cd-box{ width: 44%; min-width: 140px; }
  .cd-num{ font-size: 2rem; }
}


/* ===== Responsive ===== */
@media (max-width: 980px){
  .grid.cards, .grid.rsvp{ grid-template-columns: 1fr; }
  .split{ grid-template-columns: 1fr; }
  .time-item{ grid-template-columns: 100px 1fr; }
  .car-blue{ left: -24vw; }
  .car-green{ right: -24vw; }
}

@media (max-width: 520px){
  .hero{ padding-top: 92px; }
  .time-item{ grid-template-columns: 1fr; }
  .time{ opacity: .9; }
}


/* Responsive Google Map embed (content injected from event.txt) */
.map-wrap{width:100%;}
.map-wrap iframe{width:100%;height:380px;border:0;border-radius:16px;display:block;}
@media (max-width: 520px){.map-wrap iframe{height:320px;}}


/* RSVP form */
.rsvp-form{margin-top:14px}
.rsvp-form .hp{position:absolute;left:-9999px;opacity:0;height:0;width:0}
.form-grid{display:grid;grid-template-columns:1fr;gap:12px;margin-top:12px}
@media (min-width: 680px){
  .form-grid{grid-template-columns:1fr 1fr}
  .form-grid .field:nth-child(1){grid-column:1 / -1}
}
.field{display:flex;flex-direction:column;gap:6px}
.field > span{font-size:.86rem;opacity:.9}
.field input{width:100%}
.check{display:flex;gap:10px;align-items:flex-start;margin-top:10px}
.check input{margin-top:3px}
.btn-row{display:flex;gap:10px;align-items:center;margin-top:14px}


/* Ensure selects match input styling */
select.input{appearance:none;-webkit-appearance:none;background-image:linear-gradient(45deg, transparent 50%, rgba(255,255,255,.75) 50%),linear-gradient(135deg, rgba(255,255,255,.75) 50%, transparent 50%);background-position:calc(100% - 18px) 55%, calc(100% - 12px) 55%;background-size:6px 6px,6px 6px;background-repeat:no-repeat;padding-right:38px;}


/* RSVP note under section intro */
.rsvp-note{margin:8px 0 18px; padding:10px 12px; border-radius:12px; border:1px solid rgba(0,255,200,.35); background:rgba(0,255,200,.08); color:rgba(0,255,220,.95); font-weight:600; text-shadow:0 0 10px rgba(0,255,200,.25);}

/* Strobing effect for RSVP note: cycles between teal and amber colours to draw attention */
@keyframes rsvp-strobe {
  0%, 100% {
    background: rgba(0, 255, 200, 0.08);
    border-color: rgba(0, 255, 200, 0.35);
    color: rgba(0, 255, 220, 0.95);
  }
  50% {
    background: rgba(255, 176, 32, 0.16);
    border-color: rgba(255, 176, 32, 0.5);
    color: rgba(255, 176, 32, 1);
  }
}

/* Apply strobe animation when the element also has class 'strobe' */
.rsvp-note.strobe {
  animation: rsvp-strobe 2s linear infinite;
}


/* Full-width form rows inside RSVP grid */
.form-row-full{grid-column:1 / -1;}

textarea.input{min-height:84px; resize:vertical; padding-top:10px;}


/* RSVP grid: allow specific fields to span both columns */
.form-grid .field.full{grid-column:1 / -1;}


/* === Premium revamp custom styles === */
/* Emphasise celebration line with gradient text and large type */
.hero-kicker {
  font-size: clamp(1.8rem, 5vw, 3rem);
  font-weight: 900;
  margin: 16px 0 24px;
  line-height: 1.2;
  background: linear-gradient(90deg, var(--teal), var(--amber));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 0 30px rgba(20,241,217,0.25);
}

/* Refine hero tagline styling for readability */
#hero-tagline {
  font-size: clamp(1.1rem, 2.5vw, 1.4rem);
  font-weight: 600;
  color: var(--muted);
  max-width: 80ch;
  margin: 0 auto 12px;
  line-height: 1.6;
}

/* Slightly bolder meta fields in hero */
#meta-date, #meta-time, #meta-location {
  font-weight: 600;
}

/* Section headings: larger and bolder for premium look */
.section-head h2 {
  font-size: clamp(1.6rem, 3.5vw, 2.3rem);
  font-weight: 800;
  letter-spacing: -0.02em;
}

/* Timeline enhancements: vertical line with gradient and glowing bullets */
.timeline {
  position: relative;
  padding-left: 32px;
}
.timeline::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 16px;
  width: 2px;
  background: linear-gradient(var(--teal), var(--amber));
  opacity: 0.5;
}
.time-item {
  position: relative;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.12);
}
.time-item::before {
  content: "";
  position: absolute;
  left: -28px;
  top: 20px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--teal);
  box-shadow: 0 0 0 2px rgba(20,241,217,0.4), 0 0 8px rgba(20,241,217,0.5);
}
@media (max-width: 980px) {
  .timeline::before {
    left: 12px;
  }
  .time-item::before {
    left: -24px;
  }
}

/* RSVP summary emphasised */
.rsvp-summary {
  margin-top: 8px;
  font-size: 0.9rem;
  color: var(--muted2);
}
.rsvp-summary strong {
  color: var(--teal);
}

.form-error{margin-top:10px;color:rgba(255,120,120,.95);font-weight:700;}
.input.invalid{border-color:rgba(255,90,90,.85);box-shadow:0 0 0 3px rgba(255,90,90,.18);}
