/* ---------- Fonts ----------
   Put Vazirmatn woff2 files in /static/fonts/ (local hosting, no CDN). */
@font-face {
  font-family: "Vazirmatn";
  src: url("/static/fonts/Vazirmatn-Regular.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Vazirmatn";
  src: url("/static/fonts/Vazirmatn-Bold.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}

/* ---------- Tokens ---------- */
:root {
  --cream: #ffe4bd;
  --cream-deep: #f6d3a1;
  --ink: #1f2a44;
  --line: #22304f;
  --orange: #f26b21;
  --orange-dark: #d9560f;
  --muted: #6d6a63;
  --card: #fffaf2;
  --board: #141d33;
  --radius: 14px;
  --container: 1120px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: "Vazirmatn", Tahoma, "Segoe UI", sans-serif;
  background: var(--cream);
  color: var(--ink);
  line-height: 1.9;
}

/* subtle diagonal line texture, drifting */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background: repeating-linear-gradient(
    -45deg,
    transparent 0 44px,
    rgba(34, 48, 79, 0.045) 44px 46px
  );
  background-size: 130px 130px;
  animation: bg-drift 22s linear infinite;
  pointer-events: none;
}
@keyframes bg-drift {
  to { background-position: 130px 130px; }
}

/* ---------- pencil cars drifting across the page background ---------- */
.bg-cars {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
  direction: ltr;
}
.bg-car { position: absolute; width: 170px; height: auto; opacity: 0.13; }
.sketch {
  fill: none;
  stroke: var(--line);
  stroke-width: 3.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 10 4; /* broken line = pencil sketch feel */
}
.bg-car.one   { top: 24%; animation: cross-right 46s linear infinite; }
.bg-car.two   { top: 55%; animation: cross-left 58s linear infinite; animation-delay: -18s; }
.bg-car.two svg, .bg-car.two { transform-origin: center; }
.bg-car.two   { scale: -1 1; } /* face the other way */
.bg-car.three { top: 82%; width: 120px; animation: cross-right 70s linear infinite; animation-delay: -35s; }

@keyframes cross-right {
  from { translate: -220px 0; }
  to   { translate: 110vw 0; }
}
@keyframes cross-left {
  from { translate: 110vw 0; }
  to   { translate: -220px 0; }
}

.container { max-width: var(--container); margin: 0 auto; padding: 0 20px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  padding: 12px 26px;
  border-radius: var(--radius);
  text-decoration: none;
  font-weight: 700;
  font-size: 0.95rem;
  transition: transform 0.15s ease, background 0.2s ease, color 0.2s ease;
}
.btn:active { transform: scale(0.97); }
.btn-primary { background: var(--orange); color: #fff; }
.btn-primary:hover { background: var(--orange-dark); }
.btn-dark { background: var(--ink); color: #fff; }
.btn-dark:hover { background: #101a30; }
.btn-sm { padding: 8px 18px; font-size: 0.85rem; }

/* ---------- Topbar ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255, 228, 189, 0.94);
  backdrop-filter: blur(8px);
  border-bottom: 2px solid var(--ink);
}
.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 68px;
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.brand-h {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 8px;
  background: var(--orange);
  color: #fff;
  font-weight: 700;
  font-size: 1.3rem;
}
.brand-name { font-size: 1.1rem; letter-spacing: 0.04em; color: var(--orange); font-weight: 700; }
.brand-name b { color: var(--muted); font-weight: 700; }
.nav { display: flex; gap: 22px; }
.nav a { color: var(--ink); text-decoration: none; font-size: 0.95rem; position: relative; }
.nav a::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: -4px;
  height: 2px;
  width: 0;
  background: var(--orange);
  transition: width 0.25s ease;
}
.nav a:hover::after { width: 100%; }

/* ---------- Hero + parking scene ---------- */
.hero {
  position: relative;
  min-height: 78vh;
  display: flex;
  align-items: flex-start;
  overflow: hidden;
}
.hero-content { position: relative; z-index: 2; padding-top: 72px; text-align: center; width: 100%; }
.hero h1 {
  font-size: clamp(1.7rem, 4vw, 2.8rem);
  line-height: 1.5;
  margin-bottom: 14px;
  animation: rise-in 0.9s ease-out both;
}
.tagline {
  font-size: 1.25rem;
  color: var(--muted);
  margin-bottom: 30px;
  direction: ltr;
  animation: rise-in 0.9s ease-out 0.2s both;
}
.tagline .en { color: var(--orange); font-weight: 700; border-bottom: 3px solid var(--orange); }
.hero-actions {
  display: flex; gap: 12px; justify-content: center; flex-wrap: wrap;
  animation: rise-in 0.9s ease-out 0.4s both;
}
@keyframes rise-in {
  from { opacity: 0; transform: translateY(22px); }
  to   { opacity: 1; transform: none; }
}

.scene { position: absolute; inset-inline: 0; bottom: 0; z-index: 1; direction: ltr; }
.scene svg { width: 100%; height: auto; display: block; }

.ground { stroke: var(--line); stroke-width: 4; stroke-linecap: round; }
.car-body {
  fill: none;
  stroke: var(--line);
  stroke-width: 5;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.wheel { fill: var(--cream); stroke: var(--line); stroke-width: 5; }
.hub { fill: var(--line); stroke: none; }
.thin { stroke-width: 3.5; }

.car-park { animation: drive-park 12s cubic-bezier(0.25, 0.6, 0.3, 1) infinite; }
@keyframes drive-park {
  0%   { transform: translateX(-260px); opacity: 0; }
  4%   { opacity: 1; }
  38%  { transform: translateX(320px); }
  42%  { transform: translateX(308px); }
  44%  { transform: translateX(314px); }
  86%  { transform: translateX(314px); opacity: 1; }
  94%  { opacity: 0; }
  100% { transform: translateX(314px); opacity: 0; }
}

.bay-line {
  stroke: var(--orange);
  stroke-width: 5;
  stroke-linecap: round;
  stroke-dasharray: 70;
  stroke-dashoffset: 70;
  animation: bay-draw 12s ease-out infinite;
}
@keyframes bay-draw {
  0%, 6%    { stroke-dashoffset: 70; }
  16%       { stroke-dashoffset: 0; }
  90%       { stroke-dashoffset: 0; }
  96%, 100% { stroke-dashoffset: 70; }
}

.sign-post {
  stroke: var(--line);
  stroke-width: 4;
  stroke-dasharray: 110;
  stroke-dashoffset: 110;
  animation: sign-draw 12s ease-out infinite;
}
.sign-box {
  fill: none;
  stroke: var(--line);
  stroke-width: 4;
  stroke-dasharray: 200;
  stroke-dashoffset: 200;
  animation: sign-draw 12s ease-out infinite;
  animation-delay: 0.4s;
}
.sign-p {
  fill: var(--orange);
  font-family: Arial, sans-serif;
  font-size: 34px;
  font-weight: 700;
  text-anchor: middle;
  opacity: 0;
  animation: sign-fade 12s ease-out infinite;
}
@keyframes sign-draw {
  0%, 8%    { stroke-dashoffset: 200; }
  20%       { stroke-dashoffset: 0; }
  90%       { stroke-dashoffset: 0; }
  96%, 100% { stroke-dashoffset: 200; }
}
@keyframes sign-fade {
  0%, 18%   { opacity: 0; }
  26%       { opacity: 1; }
  88%       { opacity: 1; }
  94%, 100% { opacity: 0; }
}

.car-pass { opacity: 0.5; animation: pass-by 14s linear infinite; }
@keyframes pass-by {
  0%   { transform: translateX(1500px); }
  100% { transform: translateX(-300px); }
}

/* ---------- System components ---------- */
.system { padding: 88px 0 72px; }
.system-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  margin-bottom: 40px;
}
.system-lead { font-size: 1.15rem; font-weight: 700; max-width: 640px; }
.card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.card {
  background: var(--card);
  border: 1.5px solid var(--ink);
  border-radius: var(--radius);
  padding: 28px 24px;
  text-align: center;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: 0 8px 0 0 var(--ink); }
.card-icon { display: inline-grid; place-items: center; width: 62px; height: 62px; margin-bottom: 14px; }
.card-icon svg {
  width: 46px;
  height: 46px;
  fill: none;
  stroke: var(--line);
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.card h3 { font-size: 1.05rem; margin-bottom: 8px; }
.card p { color: var(--muted); font-size: 0.92rem; }

/* ---------- Story scene: person -> car -> P5 garage ---------- */
.story { padding: 8px 0 40px; }
.story-head { text-align: center; margin-bottom: 4px; }
.story-scene { direction: ltr; }
.story-scene svg { width: 100%; height: auto; display: block; }

.g-line {
  fill: none;
  stroke: var(--line);
  stroke-width: 5;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.thin-g { stroke-width: 3; opacity: 0.75; }
.p5-box { fill: none; stroke: var(--orange); stroke-width: 4; }
.p5-text {
  fill: var(--orange);
  font-family: Arial, sans-serif;
  font-size: 36px;
  font-weight: 700;
  text-anchor: middle;
}
.p-line { fill: none; stroke: var(--line); stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; }

/* barrier lifts when the car approaches */
.barrier-arm {
  stroke: var(--orange);
  stroke-width: 6;
  stroke-linecap: round;
  transform-origin: 470px 262px;
  animation: barrier 18s ease-in-out infinite;
}
@keyframes barrier {
  0%, 36%   { transform: rotate(0deg); }
  42%, 66%  { transform: rotate(-75deg); }
  72%, 100% { transform: rotate(0deg); }
}

/* person walks in, gets in the car */
.person { animation: person-walk 18s linear infinite; }
@keyframes person-walk {
  0%   { transform: translateX(1380px); opacity: 0; }
  3%   { opacity: 1; }
  24%  { transform: translateX(1046px); opacity: 1; }
  28%  { transform: translateX(1046px); opacity: 0; }
  100% { transform: translateX(1046px); opacity: 0; }
}
.person-bob { animation: bob 0.55s ease-in-out infinite alternate; }
@keyframes bob {
  from { transform: translateY(0); }
  to   { transform: translateY(-5px); }
}

/* the car waits, then drives into the garage and disappears inside */
.story-car { animation: story-drive 18s ease-in-out infinite; }
@keyframes story-drive {
  0%   { transform: translateX(800px); opacity: 0; }
  3%   { opacity: 1; }
  30%  { transform: translateX(800px); opacity: 1; }
  56%  { transform: translateX(430px); opacity: 1; }
  64%  { transform: translateX(250px); opacity: 0; }
  100% { transform: translateX(250px); opacity: 0; }
}

/* ---------- Why us ---------- */
.why { padding: 24px 0 72px; }
.why-inner { display: grid; grid-template-columns: 1.1fr 1fr; gap: 48px; align-items: center; }
.eyebrow { color: var(--orange); font-weight: 700; margin-bottom: 6px; }
.why h2 { font-size: 1.6rem; line-height: 1.6; margin-bottom: 14px; }
.why-text { color: var(--muted); margin-bottom: 24px; }
.why-art svg { width: 100%; height: auto; }
.bay-static { stroke: var(--orange); stroke-width: 4; stroke-linecap: round; }
.idle-car .wheel { stroke-width: 4; }
.idle-car .car-body { stroke-width: 4; }

/* ---------- Testimonials ---------- */
.testimonials { padding: 0 0 72px; }
.section-title { font-size: 1.5rem; margin-bottom: 26px; }
.quote-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.quote {
  background: var(--card);
  border: 1.5px solid var(--ink);
  border-right: 6px solid var(--orange);
  border-radius: var(--radius);
  padding: 26px 24px;
}
.quote p { font-size: 0.95rem; margin-bottom: 14px; }
.quote footer { font-weight: 700; color: var(--orange); font-size: 0.9rem; }

/* ---------- Certifications marquee ---------- */
.certs { padding: 0 0 72px; }
.marquee {
  overflow: hidden;
  direction: ltr;
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.marquee-track {
  display: flex;
  gap: 18px;
  width: max-content;
  animation: marquee 30s linear infinite;
}
.marquee:hover .marquee-track { animation-play-state: paused; }
@keyframes marquee {
  to { transform: translateX(-50%); }
}
.badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  min-width: 190px;
  padding: 20px 16px;
  background: var(--card);
  border: 1.5px solid var(--ink);
  border-radius: var(--radius);
}
.badge-ring {
  display: grid;
  place-items: center;
  width: 68px;
  height: 68px;
  border: 3px solid var(--line);
  border-radius: 50%;
  font-weight: 700;
  font-size: 1rem;
  color: var(--line);
  letter-spacing: 0.03em;
  position: relative;
}
.badge-ring::after {
  content: "";
  position: absolute;
  inset: -8px;
  border: 1.5px dashed var(--orange);
  border-radius: 50%;
}
.badge-label { font-size: 0.82rem; font-weight: 700; color: var(--muted); direction: ltr; }

/* ---------- Articles as parking tickets ---------- */
.articles { padding: 0 0 72px; }
.row-head { display: flex; align-items: baseline; justify-content: space-between; }
.link-more { color: var(--orange); font-weight: 700; text-decoration: none; font-size: 0.9rem; }
.link-more:hover { text-decoration: underline; }

.ticket-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.ticket {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 96px;
  background: var(--card);
  border: 1.5px solid var(--ink);
  border-radius: 12px;
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.ticket:hover { transform: translateY(-4px) rotate(-0.6deg); box-shadow: 0 8px 0 0 var(--ink); }
.ticket-main { padding: 22px 20px; display: flex; flex-direction: column; gap: 10px; }
.ticket-main h3 { font-size: 0.98rem; line-height: 1.75; font-weight: 700; }
.chip {
  align-self: flex-start;
  background: var(--cream-deep);
  color: var(--ink);
  border-radius: 999px;
  padding: 2px 14px;
  font-size: 0.76rem;
  font-weight: 700;
}
.ticket-stub {
  position: relative;
  border-right: 2px dashed var(--ink);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 18px 10px 14px;
  background: repeating-linear-gradient(
    45deg,
    transparent 0 10px,
    rgba(242, 107, 33, 0.07) 10px 12px
  );
}
/* punched notches on the perforation line */
.ticket-stub::before,
.ticket-stub::after {
  content: "";
  position: absolute;
  right: -11px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--cream);
  border: 1.5px solid var(--ink);
}
.ticket-stub::before { top: -12px; }
.ticket-stub::after { bottom: -12px; }
.stub-time {
  writing-mode: vertical-rl;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--orange);
}
.barcode {
  width: 56px;
  height: 30px;
  background: repeating-linear-gradient(
    90deg,
    var(--ink) 0 2px, transparent 2px 5px,
    var(--ink) 5px 6px, transparent 6px 10px,
    var(--ink) 10px 13px, transparent 13px 16px
  );
}

/* ---------- News & tenders as LED boards ---------- */
.newsline { padding: 0 0 72px; }
.news-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 26px; }
.board {
  position: relative;
  background: var(--board);
  border: 1.5px solid var(--ink);
  border-radius: 16px;
  padding: 22px 24px 20px;
  overflow: hidden;
  box-shadow: inset 0 0 40px rgba(0, 0, 0, 0.45);
}
/* screen scanlines */
.board::after {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    rgba(255, 255, 255, 0.035) 0 2px,
    transparent 2px 4px
  );
  pointer-events: none;
}
.board-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
}
.board-title { color: #fff; font-weight: 700; font-size: 1.02rem; }
.lamps { display: flex; gap: 8px; }
.lamp {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--orange);
  box-shadow: 0 0 10px var(--orange);
  animation: lamp-blink 1.6s infinite;
}
.lamp.l2 { animation-delay: 0.8s; }
@keyframes lamp-blink { 50% { opacity: 0.25; box-shadow: none; } }

.board-list { list-style: none; }
.board-list li {
  position: relative;
  padding: 11px 22px 11px 0;
  color: #ffb877;
  font-weight: 700;
  font-size: 0.9rem;
  text-shadow: 0 0 10px rgba(242, 107, 33, 0.45);
  border-bottom: 1px dashed rgba(255, 255, 255, 0.1);
}
.board-list li:last-child { border-bottom: none; }
.board-list li::before {
  content: "▸";
  position: absolute;
  right: 0;
  color: var(--orange);
}
.board-more {
  display: inline-block;
  margin-top: 14px;
  color: #fff;
  font-size: 0.85rem;
  font-weight: 700;
  text-decoration: none;
  border-bottom: 2px solid var(--orange);
}
.board-more:hover { color: var(--orange); }

/* ---------- About / footer ---------- */
.about { background: var(--ink); color: #efe6d6; padding: 60px 0 40px; }
.about-grid { display: grid; grid-template-columns: 1.4fr 0.8fr 1fr; gap: 40px; }
.about h2 {
  color: #fff;
  font-size: 1.1rem;
  margin-bottom: 12px;
  border-right: 4px solid var(--orange);
  padding-right: 10px;
}
.about p { font-size: 0.92rem; color: #cfc7b8; }
.foot-list { list-style: none; margin-bottom: 22px; }
.foot-list li { font-size: 0.92rem; margin-bottom: 8px; color: #cfc7b8; }
.foot-list a { color: #ffd9a8; text-decoration: none; }
.foot-list a:hover { color: var(--orange); }
.social li { display: inline-block; margin-left: 14px; }

.footer { background: #16203a; color: #8f97ab; text-align: center; padding: 16px 0; font-size: 0.82rem; }

/* ---------- Scroll reveal (only when JS is on) ---------- */
html.js main > section:not(.hero) {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
html.js main > section.in-view { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 920px) {
  .card-grid { grid-template-columns: repeat(2, 1fr); }
  .why-inner { grid-template-columns: 1fr; }
  .ticket-grid { grid-template-columns: 1fr; }
  .quote-grid { grid-template-columns: 1fr; }
  .news-grid { grid-template-columns: 1fr; }
  .about-grid { grid-template-columns: 1fr; }
  .system-head { flex-direction: column; align-items: flex-start; }
  .nav { display: none; }
  .hero { min-height: 64vh; }
}
@media (max-width: 560px) {
  .card-grid { grid-template-columns: 1fr; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  body::before { animation: none; }
  .bg-car { animation: none !important; opacity: 0; }
  .car-park { animation: none; transform: translateX(314px); }
  .car-pass { animation: none; opacity: 0; }
  .bay-line, .sign-post, .sign-box { animation: none; stroke-dashoffset: 0; }
  .sign-p { animation: none; opacity: 1; }
  .person { animation: none; transform: translateX(1046px); }
  .person-bob { animation: none; }
  .story-car { animation: none; transform: translateX(800px); opacity: 1; }
  .barrier-arm { animation: none; }
  .marquee-track { animation: none; }
  .lamp { animation: none; }
  .hero h1, .tagline, .hero-actions { animation: none; }
  html.js main > section:not(.hero) { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ---------- Public news pages ---------- */
.page { padding: 48px 0 72px; min-height: 60vh; }
.page-head { margin-bottom: 34px; }
.page-sub { color: var(--muted); }
.board-list a { color: inherit; text-decoration: none; }
.board-list a:hover { color: #fff; }

.news-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.news-card {
  background: var(--card);
  border: 1.5px solid var(--ink);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.news-card:hover { transform: translateY(-4px); box-shadow: 0 8px 0 0 var(--ink); }
.news-thumb { display: block; aspect-ratio: 5 / 3; background: var(--cream); }
.news-thumb img, .news-thumb svg { width: 100%; height: 100%; object-fit: cover; display: block; }
.news-body { padding: 18px 18px 20px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.news-body h2 { font-size: 1rem; line-height: 1.75; }
.news-body h2 a { color: var(--ink); text-decoration: none; }
.news-body h2 a:hover { color: var(--orange); }
.news-summary { color: var(--muted); font-size: 0.87rem; flex: 1; }
.news-meta { display: flex; flex-wrap: wrap; gap: 10px; align-items: baseline; font-size: 0.78rem; }
.news-date { color: var(--muted); font-weight: 700; }
.news-tags, .detail-tags { color: var(--orange); font-weight: 700; font-size: 0.82rem; }
.news-source { color: var(--muted); }

.detail-grid { display: grid; grid-template-columns: 1fr 300px; gap: 40px; align-items: start; }
.detail h1 { font-size: 1.5rem; line-height: 1.7; margin: 10px 0 8px; }
.detail-image {
  width: 100%;
  border-radius: var(--radius);
  border: 1.5px solid var(--ink);
  margin: 18px 0;
}
.detail-body p { margin-bottom: 16px; font-size: 0.97rem; }
.detail-tags { display: block; margin: 12px 0 18px; }
.detail-side {
  background: var(--card);
  border: 1.5px solid var(--ink);
  border-radius: var(--radius);
  padding: 22px;
  position: sticky;
  top: 90px;
}
.side-title { font-size: 1.05rem; margin-bottom: 14px; }
.side-list { list-style: none; margin-bottom: 18px; }
.side-list li { padding: 9px 0; border-bottom: 1.5px dashed var(--cream-deep); font-size: 0.88rem; }
.side-list li:last-child { border-bottom: none; }
.side-list a { color: var(--ink); text-decoration: none; }
.side-list a:hover { color: var(--orange); }

@media (max-width: 920px) {
  .news-cards { grid-template-columns: 1fr; }
  .detail-grid { grid-template-columns: 1fr; }
  .detail-side { position: static; }
}

.detail-h2 {
  font-size: 1.15rem;
  margin: 26px 0 10px;
  padding-right: 12px;
  border-right: 4px solid var(--orange);
}

/* ---------- products ---------- */
.brand-logo { height: 40px; width: auto; border-radius: 8px; }
.product-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 4px; }
.price { color: var(--orange); font-weight: 700; font-size: 0.95rem; }
.price-lg { font-size: 1.35rem; display: block; margin-bottom: 12px; }
.product-grid { display: grid; grid-template-columns: 1fr 1.2fr; gap: 40px; align-items: start; }
.product-title { font-size: 1.5rem; margin-bottom: 8px; }
.buy-box {
  background: var(--card);
  border: 1.5px solid var(--ink);
  border-radius: var(--radius);
  padding: 20px 22px;
  margin: 18px 0 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: flex-start;
}

/* ---------- parkings map ---------- */
.map-controls { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 16px; align-items: center; }
.map-controls select {
  padding: 10px 14px;
  border: 1.5px solid var(--ink);
  border-radius: 10px;
  font: inherit;
  background: #fff;
  min-width: 180px;
}
#map {
  width: 100%;
  height: 480px;
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  z-index: 1;
}
.p-marker span {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  background: var(--orange);
  color: #fff;
  font-weight: 700;
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  border: 2px solid #fff;
  box-shadow: 0 2px 6px rgba(0,0,0,0.35);
}
.p-marker span { line-height: 1; }
.p-marker { background: none; border: none; }
.leaflet-popup-content { font-family: inherit; direction: rtl; text-align: right; line-height: 1.9; }
.pop-tel { color: var(--orange); font-weight: 700; text-decoration: none; }

.parking-list { margin-top: 20px; display: flex; flex-direction: column; gap: 10px; }
.parking-item {
  background: var(--card);
  border: 1.5px solid var(--ink);
  border-radius: var(--radius);
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}
.pk-meta { display: block; color: var(--muted); font-size: 0.82rem; }
.pk-side { display: flex; align-items: center; gap: 12px; }
.pk-cap { font-size: 0.82rem; font-weight: 700; color: var(--ink); }

@media (max-width: 860px) {
  .product-grid { grid-template-columns: 1fr; }
  #map { height: 380px; }
  .map-controls select { min-width: 140px; flex: 1; }
}

/* ---------- animated card icons (pure CSS, zero extra load) ---------- */
.ic-gear .gear-spin { transform-origin: 12px 12px; animation: gear-rot 7s linear infinite; }
@keyframes gear-rot { to { transform: rotate(360deg); } }

.ic-sensor .wave { opacity: 0.25; animation: wave-pulse 2s ease-in-out infinite; }
.ic-sensor .w2 { animation-delay: 0.5s; }
@keyframes wave-pulse { 0%, 100% { opacity: 0.2; } 40% { opacity: 1; } }

.ic-camera .cam-head { transform-origin: 7px 11px; animation: cam-scan 4s ease-in-out infinite; }
@keyframes cam-scan { 0%, 100% { transform: rotate(0deg); } 50% { transform: rotate(-8deg); } }

.ic-shield .shield-body { transform-origin: 12px 12px; animation: shield-beat 2.6s ease-in-out infinite; }
@keyframes shield-beat { 0%, 100% { transform: scale(1); } 12% { transform: scale(1.07); } 24% { transform: scale(1); } }

.ic-pay .pay-line { stroke-dasharray: 8; animation: pay-swipe 2.2s ease-in-out infinite; }
@keyframes pay-swipe { 0% { stroke-dashoffset: 8; opacity: 0; } 40%, 70% { stroke-dashoffset: 0; opacity: 1; } 100% { opacity: 0; } }

.ic-patrol { animation: patrol-bob 1.6s ease-in-out infinite; display: inline-grid; }
@keyframes patrol-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-3px); } }

/* hover: icons speed up + tint orange */
.card:hover .card-icon svg { stroke: var(--orange); }
.card:hover .ic-gear .gear-spin { animation-duration: 1.6s; }
.card:hover .ic-sensor .wave { animation-duration: 0.8s; }

@media (prefers-reduced-motion: reduce) {
  .ic-gear .gear-spin, .ic-sensor .wave, .ic-camera .cam-head,
  .ic-shield .shield-body, .ic-pay .pay-line, .ic-patrol { animation: none; }
}

/* footer social icons */
.social { display: flex; gap: 10px; }
.social li { display: inline-flex; margin-left: 0; }
.social a {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--orange);
}
.social a:hover { background: var(--orange-dark); }
.social svg { width: 20px; height: 20px; fill: none; stroke: #fff; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- animated system cards (pure CSS, zero load cost) ---------- */
html.js .system .card { opacity: 0; transform: translateY(24px); transition: opacity 0.55s ease, transform 0.55s ease; }
html.js .system.in-view .card { opacity: 1; transform: none; }
html.js .system.in-view .card:nth-child(1) { transition-delay: 0.05s; }
html.js .system.in-view .card:nth-child(2) { transition-delay: 0.15s; }
html.js .system.in-view .card:nth-child(3) { transition-delay: 0.25s; }
html.js .system.in-view .card:nth-child(4) { transition-delay: 0.35s; }
html.js .system.in-view .card:nth-child(5) { transition-delay: 0.45s; }
html.js .system.in-view .card:nth-child(6) { transition-delay: 0.55s; }

/* icons come alive: shield pulses, waves ripple, camera pans, gear turns */
.ic-shield { animation: ic-pulse 2.6s ease-in-out infinite; transform-origin: center; }
@keyframes ic-pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.07); } }

.wave { animation: ic-wave 2s ease-in-out infinite; }
.wave.w2 { animation-delay: 0.35s; }
@keyframes ic-wave { 0%, 100% { opacity: 0.25; } 50% { opacity: 1; } }

.ic-cam { animation: ic-pan 4s ease-in-out infinite; transform-origin: 30% 70%; }
@keyframes ic-pan { 0%, 100% { transform: rotate(0deg); } 50% { transform: rotate(-7deg); } }

.pay-line { stroke-dasharray: 8; animation: ic-swipe 1.8s linear infinite; }
@keyframes ic-swipe { to { stroke-dashoffset: -16; } }

.gear { animation: ic-spin 10s linear infinite; transform-origin: center; }
@keyframes ic-spin { to { transform: rotate(360deg); } }

.ic-patrol { animation: ic-step 1.4s ease-in-out infinite; }
@keyframes ic-step { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-1.5px); } }

@media (prefers-reduced-motion: reduce) {
  .ic-shield, .wave, .ic-cam, .pay-line, .gear, .ic-patrol { animation: none; }
  html.js .system .card { opacity: 1; transform: none; transition: none; }
}

/* social icons in footer */
.social li { display: inline-flex; align-items: center; gap: 6px; margin-left: 16px; }
.social svg { width: 18px; height: 18px; fill: none; stroke: #ffd9a8; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.social a:hover svg { stroke: var(--orange); }

.pk-count { font-weight: 700; color: var(--orange); font-size: 0.9rem; }

/* ---------- system cards: parking-bay slider ---------- */
.sys-slider { display: flex; align-items: stretch; gap: 10px; }
.sys-viewport {
  direction: ltr;            /* RTL scroll containers use negative scrollLeft */
  position: relative;        /* offsetLeft of cards measured from here */
  overflow-x: auto;
  overflow-y: hidden;
  flex: 1;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  /* the "parking lot ground" the cards sit on */
  border-bottom: 4px solid var(--ink);
  padding-bottom: 26px;
}
.sys-viewport::-webkit-scrollbar { display: none; }
.sys-track {
  display: flex;
  gap: 0;
  direction: ltr; /* simple scroll math; each card keeps rtl inside */
}
.sys-track .card {
  direction: rtl;
  flex: 0 0 33.34%;
  min-width: 33.34%;
  scroll-snap-align: center;
  margin: 8px 0 0;
  border: none;
  border-radius: 0;
  background: transparent;
  position: relative;
  padding: 24px 26px 18px;
  transition: transform 0.45s ease, opacity 0.45s ease;
  opacity: 0.55;
  transform: scale(0.94);
}
/* orange bay line between the parked cards */
.sys-track .card::before {
  content: "";
  position: absolute;
  left: 0;
  bottom: -8px;
  width: 5px;
  height: 78%;
  border-radius: 3px;
  background: var(--orange);
}
.sys-track .card:first-child::before { display: none; }
/* the active (parked) card lifts and glows */
.sys-track .card.active { opacity: 1; transform: scale(1); }
.sys-track .card.active h3 { color: var(--orange-dark); }
.sys-track .card:hover { box-shadow: none; transform: scale(0.97); }
.sys-track .card.active:hover { transform: scale(1.01); }

.sys-nav {
  align-self: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 2px solid var(--ink);
  background: var(--card);
  color: var(--ink);
  font-size: 1.5rem;
  font-weight: 700;
  cursor: pointer;
  line-height: 1;
  transition: background 0.2s ease, color 0.2s ease;
}
.sys-nav:hover { background: var(--orange); border-color: var(--orange); color: #fff; }

.sys-dots { display: flex; justify-content: center; gap: 8px; margin-top: 14px; }
.sys-dots i {
  width: 22px;
  height: 6px;
  border-radius: 999px;
  background: var(--cream-deep);
  border: 1.5px solid var(--ink);
  cursor: pointer;
  transition: background 0.25s ease, width 0.25s ease;
}
.sys-dots i.on { background: var(--orange); width: 34px; }

/* the tiny car cruising under the lot, forever */
.sys-road { position: relative; height: 40px; overflow: hidden; margin-top: -22px; pointer-events: none; }
.sys-car { position: absolute; bottom: 0; width: 96px; animation: sys-cruise 16s linear infinite; }
@keyframes sys-cruise {
  0%   { left: -110px; }
  100% { left: 105%; }
}

@media (max-width: 920px) {
  .sys-track .card { flex: 0 0 100%; min-width: 100%; }
  .sys-nav { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .sys-car { animation: none; opacity: 0; }
  .sys-track .card { opacity: 1; transform: none; transition: none; }
}

/* ---------- contact page: aerial lot animation ---------- */
.lot-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  opacity: 0.45;
  pointer-events: none;
  direction: ltr;
}
.lot-bg svg { width: 100%; height: 100%; }
.lot-lines line { stroke: var(--ink); stroke-width: 3; opacity: 0.5; stroke-linecap: round; }
.t-body { fill: var(--cream); stroke: var(--line); stroke-width: 4; }
.t-glass { stroke: var(--line); stroke-width: 3; stroke-linecap: round; }
.tcar { transform-box: fill-box; transform-origin: center; }

/* car A: right along the upper lane, then turns up into the empty bay (col 4, row 1) */
.drive-a { animation: lot-a 20s ease-in-out infinite; }
@keyframes lot-a {
  0%   { transform: translate(-120px, 285px) rotate(0deg); opacity: 0; }
  4%   { opacity: 1; }
  38%  { transform: translate(360px, 285px) rotate(0deg); }
  46%  { transform: translate(430px, 245px) rotate(-52deg); }
  54%  { transform: translate(465px, 155px) rotate(-90deg); }  /* parked */
  86%  { transform: translate(465px, 155px) rotate(-90deg); opacity: 1; }
  92%  { opacity: 0; }
  100% { transform: translate(465px, 155px) rotate(-90deg); opacity: 0; }
}

/* car B: left along the lower lane, parks nose-down (col 6, row 3) */
.drive-b { animation: lot-b 20s ease-in-out infinite; animation-delay: -10s; }
@keyframes lot-b {
  0%   { transform: translate(1320px, 552px) rotate(180deg); opacity: 0; }
  4%   { opacity: 1; }
  38%  { transform: translate(750px, 552px) rotate(180deg); }
  46%  { transform: translate(680px, 592px) rotate(128deg); }
  54%  { transform: translate(645px, 688px) rotate(90deg); }   /* parked */
  86%  { transform: translate(645px, 688px) rotate(90deg); opacity: 1; }
  92%  { opacity: 0; }
  100% { transform: translate(645px, 688px) rotate(90deg); opacity: 0; }
}

.contact-page { position: relative; }
.contact-banner {
  background: var(--orange);
  color: #fff;
  text-align: center;
  font-size: 1.35rem;
  font-weight: 700;
  padding: 18px 20px;
  border-radius: var(--radius);
  margin-bottom: 30px;
  box-shadow: 0 6px 0 0 var(--ink);
}
.contact-wrap {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 26px;
  align-items: start;
}
.contact-form {
  background: var(--card);
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.contact-form input, .contact-form textarea {
  width: 100%;
  padding: 13px 16px;
  border: 1.5px solid var(--ink);
  border-radius: 10px;
  font: inherit;
  background: #fff;
}
.contact-form input:focus, .contact-form textarea:focus {
  outline: 2px solid var(--orange);
  outline-offset: 1px;
}
.cf-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.contact-form .btn { align-self: flex-start; }
.hp-field { position: absolute !important; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.sent-box {
  background: #e3f4ea;
  color: #1c7c46;
  border: 1.5px solid #1c7c46;
  border-radius: 10px;
  padding: 12px 16px;
  font-weight: 700;
}
.contact-side {
  background: var(--card);
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  padding: 26px;
  position: sticky;
  top: 90px;
}
.contact-side h2 { font-size: 1.1rem; margin-bottom: 14px; }
.contact-ways { list-style: none; }
.contact-ways li { padding: 10px 0; border-bottom: 1.5px dashed var(--cream-deep); font-size: 0.93rem; }
.contact-ways li:last-child { border-bottom: none; }
.contact-ways a { color: var(--orange-dark); font-weight: 700; text-decoration: none; }

@media (max-width: 860px) {
  .contact-wrap { grid-template-columns: 1fr; }
  .cf-row { grid-template-columns: 1fr; }
  .contact-side { position: static; }
}
@media (prefers-reduced-motion: reduce) {
  .drive-a, .drive-b { animation: none; opacity: 0; }
}
