/* ===================================================================
   VINQO — REDLINE DESIGN SYSTEM v4.0 (HERO LANDING PAGE)
   Automotive Spare-Parts Platform | Cairo & Giza
   =================================================================== */

:root {
  color-scheme: light;
  
  /* VINQO Canonical Color Tokens */
  --paper: #F8F8F4;
  --surface: #FFFFFF;
  --surface-raised: #FFFFFF;
  --ink: #20221F;
  --accent: #F75730;
  --accent-hover: #E04722;
  --accent-light: #FFEDE8;
  --on-accent: #181C16;
  --line: #CBD1C7;
  --line-subtle: #E2E6DF;
  --muted: #565B53;
  --muted-light: #767B73;
  --tint: #E8EAE3;
  --control: #FFFFFF;
  --selected: #20221F;
  --on-selected: #F8F8F4;
  --focus: #225DAA;
  --chrome: #F8F8F4;
  --error-surface: #FBE4DC;
  --error-ink: #832A16;
  --success-ink: #1A6646;
  --success-surface: #E6F1E8;
  --warning-ink: #7A5018;
  --warning-surface: #F6EDDB;
  
  /* Shadows & Elevation */
  --shadow-sm: 0 2px 8px rgba(32, 34, 31, 0.04);
  --shadow-md: 0 10px 30px rgba(32, 34, 31, 0.06);
  --shadow-lg: 0 20px 45px rgba(32, 34, 31, 0.09);
  --glow-accent: 0 0 24px rgba(247, 87, 48, 0.28);
  
  /* Brand Slant Geometry */
  --skew-angle: -18deg;
  --skew-angle-sharp: -28deg;
  
  /* Transitions */
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --duration: 0.25s;
}

body.dark {
  color-scheme: dark;
  --paper: #191D20;
  --surface: #252B2E;
  --surface-raised: #2D3438;
  --ink: #F6F3EC;
  --accent: #FF805A;
  --accent-hover: #FF9B7D;
  --accent-light: #3D251F;
  --on-accent: #231812;
  --line: #454D50;
  --line-subtle: #343B3E;
  --muted: #B9C1BF;
  --muted-light: #949C9A;
  --tint: #2C3336;
  --control: #22282B;
  --selected: #FFD2BE;
  --on-selected: #392018;
  --focus: #9DD4FF;
  --chrome: #202528;
  --error-surface: #442D2C;
  --error-ink: #FFC5B8;
  --success-ink: #B7E5C6;
  --success-surface: #234137;
  --warning-ink: #F3D5A3;
  --warning-surface: #40382A;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.25);
  --shadow-md: 0 10px 30px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 20px 45px rgba(0, 0, 0, 0.45);
  --glow-accent: 0 0 28px rgba(255, 128, 90, 0.3);
}

/* Reset & Base */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  scroll-padding-top: 76px; /* Height of sticky navbar */
}

body {
  min-height: 100vh;
  background-color: var(--paper);
  color: var(--ink);
  font-family: 'Changa', Tahoma, 'Segoe UI', sans-serif;
  line-height: 1.7;
  direction: rtl;
  text-align: right;
  overflow-x: hidden;
  transition: background-color var(--duration) var(--ease), color var(--duration) var(--ease);
  position: relative;
}

/* Atmospheric Automotive Grid Background */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: 
    radial-gradient(circle at 80% 15%, rgba(247, 87, 48, 0.07) 0%, transparent 45%),
    radial-gradient(circle at 15% 85%, rgba(34, 93, 170, 0.05) 0%, transparent 50%),
    linear-gradient(to right, var(--line-subtle) 1px, transparent 1px),
    linear-gradient(to bottom, var(--line-subtle) 1px, transparent 1px);
  background-size: 100% 100%, 100% 100%, 48px 48px, 48px 48px;
  background-position: center center;
  opacity: 0.65;
  pointer-events: none;
  z-index: 0;
}

body.dark::before {
  background-image: 
    radial-gradient(circle at 80% 15%, rgba(255, 128, 90, 0.1) 0%, transparent 45%),
    radial-gradient(circle at 15% 85%, rgba(157, 212, 255, 0.05) 0%, transparent 50%),
    linear-gradient(to right, rgba(69, 77, 80, 0.4) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(69, 77, 80, 0.4) 1px, transparent 1px);
  opacity: 0.5;
}

