/* IHAB Landing Page Styles — aligned with app design system (index.css) */

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

:root {
  /* Backgrounds */
  --color-bg-primary: #f8fafc;
  --color-bg-secondary: #ffffff;
  --color-bg-dark: #0f172a;
  --color-bg-dark-secondary: #1e293b;

  /* Accents — Electric blue */
  --color-accent-primary: #2563eb;
  --color-accent-hover: #3b82f6;
  --color-accent-light: #93c5fd;
  --color-accent-gradient: #1e40af;

  /* Text */
  --color-text-primary: #0f172a;
  --color-text-secondary: #475569;
  --color-text-muted: #94a3b8;
  --color-text-inverse: #f8fafc;

  /* Status */
  --color-success: #16a34a;
  --color-purple: #7c3aed;

  /* Borders */
  --color-border: rgba(15, 23, 42, 0.08);

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.08);
  --shadow-md: 0 4px 12px rgba(15, 23, 42, 0.12);
  --shadow-lg: 0 8px 28px rgba(15, 23, 42, 0.14);
  --shadow-glow: 0 0 20px rgba(37, 99, 235, 0.25);

  /* Spacing */
  --spacing-xs: 0.25rem;
  --spacing-sm: 0.625rem;
  --spacing-md: 1.125rem;
  --spacing-lg: 1.75rem;
  --spacing-xl: 2.5rem;
  --spacing-2xl: 3.75rem;

  /* Radius — Pill / Fully Rounded */
  --radius-sm: 0.75rem;
  --radius-md: 1rem;
  --radius-lg: 1.5rem;
  --radius-full: 9999px;

  /* Typography */
  --font-sans: 'Space Grotesk', system-ui, -apple-system, sans-serif;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-sans);
  color: var(--color-text-primary);
  background: var(--color-bg-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

img {
  max-width: 100%;
  display: block;
}

/* ——— Utilities ——— */
.container {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ——— Buttons ——— */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 1rem;
  line-height: 1;
  border: none;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: background 200ms ease, box-shadow 200ms ease, transform 200ms ease;
  text-decoration: none;
}

.btn:focus-visible {
  outline: 2px solid var(--color-accent-primary);
  outline-offset: 2px;
}

.btn-primary {
  background: var(--color-accent-primary);
  color: #fff;
  padding: 0.875rem 2rem;
}

.btn-primary:hover {
  background: var(--color-accent-hover);
  box-shadow: var(--shadow-glow);
  transform: translateY(-1px);
}

.btn-secondary {
  background: transparent;
  color: var(--color-accent-primary);
  padding: 0.875rem 2rem;
  border: 2px solid var(--color-accent-primary);
}

.btn-secondary:hover {
  background: rgba(37, 99, 235, 0.06);
  transform: translateY(-1px);
}

.btn-white {
  background: #fff;
  color: var(--color-accent-primary);
  padding: 0.875rem 2rem;
}

.btn-white:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.btn-ghost {
  background: transparent;
  color: var(--color-text-inverse);
  padding: 0.875rem 2rem;
  border: 2px solid rgba(255, 255, 255, 0.3);
}

.btn-ghost:hover {
  border-color: rgba(255, 255, 255, 0.6);
  background: rgba(255, 255, 255, 0.08);
}

/* ——— Navigation ——— */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(248, 250, 252, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-border);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 4rem;
}

.nav-logo {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-accent-primary);
  letter-spacing: -0.01em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  list-style: none;
}

.nav-links a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--color-text-secondary);
  transition: color 200ms ease;
}

.nav-links a:hover,
.nav-links a:focus-visible {
  color: var(--color-accent-primary);
}

.nav-cta {
  font-size: 0.875rem;
  padding: 0.5rem 1.25rem;
}

/* ——— Hero ——— */
.hero {
  background: linear-gradient(135deg, var(--color-bg-dark) 0%, var(--color-bg-dark-secondary) 100%);
  color: var(--color-text-inverse);
  padding: 5rem 0 6rem;
  text-align: center;
  overflow: hidden;
  position: relative;
}

.hero::before {
  content: '';
  position: absolute;
  top: -40%;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 800px;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.15) 0%, transparent 70%);
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 720px;
  margin: 0 auto;
}

.hero h1 {
  font-size: clamp(2rem, 5vw, 3.25rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: 1.25rem;
}

.hero-highlight {
  color: var(--color-accent-light);
}

.hero p {
  font-size: clamp(1rem, 2.5vw, 1.25rem);
  color: var(--color-text-muted);
  max-width: 560px;
  margin: 0 auto 2.5rem;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

/* ——— Features ——— */
.features {
  padding: 5rem 0;
  background: var(--color-bg-primary);
}

.section-header {
  text-align: center;
  max-width: 560px;
  margin: 0 auto 3.5rem;
}

.section-header h2 {
  font-size: clamp(1.5rem, 3.5vw, 2.25rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--color-text-primary);
  margin-bottom: 0.75rem;
}

.section-header p {
  font-size: 1.05rem;
  color: var(--color-text-secondary);
  line-height: 1.6;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
}

.feature-card {
  background: var(--color-bg-secondary);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 2rem 1.75rem;
  transition: box-shadow 200ms ease, transform 200ms ease;
}

.feature-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.feature-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  border-radius: var(--radius-sm);
  margin-bottom: 1.25rem;
  font-size: 1.5rem;
}

.feature-icon--blue {
  background: rgba(37, 99, 235, 0.1);
  color: var(--color-accent-primary);
}

.feature-icon--green {
  background: rgba(22, 163, 74, 0.1);
  color: var(--color-success);
}

.feature-icon--purple {
  background: rgba(124, 58, 237, 0.1);
  color: var(--color-purple);
}

.feature-card h3 {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--color-text-primary);
}

