/* RoadHand web prototype — Iron Asphalt desktop */
@import url("./tokens.css");

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; background: #131313; color: #e6e1dc; font-family: var(--font-body); }
button { font-family: inherit; cursor: pointer; border: 0; background: none; color: inherit; padding: 0; }
a { color: inherit; text-decoration: none; }
input, textarea, select { font-family: inherit; color: inherit; }

.container { max-width: 1408px; margin: 0 auto; padding: 0 32px; }
.container-narrow { max-width: 1200px; margin: 0 auto; padding: 0 32px; }

/* NAV */
.w-nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(19,19,19,0.92);
  backdrop-filter: blur(16px);
  border-bottom: 4px solid var(--accent, #ff8c00);
}
.w-nav-inner { display: flex; align-items: center; gap: 32px; padding: 20px 32px; }
.w-logo { font-family: var(--font-headline); font-weight: 900; font-size: 18px; letter-spacing: 0.04em; text-transform: uppercase; }
.w-logo b { color: var(--accent, #ff8c00); }
.w-logo span { color: #9d9189; }
.w-nav-items { display: flex; gap: 4px; flex: 1; }
.w-nav-item {
  font-family: var(--font-headline); font-weight: 800; font-size: 11px;
  letter-spacing: 0.16em; text-transform: uppercase;
  padding: 10px 14px; color: #d2c7bc;
  position: relative; transition: color 120ms;
}
.w-nav-item:hover { color: #fff; }
.w-nav-item[data-active="true"] { color: var(--accent, #ff8c00); }
.w-nav-item[data-active="true"]::after {
  content: ""; position: absolute; left: 14px; right: 14px; bottom: -6px;
  height: 3px; background: var(--accent, #ff8c00);
}
.w-nav-cta { display: flex; gap: 8px; }

/* Typography */
.eyebrow {
  font-family: var(--font-headline); font-weight: 700; font-size: 12px;
  letter-spacing: 0.3em; text-transform: uppercase; color: var(--accent, #ff8c00);
}
.eyebrow.dim { color: #9d9189; }
.eyebrow::before { content: "// "; opacity: 0.6; }

.h-display { font-family: var(--font-headline); font-weight: 900; letter-spacing: -0.04em; text-transform: uppercase; line-height: 0.9; }
.h-section { font-family: var(--font-headline); font-weight: 900; letter-spacing: -0.02em; text-transform: uppercase; line-height: 1; }
.h-card { font-family: var(--font-headline); font-weight: 800; letter-spacing: -0.01em; text-transform: uppercase; }
.metric { font-family: var(--font-headline); font-weight: 900; letter-spacing: -0.04em; line-height: 0.9; font-variant-numeric: tabular-nums; }
.mono { font-family: var(--font-mono); }

/* Caution stripes */
.stripe { height: 12px; background: repeating-linear-gradient(45deg, #ff8c00 0 20px, #000 20px 40px); }
.stripe.thin { height: 6px; background: repeating-linear-gradient(45deg, #ff8c00 0 12px, #000 12px 24px); }
.stripe.yellow { background: repeating-linear-gradient(45deg, #ffdb3c 0 20px, #000 20px 40px); }

/* Buttons */
.btn {
  font-family: var(--font-headline); font-weight: 900; text-transform: uppercase;
  letter-spacing: 0.12em; font-size: 13px;
  padding: 16px 22px; min-height: 52px;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  transition: filter 120ms, transform 80ms, background 120ms;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent, #ff8c00); color: #2b1500; }
.btn-primary:hover { filter: brightness(1.08); }
.btn-outline { background: transparent; border: 2px solid var(--accent, #ff8c00); color: var(--accent, #ff8c00); padding: 14px 20px; }
.btn-outline:hover { background: rgba(255,140,0,0.12); }
.btn-ghost { background: #2a2a2a; color: #e6e1dc; }
.btn-ghost:hover { background: #353534; }
.btn-link { color: var(--accent, #ff8c00); padding: 8px 0; }

/* Cards */
.card { background: #201f1f; padding: 28px; transition: background 150ms; }
.card-low { background: #1c1b1b; }
.card-high { background: #2a2a2a; }
.card-accent { border-left: 6px solid var(--accent, #ff8c00); }
.card-warn { border-left: 6px solid #ffdb3c; }
.card-danger { border-left: 6px solid #93000a; }
.card-success { border-left: 6px solid #1bc268; }

/* Badge */
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--font-headline); font-weight: 900;
  font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase;
  padding: 6px 10px; white-space: nowrap;
}
.badge-success { background: #1bc268; color: #00301a; }
.badge-warn { background: #ffdb3c; color: #4d3a00; }
.badge-danger { background: #93000a; color: #ffd9d4; }
.badge-neutral { background: #2a2a2a; color: #d2c7bc; }
.badge-accent { background: var(--accent, #ff8c00); color: #2b1500; }
.badge-outline { background: transparent; color: #d2c7bc; box-shadow: inset 0 0 0 1px #564334; }
.badge-live::before { content: ""; width: 6px; height: 6px; background: currentColor; border-radius: 50%; animation: pulse 2s ease-in-out infinite; }
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:.35} }

/* Inputs */
.input {
  width: 100%; background: #353534; color: #e6e1dc; border: 0;
  padding: 16px 18px; min-height: 56px; font-size: 16px; outline: none;
}
.input:focus { background: #3f3e3c; box-shadow: inset 0 -3px 0 var(--accent, #ff8c00); }
.input::placeholder { color: #6b6660; }
.input-label {
  font-family: var(--font-headline); font-weight: 900; font-size: 11px;
  letter-spacing: 0.22em; text-transform: uppercase; color: #9d9189;
  margin-bottom: 8px; display: block;
}

/* Hi-vis bg */
.hi-vis-grid {
  background-color: #131313;
  background-image:
    linear-gradient(rgba(255,140,0,0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,140,0,0.05) 1px, transparent 1px);
  background-size: 48px 48px;
}

/* Stamp */
.stamp { box-shadow: 8px 8px 0 0 #000; }
.stamp-sm { box-shadow: 5px 5px 0 0 #000; }

/* Photo overlay */
.photo-wrap { position: relative; overflow: hidden; }
.photo-wrap img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo-wrap::after {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(ellipse at top right, rgba(255,140,0,0.22), transparent 60%),
    linear-gradient(180deg, rgba(19,19,19,0.5) 0%, rgba(19,19,19,0.9) 75%, #131313 100%);
}

/* Hero */
.w-hero {
  position: relative; overflow: hidden;
  min-height: 640px;
  display: flex; align-items: center;
}
.w-hero-bg { position: absolute; inset: 0; z-index: 0; }
.w-hero-bg img { width: 100%; height: 100%; object-fit: cover; }
.w-hero-bg::after {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(ellipse at top right, rgba(255,140,0,0.25), transparent 55%),
    linear-gradient(90deg, rgba(19,19,19,0.95) 0%, rgba(19,19,19,0.75) 60%, rgba(19,19,19,0.3) 100%),
    linear-gradient(180deg, transparent 0%, rgba(19,19,19,0.7) 100%);
}
.w-hero-content { position: relative; z-index: 2; }

/* Percentile bar */
.perc-bar {
  position: relative; height: 36px;
  background: linear-gradient(90deg,
    #5c1a18 0%, #93000a 18%, #b27500 35%,
    #ffdb3c 55%, #1bc268 78%, #0a8a47 100%);
}
.perc-marker {
  position: absolute; top: -14px; bottom: -14px;
  width: 4px; background: #fff;
  box-shadow: 0 0 0 1px #000;
  transform: translateX(-50%);
}
.perc-marker::after {
  content: ""; position: absolute; left: 50%; top: -9px;
  width: 0; height: 0; transform: translateX(-50%);
  border-left: 8px solid transparent; border-right: 8px solid transparent;
  border-top: 9px solid #fff;
}

/* Score dial */
.score-dial { position: relative; }
.score-dial svg { transform: rotate(-90deg); }
.score-dial .num {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center; flex-direction: column;
  font-family: var(--font-headline); font-weight: 900; line-height: 1;
}

/* Spark */
.spark { display: flex; align-items: flex-end; gap: 4px; height: 48px; }
.spark span { flex: 1; background: var(--accent, #ff8c00); min-height: 4px; opacity: 0.85; }

/* Section */
.section { padding: 96px 0; }
.section.tight { padding: 64px 0; }

/* Footer */
.w-footer {
  background: #0e0e0e; padding: 64px 0 32px;
  border-top: 6px solid var(--accent, #ff8c00);
}

/* Info pill */
.info-pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 10px; background: #2a2a2a;
  font-family: var(--font-mono); font-size: 11px;
  color: #d2c7bc; letter-spacing: 0.04em; text-transform: uppercase;
}

/* Rule */
.rule { height: 1px; background: #2a2a2a; }

/* Live dot */
.live-dot { width: 8px; height: 8px; background: #1bc268; border-radius: 50%;
  box-shadow: 0 0 0 4px rgba(27,194,104,0.2); animation: pulse 2s ease-in-out infinite; }

/* Stars */
.stars { display: inline-flex; gap: 2px; color: #ffdb3c; }

/* Tab pill bar */
.pill-tabs {
  display: inline-flex; background: #1c1b1b; padding: 4px;
}
.pill-tab {
  padding: 12px 20px;
  font-family: var(--font-headline); font-weight: 900;
  font-size: 12px; letter-spacing: 0.16em; text-transform: uppercase;
  color: #9d9189;
}
.pill-tab[data-active="true"] { background: var(--accent, #ff8c00); color: #2b1500; }

/* Screen transitions */
.screen { animation: slidein 280ms cubic-bezier(0.16, 1, 0.3, 1) both; }
@keyframes slidein { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }

/* Density */
.density-compact .card { padding: 18px; }
.density-comfy .card { padding: 36px; }

/* Hide stripes */
.no-stripes .stripe { display: none; }

/* Marquee */
@keyframes marq { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.marquee { display: flex; gap: 64px; animation: marq 40s linear infinite; width: max-content; padding: 16px 0; }
.marquee-wrap { overflow: hidden; background: #0e0e0e; border-top: 1px solid #2a2a2a; border-bottom: 1px solid #2a2a2a; }
.marquee-item {
  font-family: var(--font-headline); font-weight: 900; font-size: 14px;
  letter-spacing: 0.18em; text-transform: uppercase; color: #6b6660;
  display: flex; align-items: center; gap: 14px; white-space: nowrap;
}
.marquee-item b { color: #ff8c00; }

/* Focus */
input:focus-visible, button:focus-visible, select:focus-visible { outline: 2px solid var(--accent,#ff8c00); outline-offset: 2px; }
