/* CarBuddy landing — black & white, type-driven, animated. */

/* Fonturi variabile self-hosted (subsetul latin de la Google Fonts) —
   zero conexiuni externe, font-display swap pentru FCP instant. */
@font-face {
  font-family: 'Archivo';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('/fonts/archivo-var-latin.woff2') format('woff2');
}
@font-face {
  font-family: 'Space Grotesk';
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url('/fonts/space-grotesk-var-latin.woff2') format('woff2');
}

:root {
  --black: #0a0a0a;
  --white: #fafafa;
  --gray: #6b6b6b;
  --line: rgba(10, 10, 10, 0.12);
  --line-inv: rgba(250, 250, 250, 0.18);
  --font-display: 'Archivo', 'Space Grotesk', system-ui, sans-serif;
  --font-body: 'Space Grotesk', system-ui, sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; overflow-x: clip; }
body {
  font-family: var(--font-body);
  background: var(--white);
  color: var(--black);
  line-height: 1.55;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 900; letter-spacing: -0.02em; }
h2 { font-size: clamp(2rem, 5vw, 3.6rem); line-height: 1.05; text-transform: uppercase; }

/* ---------- scroll progress ---------- */
.progress { position: fixed; inset: 0 0 auto 0; height: 3px; z-index: 100; background: transparent; }
.progress span { display: block; height: 100%; width: 0; background: var(--black); transition: width 80ms linear; }

