/* ===== Variables (from original design) ===== */
:root {
  --background: hsl(40 20% 97%);
  --foreground: hsl(220 20% 10%);
  --card: hsl(0 0% 100%);
  --card-foreground: hsl(220 20% 10%);
  --primary: hsl(32 95% 45%);
  --primary-foreground: hsl(0 0% 100%);
  --secondary: hsl(40 15% 92%);
  --secondary-foreground: hsl(220 15% 20%);
  --muted: hsl(40 10% 90%);
  --muted-foreground: hsl(220 10% 40%);
  --border: hsl(220 10% 88%);
  --radius: 0.75rem;
  --gradient-warm: linear-gradient(135deg, hsl(32 95% 45%), hsl(20 90% 38%));
  --gradient-glow: radial-gradient(ellipse at center, hsl(32 95% 45% / 0.1), transparent 70%);
  --shadow-primary: 0 10px 40px -10px hsl(32 95% 45% / 0.25);
  --font-display: 'Space Grotesk', sans-serif;
  --font-body: 'Inter', sans-serif;
}

/* Dark theme (matches Lovable: charcoal background + warm center glow) */
html.dark {
  --background: hsl(220 20% 4%);
  --foreground: hsl(40 20% 95%);
  --card: hsl(220 18% 8%);
  --card-foreground: hsl(40 20% 95%);
  --primary: hsl(32 95% 55%);
  --primary-foreground: hsl(220 20% 4%);
  --secondary: hsl(220 15% 14%);
  --secondary-foreground: hsl(40 20% 90%);
  --muted: hsl(220 15% 12%);
  --muted-foreground: hsl(220 10% 55%);
  --border: hsl(220 15% 15%);
  --gradient-warm: linear-gradient(135deg, hsl(32 95% 55%), hsl(20 90% 48%));
  --gradient-glow: radial-gradient(ellipse at center, hsl(32 95% 55% / 0.15), transparent 70%);
  --shadow-primary: 0 10px 40px -10px hsl(32 95% 55% / 0.3);
}

/* ===== Base ===== */
* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--background);
  color: var(--foreground);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
  transition: background 0.3s ease, color 0.3s ease;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
}

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

/* ===== Page ===== */
.page {
  min-height: 100vh;
}

/* ===== Theme toggle (top right) ===== */
.theme-toggle {
  position: fixed;
  top: 1.25rem;
  right: 1.25rem;
  z-index: 100;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 0.75rem;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--foreground);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  transition: background 0.2s, color 0.2s, border-color 0.2s, transform 0.15s;
}

.theme-toggle:hover {
  background: var(--secondary);
  border-color: var(--border);
}

.theme-toggle:active {
  transform: scale(0.96);
}

.theme-toggle__icon {
  position: absolute;
  width: 1.25rem;
  height: 1.25rem;
}

.theme-toggle__icon svg {
  display: block;
  width: 100%;
  height: 100%;
}

.theme-toggle__icon.hidden {
  display: none;
}

/* ===== Utilities ===== */
.text-gradient {
  background: var(--gradient-warm);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hidden {
  display: none !important;
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.875rem 1.75rem;
  border-radius: 0.75rem;
  font-family: var(--font-display);
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: opacity 0.2s;
}

.btn:hover {
  opacity: 0.9;
}

.btn--primary {
  background: var(--primary);
  color: var(--primary-foreground);
  box-shadow: var(--shadow-primary);
}

.btn--lg {
  padding: 1rem 2rem;
  font-size: 1.125rem;
}

/* ===== Icons (inline SVG) ===== */
.icon {
  display: inline-block;
  width: 1.25rem;
  height: 1.25rem;
  flex-shrink: 0;
  vertical-align: middle;
}

.icon svg {
  display: block;
  width: 100%;
  height: 100%;
}

/* Button icons inherit white from .btn--primary */
.btn .icon {
  width: 1.25rem;
  height: 1.25rem;
}

/* Footer social icons – size and inherit link color */
.icon--social {
  width: 1rem;
  height: 1rem;
}

.footer__link .icon {
  width: 1rem;
  height: 1rem;
}

/* Feature card icon box + inner SVG */
.feature-card__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 0.75rem;
  background: hsl(32 95% 45% / 0.1);
  flex-shrink: 0;
  transition: background 0.3s;
}

