/* ====================================================
   TRAIL DYNAMICS — Under Construction
   Token system:
   Color   #0a0908 bg / #100e0c bg-alt / #c9954f gold /
           #e8b876 gold-bright / #6b5330 bronze-dim /
           #f5f0e6 ink / #8a8073 muted
   Type    Oswald (display/utility) + JetBrains Mono (data/coords)
   ==================================================== */

:root{
  --bg: #0a0908;
  --bg-alt: #100e0c;
  --gold: #c9954f;
  --gold-bright: #e8b876;
  --bronze: #6b5330;
  --bronze-dim: #3a2f20;
  --ink: #f5f0e6;
  --muted: #8a8073;
  --line: rgba(201,149,79,0.18);

  --font-display: 'Oswald', 'Arial Narrow', sans-serif;
  --font-mono: 'JetBrains Mono', 'Courier New', monospace;
}

*, *::before, *::after{ box-sizing: border-box; }

html{ color-scheme: dark; }

body{
  margin:0;
  min-height:100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-display);
  overflow-x: hidden;
  position: relative;
}

::selection{ background: var(--gold); color: #14100a; }

a{ color: inherit; }

/* focus visibility */
:focus-visible{
  outline: 2px solid var(--gold-bright);
  outline-offset: 3px;
}

/* ---------- ambient topo background ---------- */
#contour-canvas{
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  opacity: 0.55;
}

.grain{
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  mix-blend-mode: overlay;
}

.vignette{
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: radial-gradient(ellipse at center, transparent 35%, rgba(0,0,0,0.75) 100%);
}

/* ---------- coordinate readouts ---------- */
.coords{
  position: fixed;
  z-index: 3;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  color: var(--bronze);
  opacity: 0.8;
  user-select: none;
}
.coords--tl{ top: 1.75rem; left: 1.75rem; }
.coords--tr{ top: 1.75rem; right: 1.75rem; }
.coords--bl{ bottom: 1.75rem; left: 1.75rem; }
.coords--br{ bottom: 1.75rem; right: 1.75rem; }

@media (max-width: 640px){
  .coords{ font-size: 0.58rem; }
  .coords--tl, .coords--tr{ top: 1rem; }
  .coords--bl, .coords--br{ bottom: 1rem; }
  .coords--tl, .coords--bl{ left: 1rem; }
  .coords--tr, .coords--br{ right: 1rem; }
}

/* ---------- crosshair marks ---------- */
.crosshair{
  position: absolute;
  width: 18px; height: 18px;
  z-index: 2;
  opacity: 0.35;
  pointer-events: none;
}
.crosshair::before, .crosshair::after{
  content:'';
  position:absolute;
  background: var(--gold);
}
.crosshair::before{ top:50%; left:0; width:100%; height:1px; transform: translateY(-50%); }
.crosshair::after{ left:50%; top:0; height:100%; width:1px; transform: translateX(-50%); }
.crosshair--1{ top: 12%; left: 8%; }
.crosshair--2{ bottom: 15%; right: 9%; }
@media (max-width: 900px){ .crosshair{ display:none; } }

/* ---------- layout ---------- */
.site{
  position: relative;
  z-index: 4;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem 1.5rem 2rem;
}

.hero{
  width: 100%;
  max-width: 780px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

/* ---------- logo ---------- */
.logo-wrap{
  width: min(92vw, 480px);
  margin-bottom: 1.75rem;
  opacity: 0;
  animation: logo-in 1.1s cubic-bezier(.16,.9,.3,1) 0.15s forwards;
}
.logo-img{
  display: block;
  width: 100%;
  height: auto;
  filter: drop-shadow(0 0 40px rgba(201,149,79,0.15));
}

@keyframes logo-in{
  0%{ opacity: 0; transform: translateY(14px) scale(0.98); filter: blur(6px); }
  100%{ opacity: 1; transform: translateY(0) scale(1); filter: blur(0); }
}

/* ---------- status line ---------- */
.status-line{
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.28em;
  color: var(--gold);
  margin-bottom: 1.5rem;
  opacity: 0;
  animation: fade-up 0.8s ease 0.6s forwards;
}
.status-dot{
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--gold-bright);
  box-shadow: 0 0 8px var(--gold-bright);
  animation: pulse 1.8s ease-in-out infinite;
}

@keyframes pulse{
  0%, 100%{ opacity: 1; transform: scale(1); }
  50%{ opacity: 0.35; transform: scale(0.7); }
}

.lede{
  max-width: 520px;
  font-family: var(--font-mono);
  font-size: 0.92rem;
  line-height: 1.7;
  color: var(--muted);
  margin: 0 0 2.75rem;
  opacity: 0;
  animation: fade-up 0.8s ease 0.75s forwards;
}

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

/* ---------- launch label ---------- */
.launch-label{
  display: flex;
  align-items: center;
  gap: 1rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.3em;
  color: var(--bronze);
  margin-bottom: 1.5rem;
  opacity: 0;
  animation: fade-up 0.8s ease 0.9s forwards;
}
.launch-line{
  width: 42px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--bronze));
}
.launch-label span:last-child .launch-line,
.launch-label .launch-line:last-child{
  background: linear-gradient(90deg, var(--bronze), transparent);
}

