/* ============================================================================
   CBSE AI TUTOR — index.css  (LANDING, page-specific only)
   "Warm Scholar" — consumes base.css tokens verbatim. No :root color-token
   redefinitions live here (base.css owns tokens). Layout-only custom props are
   allowed. All units rem. Light is the default; dark via [data-theme]/.dark.
   Heavy noise / mesh / floating-shape blobs are intentionally retired (§0.7).
   Motion is tasteful and reduced-motion-safe (base.css zeroes it globally).
   ============================================================================ */

/* ----------------------------------------------------------------------------
   PAGE SHELL
   ---------------------------------------------------------------------------- */
.ix-page { background: var(--bg-primary); }

/* The index owns its own fixed brand header (no shared header-embed). */
.ix-header {
    position: fixed;
    inset: 0 0 auto 0;
    z-index: 1000;
    background: color-mix(in srgb, var(--bg-primary) 82%, transparent);
    -webkit-backdrop-filter: blur(0.75rem) saturate(1.1);
            backdrop-filter: blur(0.75rem) saturate(1.1);
    border-bottom: 0.0625rem solid transparent;
    transition: border-color var(--transition-base), box-shadow var(--transition-base), background var(--transition-base);
}
.ix-header.is-scrolled {
    border-bottom-color: var(--border-color);
    box-shadow: var(--shadow-sm);
}

.ix-brand-mark {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: var(--radius-md);
    background: var(--gradient-primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
    font-size: 1.15rem;
    box-shadow: var(--shadow-glow);
    flex-shrink: 0;
}

/* Header nav link — ink-amber on hover/active (never raw amber as text). */
.ix-navlink {
    position: relative;
    padding: 0.5rem 0.875rem;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.95rem;
    transition: color var(--transition-fast), background var(--transition-fast);
}
.ix-navlink:hover { color: var(--text-primary); background: var(--bg-sunken); }
.ix-navlink.is-active { color: var(--accent-primary-text); }

/* Round control buttons (theme toggle, hamburger, network trigger sit beside). */
.ix-iconbtn {
    width: 2.75rem;
    height: 2.75rem;
    min-width: 2.75rem;
    min-height: 2.75rem;
    border: 0.0625rem solid var(--border-color);
    background: var(--bg-card);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.05rem;
    transition: color var(--transition-fast), background var(--transition-fast), border-color var(--transition-fast), transform var(--transition-fast);
}
.ix-iconbtn:hover { color: var(--accent-primary-text); border-color: var(--accent-primary); background: var(--bg-sunken); }
.ix-theme-toggle:hover { transform: rotate(15deg); }

/* Mobile drawer (collapses via max-height). */
.ix-mobile-menu { max-height: 0; overflow: hidden; transition: max-height var(--transition-base); }
.ix-mobile-menu.is-open { max-height: 40rem; }
.ix-mobile-link {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    min-height: 2.75rem;
    padding: 0.625rem 0.875rem;
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-weight: 500;
    transition: color var(--transition-fast), background var(--transition-fast);
}
.ix-mobile-link:hover { color: var(--text-primary); background: var(--bg-sunken); }
.ix-mobile-link i { width: 1.25rem; text-align: center; color: var(--accent-primary-text); }

/* ----------------------------------------------------------------------------
   HERO  (≤1 hero-scale decoration: the .bg-notebook grid; highlighter on H1)
   ---------------------------------------------------------------------------- */
.ix-hero {
    position: relative;
    padding: 9rem 0 5.5rem;
    overflow: hidden;
    background:
        radial-gradient(ellipse 60% 50% at 85% 0%, var(--accent-primary-soft) 0%, transparent 60%),
        var(--bg-primary);
}
.ix-hero-grid {
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    gap: 4rem;
    align-items: center;
}

.ix-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4375rem 0.9375rem;
    background: var(--bg-card);
    border: 0.0625rem solid var(--border-color);
    border-radius: var(--radius-full);
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: var(--text-secondary);
    box-shadow: var(--shadow-sm);
}
.ix-eyebrow i { color: var(--accent-primary-text); }