.feature-card__icon svg {
  width: 1.25rem;
  height: 1.25rem;
  color: var(--primary);
}

.feature-card:hover .feature-card__icon {
  background: hsl(32 95% 45% / 0.2);
}

html.dark .feature-card__icon {
  background: hsl(32 95% 55% / 0.1);
}

html.dark .feature-card:hover .feature-card__icon {
  background: hsl(32 95% 55% / 0.2);
}

/* ===== Hero ===== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 5rem 1.5rem;
  overflow: hidden;
}

.hero__glow {
  position: absolute;
  inset: 0;
  background: var(--gradient-glow);
  pointer-events: none;
}

.hero__content {
  position: relative;
  z-index: 10;
  max-width: 56rem;
  margin: 0 auto 3rem;
  text-align: center;
  animation: fadeUp 0.6s ease-out;
}

.hero__badge {
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--primary);
  margin: 0 0 1.5rem;
  font-family: var(--font-body);
}

.hero__title {
  font-size: clamp(2.25rem, 5vw, 4.5rem);
  font-weight: 700;
  line-height: 1.1;
  margin: 0 0 1.5rem;
  font-family: var(--font-display);
}

.hero__title-accent {
  background: var(--gradient-warm);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero__subtitle {
  font-size: clamp(1.125rem, 2vw, 1.25rem);
  color: var(--muted-foreground);
  max-width: 42rem;
  margin: 0 auto 2rem;
  line-height: 1.6;
  font-family: var(--font-body);
}

.hero__content .btn {
  margin-top: 0.25rem;
}

.hero__video-wrap {
  position: relative;
  z-index: 10;
  width: 100%;
  max-width: 56rem;
  margin: 0 auto;
  border-radius: 1rem;
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: 0 25px 50px -12px hsl(32 95% 45% / 0.05);
  animation: fadeUp 0.6s 0.2s ease-out both;
}

.hero__video-inner {
  position: relative;
  aspect-ratio: 16 / 9;
  background: var(--card);
}

.hero__video-iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
}

.hero__video-play {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  padding: 0;
  border: none;
  background: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
}

.hero__video-play.is-hidden {
  display: none;
}

.hero__video-play img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}

.hero__video-play-icon {
  position: relative;
  z-index: 1;
  width: 5rem;
  height: 5rem;
  border-radius: 50%;
  background: var(--primary);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 40px -10px hsl(32 95% 45% / 0.3);
  transition: transform 0.2s;
}

.hero__video-play-icon svg {
  width: 2rem;
  height: 2rem;
  margin-left: 0.25rem;
}

.hero__video-play:hover .hero__video-play-icon {
  transform: scale(1.1);
}

/* ===== Section shared ===== */
.section-badge {
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--primary);
  margin: 0 0 1rem;
  font-family: var(--font-body);
}

.section-title {
  font-size: clamp(1.875rem, 4vw, 2.25rem);
  font-weight: 700;
  margin: 0 0 1rem;
  font-family: var(--font-display);
  text-align: center;
}

/* ===== Features ===== */
.features {
  position: relative;
  padding: 2rem 1.5rem;
}

.features__inner {
  max-width: 64rem;
  margin: 0 auto;
}

.features__inner > .section-badge,
.features__inner > .section-title {
  text-align: center;
}

.features__intro {
  color: var(--muted-foreground);
  font-size: 1.125rem;
  max-width: 42rem;
  margin: 0 auto 3rem;
  text-align: center;
  font-family: var(--font-body);
}

.features__tab-bar {
  display: inline-flex;
  border-radius: 0.75rem;
  background: var(--secondary);
  padding: 0.25rem;
  gap: 0.25rem;
  margin: 0 auto 2.5rem;
  width: 100%;
  max-width: fit-content;
}

.features__tab-bar {
  margin-left: auto;
  margin-right: auto;
  display: flex;
  justify-content: center;
}

.features__tab {
  padding: 0.625rem 1.25rem;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  font-weight: 600;
  font-family: var(--font-display);
  border: none;
  background: transparent;
  color: var(--muted-foreground);
  cursor: pointer;
  transition: color 0.2s, background 0.2s;
}

.features__tab:hover {
  color: var(--foreground);
}

.features__tab.active {
  background: var(--primary);
  color: var(--primary-foreground);
  box-shadow: var(--shadow-primary);
}

