/* auto.abundera.ai — Global Styles */

@layer reset, tokens, base, components, layout, responsive;

/* --- Reset --- */

@layer reset {
  *,
  *::before,
  *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
  }
}

/* --- Tokens --- */

@layer tokens {
  :root {
    --brand-accent: #ef4444;
    --color-bg: #08090a;
    --color-surface-1: #0f1012;
    --color-surface-2: #161719;
    --color-surface-3: #1e1f22;
    --color-border: rgba(255, 255, 255, 0.06);
    --color-border-hover: rgba(249, 115, 22, 0.35);
    --color-text: #f5f5f5;
    --color-text-secondary: #e4e4e7;
    --color-text-muted: #b4b4bc;
    --color-text-tertiary: #8b8b96;
    --color-accent-1: #f97316;
    --color-accent-2: #f59e0b;
    --color-accent-green: #34d399;
    --color-success: #34d399;
    --color-error: #f87171;
    --color-warning: #fbbf24;

    --color-primary: #f97316;
    --color-primary-hover: #f97316cc;
    --color-surface: var(--color-surface-1);

    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --radius: 12px;
    --radius-sm: 8px;
    --radius-lg: 16px;
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.4);
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  }
}

/* --- Base --- */

@layer base {
  @font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 400 700;
    font-display: swap;
    src: url('/fonts/inter-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF;
  }

  html { scroll-behavior: smooth; }

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

  a { color: var(--color-accent-1); text-decoration: none; }
  a:hover { color: var(--color-accent-2); }
}

/* --- Components --- */

