:root {
  --primary: #D32F2F;
  --primary-light: #ff6b6b;
  --secondary: #0f0f0f;
  --bg: #fafafa;
  --surface: #ffffff;
  --muted: #6b7280;
  --border: #e5e7eb;
  --radius: 16px;
  --radius-lg: 24px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  color: var(--secondary);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; }

.container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ============ HEADER ============ */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(250, 250, 250, 0.8);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(0,0,0,0.06);
  transition: box-shadow 0.3s;
}

.header--scrolled {
  box-shadow: 0 1px 20px rgba(0,0,0,0.08);
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.brand { display: inline-flex; align-items: center; }
.brand__logo { height: 36px; width: auto; }
.brand__logo--sm { height: 28px; }

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

.nav a {
  padding: 8px 16px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
  color: var(--muted);
  transition: all 0.2s;
}

.nav a:hover {
  color: var(--secondary);
  background: rgba(0,0,0,0.04);
}

.nav__cta {
  background: var(--secondary) !important;
  color: #fff !important;
  font-weight: 600 !important;
  padding: 8px 20px !important;
}
.nav__cta:hover {
  background: #000 !important;
  transform: translateY(-1px);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--secondary);
  border-radius: 2px;
  transition: 0.3s;
}

/* ============ HERO ============ */
.hero {
  position: relative;
  padding: 140px 0 80px;
  overflow: hidden;
}

.hero__bg {
  position: absolute;
  top: -200px;
  right: -200px;
  width: 700px;
  height: 700px;
  background: radial-gradient(circle, rgba(211,47,47,0.08) 0%, transparent 70%);
  pointer-events: none;
}

.hero__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.hero__content { max-width: 540px; }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(211,47,47,0.08);
  color: var(--primary);
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 24px;
}

.hero h1 {
  font-size: clamp(36px, 5vw, 52px);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.03em;
  margin-bottom: 20px;
}

.gradient-text {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero__desc {
  font-size: 17px;
  line-height: 1.65;
  color: var(--muted);
  max-width: 460px;
}

.cta {
  display: flex;
  gap: 12px;
  margin-top: 32px;
  flex-wrap: wrap;
}

.cta--center { justify-content: center; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 28px;
  border-radius: 14px;
  font-size: 15px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all 0.25s ease;
  text-decoration: none;
}

.btn--lg {
  padding: 16px 32px;
  font-size: 16px;
}

.btn--primary {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 8px 30px rgba(211,47,47,0.3);
}
.btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 40px rgba(211,47,47,0.4);
}

.btn--secondary {
  background: var(--surface);
  color: var(--secondary);
  border: 1px solid var(--border);
}
.btn--secondary:hover {
  background: #f5f5f5;
  transform: translateY(-2px);
}

.btn--white {
  background: rgba(255,255,255,0.15);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.25);
  backdrop-filter: blur(10px);
}
.btn--white:hover {
  background: rgba(255,255,255,0.25);
  transform: translateY(-2px);
}

.btn--disabled {
  opacity: 0.5;
  pointer-events: none;
}

.meta {
  display: flex;
  gap: 20px;
  margin-top: 36px;
  flex-wrap: wrap;
}

.meta__item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--muted);
  font-weight: 500;
}

.meta__icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: rgba(211,47,47,0.08);
  color: var(--primary);
  display: grid;
  place-items: center;
}

.note {
  margin-top: 16px;
  color: var(--primary);
  font-size: 13px;
  font-weight: 500;
}

/* Phone mockup */
.hero__visual {
  display: flex;
  justify-content: center;
  position: relative;
}

.phone {
  width: 280px;
  background: #111;
  border-radius: 40px;
  padding: 12px;
  box-shadow:
    0 30px 80px rgba(0,0,0,0.2),
    0 0 0 1px rgba(255,255,255,0.1) inset;
  position: relative;
  z-index: 2;
}

.phone__notch {
  width: 100px;
  height: 28px;
  background: #111;
  border-radius: 0 0 18px 18px;
  margin: 0 auto;
  position: relative;
  z-index: 3;
  margin-top: -12px;
}

.phone__screenshot {
  width: 100%;
  border-radius: 28px;
  margin-top: -16px;
  display: block;
}