/* ---------- nav ---------- */
.nav {
  position: fixed; inset: 3px 0 auto 0; z-index: 90;
  display: flex; justify-content: space-between; align-items: center;
  padding: 1.1rem clamp(1.2rem, 4vw, 3rem);
  background: color-mix(in srgb, var(--white) 82%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav__logo { font-family: var(--font-display); font-weight: 900; font-size: 1.25rem; letter-spacing: 0.02em; line-height: 1; display: inline-flex; align-items: center; gap: 0.5rem; }
.nav__logo span { color: var(--gray); }
.nav__icon { border-radius: 8px; display: block; width: 30px; height: 30px; }
.nav__links { display: flex; gap: clamp(0.8rem, 2.5vw, 2rem); align-items: center; font-size: 0.92rem; }
.nav__links a:not(.nav__cta) { position: relative; opacity: 0.75; transition: opacity 0.25s; }
.nav__links a:not(.nav__cta)::after {
  content: ''; position: absolute; left: 0; bottom: -4px; height: 1.5px; width: 0;
  background: var(--black); transition: width 0.3s var(--ease);
}
.nav__links a:not(.nav__cta):hover { opacity: 1; }
.nav__links a:not(.nav__cta):hover::after { width: 100%; }
.nav__cta {
  border: 1.5px solid var(--black); padding: 0.5rem 1.1rem; border-radius: 999px;
  font-weight: 500; transition: background 0.25s, color 0.25s;
}
.nav__cta:hover { background: var(--black); color: var(--white); }
@media (max-width: 640px) { .nav__links a:not(.nav__cta) { display: none; } }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 0.6rem;
  font-weight: 500; font-size: 1rem; padding: 0.95rem 1.7rem; border-radius: 999px;
  border: 1.5px solid var(--black); transition: transform 0.3s var(--ease), background 0.25s, color 0.25s;
  will-change: transform;
}
.btn__arrow { display: inline-block; transition: transform 0.3s var(--ease); }
.btn:hover .btn__arrow { transform: translateY(2px); }
.btn--ghost:hover .btn__arrow { transform: translateX(4px); }
.btn--solid { background: var(--black); color: var(--white); }
.btn--solid:hover { background: transparent; color: var(--black); }
.btn--ghost { background: transparent; color: var(--black); }
.btn--ghost:hover { background: var(--black); color: var(--white); }
.btn--inverted { border-color: var(--white); }
.btn--solid.btn--inverted { background: var(--white); color: var(--black); }
.btn--solid.btn--inverted:hover { background: transparent; color: var(--white); }
.btn--ghost.btn--inverted { color: var(--white); }
.btn--ghost.btn--inverted:hover { background: var(--white); color: var(--black); }
.btn--big { font-size: 1.2rem; padding: 1.2rem 2.4rem; }
.btn--disabled { opacity: 0.45; pointer-events: none; }

/* ---------- hero ---------- */
.hero { position: relative; min-height: 100svh; display: flex; flex-direction: column; justify-content: center; padding-top: 5rem; padding-bottom: 7.5rem; }
.hero__grid {
  position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: radial-gradient(ellipse 90% 70% at 50% 40%, black 30%, transparent 75%);
  animation: gridPan 24s linear infinite;
}
@keyframes gridPan { to { background-position: 72px 72px; } }
.hero__inner {
  display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 2rem; align-items: center;
  max-width: 1200px; margin: 0 auto; padding: 0 clamp(1.2rem, 4vw, 3rem); position: relative;
}
@media (max-width: 900px) { .hero__inner { grid-template-columns: 1fr; } }
.hero__eyebrow { font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.18em; color: var(--gray); margin-bottom: 1.2rem; }
.hero__title { font-size: clamp(2.6rem, 6.5vw, 5rem); line-height: 0.98; text-transform: uppercase; margin-bottom: 1.6rem; }
.hero__title .line { display: block; overflow: hidden; }
.hero__title .line span { display: inline-block; transform: translateY(110%); animation: lineUp 0.9s var(--ease) forwards; }
.hero__title .line:nth-child(2) span { animation-delay: 0.12s; }
.hero__title .line:nth-child(3) span { animation-delay: 0.24s; }
.hero__title .line:nth-child(4) span { animation-delay: 0.36s; }
@keyframes lineUp { to { transform: translateY(0); } }
.hero__sub { max-width: 34rem; font-size: 1.1rem; color: #333; margin-bottom: 2rem; }
.hero__actions { display: flex; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.1rem; }
.hero__note { font-size: 0.85rem; color: var(--gray); }

/* phone mockup */
.hero__visual { position: relative; display: flex; justify-content: center; }
.hero__ring {
  position: absolute; width: 420px; height: 420px; border: 1px solid var(--line);
  border-radius: 50%; animation: ringSpin 30s linear infinite; top: 50%; left: 50%;
  margin: -210px 0 0 -210px;
}
.hero__ring::before {
  content: ''; position: absolute; width: 10px; height: 10px; background: var(--black);
  border-radius: 50%; top: -5px; left: 50%;
}
@keyframes ringSpin { to { transform: rotate(360deg); } }
.phone {
  position: relative; width: 270px; height: 540px; background: var(--black);
  border-radius: 38px; padding: 10px; box-shadow: 0 40px 80px -30px rgba(0, 0, 0, 0.45);
  transform: rotate(4deg); animation: phoneFloat 7s ease-in-out infinite; z-index: 2;
}
@keyframes phoneFloat { 50% { transform: rotate(4deg) translateY(-14px); } }
.phone__notch {
  position: absolute; top: 10px; left: 50%; transform: translateX(-50%);
  width: 90px; height: 22px; background: var(--black); border-radius: 0 0 14px 14px; z-index: 3;
}
.phone__screen {
  width: 100%; height: 100%; background: var(--white); border-radius: 30px;
  padding: 2.6rem 0.9rem 0.9rem; display: flex; flex-direction: column; gap: 0.7rem; overflow: hidden;
}
.phone__header { display: flex; flex-direction: column; margin-bottom: 0.3rem; }
.phone__hello { font-weight: 700; font-size: 1.05rem; }
.phone__car { font-size: 0.78rem; color: var(--gray); }
.pcard {
  display: flex; gap: 0.6rem; align-items: flex-start; border: 1px solid var(--line);
  border-radius: 14px; padding: 0.75rem; background: #fff;
  opacity: 0; transform: translateX(24px); animation: cardIn 0.7s var(--ease) forwards;
}
.pcard strong { display: block; font-size: 0.82rem; }
.pcard em { font-style: normal; font-size: 0.72rem; color: var(--gray); }
.pcard__dot { flex: none; width: 9px; height: 9px; border-radius: 50%; background: var(--black); margin-top: 5px; }
.pcard__dot--warn { animation: blink 1.6s infinite; }
.pcard__dot--alert { animation: blink 0.9s infinite; }
@keyframes blink { 50% { opacity: 0.15; } }
.pcard--1 { animation-delay: 0.7s; }
.pcard--2 { animation-delay: 1.15s; }
.pcard--3 { animation-delay: 1.6s; }
.pcard--4 { animation-delay: 2.05s; }
@keyframes cardIn { to { opacity: 1; transform: translateX(0); } }

/* ---------- marquee ---------- */
.marquee { overflow: hidden; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--white); }
.marquee--edge { position: absolute; bottom: 0; left: 0; right: 0; }
.marquee__track {
  display: flex; white-space: nowrap; font-family: var(--font-display); font-weight: 800;
  font-size: clamp(1rem, 2.2vw, 1.5rem); padding: 0.8rem 0; animation: marquee 28s linear infinite;
}
.marquee__track--slow { animation-duration: 40s; }
.marquee__track span { padding-right: 0.5rem; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- sections ---------- */
section { position: relative; }
.section__head { max-width: 1200px; margin: 0 auto; padding: 0 clamp(1.2rem, 4vw, 3rem) 3rem; }
.section__eyebrow { font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.18em; color: var(--gray); margin-bottom: 1rem; }

/* stats */
.stats {
  display: grid; grid-template-columns: repeat(3, 1fr); max-width: 1200px; margin: 0 auto;
  padding: clamp(3rem, 8vw, 6rem) clamp(1.2rem, 4vw, 3rem);
  gap: 2rem;
}
@media (max-width: 800px) { .stats { grid-template-columns: 1fr; } }
.stat { border-top: 2px solid var(--black); padding-top: 1.2rem; }
.stat__num { font-family: var(--font-display); font-weight: 900; font-size: clamp(3rem, 6vw, 4.6rem); line-height: 1; }
.stat__unit { font-size: 1.1rem; margin-left: 0.4rem; color: var(--gray); }
.stat p { margin-top: 0.6rem; color: #333; font-size: 0.95rem; max-width: 26rem; }

/* features */
.features { padding: clamp(3rem, 8vw, 6rem) 0; }
.features__grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line);
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  max-width: 1200px; margin: 0 auto;
}
@media (max-width: 900px) { .features__grid { grid-template-columns: 1fr; } }
.fcard { background: var(--white); padding: 2.2rem 1.8rem; transition: background 0.35s, color 0.35s; }
.fcard:hover { background: var(--black); color: var(--white); }
.fcard:hover .fcard__index { -webkit-text-stroke-color: rgba(250, 250, 250, 0.5); }
.fcard:hover p { color: #cfcfcf; }
.fcard__index {
  font-family: var(--font-display); font-weight: 900; font-size: 2.4rem;
  color: transparent; -webkit-text-stroke: 1.5px rgba(10, 10, 10, 0.35);
  display: block; margin-bottom: 1rem; transition: -webkit-text-stroke-color 0.35s;
}
.fcard h3 { font-size: 1.25rem; margin-bottom: 0.6rem; }
.fcard p { font-size: 0.95rem; color: #444; transition: color 0.35s; }
.fcard--cta { display: flex; align-items: center; justify-content: center; }
.fcard--cta a {
  font-family: var(--font-display); font-weight: 900; font-size: 1.6rem; text-transform: uppercase;
  display: inline-flex; gap: 0.6rem; align-items: center; border-bottom: 3px solid currentColor; padding-bottom: 0.2rem;
}

/* how */
.how { padding: clamp(3rem, 8vw, 6rem) 0; }
.how__steps {
  list-style: none; max-width: 1200px; margin: 0 auto; padding: 0 clamp(1.2rem, 4vw, 3rem);
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 2.5rem; counter-reset: step;
}
@media (max-width: 800px) { .how__steps { grid-template-columns: 1fr; } }
.how__steps li { position: relative; padding-top: 3.4rem; border-top: 1px solid var(--line); }
.how__steps li > span {
  position: absolute; top: -1.6rem; left: 0; font-family: var(--font-display); font-weight: 900;
  font-size: 2.7rem; line-height: 1; background: var(--white); padding: 0 1rem 0.4rem 0;
}
.how__steps h3 { font-size: 1.2rem; margin-bottom: 0.5rem; }
.how__steps p { font-size: 0.95rem; color: #444; }

/* road — mașina avansează stânga→dreapta pe măsură ce dai scroll (JS) */
.road {
  position: relative; height: 120px; overflow: hidden;
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--white);
}
.road::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: 26px; height: 2px; background: var(--black);
}
.road::before {
  content: ''; position: absolute; left: 0; right: 0; bottom: 14px; height: 3px;
  background: repeating-linear-gradient(90deg, var(--black) 0 26px, transparent 26px 60px);
  opacity: 0.25;
}
.road__car { position: absolute; bottom: 24px; left: 0; will-change: transform; }
@media (prefers-reduced-motion: reduce) {
  .road__car { left: 50%; margin-left: -80px; }
}

/* providers — inverted */
.providers { background: var(--black); color: var(--white); padding: clamp(4rem, 10vw, 7rem) 0; }
.providers .section__eyebrow { color: #9a9a9a; }
.providers__sub { max-width: 40rem; margin-top: 1.4rem; color: #c9c9c9; font-size: 1.08rem; }
.providers__inner { max-width: 1200px; margin: 0 auto; }
.pricing {
  display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem;
  padding: 2rem clamp(1.2rem, 4vw, 3rem) 0; max-width: 900px;
}
@media (max-width: 760px) { .pricing { grid-template-columns: 1fr; } }
.price { border: 1px solid var(--line-inv); border-radius: 20px; padding: 2.2rem; position: relative; }
.price--pro { border-color: var(--white); }
.price__badge {
  position: absolute; top: -0.8rem; left: 2rem; background: var(--white); color: var(--black);
  font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em;
  padding: 0.25rem 0.8rem; border-radius: 999px;
}
.price__name { font-family: var(--font-display); font-weight: 800; font-size: 1.1rem; text-transform: uppercase; letter-spacing: 0.08em; color: #b5b5b5; }
.price__value { font-family: var(--font-display); font-weight: 900; font-size: 3.2rem; line-height: 1.1; margin: 0.4rem 0 1.2rem; }
.price__value span { font-size: 1rem; font-weight: 400; color: #9a9a9a; font-family: var(--font-body); }
.price ul { list-style: none; margin-bottom: 1.8rem; }
.price li { padding: 0.5rem 0 0.5rem 1.6rem; position: relative; border-bottom: 1px solid var(--line-inv); font-size: 0.95rem; color: #d8d8d8; }
.price li::before { content: '→'; position: absolute; left: 0; }
.providers__note { padding: 2rem clamp(1.2rem, 4vw, 3rem) 0; color: #9a9a9a; font-size: 0.9rem; }

/* download */
.download { padding-bottom: clamp(4rem, 9vw, 7rem); }
.download__inner { text-align: center; max-width: 720px; margin: 0 auto; padding: clamp(3rem, 7vw, 5rem) 1.5rem 0; }
.download__inner h2 { font-size: clamp(3rem, 8vw, 5.5rem); margin-bottom: 1rem; }
.download__sub { color: #444; margin-bottom: 2.2rem; }
.download__meta { margin-top: 1rem; font-size: 0.85rem; color: var(--gray); }
.download__help { margin-top: 2.4rem; text-align: left; border: 1px solid var(--line); border-radius: 14px; padding: 1rem 1.2rem; }
.download__help summary { cursor: pointer; font-weight: 500; }
.download__help p { margin-top: 0.7rem; font-size: 0.92rem; color: #444; }

/* pagini de vânzare (pentru-soferi / pentru-service-uri) */
.page-hero { padding: 9rem 0 4rem; position: relative; }
.page-hero .hero__grid { mask-image: radial-gradient(ellipse 90% 80% at 50% 0%, black 20%, transparent 70%); }
.page-hero__inner { max-width: 900px; margin: 0 auto; padding: 0 clamp(1.2rem, 4vw, 3rem); position: relative; }
.page-hero h1 { font-size: clamp(2.4rem, 5.5vw, 4.2rem); line-height: 1; text-transform: uppercase; margin-bottom: 1.4rem; }
.page-hero p { max-width: 38rem; font-size: 1.12rem; color: #333; }
.pains { max-width: 900px; margin: 0 auto; padding: 1.5rem clamp(1.2rem, 4vw, 3rem) 0; }
.pains li { list-style: none; border-top: 1px solid var(--line); padding: 1rem 0 1rem 2rem; position: relative; color: #333; }
.pains li::before { content: '✕'; position: absolute; left: 0; font-weight: 700; }
.pains li strong { color: var(--black); }
.faq { max-width: 900px; margin: 0 auto; padding: 1rem clamp(1.2rem, 4vw, 3rem) 4rem; }
.faq details { border-top: 1px solid var(--line); padding: 1.1rem 0; }
.faq summary { cursor: pointer; font-weight: 700; font-size: 1.05rem; list-style: none; display: flex; justify-content: space-between; gap: 1rem; }
.faq summary::after { content: '+'; font-weight: 400; font-size: 1.4rem; line-height: 1; }
.faq details[open] summary::after { content: '–'; }
.faq details p { margin-top: 0.8rem; color: #444; max-width: 44rem; }
.cta-final { text-align: center; padding: clamp(3rem, 7vw, 5rem) 1.5rem; border-top: 1px solid var(--line); }
.cta-final h2 { margin-bottom: 1rem; }
.cta-final p { color: #444; margin-bottom: 2rem; }

/* footer */
.footer { border-top: 1px solid var(--line); padding: 2.5rem clamp(1.2rem, 4vw, 3rem); display: flex; flex-wrap: wrap; gap: 1.4rem; align-items: center; justify-content: space-between; }
.footer__brand { font-family: var(--font-display); font-weight: 900; font-size: 1.15rem; }
.footer__brand span { color: var(--gray); }
.footer__links { display: flex; gap: 1.4rem; flex-wrap: wrap; font-size: 0.88rem; }
.footer__links a { opacity: 0.7; transition: opacity 0.2s; }
.footer__links a:hover { opacity: 1; }
.footer__copy { width: 100%; font-size: 0.8rem; color: var(--gray); }

/* ---------- mobile-first: pe telefon totul e centrat ---------- */
@media (max-width: 640px) {
  .nav { padding: 0.9rem 1rem; }
  .nav__cta { padding: 0.45rem 0.9rem; font-size: 0.85rem; }
  .hero { padding-top: 6rem; }
  .hero__visual { margin: 2.5rem 0 3.5rem; }
  .phone { width: 230px; height: 470px; }
  .hero__ring { width: 280px; height: 280px; margin: -140px 0 0 -140px; }
  .hero__inner { text-align: center; }
  .hero__sub { margin-left: auto; margin-right: auto; }
  .hero__actions { justify-content: center; }
  .section__head { text-align: center; }
  .stats { text-align: center; }
  .stat p { margin-left: auto; margin-right: auto; }
  .fcard { text-align: center; }
  .how__steps li { text-align: center; padding-top: 0.6rem; }
  .how__steps li > span { position: static; display: block; padding: 0; margin-bottom: 0.4rem; }
  .providers__sub { margin-left: auto; margin-right: auto; text-align: center; }
  .providers__note { text-align: center; }
  .price { text-align: left; }
  .footer { flex-direction: column; text-align: center; }
  .footer__links { justify-content: center; }
  .footer__copy { text-align: center; }
}

/* ---------- reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(34px); transition: opacity 0.8s var(--ease), transform 0.8s var(--ease); }
.reveal.is-visible { opacity: 1; transform: none; }

/* ---------- 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; }
  .reveal { opacity: 1; transform: none; }
  .hero__title .line span { transform: none; }
  .pcard { opacity: 1; transform: none; }
}