.ix-hero-title {
    font-family: var(--font-display);
    font-size: clamp(2.5rem, 5.4vw, 4rem);
    font-weight: 800;
    line-height: 1.08;
    letter-spacing: -0.02em;
    color: var(--text-primary);
}
.ix-hero-lead {
    font-size: 1.2rem;
    line-height: 1.7;
    color: var(--text-secondary);
    max-width: 34rem;
}

/* Trust row under hero CTAs. */
.ix-trust { display: flex; flex-wrap: wrap; gap: 1.25rem 1.75rem; }
.ix-trust-item { display: inline-flex; align-items: center; gap: 0.5rem; font-size: 0.9rem; color: var(--text-muted); font-weight: 500; }
.ix-trust-item i { color: var(--accent-secondary-text); }

/* ── Hero chat mockup (warm card; ink-on-amber user bubble) ───────────────── */
.ix-chat-card {
    position: relative;
    background: var(--bg-card);
    border: 0.0625rem solid var(--border-color);
    border-radius: var(--radius-2xl);
    padding: 1.75rem;
    box-shadow: var(--shadow-lg);
}
.ix-chat-head {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    padding-bottom: 1.125rem;
    margin-bottom: 1.25rem;
    border-bottom: 0.0625rem solid var(--border-subtle);
}
.ix-chat-avatar {
    width: 2.75rem;
    height: 2.75rem;
    border-radius: var(--radius-md);
    background: var(--gradient-primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
    font-size: 1.1rem;
    box-shadow: var(--shadow-glow);
    flex-shrink: 0;
}
.ix-chat-name { font-weight: 700; font-family: var(--font-display); line-height: 1.2; }
.ix-chat-status { display: inline-flex; align-items: center; gap: 0.375rem; font-size: 0.8rem; color: var(--accent-secondary-text); font-weight: 500; }
.ix-chat-dot { width: 0.5rem; height: 0.5rem; border-radius: var(--radius-full); background: var(--accent-secondary); }
.ix-chat-stream { display: flex; flex-direction: column; gap: 0.875rem; }
.ix-bubble {
    max-width: 85%;
    padding: 0.75rem 1rem;
    font-size: 0.92rem;
    line-height: 1.55;
    border-radius: var(--radius-lg);
    opacity: 0;
    animation: ixBubbleIn 0.5s ease forwards;
}
.ix-bubble-user {
    align-self: flex-end;
    background: var(--gradient-primary);
    color: var(--text-primary);
    border-bottom-right-radius: 0.375rem;
    animation-delay: 0.25s;
}
.ix-bubble-ai {
    align-self: flex-start;
    background: var(--bg-sunken);
    color: var(--text-primary);
    border: 0.0625rem solid var(--border-subtle);
    border-bottom-left-radius: 0.375rem;
}
.ix-bubble-ai:nth-of-type(2) { animation-delay: 0.9s; }
.ix-bubble-ai:nth-of-type(3) { animation-delay: 1.55s; }
.ix-bubble-cite { color: var(--accent-primary-text); font-weight: 600; }
@keyframes ixBubbleIn { from { opacity: 0; transform: translateY(0.625rem); } to { opacity: 1; transform: translateY(0); } }

/* ----------------------------------------------------------------------------
   STAT STRIP
   ---------------------------------------------------------------------------- */
.ix-stats {
    border-top: 0.0625rem solid var(--border-color);
    border-bottom: 0.0625rem solid var(--border-color);
    background: var(--bg-sunken);
}
.ix-stat-value {
    font-family: var(--font-display);
    font-size: clamp(2.25rem, 4vw, 3rem);
    font-weight: 800;
    line-height: 1;
    color: var(--text-primary);
}
.ix-stat-value .ix-stat-accent { color: var(--accent-primary-text); }
.ix-stat-label { font-size: 0.9rem; color: var(--text-muted); font-weight: 500; }

/* ----------------------------------------------------------------------------
   FEATURE / VALUE-PROP CARDS  (top accent rule reveals on hover)
   ---------------------------------------------------------------------------- */
.ix-feature {
    position: relative;
    overflow: hidden;
    height: 100%;
}
.ix-feature::before {
    content: '';
    position: absolute;
    inset: 0 0 auto 0;
    height: 0.1875rem;
    background: var(--gradient-primary);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform var(--transition-base);
}
.ix-feature:hover::before { transform: scaleX(1); }
.ix-feature-icon {
    width: 3.25rem;
    height: 3.25rem;
    border-radius: var(--radius-lg);
    background: var(--accent-primary-soft);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-primary-text);
    font-size: 1.35rem;
    transition: background var(--transition-base), color var(--transition-base), transform var(--transition-base);
}
.ix-feature:hover .ix-feature-icon { background: var(--gradient-primary); color: var(--text-primary); transform: scale(1.06); }