@layer components {
  .container { max-width: 1100px; margin: 0 auto; padding: 0 1.5rem; }
  .container--narrow { max-width: 720px; }

  .glass-card {
    background: var(--color-surface-1);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 2rem 1.5rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
  }

  .glass-card:hover {
    border-color: var(--color-border-hover);
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.4), 0 0 1px rgba(249, 115, 22, 0.2);
  }

  .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.875rem 2rem;
    border: none;
    border-radius: var(--radius);
    font-size: 1rem;
    font-weight: 600;
    font-family: var(--font-sans);
    cursor: pointer;
    transition: all 0.25s ease;
    text-decoration: none;
    line-height: 1;
  }

  .btn:active { transform: scale(0.98); }

  .btn--primary {
    color: #fff;
    background: linear-gradient(135deg, var(--color-accent-1), var(--color-accent-2));
    background-size: 200% 200%;
    box-shadow: 0 0 24px rgba(249, 115, 22, 0.25), 0 4px 16px rgba(0, 0, 0, 0.3);
    animation: gradientShift 4s ease infinite;
  }

  .btn--primary:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 0 40px rgba(249, 115, 22, 0.4), 0 12px 32px rgba(0, 0, 0, 0.4);
  }

  .btn--outline {
    background: rgba(255, 255, 255, 0.04);
    color: var(--color-text);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: var(--radius);
  }

  .btn--outline:hover {
    background: rgba(249, 115, 22, 0.08);
    border-color: var(--color-accent-1);
    color: var(--color-accent-1);
    box-shadow: 0 0 16px rgba(249, 115, 22, 0.1);
  }

  .section-eyebrow {
    font-size: 0.8125rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--color-accent-1);
    margin-bottom: 0.75rem;
  }

  .section-title {
    font-size: clamp(1.75rem, 4.5vw, 2.5rem);
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.15;
    background: linear-gradient(135deg, var(--color-text) 0%, var(--color-text-secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
  }

  .section-subtitle {
    font-size: clamp(0.9375rem, 1.5vw, 1.0625rem);
    color: var(--color-text-muted);
    line-height: 1.75;
    max-width: 560px;
  }

  .trust-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8125rem;
    font-weight: 600;
    padding: 0.375rem 0.875rem;
    border-radius: 20px;
    white-space: nowrap;
    background: rgba(249, 115, 22, 0.1);
    color: var(--color-accent-1);
    border: 1px solid rgba(249, 115, 22, 0.15);
  }

  /* FAQ */
  .faq-list { display: flex; flex-direction: column; gap: 0; text-align: left; }
  .faq-item { border-bottom: 1px solid var(--color-border); }
  .faq-item:first-child { border-top: 1px solid var(--color-border); }
  .faq-question {
    display: flex; align-items: center; justify-content: space-between;
    padding: 1.25rem 0; font-size: 1rem; font-weight: 600;
    color: var(--color-text); cursor: pointer; list-style: none;
    line-height: 1.4;
  }
  .faq-question::-webkit-details-marker { display: none; }
  .faq-question::after {
    content: '+'; flex-shrink: 0; margin-left: 1rem;
    font-size: 1.25rem; font-weight: 400; color: var(--color-text-muted);
    transition: transform 0.2s ease;
  }
  .faq-item[open] .faq-question::after { content: '\2212'; }
  .faq-answer {
    padding: 0 0 1.25rem; font-size: 0.9375rem;
    color: var(--color-text-secondary); line-height: 1.7;
  }

  /* CTA banner */
  .cta-banner {
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
    padding: 3rem 2rem;
    background: var(--color-surface-1);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
  }

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

  .cta-banner__desc {
    font-size: 1rem;
    color: var(--color-text-muted);
    margin-bottom: 2rem;
    line-height: 1.7;
  }

  /* Pricing */
  .pricing-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
    max-width: 960px;
    margin: 0 auto 2rem;
  }

  .pricing-card { text-align: left; padding: 2rem 1.75rem; display: flex; flex-direction: column; position: relative; }
  .pricing-card--popular { border-color: rgba(249, 115, 22, 0.35); box-shadow: 0 8px 40px rgba(249, 115, 22, 0.1), 0 0 1px rgba(249, 115, 22, 0.2); }
  .pricing-card__badge { position: absolute; top: -12px; left: 50%; transform: translateX(-50%); font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: #fff; background: linear-gradient(135deg, var(--color-accent-1), var(--color-accent-2)); padding: 0.3rem 1rem; border-radius: 999px; white-space: nowrap; }
  .pricing-card__name { font-size: 1.125rem; font-weight: 600; color: var(--color-text); margin-bottom: 0.75rem; }
  .pricing-card__price { margin-bottom: 1.5rem; }
  .pricing-card__amount { font-size: 2.5rem; font-weight: 700; letter-spacing: -0.03em; color: var(--color-text); }
  .pricing-card__mo { font-size: 1rem; font-weight: 500; color: var(--color-text-muted); margin-left: 0.125rem; }
  .pricing-card__features { list-style: none; padding: 0; margin: 0 0 2rem; display: flex; flex-direction: column; gap: 0.625rem; flex-grow: 1; }
  .pricing-card__features li { font-size: 0.9375rem; color: var(--color-text-secondary); line-height: 1.5; padding-left: 1.5rem; position: relative; }
  .pricing-card__features li::before { content: '\2713'; position: absolute; left: 0; color: var(--color-accent-1); font-weight: 700; font-size: 0.875rem; }
  .pricing-card__btn { width: 100%; text-align: center; }

  /* Footer */
  .footer {
    padding: 1.5rem;
    text-align: center;
    font-size: 0.8125rem;
    color: var(--color-text-muted);
    border-top: 1px solid var(--color-border);
  }

  .footer a { color: var(--color-text-muted); text-decoration: none; }
  .footer a:hover { color: var(--color-text); }

  /* Reveal animation */
  .reveal {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
    transition-delay: calc(var(--i, 0) * 80ms);
  }

  .reveal.revealed {
    opacity: 1;
    transform: translateY(0);
  }
}

/* --- Layout --- */