::selection {
  background: var(--accent);
  color: var(--on-accent);
}

a {
  color: inherit;
  text-decoration: none;
}

button, input {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}

button:focus-visible, input:focus-visible, a:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

/* Layout Container */
.container {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 clamp(16px, 4vw, 36px);
  position: relative;
  z-index: 1;
}

/* Redline Accent Bar / Angular Element */
.redline-bar {
  display: inline-block;
  width: 32px;
  height: 5px;
  background-color: var(--accent);
  transform: skewX(var(--skew-angle));
  vertical-align: middle;
}

/* Top Navigation Bar */
.navbar {
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  background-color: rgba(248, 248, 244, 0.88);
  border-bottom: 1px solid var(--line);
  padding: 14px 0;
  transition: background-color var(--duration) var(--ease), border-color var(--duration) var(--ease);
}

body.dark .navbar {
  background-color: rgba(25, 29, 32, 0.88);
}

.nav-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand-wrap {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-logo {
  height: 38px;
  width: auto;
  color: var(--ink);
  display: block;
}

.badge-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 6px;
  letter-spacing: 0.3px;
}

.badge-tag .dot {
  width: 7px;
  height: 7px;
  background-color: var(--accent);
  border-radius: 50%;
  display: inline-block;
  box-shadow: 0 0 8px var(--accent);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Theme Toggle Button */
.btn-icon {
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--ink);
  border-radius: 8px;
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--duration) var(--ease);
}

.btn-icon:hover {
  background: var(--tint);
  border-color: var(--muted);
}

/* Action Button */
.btn-nav-cta {
  background: var(--selected);
  color: var(--on-selected);
  border: 1px solid transparent;
  padding: 8px 18px;
  border-radius: 8px;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--duration) var(--ease);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn-nav-cta:hover {
  background: var(--accent);
  color: var(--on-accent);
  box-shadow: var(--glow-accent);
}

/* ===================================================================
   HERO SECTION
   =================================================================== */

.hero {
  padding: clamp(36px, 6vw, 72px) 0 clamp(48px, 8vw, 84px);
  position: relative;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: clamp(24px, 4vw, 56px);
  align-items: center;
}

/* Hero Content */
.hero-content {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.kicker-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  align-self: flex-start;
  padding: 6px 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-inline-end: 3px solid var(--accent);
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--ink);
  box-shadow: var(--shadow-sm);
}

.kicker-pill .live-indicator {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.kicker-pill .live-dot {
  width: 8px;
  height: 8px;
  background: var(--accent);
  border-radius: 50%;
}

.kicker-pill .live-ping {
  position: absolute;
  width: 18px;
  height: 18px;
  background: var(--accent);
  opacity: 0.4;
  border-radius: 50%;
  animation: ping 1.8s cubic-bezier(0, 0, 0.2, 1) infinite;
}

@keyframes ping {
  75%, 100% {
    transform: scale(2.2);
    opacity: 0;
  }
}

.hero-title {
  font-size: clamp(2.1rem, 3.8vw, 3.4rem);
  font-weight: 900;
  line-height: 1.35;
  color: var(--ink);
  letter-spacing: -0.5px;
}

.hero-title .highlight {
  color: var(--accent);
  position: relative;
  display: inline-block;
}

.hero-title .highlight::after {
  content: '';
  position: absolute;
  bottom: 4px;
  inset-inline: 0;
  height: 6px;
  background: var(--accent);
  opacity: 0.2;
  transform: skewX(var(--skew-angle));
  border-radius: 2px;
}

.hero-lead {
  font-size: clamp(1.05rem, 1.4vw, 1.22rem);
  color: var(--muted);
  line-height: 1.9;
  max-width: 620px;
}

.hero-lead strong {
  color: var(--ink);
  font-weight: 700;
}

/* Target Markets Pills */
.target-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 4px;
}

.target-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 6px 14px;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ink);
}

.target-tag svg {
  color: var(--accent);
}

/* ===================================================================
   HERO COUNTDOWN & WAITLIST CARD (HERO VISUAL / INTERACTIVE)
   =================================================================== */