/* ----------------------------------------------------------------------------
   HOW-IT-WORKS STEPS
   ---------------------------------------------------------------------------- */
.ix-step { position: relative; text-align: center; }
.ix-step-num {
    width: 4rem;
    height: 4rem;
    margin: 0 auto 1.25rem;
    border-radius: var(--radius-full);
    background: var(--bg-card);
    border: 0.125rem solid var(--border-color);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--accent-primary-text);
    transition: border-color var(--transition-base), box-shadow var(--transition-base), transform var(--transition-base);
}
.ix-step:hover .ix-step-num { border-color: var(--accent-primary); box-shadow: var(--shadow-glow); transform: translateY(-0.1875rem); }
/* Connector rule between steps (desktop only). */
.ix-step::after {
    content: '';
    position: absolute;
    top: 2rem;
    left: calc(50% + 2.5rem);
    width: calc(100% - 5rem);
    height: 0.125rem;
    background: var(--border-color);
}
.ix-step:last-child::after { display: none; }

/* ----------------------------------------------------------------------------
   SUBJECT SHOWCASE  (subject hue = fill/icon/left-bar ONLY; label stays ink §0.8e)
   ---------------------------------------------------------------------------- */
.ix-subject {
    position: relative;
    display: block;
    background: var(--bg-card);
    border: 0.0625rem solid var(--border-color);
    border-left: 0.1875rem solid var(--_hue, var(--accent-primary));
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    transition: transform var(--transition-base), box-shadow var(--transition-base), border-color var(--transition-base);
}
.ix-subject:hover { transform: translateY(-0.25rem); box-shadow: var(--shadow-lg); }
.ix-subject-icon {
    width: 3rem;
    height: 3rem;
    border-radius: var(--radius-md);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    background: var(--_tint, var(--accent-primary-soft));
    color: var(--_hue, var(--accent-primary-text));
}
.ix-subject-name { font-family: var(--font-display); font-weight: 700; font-size: 1.1rem; color: var(--text-primary); }
.ix-subject-meta { font-size: 0.82rem; color: var(--text-muted); }
.ix-subject-cta { font-size: 0.82rem; font-weight: 600; color: var(--accent-primary-text); }

/* ----------------------------------------------------------------------------
   PRICING TEASER  (popular plan gets amber border + ribbon)
   ---------------------------------------------------------------------------- */
.ix-plan { display: flex; flex-direction: column; height: 100%; }
.ix-plan-popular {
    border-color: var(--accent-primary);
    box-shadow: var(--shadow-lg);
}
.ix-ribbon {
    position: absolute;
    top: -0.875rem;
    left: 50%;
    transform: translateX(-50%);
    padding: 0.3125rem 0.875rem;
    background: var(--gradient-primary);
    color: var(--text-primary);
    border-radius: var(--radius-full);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    white-space: nowrap;
    box-shadow: var(--shadow-sm);
}
.ix-price { font-family: var(--font-display); font-size: 2.25rem; font-weight: 800; color: var(--text-primary); line-height: 1; }
.ix-price-suffix { font-size: 0.95rem; font-weight: 500; color: var(--text-muted); }
.ix-plan-feat { display: flex; align-items: flex-start; gap: 0.625rem; font-size: 0.92rem; color: var(--text-secondary); }
.ix-plan-feat i { margin-top: 0.2rem; color: var(--accent-secondary-text); }
.ix-plan-feat.is-off { color: var(--text-disabled); }
.ix-plan-feat.is-off i { color: var(--text-disabled); }

/* ----------------------------------------------------------------------------
   TESTIMONIALS
   ---------------------------------------------------------------------------- */