@layer layout {
  body.has-page-bg::before {
    content: '';
    position: fixed;
    inset: 0;
    z-index: -2;
    background:
      radial-gradient(ellipse 80% 50% at 50% -20%, rgba(249, 115, 22, 0.1), transparent 70%),
      radial-gradient(ellipse 60% 40% at 80% 60%, rgba(245, 158, 11, 0.06), transparent 60%),
      radial-gradient(ellipse 50% 30% at 20% 80%, rgba(249, 115, 22, 0.04), transparent 50%);
    animation: ambientShift 20s ease-in-out infinite;
    pointer-events: none;
  }

  .nav {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 100;
    padding: 0.875rem 1.5rem;
    border-bottom: 1px solid transparent;
    transition: all 0.3s ease;
  }

  .nav.scrolled {
    background: rgba(8, 9, 10, 0.85);
    backdrop-filter: blur(20px) saturate(150%);
    -webkit-backdrop-filter: blur(20px) saturate(150%);
    border-bottom-color: var(--color-border);
  }

  .nav__inner {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
  }

  .nav__logo {
    color: var(--color-text);
    font-size: 1.25rem;
    font-weight: 700;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.375rem;
  }

  .nav__logo-icon { flex-shrink: 0; }
  .nav__logo span { color: var(--color-accent-1); }

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

  .nav__link {
    color: var(--color-text-muted);
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    transition: color 0.2s;
  }

  .nav__link:hover { color: var(--color-text); }

  .nav__cta {
    background: linear-gradient(135deg, #f97316, #f59e0b);
    color: #fff !important;
    padding: 0.4rem 1rem;
    border-radius: 6px;
    font-weight: 600;
    transition: opacity 0.2s, transform 0.2s;
  }

  .nav__cta:hover {
    opacity: 0.9;
    transform: translateY(-1px);
    color: #fff !important;
  }

  .nav__toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
    color: var(--color-text);
  }

  .nav__toggle svg { width: 24px; height: 24px; }

  .section { padding: clamp(4rem, 8vw, 7.5rem) 1.5rem; }

  .section--hero {
    min-height: min(100vh, 800px);
    min-height: min(100dvh, 800px);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding-top: 6rem;
    padding-bottom: 4rem;
  }

  .hero__content { max-width: 700px; margin: 0 auto; }

  .hero__badge {
    display: inline-block;
    font-size: 0.8125rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--color-accent-1);
    background: rgba(249, 115, 22, 0.1);
    border: 1px solid rgba(249, 115, 22, 0.2);
    padding: 0.4rem 1.25rem;
    border-radius: 999px;
    margin-bottom: 1.25rem;
  }

  .hero__title {
    font-size: clamp(2.5rem, 7vw, 4rem);
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.04em;
    margin-bottom: 1.25rem;
    background: linear-gradient(135deg, #fff 0%, var(--color-text-secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
  }

  .hero__subtitle {
    font-size: clamp(1rem, 2vw, 1.1875rem);
    color: var(--color-text-muted);
    line-height: 1.7;
    margin-bottom: 2.5rem;
    max-width: 540px;
    margin-left: auto;
    margin-right: auto;
  }

  .hero__cta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 3rem;
  }

  .hero__trust {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    flex-wrap: wrap;
  }

  .trust-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
    padding: 1.5rem 0;
    border-top: 1px solid var(--color-border);
    border-bottom: 1px solid var(--color-border);
  }

  .trust-bar__item {
    font-size: 0.8125rem;
    color: var(--color-text-muted);
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
  }

  .trust-bar__icon { font-size: 1rem; color: var(--color-accent-1); }

  .feature-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }

  .feature-card { padding: 2rem 1.5rem; text-align: left; }

  .feature-card__icon {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    background: rgba(249, 115, 22, 0.1);
    border-radius: var(--radius);
    margin-bottom: 1.25rem;
  }

  .feature-card__title {
    font-size: 1.125rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 0.5rem;
    color: var(--color-text);
  }

  .feature-card__desc {
    font-size: 0.9375rem;
    color: var(--color-text-muted);
    line-height: 1.65;
  }

  .footer { margin-top: 0; }
}

/* --- Responsive --- */

@layer responsive {
  @media (max-width: 900px) {
    .feature-grid { grid-template-columns: 1fr; }
    .pricing-grid { grid-template-columns: 1fr; max-width: 400px; }
  }

  @media (max-width: 640px) {
    .nav__toggle { display: block; }

    .nav__links {
      display: none;
      position: absolute;
      top: 100%; left: 0; right: 0;
      flex-direction: column;
      align-items: stretch;
      gap: 0;
      background: rgba(8, 9, 10, 0.95);
      backdrop-filter: blur(20px);
      -webkit-backdrop-filter: blur(20px);
      border-bottom: 1px solid var(--color-border);
      padding: 0.5rem 0;
    }

    .nav__links.is-open { display: flex; }
    .nav__links li { border-bottom: 1px solid var(--color-border); }
    .nav__links li:last-child { border-bottom: none; }
    .nav__link { display: block; padding: 0.875rem 1.5rem; font-size: 1rem; }
    .nav__cta { margin: 0.5rem 1.5rem; text-align: center; border-radius: 8px; padding: 0.75rem 1rem; }
    .nav__inner { position: relative; }
    .hero__cta { flex-direction: column; }
    .hero__trust { flex-direction: column; }
    .trust-bar { flex-direction: column; gap: 1rem; }
    .glass-card { padding: 1.25rem; }
    .container { padding: 0 1rem; }
  }
}

/* --- Animations --- */

@keyframes gradientShift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

@keyframes ambientShift {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}

.hero__content > * {
  animation: fadeInUp 0.8s var(--ease-out) both;
}

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