.hero-visual-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: clamp(22px, 3vw, 32px);
  box-shadow: var(--shadow-lg);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.hero-visual-card::before {
  content: '';
  position: absolute;
  top: 0;
  inset-inline: 0;
  height: 4px;
  background: linear-gradient(to left, var(--accent) 0%, #FF9B7D 100%);
}

/* Background mechanical hatching */
.card-bg-hatch {
  position: absolute;
  inset-inline-start: -20px;
  bottom: -20px;
  width: 140px;
  height: 140px;
  background: repeating-linear-gradient(
    -28deg,
    transparent 0 12px,
    var(--line-subtle) 13px 14px
  );
  opacity: 0.6;
  pointer-events: none;
  border-radius: 50%;
}

.countdown-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--line-subtle);
  padding-bottom: 16px;
}

.countdown-title-wrap h3 {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 8px;
}

.countdown-title-wrap p {
  font-size: 0.85rem;
  color: var(--muted);
  margin-top: 2px;
}

.status-badge {
  background: var(--accent-light);
  color: var(--accent);
  border: 1px solid rgba(247, 87, 48, 0.25);
  font-size: 0.78rem;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 6px;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

/* Countdown Grid */
.countdown-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.countdown-unit {
  background: var(--tint);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px 6px 10px;
  text-align: center;
  position: relative;
  overflow: hidden;
  transition: transform var(--duration) var(--ease), border-color var(--duration) var(--ease);
}

.countdown-unit:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
}

.countdown-unit::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--accent);
  opacity: 0.4;
}

.countdown-value {
  font-size: clamp(1.8rem, 2.5vw, 2.3rem);
  font-weight: 900;
  line-height: 1.1;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  display: block;
  letter-spacing: -0.5px;
}

.countdown-label {
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--muted);
  margin-top: 4px;
  display: block;
}

/* Progress bar inside countdown */
.countdown-progress-wrap {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.progress-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.78rem;
  color: var(--muted);
  font-weight: 600;
}

.progress-track {
  height: 6px;
  background: var(--tint);
  border-radius: 999px;
  overflow: hidden;
  position: relative;
}

.progress-fill {
  height: 100%;
  width: 2%; /* Dynamic via JS */
  background: linear-gradient(to left, var(--accent) 0%, #FF9B7D 100%);
  border-radius: 999px;
  transition: width 0.6s var(--ease);
}

/* Early Access Form */
.waitlist-box {
  background: var(--surface-raised);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.waitlist-header {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.waitlist-header strong {
  font-size: 0.98rem;
  color: var(--ink);
  font-weight: 800;
}

.waitlist-header span {
  font-size: 0.82rem;
  color: var(--muted);
}

/* Role Selector Tabs */
.role-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  background: var(--tint);
  padding: 4px;
  border-radius: 8px;
}

.role-tab {
  background: transparent;
  border: 0;
  padding: 7px 10px;
  border-radius: 6px;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--muted);
  cursor: pointer;
  transition: all var(--duration) var(--ease);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.role-tab.active {
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow-sm);
}

.waitlist-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.form-row {
  display: flex;
  gap: 8px;
}

.form-input {
  flex: 1;
  background: var(--control);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 0.9rem;
  color: var(--ink);
  min-height: 44px;
  transition: border-color var(--duration) var(--ease), box-shadow var(--duration) var(--ease);
}

.form-input::placeholder {
  color: var(--muted-light);
}

.form-input:focus {
  border-color: var(--focus);
  outline: 0;
  box-shadow: 0 0 0 3px rgba(34, 93, 170, 0.15);
}

.btn-submit {
  background: var(--accent);
  color: #FFFFFF;
  border: 0;
  padding: 10px 18px;
  border-radius: 8px;
  font-weight: 800;
  font-size: 0.9rem;
  cursor: pointer;
  white-space: nowrap;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all var(--duration) var(--ease);
}

.btn-submit:hover {
  background: var(--accent-hover);
  box-shadow: var(--glow-accent);
}

.waitlist-perk {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.77rem;
  color: var(--muted);
  font-weight: 600;
}

.waitlist-perk svg {
  color: var(--success-ink);
  flex-shrink: 0;
}

/* Success notification message */
.form-feedback {
  display: none;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 700;
  animation: fadeIn 0.3s var(--ease);
}

.form-feedback.success {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--success-surface);
  color: var(--success-ink);
  border: 1px solid rgba(26, 102, 70, 0.2);
}

.form-feedback.error {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--error-surface);
  color: var(--error-ink);
  border: 1px solid rgba(131, 42, 22, 0.2);
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ===================================================================
   PROBLEM DEFINITION CARDS (THE PAIN POINTS)
   =================================================================== */

