:root{
  --bg1:#0b0f1a;
  --bg2:#1b1233;
  --card:#0f1626cc;
  --text:#f4f4f7;
  --muted:#c7c7d1;
  --accent:#ffd36a;
  --accent2:#8bd3ff;
  --danger:#ff7b7b;
  --shadow: 0 20px 60px rgba(0,0,0,.35);
  --radius: 18px;
  --line: rgba(255,255,255,.14);
}

*{ box-sizing:border-box; }
html,body{ height:100%; }
body{
  margin:0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial;
  color:var(--text);
  background:
    radial-gradient(
      420px 1200px at 50% 50%,
      rgba(255, 211, 106, 0.10),
      rgba(27, 18, 51, 0.35) 45%,
      rgba(11, 15, 26, 0.95) 75%
    ),
    linear-gradient(180deg, #0b0f1a 0%, #1b1233 100%);
  overflow-x:hidden;
}

body::after{
  content:"";
  position:fixed;
  inset:0;
  pointer-events:none;
  background:
    radial-gradient(
      ellipse at center,
      transparent 40%,
      rgba(0,0,0,.55) 100%
    );
}


.wrap{
  min-height:100%;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:32px 16px;
}

.card{
  width:min(980px, 100%);
  background: linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.03));
  border: 1px solid rgba(255,255,255,.10);
  box-shadow: var(--shadow);
  border-radius: var(--radius);
  padding: 28px;
  position:relative;
  overflow:hidden;
}

.card:before{
  content:"";
  position:absolute;
  inset:-2px;
  background: radial-gradient(700px 350px at 10% 10%, rgba(255,211,106,.14), transparent 60%),
              radial-gradient(800px 450px at 90% 0%, rgba(139,211,255,.10), transparent 55%);
  pointer-events:none;
}

.inner{ position:relative; }

h1{
  margin:0 0 8px;
  font-size: clamp(28px, 4vw, 44px);
  letter-spacing: .4px;
}

p{
  margin:0 0 18px;
  color: var(--muted);
  line-height: 1.55;
  font-size: 16px;
}

.badge{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding: 8px 12px;
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 999px;
  background: rgba(0,0,0,.16);
  color: rgba(255,255,255,.9);
  font-size: 13px;
}

.grid{
  display:grid;
  grid-template-columns: 1fr;
  gap: 18px;
  margin-top: 16px;
}

@media (min-width: 860px){
  .grid{
    grid-template-columns: 1.1fr .9fr;
    align-items: start;
  }
}

.countdown{
  font-variant-numeric: tabular-nums;
  font-size: clamp(28px, 5vw, 46px);
  letter-spacing: 1px;
  color: var(--text);
  padding: 14px 16px;
  border-radius: 14px;
  background: rgba(0,0,0,.18);
  border: 1px solid rgba(255,255,255,.10);
}

.small{
  font-size: 13px;
  color: rgba(255,255,255,.70);
}

.hr{
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.16), transparent);
  margin: 22px 0;
}

.stage{
  display:none;
  animation: fadeIn .45s ease both;
}
.stage.active{ display:block; }

@keyframes fadeIn{
  from{ opacity:0; transform: translateY(10px); }
  to{ opacity:1; transform: translateY(0); }
}

.inputRow{
  display:flex;
  gap: 10px;
  flex-wrap: wrap;
}

input[type="text"]{
  flex: 1;
  min-width: 220px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(0,0,0,.18);
  color: var(--text);
  outline: none;
  font-size: 16px;
}

button{
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.16);
  background: rgba(255,211,106,.16);
  color: var(--text);
  font-weight: 650;
  cursor: pointer;
  transition: transform .08s ease, background .2s ease;
}
button:hover{ background: rgba(255,211,106,.22); }
button:active{ transform: translateY(1px); }

.msg{
  margin-top: 10px;
  font-size: 14px;
}
.msg.ok{ color: rgba(139, 255, 180, .95); }
.msg.err{ color: rgba(255, 123, 123, .95); }

/* Road header + ending card */
.roadHeader{
  display:flex;
  flex-direction:column;
  gap: 6px;
  margin-bottom: 8px;
}
.roadSubtitle{ color: rgba(255,255,255,.72); }