.phone__glow {
  position: absolute;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(211,47,47,0.15), transparent 70%);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 1;
  pointer-events: none;
}

/* ============ SECTIONS ============ */
.section {
  padding: 80px 0;
}

.section__header {
  margin-bottom: 48px;
}

.section__header--center {
  text-align: center;
}

.section__tag {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 999px;
  background: rgba(211,47,47,0.08);
  color: var(--primary);
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 16px;
}

.section__tag--light {
  background: rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.9);
}

.section h2 {
  font-size: clamp(28px, 4vw, 38px);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.section__subtitle {
  margin-top: 12px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.6;
}

.section__subtitle--light {
  color: rgba(255,255,255,0.6);
}

/* ============ FEATURES ============ */
.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.grid--3 { grid-template-columns: repeat(3, 1fr); }

.feature {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 24px;
  transition: all 0.3s ease;
}

.feature:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 50px rgba(0,0,0,0.08);
  border-color: rgba(211,47,47,0.2);
}

.feature__icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  margin-bottom: 20px;
}

.feature__icon--orange { background: rgba(249,115,22,0.08); color: #f97316; }
.feature__icon--blue { background: rgba(59,130,246,0.08); color: #3b82f6; }
.feature__icon--green { background: rgba(34,197,94,0.08); color: #22c55e; }
.feature__icon--purple { background: rgba(139,92,246,0.08); color: #8b5cf6; }
.feature__icon--red { background: rgba(211,47,47,0.08); color: var(--primary); }
.feature__icon--teal { background: rgba(20,184,166,0.08); color: #14b8a6; }

.feature h3 {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.feature p {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.6;
}

.badge--sm {
  font-size: 10px;
  padding: 2px 8px;
  margin-bottom: 0;
}

/* ============ OPERATORS ============ */
.section--alt {
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.operators {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 16px;
  max-width: 800px;
  margin: 0 auto;
}

.operators__loading {
  grid-column: 1 / -1;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
  padding: 24px;
}

.operator {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 16px;
  text-align: center;
  transition: all 0.3s ease;
}

.operator:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 30px rgba(0,0,0,0.08);
  border-color: rgba(211,47,47,0.2);
}

.operator__logo-wrap {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  background: #fff;
  border: 1px solid var(--border);
  display: grid;
  place-items: center;
  margin: 0 auto 12px;
  overflow: hidden;
}

.operator__img {
  width: 48px;
  height: 48px;
  object-fit: contain;
}

.operator__name {
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 8px;
  text-transform: capitalize;
}

.operator__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  justify-content: center;
}

.operator__tag {
  font-size: 10px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(211,47,47,0.06);
  color: var(--primary);
}

/* ============ HOW IT WORKS ============ */
.section--dark {
  background: var(--secondary);
  color: #fff;
}

.section--dark h2 { color: #fff; }

.steps {
  max-width: 600px;
  margin: 48px auto 0;
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

.step {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  padding: 24px;
  border-radius: var(--radius);
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
  transition: all 0.3s;
}

.step:hover {
  background: rgba(255,255,255,0.08);
}

.step__n {
  width: 44px;
  height: 44px;
  min-width: 44px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 18px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: #fff;
}

.step__content h3 {
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 6px;
}

.step__content p {
  font-size: 14px;
  color: rgba(255,255,255,0.5);
  line-height: 1.6;
}

.step__line {
  width: 2px;
  height: 24px;
  background: rgba(255,255,255,0.1);
  margin: 0 0 0 44px;
}

/* ============ FAQ ============ */
.faq {
  max-width: 640px;
  margin: 40px auto 0;
  display: grid;
  gap: 12px;
}

.faq details {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0;
  background: var(--surface);
  overflow: hidden;
  transition: all 0.3s;
}

.faq details:hover {
  border-color: rgba(211,47,47,0.2);
}

.faq details[open] {
  box-shadow: 0 8px 30px rgba(0,0,0,0.06);
}

.faq summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 15px;
  padding: 20px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  list-style: none;
}

.faq summary::-webkit-details-marker { display: none; }

.faq__chevron {
  transition: transform 0.3s;
  flex-shrink: 0;
  color: var(--muted);
}

details[open] .faq__chevron {
  transform: rotate(180deg);
}

.faq p {
  padding: 0 24px 20px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}

/* ============ CTA SECTION ============ */
.section--cta {
  background: linear-gradient(135deg, var(--secondary) 0%, #1a1a2e 100%);
  color: #fff;
  padding: 80px 0;
}

.section--cta h2 {
  color: #fff;
  font-size: clamp(28px, 4vw, 36px);
}

.section--cta .section__subtitle {
  color: rgba(255,255,255,0.6);
  margin-bottom: 32px;
}

.cta-logo {
  height: 56px;
  width: auto;
  margin-bottom: 24px;
  filter: brightness(0) invert(1);
}

/* ============ FOOTER ============ */
.footer {
  padding: 32px 0;
  border-top: 1px solid var(--border);
}

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

.footer__muted {
  color: var(--muted);
  font-size: 13px;
  margin-top: 8px;
}

.footer__links {
  display: flex;
  gap: 24px;
}

.footer__links a {
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
  transition: color 0.2s;
}

.footer__links a:hover {
  color: var(--secondary);
}

/* ============ ANIMATIONS ============ */

/* --- Keyframes --- */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(30px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInLeft {
  from { opacity: 0; transform: translateX(-40px); }
  to   { opacity: 1; transform: translateX(0); }
}

@keyframes fadeInRight {
  from { opacity: 0; transform: translateX(40px); }
  to   { opacity: 1; transform: translateX(0); }
}

@keyframes fadeInScale {
  from { opacity: 0; transform: scale(0.9); }
  to   { opacity: 1; transform: scale(1); }
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}

@keyframes pulse-glow {
  0%, 100% { opacity: 0.4; transform: translate(-50%, -50%) scale(1); }
  50% { opacity: 0.7; transform: translate(-50%, -50%) scale(1.15); }
}

@keyframes shimmer {
  0% { background-position: -200% center; }
  100% { background-position: 200% center; }
}

@keyframes step-pop {
  0% { transform: scale(0.5); opacity: 0; }
  70% { transform: scale(1.15); }
  100% { transform: scale(1); opacity: 1; }
}

@keyframes slide-line {
  from { height: 0; opacity: 0; }
  to   { height: 24px; opacity: 1; }
}

@keyframes badge-bounce {
  0% { opacity: 0; transform: translateY(-10px) scale(0.9); }
  60% { transform: translateY(3px) scale(1.02); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

/* --- Scroll reveal base --- */
[data-animate] {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1), transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

[data-animate].visible {
  opacity: 1;
  transform: translateY(0);
}

/* Direction variants */
[data-animate="left"] {
  transform: translateX(-40px);
}
[data-animate="left"].visible {
  transform: translateX(0);
}

[data-animate="right"] {
  transform: translateX(40px);
}
[data-animate="right"].visible {
  transform: translateX(0);
}

[data-animate="scale"] {
  transform: scale(0.9);
}
[data-animate="scale"].visible {
  transform: scale(1);
}

/* Stagger delays (set via CSS custom property or classes) */
[data-animate][data-delay="1"] { transition-delay: 0.1s; }
[data-animate][data-delay="2"] { transition-delay: 0.2s; }
[data-animate][data-delay="3"] { transition-delay: 0.3s; }
[data-animate][data-delay="4"] { transition-delay: 0.4s; }
[data-animate][data-delay="5"] { transition-delay: 0.5s; }
[data-animate][data-delay="6"] { transition-delay: 0.6s; }

/* --- Hero entrance --- */
.hero__content .badge {
  opacity: 0;
  animation: badge-bounce 0.6s 0.2s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.hero__content h1 {
  opacity: 0;
  animation: fadeInUp 0.8s 0.35s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.hero__desc {
  opacity: 0;
  animation: fadeInUp 0.8s 0.5s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.hero__content .cta {
  opacity: 0;
  animation: fadeInUp 0.8s 0.65s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.hero__content .meta {
  opacity: 0;
  animation: fadeInUp 0.8s 0.8s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

/* --- Floating phone --- */
.phone {
  animation: float 5s ease-in-out infinite;
}

/* --- Pulsing glow --- */
.phone__glow {
  animation: pulse-glow 3s ease-in-out infinite;
}

/* --- Hero visual entrance --- */
.hero__visual {
  opacity: 0;
  animation: fadeInRight 1s 0.4s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

/* --- Button shine effect on hover --- */
.btn {
  position: relative;
  overflow: hidden;
}

.btn::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 60%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  transition: left 0.5s ease;
}

.btn:hover::after {
  left: 120%;
}

/* --- Feature cards hover glow --- */
.feature {
  position: relative;
}

.feature::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(211,47,47,0.15), transparent, rgba(211,47,47,0.1));
  opacity: 0;
  transition: opacity 0.4s ease;
  z-index: -1;
}

.feature:hover::before {
  opacity: 1;
}

/* --- Feature icon bounce on card hover --- */
.feature:hover .feature__icon {
  animation: step-pop 0.4s ease;
}

/* --- Step number pop on reveal --- */
.step.visible .step__n {
  animation: step-pop 0.5s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

/* --- Step line grow on reveal --- */
.step__line {
  height: 0;
  opacity: 0;
  transition: height 0.4s 0.2s ease, opacity 0.4s 0.2s ease;
}

.step__line.visible {
  height: 24px;
  opacity: 1;
}

/* --- Operator card hover --- */
.operator {
  transition: all 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

.operator:hover .operator__logo-wrap {
  transform: scale(1.08) rotate(-2deg);
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

.operator__logo-wrap {
  transition: transform 0.3s ease;
}

/* --- FAQ answer slide down --- */
.faq details .faq__answer {
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  transition: max-height 0.4s ease, opacity 0.3s ease, padding 0.3s ease;
  padding: 0 24px;
}

details[open] .faq__answer {
  max-height: 200px;
  opacity: 1;
  padding: 0 24px 20px;
}

/* --- CTA section entrance --- */
.section--cta .cta-logo {
  opacity: 0;
  animation: fadeInScale 0.7s ease forwards;
  animation-play-state: paused;
}

.section--cta.visible .cta-logo {
  animation-play-state: running;
}

/* --- Gradient text shimmer on load --- */
.gradient-text {
  background-size: 200% auto;
  animation: shimmer 3s 1s ease-in-out infinite;
}

/* --- Section tag slide in --- */
.section__tag {
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.section__header.visible .section__tag {
  opacity: 1;
  transform: translateY(0);
}

/* --- Nav link underline animation --- */
.nav a:not(.nav__cta) {
  position: relative;
}

.nav a:not(.nav__cta)::after {
  content: '';
  position: absolute;
  bottom: 4px;
  left: 50%;
  width: 0;
  height: 2px;
  background: var(--primary);
  border-radius: 1px;
  transition: width 0.3s ease, left 0.3s ease;
}

.nav a:not(.nav__cta):hover::after {
  width: 60%;
  left: 20%;
}

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ============ RESPONSIVE ============ */
@media (max-width: 960px) {
  .hero__grid {
    grid-template-columns: 1fr;
    gap: 48px;
    text-align: center;
  }
  .hero__content { max-width: 100%; }
  .hero__desc { max-width: 100%; margin: 0 auto; }
  .cta { justify-content: center; }
  .meta { justify-content: center; }
  .grid, .grid--3 { grid-template-columns: repeat(2, 1fr); }
  .nav {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: rgba(250, 250, 250, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    flex-direction: column;
    padding: 16px 24px;
    border-bottom: 1px solid var(--border);
    transform: translateY(-10px);
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
    pointer-events: none;
  }
  .nav--open {
    display: flex;
    transform: translateY(0);
    opacity: 1;
    pointer-events: all;
  }
  .nav-toggle { display: flex; }
  .phone { width: 240px; }
  .hero { padding: 120px 0 60px; }
}

@media (max-width: 560px) {
  .grid, .grid--3 { grid-template-columns: 1fr; }
  .btn { width: 100%; }
  .hero h1 { font-size: 32px; }
  .section { padding: 60px 0; }
  .footer__inner { flex-direction: column; text-align: center; }
  .footer__links { gap: 16px; }
  .step { padding: 16px; }
  .step__line { margin-left: 36px; height: 16px; }
}