.feature-card p {
  font-size: 0.95rem;
  color: var(--color-text-secondary);
  line-height: 1.6;
}

.feature-badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-purple);
  background: rgba(124, 58, 237, 0.1);
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-full);
  margin-left: 0.5rem;
  vertical-align: middle;
}

/* ——— Pricing ——— */
.pricing {
  padding: 5rem 0;
  background: var(--color-bg-dark);
  color: var(--color-text-inverse);
}

.pricing .section-header h2 {
  color: var(--color-text-inverse);
}

.pricing .section-header p {
  color: var(--color-text-muted);
}

.pricing-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  max-width: 820px;
  margin: 0 auto;
}

@media (min-width: 640px) {
  .pricing-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.pricing-card {
  border-radius: var(--radius-md);
  padding: 2.5rem 2rem;
  display: flex;
  flex-direction: column;
}

.pricing-card--free {
  background: var(--color-bg-dark-secondary);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.pricing-card--premium {
  background: var(--color-accent-primary);
  position: relative;
  overflow: hidden;
}

.pricing-card--premium::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.08) 0%, transparent 60%);
  pointer-events: none;
}

.pricing-card h3 {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.pricing-price {
  font-size: 2.5rem;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 0.25rem;
}

.pricing-price span {
  font-size: 1rem;
  font-weight: 400;
  opacity: 0.7;
}

.pricing-annual {
  font-size: 0.875rem;
  opacity: 0.7;
  margin-bottom: 1.5rem;
}

.pricing-features {
  list-style: none;
  margin-bottom: 2rem;
  flex: 1;
}

.pricing-features li {
  font-size: 0.95rem;
  padding: 0.4rem 0;
  display: flex;
  align-items: flex-start;
  gap: 0.625rem;
  line-height: 1.5;
}

.pricing-features li::before {
  content: '';
  flex-shrink: 0;
  width: 1.25rem;
  height: 1.25rem;
  margin-top: 0.125rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%2316a34a'%3E%3Cpath fill-rule='evenodd' d='M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z' clip-rule='evenodd'/%3E%3C/svg%3E");
  background-size: contain;
  background-repeat: no-repeat;
}

.pricing-card--premium .pricing-features li::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%23ffffff'%3E%3Cpath fill-rule='evenodd' d='M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z' clip-rule='evenodd'/%3E%3C/svg%3E");
}

.pricing-trial {
  text-align: center;
  margin-top: 2.5rem;
  font-size: 0.95rem;
  color: var(--color-text-muted);
}

.pricing-trial strong {
  color: var(--color-accent-light);
}

/* ——— CTA Banner ——— */
.cta-banner {
  padding: 5rem 0;
  background: var(--color-bg-primary);
  text-align: center;
}

.cta-banner h2 {
  font-size: clamp(1.5rem, 3.5vw, 2.25rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--color-text-primary);
  margin-bottom: 0.75rem;
}

.cta-banner p {
  font-size: 1.05rem;
  color: var(--color-text-secondary);
  max-width: 480px;
  margin: 0 auto 2rem;
  line-height: 1.6;
}

/* ——— Footer ——— */
.footer {
  background: var(--color-bg-dark);
  color: var(--color-text-muted);
  padding: 2.5rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
  text-align: center;
}

@media (min-width: 640px) {
  .footer-inner {
    flex-direction: row;
    justify-content: space-between;
    text-align: left;
  }
}

.footer-brand {
  font-size: 0.9rem;
  line-height: 1.6;
}

.footer-brand strong {
  color: var(--color-text-inverse);
  font-weight: 600;
}

.footer-tagline {
  font-style: italic;
  font-size: 0.85rem;
}

.footer-links {
  display: flex;
  gap: 1.5rem;
  list-style: none;
}

.footer-links a {
  font-size: 0.875rem;
  color: var(--color-text-muted);
  transition: color 200ms ease;
}

.footer-links a:hover,
.footer-links a:focus-visible {
  color: var(--color-text-inverse);
}

/* ——— Responsive ——— */

/* Small screens: single column, tighter spacing */
@media (max-width: 639px) {
  .nav-links {
    display: none;
  }

  .hero {
    padding: 3.5rem 0 4rem;
  }

  .features {
    padding: 3.5rem 0;
  }

  .features-grid {
    grid-template-columns: 1fr;
  }

  .pricing {
    padding: 3.5rem 0;
  }

  .cta-banner {
    padding: 3.5rem 0;
  }

  .section-header {
    margin-bottom: 2.5rem;
  }
}

/* Medium screens */
@media (min-width: 640px) and (max-width: 1023px) {
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Large screens */
@media (min-width: 1024px) {
  .features-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .btn,
  .feature-card,
  .nav-links a,
  .footer-links a {
    transition: none;
  }
}