.problem-section {
  padding: 40px 0 60px;
  position: relative;
}

.section-head {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 36px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.section-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  font-weight: 800;
  color: var(--accent);
  letter-spacing: 1px;
}

.section-title {
  font-size: clamp(1.7rem, 2.6vw, 2.3rem);
  font-weight: 800;
  color: var(--ink);
  line-height: 1.4;
}

.section-desc {
  font-size: 1rem;
  color: var(--muted);
  line-height: 1.8;
}

.problem-cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.problem-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 24px;
  position: relative;
  overflow: hidden;
  transition: all var(--duration) var(--ease);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.problem-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
  box-shadow: var(--shadow-md);
}

.problem-card::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 4px;
  height: 100%;
  background: var(--line);
  transition: background-color var(--duration) var(--ease);
}

.problem-card:hover::before {
  background: var(--accent);
}

.problem-icon-wrap {
  width: 46px;
  height: 46px;
  background: var(--tint);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  font-size: 1.4rem;
}

.problem-card h4 {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--ink);
  line-height: 1.45;
}

.problem-card p {
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.8;
  flex: 1;
}

.problem-impact {
  display: flex;
  align-items: center;
  gap: 6px;
  padding-top: 12px;
  border-top: 1px dashed var(--line-subtle);
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--error-ink);
}

/* ===================================================================
   HOW VINQO SOLVES IT (THE PROMISE)
   =================================================================== */

.solution-strip {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: clamp(24px, 3.5vw, 36px);
  margin-top: 24px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  box-shadow: var(--shadow-sm);
}

.solution-item {
  display: flex;
  flex-direction: column;
  gap: 8px;
  position: relative;
}

.solution-item:not(:last-child)::after {
  content: '';
  position: absolute;
  inset-inline-end: -10px;
  top: 15%;
  height: 70%;
  width: 1px;
  background: var(--line);
}

.solution-num {
  font-size: 0.85rem;
  font-weight: 900;
  color: var(--accent);
  background: var(--accent-light);
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  font-variant-numeric: tabular-nums;
}

.solution-item strong {
  font-size: 1rem;
  font-weight: 800;
  color: var(--ink);
}

.solution-item p {
  font-size: 0.84rem;
  color: var(--muted);
  line-height: 1.7;
}

/* ===================================================================
   FOOTER
   =================================================================== */

.site-footer {
  border-top: 1px solid var(--line);
  padding: 32px 0;
  background-color: var(--paper);
  margin-top: 40px;
}

.footer-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.footer-logo {
  height: 28px;
  width: auto;
  color: var(--ink);
}

.footer-slogan {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--muted);
  letter-spacing: 1px;
  direction: ltr;
}

.footer-copy {
  font-size: 0.82rem;
  color: var(--muted);
}

.footer-socials {
  display: flex;
  align-items: center;
  gap: 10px;
}

.social-link {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--duration) var(--ease);
}

.social-link:hover {
  background: var(--accent);
  color: #FFFFFF;
  border-color: var(--accent);
}

/* ===================================================================
   RESPONSIVE QUERIES
   =================================================================== */

@media (max-width: 980px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 36px;
  }
  
  .problem-cards-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  
  .solution-strip {
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
  }

  .solution-item:not(:last-child)::after {
    display: none;
  }
}

@media (max-width: 600px) {
  .navbar .brand-wrap {
    gap: 8px;
  }

  .brand-logo {
    height: 30px;
  }

  .badge-tag {
    display: none;
  }

  .btn-nav-cta {
    padding: 6px 12px;
    font-size: 0.8rem;
  }

  .countdown-grid {
    gap: 6px;
  }

  .countdown-unit {
    padding: 10px 4px 8px;
  }

  .countdown-value {
    font-size: 1.6rem;
  }

  .form-row {
    flex-direction: column;
  }

  .btn-submit {
    width: 100%;
  }

  .solution-strip {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .footer-content {
    flex-direction: column;
    text-align: center;
    gap: 16px;
  }

  .footer-brand {
    justify-content: center;
  }

  .problem-cards-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }
}

/* ===================================================================
   ACCESSIBILITY: REDUCED MOTION
   =================================================================== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  html {
    scroll-behavior: auto;
  }
}
