/* ==========================================================================
   SECTOR4 MOTORSPORT // THE SIM RACING PADDOCK
   Aesthetic: Minimalist Brutalist Dark Terminal (Ref: Skills Network / Vercel)
   ========================================================================== */

:root {
  --bg-color: #000000;
  --bg-card: #080808;
  --bg-card-hover: #0F0F0F;
  --border-dim: #181818;
  --border-mid: #262626;
  --border-light: #3A3A3A;
  --text-main: #FFFFFF;
  --text-muted: #888888;
  --text-dim: #555555;
  --s4-orange: #F25C05;
  --s4-lime: #99CC00;
  --s4-blue: #0099FF;
  --font-mono: 'JetBrains Mono', 'SF Mono', Consolas, Menlo, monospace;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  background-color: var(--bg-color);
  color: var(--text-main);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
}

body {
  background-color: var(--bg-color);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow-x: hidden;
}

body.loading-active {
  overflow: hidden;
  height: 100vh;
}

/* --------------------------------------------------------------------------
   Interactive Telemetry Intro / Preloader Screen
   -------------------------------------------------------------------------- */
.loader-overlay {
  position: fixed;
  inset: 0;
  background: #000000;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  transition: transform 0.75s cubic-bezier(0.85, 0, 0.15, 1), opacity 0.6s ease;
}

.loader-overlay.slide-out-left {
  transform: translateX(-100%);
  opacity: 0;
  pointer-events: none;
}

.loader-content {
  width: 100%;
  max-width: 860px;
  background: #050505;
  border: 1px solid var(--border-mid);
  border-radius: 8px;
  padding: 1.5rem 1.75rem;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.95);
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.loader-hud-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  border-bottom: 1px solid var(--border-dim);
  padding-bottom: 0.85rem;
}

.loader-brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  color: #EEE;
  font-weight: 700;
}

.hud-blink-dot {
  width: 8px;
  height: 8px;
  background: var(--s4-orange);
  border-radius: 50%;
  animation: blinkFast 0.8s infinite alternate ease-in-out;
}

@keyframes blinkFast {
  from { opacity: 0.2; transform: scale(0.8); }
  to { opacity: 1; transform: scale(1.15); box-shadow: 0 0 8px var(--s4-orange); }
}

.loader-telemetry-readout {
  display: flex;
  gap: 1.25rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-dim);
}

.loader-telemetry-readout strong {
  color: #FFF;
}

.loader-canvas-wrapper {
  background: #020202;
  border: 1px solid var(--border-dim);
  border-radius: 4px;
  position: relative;
  overflow: hidden;
  padding: 0.5rem;
}

#loaderCanvas {
  width: 100%;
  height: 200px;
  display: block;
}

.loader-markers {
  display: flex;
  justify-content: space-between;
  padding: 0.5rem 0.25rem 0.25rem 0.25rem;
  border-top: 1px solid #111;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  color: var(--text-dim);
  letter-spacing: 0.05em;
  overflow-x: auto;
}

.m-point {
  white-space: nowrap;
}

.loader-status-bar {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.status-track {
  width: 100%;
  height: 4px;
  background: #111;
  border-radius: 2px;
  overflow: hidden;
}

.status-fill {
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, #00FF66, #FF2233, #00FF66);
  box-shadow: 0 0 12px rgba(0, 255, 102, 0.8), -8px 0 20px rgba(255, 34, 51, 0.6);
  filter: blur(0.4px);
  transition: width 0.04s linear;
}

.status-label-row {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-muted);
}

/* --------------------------------------------------------------------------
   Floating Right Vertical Dock (Logos & Icons Only - No Text)
   -------------------------------------------------------------------------- */
.right-vertical-nav {
  position: fixed;
  right: 1.5rem;
  top: 50%;
  transform: translateY(-50%);
  z-index: 999;
}

.dock-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.65rem;
  background: rgba(10, 10, 10, 0.85);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--border-mid);
  padding: 0.75rem 0.5rem;
  border-radius: 30px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8);
}

.dock-item {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #777;
  border-radius: 50%;
  text-decoration: none;
  background: transparent;
  border: none;
  cursor: pointer;
  transition: all 0.16s ease;
  position: relative;
  outline: none;
}

.dock-item:hover, .dock-item.dock-active {
  color: #FFF;
  background: #1C1C1C;
  transform: scale(1.1);
}

.dock-item.logo-item {
  width: 36px;
  height: 36px;
  padding: 2px;
}

