@layer components {
  /* ==========================================================================
     Landing Page Components
     Landing page portals, plans, and FAQ
     ========================================================================== */

  /* Landing Body
     ------------------------------------------------------------------------- */
  /* Must override app-theme.css's `body { background: var(--surface-bg) }`
     which also sits in @layer components. Same layer + higher specificity
     (body.landing-body vs body) wins. Landing page is intentionally dark in
     both light and dark themes — its own art direction, not theme-driven. */
  body.landing-body {
    margin: 0;
    background: #0b1120;
    color: #e2e8f0;
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
  }

  body.landing-body::before {
    content: "";
    position: fixed;
    inset: 0;
    background:
      radial-gradient(ellipse at 20% 50%, rgba(14, 165, 233, 0.12) 0%, transparent 50%),
      radial-gradient(ellipse at 80% 20%, rgba(56, 189, 248, 0.08) 0%, transparent 50%),
      radial-gradient(ellipse at 50% 80%, rgba(20, 184, 166, 0.06) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
  }

  /* Landing Hero
     ------------------------------------------------------------------------- */
  .landing-hero {
    text-align: center;
    padding: 5rem 0 3rem;
  }

  /* Landing Portal Card
     ------------------------------------------------------------------------- */
  .landing-portal-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    padding: 2rem 1.25rem;
    background: var(--landing-surface);
    border: 1px solid var(--landing-border);
    border-radius: var(--radius-xl);
    text-decoration: none;
    color: var(--landing-text);
    transition: all var(--duration) var(--ease);
  }

  .landing-portal-card:hover {
    background: var(--landing-surface-hover);
    border-color: var(--landing-border-hover);
    transform: translateY(-2px);
    box-shadow: var(--landing-card-shadow);
    color: var(--landing-text-hover);
  }

  .landing-portal-icon {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-full);
    font-size: 1.25rem;
    color: var(--color-white);
  }

  .landing-portal-icon--admin {
    background: var(--gradient-cloud);
    box-shadow: var(--landing-icon-shadow-cloud);
  }

  .landing-portal-icon--client {
    /* Uses --gradient-client (emerald → teal, matches the legacy intent
       and the client portal's brand gradient). The earlier component
       version used --gradient-success which is the success-state palette,
       not the client-portal palette. */
    background: var(--gradient-client);
    box-shadow: var(--landing-icon-shadow-success);
  }

  .landing-portal-icon--reseller {
    background: var(--gradient-purple);
    box-shadow: var(--landing-icon-shadow-purple);
  }

  .landing-portal-label {
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-semibold);
  }

  .landing-portal-desc {
    font-size: var(--font-size-sm);
    color: var(--landing-text-muted);
  }

  /* Landing Section
     ------------------------------------------------------------------------- */
  .landing-plans {
    padding: 3rem 0 4rem;
  }

  .landing-section-title {
    text-align: center;
    font-size: var(--font-size-xl);
    font-weight: var(--font-weight-bold);
    color: var(--landing-heading);
    margin-bottom: 0.375rem;
  }

  .landing-section-subtitle {
    text-align: center;
    font-size: var(--font-size-sm);
    color: var(--landing-text-muted);
    margin-bottom: 2.5rem;
  }

  .landing-plans-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.25rem;
  }

  /* Landing Plan Card
     ------------------------------------------------------------------------- */
  .landing-plan-card {
    background: var(--landing-surface);
    border: 1px solid var(--landing-border);
    border-radius: var(--radius-xl);
    overflow: hidden;
    transition: border-color var(--duration) var(--ease);
  }

  .landing-plan-card:hover {
    border-color: var(--landing-cloud-border);
  }

  .landing-plan-header {
    padding: 1.5rem 1.5rem 1rem;
    border-bottom: 1px solid var(--landing-border-light);
  }

  .landing-plan-header h3,
  .landing-plan-header .h3 {
    font-size: var(--font-size-lg);
    font-weight: var(--font-weight-bold);
    color: var(--landing-heading);
    margin: 0 0 0.25rem;
  }

  .landing-plan-desc {
    font-size: var(--font-size-sm);
    color: var(--landing-text-muted);
    margin: 0;
    line-height: 1.5;
  }

  .landing-plan-features {
    list-style: none;
    padding: 1rem 1.5rem 1.5rem;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
  }

  .landing-plan-features li {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    font-size: var(--font-size-sm);
    color: var(--landing-text-secondary);
  }

  .landing-plan-features li i {
    width: 18px;
    text-align: center;
    color: var(--landing-cloud-accent);
    font-size: 0.8125rem;
  }

  .landing-plan-features li strong {
    color: var(--landing-heading);
  }

  /* Landing FAQ
     ------------------------------------------------------------------------- */
  .landing-faq {
    padding: 3rem 0 4rem;
    border-top: 1px solid var(--landing-border-light);
  }

  .landing-faq-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
    max-width: 960px;
    margin: 0 auto;
  }

  .landing-faq-group {
    background: var(--landing-surface-elevated);
    border: 1px solid var(--landing-border);
    border-radius: var(--radius-xl);
    padding: 1.25rem 1.5rem;
    transition: border-color var(--duration) var(--ease);
  }

  .landing-faq-group:hover {
    border-color: var(--landing-border-hover);
  }

  .landing-faq-group-title {
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-semibold);
    color: var(--landing-text);
    margin: 0 0 0.75rem;
    padding-bottom: 0.625rem;
    border-bottom: 1px solid var(--landing-border-light);
    display: flex;
    align-items: center;
    gap: 0.5rem;
  }

  .landing-faq-group-title i {
    color: var(--landing-cloud-accent);
    font-size: var(--font-size-sm);
    width: 20px;
    text-align: center;
  }

  .landing-faq-item {
    border-top: 1px solid var(--landing-border-light);
    padding: 0;
    margin: 0;
  }

  .landing-faq-item:first-of-type {
    border-top: none;
  }

  .landing-faq-item summary {
    padding: 0.625rem 0;
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-medium);
    color: var(--landing-text-secondary);
    cursor: pointer;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
  }

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

  .landing-faq-item summary::marker {
    display: none;
    content: "";
  }

  .landing-faq-item summary::after {
    content: "+";
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-light);
    color: var(--landing-text-muted);
    flex-shrink: 0;
    margin-left: 0.5rem;
    transition: color var(--duration) var(--ease);
  }

  .landing-faq-item summary:hover {
    color: var(--landing-heading);
  }

  .landing-faq-item[open] summary::after {
    content: "−";
    color: var(--landing-cloud-accent);
  }

  .landing-faq-item p {
    margin: 0 0 0.625rem;
    padding: 0 0 0.25rem;
    font-size: var(--font-size-sm);
    line-height: 1.6;
    color: var(--landing-text-muted);
  }

  /* Landing Footer
     ------------------------------------------------------------------------- */
  .landing-footer {
    text-align: center;
    padding: 2rem 0;
    font-size: var(--font-size-xs);
    color: var(--landing-footer-text);
    border-top: 1px solid var(--landing-border-light);
  }

  .landing-footer a {
    color: var(--landing-footer-link);
    text-decoration: none;
  }

  .landing-footer a:hover {
    color: var(--landing-cloud-accent);
  }

  /* Landing Responsive
     ------------------------------------------------------------------------- */
  @media (max-width: 768px) {
    .landing-faq-grid {
      grid-template-columns: 1fr;
    }
  }

  @media (max-width: 576px) {
    .landing-portals {
      grid-template-columns: 1fr;
      max-width: 280px;
    }
    .landing-hero {
      padding: 3rem 0 2rem;
    }
  }
}