.features__subtitle {
  text-align: center;
  color: var(--muted-foreground);
  font-size: 0.875rem;
  margin: 0 0 2rem;
  font-family: var(--font-body);
}

.features__grid {
  /* wrapper only; panels are the grid containers */
}

.features__panel {
  display: grid;
  gap: 1.5rem;
}

@media (min-width: 768px) {
  .features__panel {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .features__panel {
    grid-template-columns: repeat(3, 1fr);
  }
}

.features__panel.hidden {
  display: none;
}

.feature-card {
  padding: 1.75rem;
  border-radius: 1rem;
  background: var(--card);
  border: 1px solid var(--border);
  transition: border-color 0.3s;
}

.feature-card:hover {
  border-color: hsl(32 95% 45% / 0.3);
}

.feature-card__title {
  font-size: 1.125rem;
  font-weight: 600;
  margin: 0 0 0.5rem;
  font-family: var(--font-display);
}

.feature-card__desc {
  color: var(--muted-foreground);
  font-size: 0.875rem;
  line-height: 1.6;
  margin: 0;
  font-family: var(--font-body);
}

.feature-card__icon {
  margin-bottom: 1rem;
}

/* ===== How It Works ===== */
.how {
  position: relative;
  padding: 2rem 1.5rem;
}

.how__inner {
  max-width: 56rem;
  margin: 0 auto;
}

.how__inner > .section-badge,
.how__inner > .section-title {
  text-align: center;
}

.how__inner > .section-title {
  margin-bottom: 4rem;
}

.how__steps {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.how__step {
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
  padding: 1.5rem;
  border-radius: 1rem;
  background: var(--card);
  border: 1px solid var(--border);
  animation: fadeUp 0.5s ease-out both;
}

.how__step:nth-child(1) { animation-delay: 0s; }
.how__step:nth-child(2) { animation-delay: 0.1s; }
.how__step:nth-child(3) { animation-delay: 0.2s; }
.how__step:nth-child(4) { animation-delay: 0.3s; }

.how__step-num {
  font-size: 1.875rem;
  font-weight: 700;
  font-family: var(--font-display);
  color: hsl(32 95% 45% / 0.3);
  flex-shrink: 0;
}

.how__step-title {
  font-size: 1.125rem;
  font-weight: 600;
  margin: 0 0 0.25rem;
  font-family: var(--font-display);
}

.how__step-desc {
  color: var(--muted-foreground);
  font-size: 0.875rem;
  line-height: 1.6;
  margin: 0;
  font-family: var(--font-body);
}

/* ===== CTA ===== */
.cta {
  position: relative;
  padding: 2rem 1.5rem;
}

.cta__inner {
  max-width: 48rem;
  margin: 0 auto;
  text-align: center;
}

.cta__card {
  position: relative;
  padding: 3rem;
  border-radius: 1.5rem;
  background: var(--card);
  border: 1px solid var(--border);
  overflow: hidden;
}

.cta__glow {
  position: absolute;
  inset: 0;
  background: var(--gradient-glow);
  opacity: 0.5;
  pointer-events: none;
}

.cta__content {
  position: relative;
  z-index: 10;
}

.cta__title {
  font-size: clamp(1.875rem, 4vw, 2.25rem);
  font-weight: 700;
  margin: 0 0 1rem;
  font-family: var(--font-display);
}

.cta__text {
  color: var(--muted-foreground);
  font-size: 1.125rem;
  max-width: 32rem;
  margin: 0 auto 2rem;
  font-family: var(--font-body);
}

/* ===== Footer ===== */
.footer {
  padding: 3rem 1.5rem;
  border-top: 1px solid var(--border);
}

.footer__inner {
  max-width: 64rem;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

@media (min-width: 768px) {
  .footer__inner {
    flex-direction: row;
  }
}

.footer__copy {
  font-size: 0.875rem;
  color: var(--muted-foreground);
  margin: 0;
  font-family: var(--font-body);
}

.footer__links {
  display: flex;
  gap: 1rem;
}

.footer__link {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 0.5rem;
  background: var(--secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted-foreground);
  transition: color 0.2s, background 0.2s;
}

.footer__link:hover {
  color: var(--foreground);
  background: hsl(40 15% 92% / 0.8);
}

html.dark .footer__link:hover {
  background: hsl(220 15% 14% / 0.8);
}

/* ===== Animations ===== */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