.ix-quote-stars { color: var(--accent-primary); }
.ix-quote-body { font-size: 1.02rem; line-height: 1.7; color: var(--text-secondary); }
.ix-quote-avatar {
    width: 2.75rem;
    height: 2.75rem;
    border-radius: var(--radius-md);
    background: var(--accent-secondary-soft);
    color: var(--accent-secondary-text);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-family: var(--font-display);
    flex-shrink: 0;
}
.ix-quote-name { font-weight: 600; color: var(--text-primary); }
.ix-quote-role { font-size: 0.85rem; color: var(--text-muted); }

/* ----------------------------------------------------------------------------
   FINAL CTA  (warm gradient panel — sparing gradient use)
   ---------------------------------------------------------------------------- */
.ix-cta-panel {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-2xl);
    border: 0.0625rem solid var(--border-color);
    background: var(--gradient-warm);
    padding: 4rem 2.5rem;
    text-align: center;
}
.dark .ix-cta-panel { background: linear-gradient(135deg, var(--bg-elevated) 0%, var(--bg-card) 100%); }
.ix-cta-title { font-family: var(--font-display); font-weight: 800; color: var(--text-primary); }
.ix-cta-lead { color: var(--text-secondary); }

/* ----------------------------------------------------------------------------
   INVESTOR CTA STRIP
   ---------------------------------------------------------------------------- */
.ix-investor {
    border-top: 0.0625rem solid var(--border-color);
    background: var(--bg-sunken);
}

/* ----------------------------------------------------------------------------
   FOOTER  (warm dark-ink panel in light; uses elevated surface in dark)
   ---------------------------------------------------------------------------- */
.ix-footer { background: #1f2430; color: #c9cdd6; padding-top: 4rem; padding-bottom: 2rem; }
.dark .ix-footer { background: var(--bg-secondary); border-top: 0.0625rem solid var(--border-color); }
.ix-footer-title { font-family: var(--font-display); font-weight: 700; font-size: 0.8rem; letter-spacing: 0.08em; text-transform: uppercase; color: #ffffff; }
.dark .ix-footer-title { color: var(--text-primary); }
.ix-footer-link { font-size: 0.92rem; color: #9aa0ab; transition: color var(--transition-fast); }
.ix-footer-link:hover { color: var(--accent-primary); }
.dark .ix-footer-link { color: var(--text-secondary); }
.dark .ix-footer-link:hover { color: var(--accent-primary-text); }
.ix-footer-rule { border-top: 0.0625rem solid rgba(255, 255, 255, 0.1); }
.dark .ix-footer-rule { border-top-color: var(--border-color); }
.ix-footer-social {
    width: 2.75rem;
    height: 2.75rem;
    min-width: 2.75rem;
    min-height: 2.75rem;
    border-radius: var(--radius-md);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #9aa0ab;
    transition: color var(--transition-fast), background var(--transition-fast);
}
.ix-footer-social:hover { color: var(--accent-primary); background: rgba(255, 255, 255, 0.06); }

/* ----------------------------------------------------------------------------
   REVEAL  (IntersectionObserver-driven; reduced-motion handled by base.css)
   ---------------------------------------------------------------------------- */
.ix-reveal { opacity: 0; transform: translateY(1.5rem); transition: opacity 0.6s ease, transform 0.6s ease; }
.ix-reveal.is-visible { opacity: 1; transform: translateY(0); }
/* Safety net: if the observer never fires (no-JS / blocked), reveal anyway. */
@media (prefers-reduced-motion: reduce) {
    .ix-reveal { opacity: 1; transform: none; }
}

/* ----------------------------------------------------------------------------
   NETWORK TRIGGER ACCENT (§2 contract: --otrotl-trigger-accent* live in <head>)
   ---------------------------------------------------------------------------- */

/* ----------------------------------------------------------------------------
   RESPONSIVE
   ---------------------------------------------------------------------------- */
@media (max-width: 64em) {
    .ix-hero-grid { grid-template-columns: 1fr; gap: 3rem; }
    .ix-hero { padding: 7.5rem 0 4rem; }
    .ix-step::after { display: none; }
}
@media (max-width: 48em) {
    .ix-hero-lead { max-width: none; }
    .ix-cta-panel { padding: 3rem 1.5rem; }
}
@media (max-width: 30em) {
    .ix-hero-title { font-size: clamp(2.1rem, 9vw, 2.75rem); }
}