.dock-logo {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

.dock-divider {
  width: 18px;
  height: 1px;
  background: var(--border-dim);
  margin: 0.15rem 0;
}

.dock-item.instagram-dock:hover { color: #E1306C; }
.dock-item.discord-dock:hover { color: #5865F2; }

/* --------------------------------------------------------------------------
   Main Page Layout
   -------------------------------------------------------------------------- */
.page-container {
  max-width: 1120px;
  width: 100%;
  margin: 0 auto;
  padding: 5rem 2rem 6rem 2rem;
}

/* --------------------------------------------------------------------------
   Hero Section - Fully Centered + Kinetic Reveal Animations
   -------------------------------------------------------------------------- */
.hero-section {
  padding-bottom: 5rem;
  border-bottom: 1px solid var(--border-dim);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.hero-center-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 2.5rem;
}

.block-typography-wrapper {
  position: relative;
  display: inline-block;
}

/* Big Title Kinetic Reveal Animation */
.block-title {
  font-family: var(--font-mono);
  font-size: clamp(3.6rem, 9vw, 6.8rem);
  font-weight: 900;
  letter-spacing: -0.04em;
  line-height: 0.9;
  color: #FFFFFF;
  text-transform: uppercase;
  margin: 0;
  text-shadow:
    1px 1px 0 #000,
    2px 2px 0 #000,
    3px 3px 0 #000,
    4px 4px 0 #FFF,
    5px 5px 0 #FFF,
    6px 6px 0 #000,
    7px 7px 0 #666,
    8px 8px 0 #666;
  opacity: 0;
  transform: translateY(30px) scale(0.96);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.block-title.revealed {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.block-subtitle {
  font-family: var(--font-mono);
  font-size: clamp(1.4rem, 3.2vw, 2.2rem);
  font-weight: 800;
  letter-spacing: 0.22em;
  color: #FFF;
  margin-top: 1rem;
  text-shadow: 2px 2px 0 #333;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.15s, transform 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.15s;
}

.block-subtitle.revealed {
  opacity: 1;
  transform: translateY(0);
}

.hero-tagline {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  letter-spacing: 0.16em;
  color: var(--text-muted);
  margin-top: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  opacity: 0;
  transition: opacity 0.7s ease 0.3s;
}

.hero-tagline.revealed {
  opacity: 1;
}

.tagline-dot {
  width: 8px;
  height: 8px;
  background: var(--s4-orange);
  border-radius: 1px;
}

/* Action Box */
.hero-center-actions {
  width: 100%;
  max-width: 480px;
  margin-bottom: 2.75rem;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.7s ease 0.4s, transform 0.7s ease 0.4s;
}

.hero-center-actions.revealed {
  opacity: 1;
  transform: translateY(0);
}

.terminal-action-box {
  background: var(--bg-card);
  border: 1px solid var(--border-mid);
  border-radius: 6px;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: center;
}

.terminal-buttons {
  display: flex;
  gap: 0.85rem;
  justify-content: center;
  width: 100%;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  font-family: var(--font-mono);
  font-size: 0.92rem;
  font-weight: 600;
  text-decoration: none;
  padding: 0.75rem 1.4rem;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.12s ease;
  user-select: none;
  border: 1px solid transparent;
}

.btn-primary { background: #FFFFFF; color: #000000; }
.btn-primary:hover { background: #EAEAEA; transform: translateY(-1px); }

.btn-secondary {
  background: #141414;
  color: #FFFFFF;
  border-color: var(--border-mid);
}
.btn-secondary:hover {
  background: #1F1F1F;
  border-color: var(--border-light);
  transform: translateY(-1px);
}

.terminal-copy-hint {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  background: #000;
  border: 1px solid var(--border-dim);
  border-radius: 4px;
  padding: 0.55rem 0.9rem;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--text-muted);
}

.copy-link-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  padding: 0.2rem;
  border-radius: 3px;
  transition: color 0.12s ease;
}

.copy-link-btn:hover { color: #FFF; }

.hero-desc-centered {
  max-width: 720px;
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
  margin: 0 auto;
  opacity: 0;
  transition: opacity 0.7s ease 0.55s;
}

.hero-desc-centered.revealed {
  opacity: 1;
}

.lead-text {
  font-size: 1.25rem;
  line-height: 1.6;
  color: #EEEEEE;
  font-weight: 400;
}

.sub-text {
  font-size: 1.05rem;
  line-height: 1.6;
  color: var(--text-muted);
  font-weight: 400;
}

/* Sections */
.section-container {
  padding: 4.5rem 0;
  border-bottom: 1px solid var(--border-dim);
}

.section-header { margin-bottom: 2rem; }

.section-tag {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.15em;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-bottom: 0.4rem;
}

.section-title {
  font-family: var(--font-mono);
  font-size: 1.45rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #FFF;
}

/* Table Style */
.leaderboard-table {
  background: var(--bg-card);
  border: 1px solid var(--border-dim);
  border-radius: 6px;
  overflow: hidden;
}

.table-header-row {
  display: grid;
  grid-template-columns: 50px 240px 1fr 140px;
  padding: 0.85rem 1.25rem;
  background: #0C0C0C;
  border-bottom: 1px solid var(--border-mid);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  text-transform: uppercase;
}

.table-row {
  display: grid;
  grid-template-columns: 50px 240px 1fr 140px;
  padding: 1.2rem 1.25rem;
  border-bottom: 1px solid var(--border-dim);
  align-items: center;
  transition: background 0.3s ease, outline 0.3s ease;
}

.table-row:last-child { border-bottom: none; }
.table-row:hover { background: var(--bg-card-hover); }

/* Highlight flash animation when navigated to via sidebar button */
.table-row.row-highlight {
  background: rgba(242, 92, 5, 0.15);
  box-shadow: inset 3px 0 0 var(--s4-orange);
}

.col-num { font-family: var(--font-mono); font-size: 0.85rem; color: var(--text-dim); }
.col-main { display: flex; flex-direction: column; gap: 0.2rem; }
.row-title { font-size: 0.95rem; font-weight: 600; color: #FFF; }
.row-tag { font-family: var(--font-mono); font-size: 0.72rem; color: var(--text-dim); }
.col-desc { font-size: 0.88rem; color: #999; line-height: 1.45; padding-right: 1.5rem; }
.col-status { text-align: right; }

.badge-active {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  background: rgba(153, 204, 0, 0.12);
  color: var(--s4-lime);
  border: 1px solid rgba(153, 204, 0, 0.3);
  padding: 0.3rem 0.6rem;
  border-radius: 3px;
}

.badge-tool {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  background: rgba(242, 92, 5, 0.12);
  color: var(--s4-orange);
  border: 1px solid rgba(242, 92, 5, 0.3);
  padding: 0.3rem 0.6rem;
  border-radius: 3px;
}

/* Two Column Layout */
.two-col-layout {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 2rem;
}

.panel-box {
  background: var(--bg-card);
  border: 1px solid var(--border-dim);
  border-radius: 6px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.panel-box-header {
  padding: 0.9rem 1.25rem;
  background: #0B0B0B;
  border-bottom: 1px solid var(--border-dim);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.box-title { font-family: var(--font-mono); font-size: 0.78rem; font-weight: 600; color: #EEE; }
.box-badge { font-family: var(--font-mono); font-size: 0.68rem; color: var(--text-dim); }

.graph-wrapper {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

#telemetryCanvas {
  width: 100%;
  height: 220px;
  background: #020202;
  border: 1px solid var(--border-dim);
  border-radius: 4px;
  cursor: crosshair;
}

.scrubber-legend {
  display: flex;
  justify-content: space-around;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
  padding-top: 0.25rem;
}

.legend-item { display: flex; align-items: center; gap: 0.35rem; }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.throttle-dot { background: #00FF66; box-shadow: 0 0 6px rgba(0, 255, 102, 0.6); }
.brake-dot { background: #FF2233; box-shadow: 0 0 6px rgba(255, 34, 51, 0.6); }
.speed-dot { background: #FFFFFF; }

.scrub-instruction {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--text-dim);
  text-align: center;
}

.panel-body-text {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  font-size: 0.95rem;
  line-height: 1.6;
  color: #BBB;
}

.panel-body-text strong { color: #FFF; }

.plain-bullet-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding-top: 0.25rem;
}

.plain-bullet-list li {
  position: relative;
  padding-left: 1.25rem;
  color: #AAA;
  font-size: 0.9rem;
}

.plain-bullet-list li::before {
  content: "•";
  position: absolute;
  left: 0;
  color: var(--s4-orange);
}

/* Fuel Planner (Enclosed box alignment) */
.fuel-calculator-panel {
  background: var(--bg-card);
  border: 1px solid var(--border-dim);
  border-radius: 6px;
  padding: 1.75rem;
}

.calc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1.5rem;
  margin-bottom: 1.75rem;
}

.calc-field { display: flex; flex-direction: column; gap: 0.45rem; }
.calc-label { font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.08em; color: var(--text-muted); }
.field-hint { font-size: 0.7rem; color: var(--text-dim); }

.time-picker-row {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: #020202;
  border: 1px solid var(--border-mid);
  border-radius: 4px;
  padding: 0.45rem 0.65rem;
  width: 100%;
}

.time-part { display: inline-flex; align-items: baseline; gap: 0.25rem; }

.time-input {
  background: transparent;
  border: none;
  color: #FFF;
  font-family: var(--font-mono);
  font-size: 1rem;
  font-weight: 700;
  width: 32px;
  text-align: center;
  outline: none;
  padding: 0;
  margin: 0;
  -moz-appearance: textfield;
}

.time-input::-webkit-outer-spin-button,
.time-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.time-unit { font-family: var(--font-mono); font-size: 0.65rem; font-weight: 600; color: var(--text-dim); }
.colon { font-family: var(--font-mono); color: var(--text-dim); font-weight: 700; font-size: 0.9rem; margin: 0 0.15rem; }

.lap-time-row, .input-with-unit {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  background: #020202;
  border: 1px solid var(--border-mid);
  border-radius: 4px;
  padding: 0.45rem 0.65rem;
  width: 100%;
}

.time-input.short { width: 30px; }
.time-input.medium { width: 44px; }
.time-input.wide { width: 65px; text-align: left; }

.unit-text { font-family: var(--font-mono); font-size: 0.75rem; color: var(--text-muted); }

.select-input {
  background: #020202;
  border: 1px solid var(--border-mid);
  color: #FFF;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  padding: 0.65rem 0.6rem;
  border-radius: 4px;
  outline: none;
  cursor: pointer;
  width: 100%;
}

.calc-action-bar { margin-bottom: 1.5rem; }

.fuel-result-container {
  background: #050505;
  border: 1px solid var(--border-mid);
  border-radius: 5px;
  padding: 1.25rem;
}

.result-box {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1.25rem;
  border-bottom: 1px solid var(--border-dim);
  padding-bottom: 1rem;
  margin-bottom: 0.75rem;
}

.res-item { display: flex; flex-direction: column; gap: 0.3rem; }
.res-label { font-family: var(--font-mono); font-size: 0.7rem; color: var(--text-muted); }
.res-val { font-family: var(--font-mono); font-size: 1.45rem; font-weight: 700; color: #FFF; }
.res-val.highlight-color { color: var(--s4-orange); }
.res-note { font-size: 0.85rem; color: var(--text-muted); line-height: 1.4; }

/* Footer */
.site-footer {
  padding-top: 3.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.footer-left { display: flex; align-items: center; gap: 0.75rem; }
.footer-logo { width: 20px; height: 20px; border-radius: 3px; object-fit: cover; }
.footer-copy { font-family: var(--font-mono); font-size: 0.72rem; color: var(--text-dim); }
.footer-right { display: flex; gap: 1.25rem; flex-wrap: wrap; }
.footer-link { font-family: var(--font-mono); font-size: 0.75rem; color: var(--text-muted); text-decoration: none; }
.footer-link:hover { color: var(--s4-orange); }

@media (max-width: 900px) {
  .right-vertical-nav {
    position: fixed;
    right: 0.75rem;
    top: auto;
    bottom: 1rem;
    transform: none;
  }
  .dock-inner {
    flex-direction: row;
    padding: 0.4rem 0.6rem;
    border-radius: 20px;
  }
  .dock-divider { width: 1px; height: 18px; margin: 0 0.2rem; }
  .hero-grid, .two-col-layout { grid-template-columns: 1fr; gap: 2rem; }
  .table-header-row { display: none; }
  .table-row { grid-template-columns: 35px 1fr; gap: 0.75rem; }
  .col-desc { grid-column: 2 / -1; padding-right: 0; }
  .col-status { grid-column: 2 / -1; text-align: left; }
  .page-container { padding: 3rem 1.2rem 5rem 1.2rem; }
  .loader-markers { display: none; }
}
/* Start / Ignition screen styles */
.loader-start-screen {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  background: rgba(0, 0, 0, 0.95);
  cursor: pointer;
}

.start-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
  text-align: center;
  padding: 2rem;
  border: 1px solid var(--border-mid);
  border-radius: 8px;
  background: #080808;
}

.start-title {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  letter-spacing: 0.18em;
  color: #fff;
  font-weight: 700;
}

.start-btn {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  padding: 0.85rem 1.75rem;
}

.start-hint {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  color: var(--text-dim);
}