/* ---------- countdown ---------- */
.countdown{
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: clamp(0.4rem, 2vw, 1.1rem);
  margin-bottom: 1.25rem;
  opacity: 0;
  animation: fade-up 0.9s ease 1.05s forwards;
}

.unit{
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.65rem;
}

.gauge{
  position: relative;
  width: clamp(58px, 16vw, 92px);
  height: clamp(66px, 18vw, 104px);
  background:
    linear-gradient(160deg, #17130e 0%, #0d0b08 55%, #0a0807 100%);
  border: 1px solid var(--bronze);
  border-radius: 6px;
  box-shadow:
    inset 0 0 0 1px rgba(201,149,79,0.06),
    inset 0 2px 10px rgba(0,0,0,0.6),
    0 8px 18px rgba(0,0,0,0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.gauge__glow{
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 20%, rgba(201,149,79,0.14), transparent 65%);
  pointer-events: none;
}

.gauge__digits{
  position: relative;
  z-index: 2;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.5rem, 5vw, 2.35rem);
  letter-spacing: 0.02em;
  color: var(--gold-bright);
  text-shadow: 0 0 18px rgba(232,184,118,0.45), 0 0 2px rgba(232,184,118,0.6);
  font-variant-numeric: tabular-nums;
  transition: opacity 0.15s ease;
}

.gauge__digits.tick{
  animation: digit-tick 0.4s cubic-bezier(.2,.9,.3,1);
}
@keyframes digit-tick{
  0%{ transform: translateY(-6px); opacity: 0; filter: blur(2px); }
  60%{ transform: translateY(1px); opacity: 1; filter: blur(0); }
  100%{ transform: translateY(0); }
}

/* rivets — subtle corner marks referencing rugged hardware */
.gauge__rivet{
  position: absolute;
  width: 4px; height: 4px;
  border-radius: 50%;
  background: var(--bronze);
  box-shadow: inset 0 1px 1px rgba(0,0,0,0.6), 0 0.5px 0 rgba(232,184,118,0.25);
  z-index: 2;
}
.gauge__rivet--tl{ top: 6px; left: 6px; }
.gauge__rivet--tr{ top: 6px; right: 6px; }
.gauge__rivet--bl{ bottom: 6px; left: 6px; }
.gauge__rivet--br{ bottom: 6px; right: 6px; }

.unit__label{
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--muted);
}

.sep{
  font-family: var(--font-display);
  font-size: clamp(1.2rem, 4vw, 1.8rem);
  color: var(--bronze);
  align-self: center;
  margin-top: -1.4rem;
  opacity: 0.6;
}
@media (max-width: 480px){
  .sep{ display: none; }
  .countdown{ gap: 0.5rem; }
}

.target-date{
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.18em;
  color: var(--bronze);
  margin-bottom: 3rem;
  opacity: 0;
  animation: fade-up 0.8s ease 1.2s forwards;
}

/* ---------- notify form ---------- */
.notify{
  width: 100%;
  max-width: 420px;
  opacity: 0;
  animation: fade-up 0.8s ease 1.35s forwards;
}
.notify__label{
  display: block;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.85rem;
}
.notify__row{
  display: flex;
  gap: 0.6rem;
}
.notify__input{
  flex: 1;
  min-width: 0;
  background: rgba(201,149,79,0.04);
  border: 1px solid var(--bronze);
  border-radius: 4px;
  padding: 0.85rem 1rem;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--ink);
  transition: border-color 0.2s ease, background 0.2s ease;
}
.notify__input::placeholder{ color: #55493a; }
.notify__input:focus{
  border-color: var(--gold);
  background: rgba(201,149,79,0.08);
  outline: none;
}

.notify__btn{
  flex-shrink: 0;
  background: var(--gold);
  color: #14100a;
  border: 1px solid var(--gold);
  border-radius: 4px;
  padding: 0.85rem 1.4rem;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
}
.notify__btn:hover{
  background: var(--gold-bright);
  box-shadow: 0 4px 20px rgba(201,149,79,0.35);
}
.notify__btn:active{ transform: translateY(1px); }

.notify__msg{
  min-height: 1.2em;
  margin: 0.75rem 0 0;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--gold-bright);
}

@media (max-width: 480px){
  .notify__row{ flex-direction: column; }
  .notify__btn{ width: 100%; }
}

/* ---------- footer ---------- */
.site-footer{
  position: relative;
  z-index: 4;
  text-align: center;
  padding: 2rem 1.5rem 1rem;
  opacity: 0;
  animation: fade-up 0.8s ease 1.5s forwards;
}
.footer-line{
  width: 60px;
  height: 1px;
  background: var(--bronze-dim);
  margin: 0 auto 1rem;
}
.site-footer p{
  margin: 0;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  color: #524738;
}

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce){
  *, *::before, *::after{
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .logo-wrap, .status-line, .lede, .launch-label, .countdown,
  .target-date, .notify, .site-footer{
    opacity: 1;
  }
}