.final{
  margin-top: 18px;
  padding: 16px;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,.12);
  background: radial-gradient(700px 300px at 20% 0%, rgba(139,211,255,.10), transparent 60%),
              radial-gradient(600px 280px at 80% 20%, rgba(255,211,106,.12), transparent 60%),
              rgba(0,0,0,.16);
}
.final h2{ margin:0 0 6px; }
.final p{ margin:0; color: rgba(255,255,255,.85); }

/* =============================
   VERTICAL ROAD PATH (curved)
   ============================= */

.road{
  margin-top: 22px;
  position: relative;
  display:flex;
  flex-direction:column;
  gap: 6px;
  padding: 6px 0;
}

.stop{
  position: relative;
  display:grid;
  grid-template-columns: 1fr 64px 1fr;
  align-items:center;
  padding: 18px 0;
}

/* center spine */
.stop:before{
  content:"";
  position:absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 2px;
  transform: translateX(-1px);
  background: linear-gradient(
    180deg,
    transparent,
    rgba(255,255,255,.25),
    transparent
  );
  border-radius: 999px;
  pointer-events:none;
}

/* dot */
.dot{
  grid-column: 2;
  justify-self:center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: rgba(255,211,106,.22);
  border: 1px solid rgba(255,255,255,.22);
  box-shadow: 0 0 0 7px rgba(255,211,106,.06);
  z-index: 2;
}

/* cards alternate left/right */
.stop.left .stopCard{ grid-column: 1; justify-self: end; }
.stop.right .stopCard{ grid-column: 3; justify-self: start; }

.stopCard{
  width: min(420px, 100%);
  background: rgba(0,0,0,.18);
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 16px;
  padding: 14px;
  display:grid;
  grid-template-columns: 120px 1fr;
  gap: 14px;
  box-shadow: 0 18px 45px rgba(0,0,0,.22);
  position:relative;
  z-index: 3;

  /* reveal */
  opacity: 0;
  transform: translateY(12px);
  transition: opacity .6s ease, transform .6s ease;
}

/* "hanging" feel */
.stop.left .stopCard{ transform: translateY(12px) rotate(-1.6deg); }
.stop.right .stopCard{ transform: translateY(12px) rotate(1.6deg); }
.stop.in-view .stopCard{ opacity: 1; transform: translateY(0) rotate(var(--rot)); transition-delay: calc(var(--i) * 120ms); }
.stop.left.in-view .stopCard{ --rot: -1.6deg; }
.stop.right.in-view .stopCard{ --rot: 1.6deg; }

.photo{
  width: 120px;
  height: 120px;
  border-radius: 14px;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.12);
  overflow:hidden;
}
.photo img{
  width:100%;
  height:100%;
  object-fit: cover;
  display:block;
}

.meta{ display:flex; flex-direction:column; gap: 4px; }
.date{ font-size: 13px; color: rgba(255,255,255,.70); }
.title{ font-weight: 750; letter-spacing: .2px; }
.text{ color: rgba(255,255,255,.82); line-height: 1.45; }

/* Curved connector SVG between stops */
.connector{
  grid-column: 1 / -1;
  height: 72px;
  position: relative;
  z-index: 1;
  pointer-events:none;
}

.connector svg{
  width: 100%;
  height: 100%;
  display:block;
}

/* make path stroke subtle */
.connector path{
  stroke: rgba(255,255,255,.32);
  stroke-width: 2.2;
  fill: none;
}

/* arrow head */
.connector marker path{
  fill: var(--accent);
}

@media (max-width: 820px){
  .stop{
    grid-template-columns: 1fr;
    padding: 14px 0;
  }
  .stop:before{
    left: 20px;
    transform: none;
  }
  .dot{
    grid-column: 1;
    justify-self: start;
    margin-left: 11px;
  }
  .stopCard{
    grid-column: 1 !important;
    justify-self: stretch !important;
    margin-left: 42px;
    width: auto;
    grid-template-columns: 1fr;
  }
  .connector{
    margin-left: 12px;
  }
  .connector svg{
    width: calc(100% - 12px);
  }
}

/* Reduce motion */
@media (prefers-reduced-motion: reduce){
  .stopCard{
    transition: none;
    opacity: 1;
    transform: none;
  }
}
