/* Novinex — parking guidance site.
   Graphite and white, one teal accent used sparingly. Green/red only mean spot status.
   The 3D garage is the loud element; the rest stays calm. */

@font-face {
  font-family: "Estedad";
  src: url("fonts/Estedad-var.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --bg: #0C0E11;
  --surface: #14171B;
  --surface-2: #1B1F24;
  --text: #EEF1F3;
  --soft: #A7AFB6;
  --muted: #6E777F;
  --accent: #2DD4C4;
  --accent-hi: #5FE6D9;
  --free: #2BE07F;
  --taken: #F04444;
  --fault: #8A939A;
  --warn: #E8B54A;
  --line: rgba(238, 241, 243, 0.08);

  --step--1: 0.875rem;
  --step-0: 1.0625rem;
  --step-1: 1.25rem;
  --step-2: clamp(1.6rem, 1.2rem + 1.4vw, 2.3rem);
  --step-3: clamp(2rem, 1.4rem + 2vw, 3rem);
  --step-4: clamp(2.6rem, 1.4rem + 4.2vw, 5rem);

  --wrap: 1200px;
  --radius: 12px;
}

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

html { scroll-behavior: smooth; scroll-padding-top: 72px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  font-family: "Estedad", Tahoma, sans-serif;
  font-size: var(--step-0);
  font-weight: 400;
  line-height: 1.85;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { margin: 0; line-height: 1.3; font-weight: 700; }
p { margin: 0; }
a { color: inherit; }

.wrap { width: min(100% - 2.5rem, var(--wrap)); margin-inline: auto; }
.muted { color: var(--muted); }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

.skip {
  position: absolute; inset-inline-start: 1rem; top: -4rem;
  background: var(--accent); color: var(--bg); padding: .5rem 1rem; z-index: 30;
}
.skip:focus { top: 1rem; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: .8rem 1.5rem;
  font: inherit; font-weight: 600; text-decoration: none;
  color: #06201D; background: var(--accent);
  border: 1px solid var(--accent); border-radius: 999px;
  transition: background-color .15s, border-color .15s;
}
.btn:hover { background: var(--accent-hi); border-color: var(--accent-hi); }
.btn-ghost { background: transparent; color: var(--text); border-color: rgba(238, 241, 243, .22); }
.btn-ghost:hover { background: rgba(238, 241, 243, .06); border-color: rgba(238, 241, 243, .4); }
.btn-small { padding: .4rem 1.1rem; font-size: var(--step--1); }

/* Header floats over the stage */
.site-header {
  position: fixed; inset: 0 0 auto; z-index: 20;
  transition: background-color .25s, border-color .25s;
  border-bottom: 1px solid transparent;
}
.site-header.solid { background: rgba(12, 14, 17, .88); backdrop-filter: blur(12px); border-color: var(--line); }
.header-row {
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 2rem;
  min-height: 68px; padding-inline: 1.4rem;
  border-inline: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: .7rem; text-decoration: none; justify-self: start; }
.brand-mark { width: 30px; height: auto; }
.brand-text { display: flex; flex-direction: column; line-height: 1.25; }
.brand-name { font-weight: 800; font-size: 1.1rem; }
.brand-sub { font-size: .56rem; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.nav { display: flex; gap: 2.2rem; font-size: var(--step--1); }
.nav a { text-decoration: none; color: var(--soft); transition: color .15s; }
.nav a:hover { color: var(--text); }
.header-phone {
  justify-self: end; display: inline-flex; align-items: center; gap: .55rem;
  font-weight: 700; font-size: .95rem; text-decoration: none; letter-spacing: .02em;
}
.header-phone i { width: 9px; height: 9px; background: var(--accent); border-radius: 2px; }
.header-phone:hover { color: var(--accent); }

/* Stage */
.stage { position: relative; }
.stage-sticky { position: sticky; top: 0; height: 100vh; height: 100svh; margin-bottom: -100vh; margin-bottom: -100svh; overflow: hidden; }
#scene { display: block; width: 100%; height: 100%; }
.fallback { display: none; position: absolute; inset: 0; place-items: center; padding: 6rem 1.5rem 5rem; }
.fallback .lot { width: min(100%, 760px); }
.no-webgl #scene { display: none; }
.no-webgl .fallback { display: grid; }

.scrim {
  position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(to left, rgba(12, 14, 17, .9) 0%, rgba(12, 14, 17, .55) 30%, rgba(12, 14, 17, 0) 52%),
    linear-gradient(to top, rgba(12, 14, 17, .85) 0%, rgba(12, 14, 17, 0) 18%),
    linear-gradient(to bottom, rgba(12, 14, 17, .6) 0%, rgba(12, 14, 17, 0) 14%);
}

.hud {
  position: absolute; inset-inline: 0; bottom: 1.4rem; z-index: 2;
  width: min(100% - 2.5rem, var(--wrap)); margin-inline: auto;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  font-size: var(--step--1); color: var(--soft);
}
.live { display: inline-flex; align-items: center; gap: .55rem; }
.live i { width: 7px; height: 7px; border-radius: 50%; background: var(--free); }
@media (prefers-reduced-motion: no-preference) { .live i { animation: blink 1.8s ease-in-out infinite; } }
@keyframes blink { 50% { opacity: .25; } }
.sim-toggle {
  font: inherit; font-size: var(--step--1); color: var(--soft); cursor: pointer;
  background: transparent; border: 1px solid var(--line); border-radius: 999px; padding: .25rem .9rem;
}
.sim-toggle:hover { color: var(--text); border-color: rgba(238, 241, 243, .3); }

/* Chapters */
.chapters { position: relative; z-index: 1; pointer-events: none; }
.chapter { min-height: 100vh; min-height: 100svh; display: flex; align-items: center; padding-block: 6rem; }
.chapter a, .chapter button { pointer-events: auto; }

.hero-copy { max-width: 34rem; }
.hero-copy h1 { font-size: var(--step-4); font-weight: 800; letter-spacing: -0.02em; line-height: 1.15; }
.lead { margin-top: 1.2rem; font-size: var(--step-1); color: var(--soft); }
.hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 2.2rem; }

.beat { max-width: 26rem; padding-inline-start: 1.4rem; border-inline-start: 2px solid var(--accent); }
.beat h2 { font-size: var(--step-3); font-weight: 800; letter-spacing: -0.015em; }
.beat p { margin-top: .5rem; font-size: var(--step-1); color: var(--soft); }

/* Sections */
.section { padding-block: clamp(4.5rem, 10vw, 8rem); }
.band { background: var(--surface); }
.section-title { font-size: var(--step-2); font-weight: 750; letter-spacing: -0.01em; max-width: 20ch; }
.section-lead { margin-top: .9rem; color: var(--soft); max-width: 34em; font-size: var(--step-1); }

/* Facts */
.facts-band { border-block: 1px solid var(--line); padding-block: clamp(3.5rem, 7vw, 5rem); }
.facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; }
.fact strong { display: block; font-size: var(--step-3); font-weight: 800; line-height: 1.15; }
.fact p { margin-top: .4rem; color: var(--soft); font-size: var(--step--1); }
.sources { margin-top: 2.5rem; font-size: .78rem; color: var(--muted); }

/* Driver */
.split { display: grid; grid-template-columns: 1fr minmax(240px, 290px); gap: clamp(2rem, 8vw, 8rem); align-items: center; }
.phone {
  justify-self: center; width: 100%; max-width: 290px;
  padding: 10px; border-radius: 40px; background: #050607;
  border: 1px solid #2A2F35;
}
.phone-screen { border-radius: 31px; overflow: hidden; background: var(--bg); padding: 1.1rem .8rem 1rem; }
.phone-top { display: flex; justify-content: space-between; align-items: center; font-size: var(--step--1); font-weight: 600; padding-inline: .3rem; margin-bottom: .8rem; }
.pill { font-size: .78rem; font-weight: 700; color: #04210F; background: var(--free); border-radius: 99px; padding: .05rem .6rem; }
.phone-hint { margin-top: .8rem; font-size: var(--step--1); color: var(--soft); padding-inline: .3rem; line-height: 1.7; }
.phone-hint strong { color: var(--accent); }

/* 2D lot (fallback + phone) */
.lot { display: block; width: 100%; height: auto; }
.lot .floor-bg { fill: #16191D; }
.lot .bay-line { stroke: var(--text); stroke-opacity: .35; stroke-width: 2; }
.lot .lane { stroke: var(--text); stroke-opacity: .25; stroke-width: 3; stroke-dasharray: 18 14; }
.lot .arrow { fill: var(--text); opacity: .3; }
.lot .column { fill: #3A4047; }
.lot .spot-num { fill: var(--text); fill-opacity: .4; font-size: 13px; font-family: inherit; text-anchor: middle; dominant-baseline: middle; }
.lot .wall { fill: none; stroke: #343A40; stroke-width: 4; }
.lot .gate-label { fill: var(--accent); font-size: 14px; font-weight: 700; font-family: inherit; text-anchor: middle; dominant-baseline: middle; }
.lot .light { transition: fill .3s; }
.lot .light.free { fill: var(--free); }
.lot .light.taken { fill: var(--taken); }
.lot .light.fault { fill: var(--fault); }
.lot .halo { opacity: .22; transition: fill .3s; }
.lot .car { transition: transform .7s cubic-bezier(.2, .7, .2, 1), opacity .5s; }
.lot .car.away { opacity: 0; }
.lot .car-body { fill: #C9CED2; }
.lot .car-glass { fill: #4B535A; }
.lot .route { fill: none; stroke: var(--accent); stroke-width: 6; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 2 13; }
.lot .target { fill: none; stroke: var(--accent); stroke-width: 3; }
@media (prefers-reduced-motion: no-preference) {
  .lot .target { animation: pulse 1.6s ease-in-out infinite; }
  .lot .route { animation: march 1s linear infinite; }
}
@keyframes pulse { 50% { stroke-opacity: .25; } }
@keyframes march { to { stroke-dashoffset: -15; } }

/* Dashboard */
.dash { margin-top: 2.5rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg); overflow: hidden; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); border-bottom: 1px solid var(--line); }
.stats > div { padding: 1.3rem 1.5rem; display: flex; flex-direction: column; gap: .15rem; }
.stats > div + div { border-inline-start: 1px solid var(--line); }
.stats span { font-size: var(--step--1); color: var(--muted); }
.stats strong { font-size: var(--step-3); font-weight: 750; line-height: 1.2; }
.c-free { color: var(--free); }
.c-warn { color: var(--warn); }
.dash-body { display: grid; grid-template-columns: 1fr 1.3fr; }
.dash-body > div { padding: 1.5rem; }
.dash-body > div + div { border-inline-start: 1px solid var(--line); }
.dash-body h3 { font-size: var(--step--1); font-weight: 600; color: var(--soft); margin-bottom: 1.2rem; }
.floor { display: grid; grid-template-columns: 4.5rem 1fr 2.8rem; align-items: center; gap: .8rem; font-size: var(--step--1); margin-bottom: 1rem; }
.bar { height: 6px; background: var(--surface-2); border-radius: 99px; overflow: hidden; }
.bar i { display: block; height: 100%; width: var(--v); background: var(--text); border-radius: 99px; }
#hours-chart { width: 100%; height: auto; display: block; }
#hours-chart .b { fill: #2C3238; }
#hours-chart .b.peak { fill: var(--accent); }
#hours-chart text { fill: var(--muted); font-size: 11px; font-family: inherit; text-anchor: middle; }
.dash-note { padding: .6rem 1.5rem; border-top: 1px solid var(--line); font-size: .78rem; color: var(--muted); }

/* Scope: a real sequence */
.steps { list-style: none; padding: 0; margin: 2.5rem 0 0; display: grid; grid-template-columns: repeat(5, 1fr); counter-reset: st; }
.steps li { counter-increment: st; padding: 1.2rem 1.2rem 0; border-top: 1px solid var(--line); font-weight: 600; }
.steps li::before { content: counter(st, persian); display: block; font-size: var(--step--1); color: var(--accent); margin-bottom: .4rem; }
.steps li + li { border-inline-start: 1px solid var(--line); }

/* Pilot + FAQ */
.pilot { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem 5rem; align-items: start; }
.faq details { border-bottom: 1px solid var(--line); }
.faq details:first-child { border-top: 1px solid var(--line); }
.faq summary {
  cursor: pointer; list-style: none; padding: 1rem 0; font-weight: 600;
  display: flex; justify-content: space-between; align-items: center; gap: 1rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 1.3rem; color: var(--muted); line-height: 1; }
.faq details[open] summary::after { content: "−"; }
.faq details p { padding-bottom: 1rem; color: var(--soft); }

/* Contact */
.contact-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 2rem; align-items: center; }
.contact-actions { display: flex; flex-direction: column; gap: .75rem; }
.contact-actions .btn { font-size: var(--step-1); padding-block: .95rem; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding-top: clamp(3rem, 6vw, 4.5rem); font-size: var(--step--1); color: var(--soft); }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 2.5rem; padding-bottom: 3rem; }
.footer-brand .brand-name { color: var(--text); }
.footer-brand p { margin-top: 1rem; max-width: 26em; }
.footer-col { display: flex; flex-direction: column; gap: .55rem; align-items: flex-start; }
.footer-col h2 { font-size: var(--step--1); font-weight: 600; color: var(--muted); margin-bottom: .3rem; }
.footer-col a { text-decoration: none; }
.footer-col a:hover, .footer-bottom a:hover { color: var(--accent); }
.footer-bottom {
  display: flex; justify-content: space-between; gap: 1rem;
  padding-block: 1.3rem; border-top: 1px solid var(--line); color: var(--muted); font-size: .8rem;
}
.footer-bottom a { text-decoration: none; }

/* Responsive */
@media (max-width: 1000px) {
  .nav { gap: 1.4rem; }
  .split, .pilot, .contact-grid, .dash-body { grid-template-columns: 1fr; }
  .dash-body > div + div { border-inline-start: 0; border-top: 1px solid var(--line); }
  .steps { grid-template-columns: 1fr 1fr; }
  .steps li:nth-child(odd) { border-inline-start: 0; }
}
@media (max-width: 760px) {
  .nav { display: none; }
  .header-row { grid-template-columns: 1fr auto; border-inline: 0; padding-inline: 0; }
  .brand-sub { display: none; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
  .scrim {
    background:
      linear-gradient(to top, rgba(12, 14, 17, .95) 0%, rgba(12, 14, 17, .55) 42%, rgba(12, 14, 17, 0) 70%),
      linear-gradient(to bottom, rgba(12, 14, 17, .6) 0%, rgba(12, 14, 17, 0) 14%);
  }
  .chapter { align-items: flex-end; padding-block: 5rem 5.5rem; }
  .hero-copy h1 { font-size: 2.5rem; }
  .facts { grid-template-columns: 1fr; gap: 1.6rem; }
  .stats { grid-template-columns: 1fr 1fr; }
  .stats > div:nth-child(3) { border-inline-start: 0; }
  .stats > div:nth-child(n+3) { border-top: 1px solid var(--line); }
  .steps { grid-template-columns: 1fr; }
  .steps li, .steps li + li { border-inline-start: 0; }
}
