/* ============================================================
   COMPONENTS.CSS
   All component-level styles for Ace Your Certs.
   Imported after style.css.
   ============================================================ */

/* ============================================================
   SITE HEADER
   ============================================================ */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(14, 11, 26, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    transition: background 0.3s;
}
.site-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 0 48px;
    height: 64px;
}

/* Logo */
.site-logo { text-decoration: none; display: inline-flex; align-items: center; }
.site-logo__text {
    font-family: var(--font-display);
    font-size: 19px;
    font-weight: 800;
    letter-spacing: -0.3px;
    color: var(--text-primary);
}
.site-logo__text span { color: var(--cyan); }
.site-logo--footer .site-logo__text { color: rgba(240,238,255,0.35); }
.site-logo--footer .site-logo__text span { color: rgba(0,229,204,0.5); }

/* Primary nav */
.primary-nav__list {
    display: flex;
    align-items: center;
    gap: 28px;
    list-style: none;
    margin: 0;
    padding: 0;
}
.primary-nav__list a {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-muted);
    text-decoration: none;
    letter-spacing: 0.03em;
    transition: color 0.2s;
}
.primary-nav__list a:hover,
.primary-nav__list a.active { color: var(--cyan); }

/* Header actions */
.site-header__actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Hamburger (mobile) */
.nav-hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 36px;
    height: 36px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 4px;
}
.nav-hamburger span {
    display: block;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: transform 0.25s, opacity 0.25s;
}
.nav-hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-hamburger.open span:nth-child(2) { opacity: 0; }
.nav-hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ============================================================
   SITE FOOTER
   ============================================================ */
.site-footer {
    border-top: 1px solid var(--border);
    background: var(--bg-deep);
    padding: 40px 0 28px;
}
.site-footer__inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 48px;
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 48px;
    align-items: start;
}
.site-footer__tagline {
    font-size: 13px;
    color: var(--text-subtle);
    margin-top: 8px;
    max-width: 280px;
    line-height: 1.6;
}
.footer-nav__list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    list-style: none;
}
.footer-nav__list a {
    font-size: 13px;
    color: rgba(240,238,255,0.3);
    text-decoration: none;
    transition: color 0.2s;
}
.footer-nav__list a:hover { color: var(--cyan); }
.site-footer__copy {
    font-size: 12px;
    color: var(--text-subtle);
    margin-bottom: 6px;
}
.site-footer__disclaimer {
    font-size: 11px;
    color: rgba(240,238,255,0.18);
    line-height: 1.6;
    max-width: 320px;
}
.site-footer__disclaimer a { color: rgba(240,238,255,0.3); }

/* ============================================================
   STAR CANVAS
   ============================================================ */
.stars-canvas {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}
.star {
    position: absolute;
    border-radius: 50%;
    animation: twinkle var(--dur, 3s) ease-in-out infinite var(--delay, 0s) alternate;
}
@keyframes twinkle {
    from { opacity: var(--min-op, 0.1); transform: scale(1); }
    to   { opacity: 1; transform: scale(1.5); }
}

/* Ensure content sits above the star canvas */
.site-header, .site-main, .site-footer { position: relative; z-index: 1; }

/* ============================================================
   HERO
   ============================================================ */
.hero {
    position: relative;
    padding: 72px 48px 64px;
    overflow: hidden;
}
.hero__glow-main {
    width: 700px; height: 500px;
    top: -120px; left: 50%;
    transform: translateX(-50%);
}
.hero__glow-accent {
    width: 350px; height: 350px;
    bottom: -60px; right: -80px;
}
.hero__waveform {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 72px;
    display: flex;
    align-items: flex-end;
    gap: 3px;
    padding: 0 24px;
    pointer-events: none;
    opacity: 0.1;
}
.hero__waveform .wave-bar {
    flex: 1;
    background: var(--purple-mid);
    border-radius: 2px 2px 0 0;
    animation: wavePulse var(--d, 1.5s) ease-in-out infinite var(--dl, 0s) alternate;
}
@keyframes wavePulse {
    from { transform: scaleY(0.25); }
    to   { transform: scaleY(1); }
}

.hero__inner {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: 1fr 420px;
    gap: 60px;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}
.hero__eyebrow {
    display: inline-flex;
    align-items: center;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--cyan);
    padding: 5px 14px;
    border: 1px solid rgba(0,229,204,0.25);
    border-radius: 20px;
    background: rgba(0,229,204,0.06);
    margin-bottom: 20px;
    width: fit-content;
}
.hero__headline {
    margin-bottom: 20px;
}
.hero__sub {
    font-size: 16px;
    font-weight: 300;
    color: var(--text-muted);
    line-height: 1.75;
    max-width: 460px;
    margin-bottom: 32px;
}
.hero__actions {
    display: flex;
    gap: 14px;
    align-items: center;
    flex-wrap: wrap;
}
.hero__stats {
    display: flex;
    gap: 32px;
    margin-top: 44px;
    padding-top: 28px;
    border-top: 1px solid var(--border);
}
.hero__stat-num {
    display: block;
    font-family: var(--font-display);
    font-size: 28px;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -0.5px;
    line-height: 1;
    margin-bottom: 4px;
}
.hero__stat-label {
    display: block;
    font-size: 12px;
    color: var(--text-muted);
}

/* Fade-up animation for hero content */
.hero__content > * {
    animation: fadeUp 0.45s ease both;
}
.hero__content > *:nth-child(1) { animation-delay: 0.05s; }
.hero__content > *:nth-child(2) { animation-delay: 0.12s; }
.hero__content > *:nth-child(3) { animation-delay: 0.20s; }
.hero__content > *:nth-child(4) { animation-delay: 0.28s; }
.hero__content > *:nth-child(5) { animation-delay: 0.36s; }
.hero__card-wrap { animation: fadeUp 0.45s ease 0.18s both; }

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

/* ============================================================
   QOTD CARD
   ============================================================ */
.qotd-card {
    position: relative;
    z-index: 2;
}
.qotd-card__label {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--cyan);
    margin-bottom: 16px;
}
.qotd-dot {
    display: block;
    width: 7px; height: 7px;
    border-radius: 50%;
    background: var(--cyan);
    box-shadow: 0 0 7px var(--cyan);
    animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
    0%,100% { box-shadow: 0 0 7px var(--cyan); }
    50%      { box-shadow: 0 0 14px var(--cyan); }
}
.qotd-card__question {
    font-size: 14px;
    color: var(--text-primary);
    line-height: 1.65;
    margin-bottom: 18px;
}
.qotd-card__options {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 16px;
}
.qotd-opt {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 14px;
    border-radius: var(--radius-md);
    border: 1px solid rgba(123,63,228,0.3);
    background: rgba(123,63,228,0.06);
    font-family: var(--font-body);
    font-size: 13px;
    color: var(--text-muted);
    cursor: pointer;
    text-align: left;
    width: 100%;
    transition: all 0.2s;
}
.qotd-opt:hover:not(:disabled) {
    border-color: var(--cyan);
    color: var(--text-primary);
    background: var(--cyan-muted);
}
.qotd-opt:disabled { cursor: default; }
.qotd-opt.is-correct {
    border-color: var(--cyan);
    background: rgba(0,229,204,0.1);
    color: var(--cyan);
}
.qotd-opt.is-wrong {
    border-color: rgba(224,64,251,0.25);
    background: rgba(224,64,251,0.04);
    color: rgba(240,238,255,0.3);
}
.qotd-opt__letter {
    font-weight: 700;
    font-size: 11px;
    min-width: 18px;
    color: var(--purple-mid);
    margin-top: 1px;
    flex-shrink: 0;
}
.qotd-opt.is-correct .qotd-opt__letter { color: var(--cyan); }
.qotd-card__rationale {
    margin-top: 12px;
    padding: 12px 14px;
    background: rgba(0,229,204,0.06);
    border-left: 2px solid var(--cyan);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    font-size: 13px;
    color: rgba(240,238,255,0.75);
    line-height: 1.65;
}
.qotd-card__footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 14px;
    border-top: 1px solid var(--border);
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 14px;
}
.qotd-card__cert { font-size: 12px; color: var(--text-muted); }

/* ============================================================
   FEATURES BAR
   ============================================================ */
.features-bar {
    background: var(--bg-mid);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    position: relative;
    z-index: 1;
}
.features-bar__inner {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    max-width: 1200px;
    margin: 0 auto;
}
.feature-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 28px 20px;
    border-right: 1px solid var(--border);
    transition: background 0.2s;
    cursor: default;
}
.feature-item:last-child { border-right: none; }
.feature-item:hover { background: rgba(123,63,228,0.07); }
.feature-item__icon {
    width: 42px; height: 42px;
    border-radius: 10px;
    background: rgba(123,63,228,0.14);
    border: 1px solid rgba(123,63,228,0.28);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
    color: var(--purple-mid);
}
.feature-item__name {
    font-size: 13px;
    font-weight: 500;
    color: var(--cyan);
    margin-bottom: 4px;
}
.feature-item__desc {
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.5;
}

/* ============================================================
   NEWS TICKER
   ============================================================ */
.news-ticker {
    background: var(--bg-mid);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    overflow: hidden;
    height: 38px;
    position: relative;
    z-index: 1;
}
.news-ticker__label {
    background: var(--cyan);
    color: var(--bg-deep);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 0 16px;
    height: 100%;
    display: flex;
    align-items: center;
    flex-shrink: 0;
}
.news-ticker__track-wrap {
    overflow: hidden;
    flex: 1;
}
.news-ticker__track {
    display: flex;
    align-items: center;
    gap: 40px;
    white-space: nowrap;
    animation: tickerScroll 32s linear infinite;
}
.news-ticker__track:hover { animation-play-state: paused; }
@keyframes tickerScroll {
    from { transform: translateX(0); }
    to   { transform: translateX(-50%); }
}
.news-ticker__item {
    font-size: 12px;
    color: var(--text-muted);
    flex-shrink: 0;
}
.news-ticker__item a { color: var(--text-muted); text-decoration: none; transition: color 0.2s; }
.news-ticker__item a:hover { color: var(--cyan); }
.news-ticker__sep { color: var(--purple-mid); opacity: 0.5; font-size: 12px; flex-shrink: 0; }

/* ============================================================
   CERTIFICATIONS SECTION
   ============================================================ */
.cert-section {
    border-top: 1px solid var(--border);
    max-width: 100%;
}
.cert-section .section-title,
.cert-section .section-label,
.cert-section .section-sub {
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 48px;
    padding-right: 48px;
}
.cert-section .section-label { padding-bottom: 0; }
.cert-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 22px;
    max-width: 1200px;
    margin: 44px auto 0;
    padding: 0 48px;
}
.cert-card { position: relative; overflow: hidden; }
.cert-card::before {
    content: '';
    position: absolute;
    top: -60px; right: -60px;
    width: 160px; height: 160px;
    border-radius: 50%;
    opacity: 0.06;
    pointer-events: none;
}
.cert-card--chc::before  { background: var(--purple); }
.cert-card--chpc::before { background: var(--cyan); }
.cert-card__badge   { margin-bottom: 18px; font-family: var(--font-display); }
.cert-card__title   { font-size: 20px; margin-bottom: 10px; }
.cert-card__desc    { font-size: 13px; color: var(--text-muted); line-height: 1.7; margin-bottom: 20px; }
.cert-card__meta    { display: flex; gap: 24px; margin-bottom: 22px; }
.cert-card__meta-item strong {
    display: block;
    font-family: var(--font-display);
    font-size: 20px;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1.1;
    margin-bottom: 2px;
}
.cert-card__meta-item span { font-size: 12px; color: var(--text-muted); }
.cert-card__link {
    font-size: 13px;
    font-weight: 500;
    color: var(--cyan);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: none;
    background: transparent;
    cursor: pointer;
    padding: 0;
    font-family: var(--font-body);
    text-decoration: none;
    transition: gap 0.2s;
}
.cert-card__link:hover { gap: 10px; color: var(--cyan); }

/* ============================================================
   HOW IT WORKS
   ============================================================ */
.how-section {
    background: rgba(255,255,255,0.02);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}
.how-section .section-title,
.how-section .section-label {
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 48px;
    padding-right: 48px;
}
.steps-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0;
    max-width: 1200px;
    margin: 52px auto 0;
    padding: 0 48px;
    position: relative;
}
.steps-grid::before {
    content: '';
    position: absolute;
    top: 27px;
    left: calc(48px + 12.5%);
    width: calc(75% - 0px);
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(0,229,204,0.35), rgba(0,229,204,0.35), transparent);
}
.step { padding: 0 20px; text-align: center; }
.step__num {
    width: 54px; height: 54px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-display);
    font-size: 18px;
    font-weight: 800;
    margin: 0 auto 20px;
    position: relative;
    z-index: 1;
    border: 1px solid;
    transition: transform 0.2s;
}
.step:hover .step__num { transform: scale(1.1); }
.step--1 .step__num { background: rgba(123,63,228,0.2); color: var(--purple-mid); border-color: rgba(123,63,228,0.4); box-shadow: 0 0 16px rgba(123,63,228,0.2); }
.step--2 .step__num { background: rgba(123,63,228,0.12); color: var(--purple-mid); border-color: rgba(123,63,228,0.28); }
.step--3 .step__num { background: rgba(0,229,204,0.1); color: var(--cyan); border-color: rgba(0,229,204,0.3); }
.step--4 .step__num { background: rgba(0,229,204,0.18); color: var(--cyan); border-color: rgba(0,229,204,0.4); box-shadow: 0 0 16px rgba(0,229,204,0.14); }
.step__title { font-size: 15px; margin-bottom: 8px; }
.step__desc  { font-size: 13px; color: var(--text-muted); line-height: 1.65; }

/* ============================================================
   PRICING
   ============================================================ */
.pricing-section {
    border-top: 1px solid var(--border);
}
.pricing-section .section-title,
.pricing-section .section-label,
.pricing-section .section-sub {
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 48px;
    padding-right: 48px;
}
.pricing-grid {
    display: grid;
    grid-template-columns: 1fr 1.08fr 1fr;
    gap: 18px;
    max-width: 1200px;
    margin: 44px auto 0;
    padding: 0 48px;
    align-items: start;
}
.plan-card { transition: transform 0.2s; cursor: default; }
.plan-card:hover { transform: translateY(-4px); }
.plan-card--featured {
    border-color: var(--cyan) !important;
    background: var(--bg-card2) !important;
    box-shadow: var(--shadow-cyan) !important;
    position: relative;
    padding-top: 38px;
}
.plan-card__tag {
    position: absolute;
    top: -12px; left: 50%;
    transform: translateX(-50%);
    background: var(--cyan);
    color: var(--bg-deep);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 4px 14px;
    border-radius: 20px;
    white-space: nowrap;
}
.plan-card__name   { font-family: var(--font-display); font-size: 18px; font-weight: 800; margin-bottom: 8px; }
.plan-card__price  { display: flex; align-items: baseline; gap: 4px; margin-bottom: 8px; }
.plan-card__amount { font-family: var(--font-display); font-size: 38px; font-weight: 800; letter-spacing: -1px; }
.plan-card__period { font-size: 13px; color: var(--text-muted); }
.plan-card__desc   { font-size: 13px; color: var(--text-muted); line-height: 1.6; margin-bottom: 22px; }
.plan-card__features {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 26px;
}
.plan-card__features li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 13px;
    color: rgba(240,238,255,0.7);
    line-height: 1.5;
}
.plan-card__features li::before {
    content: '';
    display: block;
    width: 16px; height: 16px;
    min-width: 16px;
    border-radius: 50%;
    margin-top: 1px;
    border: 1.5px solid var(--purple-mid);
    background: rgba(155,95,244,0.1);
    flex-shrink: 0;
}
.plan-card__features--cyan li::before {
    border-color: var(--cyan);
    background: rgba(0,229,204,0.1);
}

/* ============================================================
   FAQ
   ============================================================ */
.faq-section {
    background: var(--bg-mid);
    border-top: 1px solid var(--border);
}
.faq-section .section-title,
.faq-section .section-label {
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 48px;
    padding-right: 48px;
}
.faq-layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 56px;
    max-width: 1200px;
    margin: 44px auto 0;
    padding: 0 48px;
    align-items: start;
}
.faq-item { border-bottom: 1px solid var(--border); }
.faq-item__btn {
    width: 100%;
    text-align: left;
    background: transparent;
    border: none;
    padding: 18px 0;
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 400;
    color: rgba(240,238,255,0.75);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    transition: color 0.2s;
}
.faq-item__btn:hover { color: var(--text-primary); }
.faq-item__btn[aria-expanded="true"] { color: var(--cyan); }
.faq-item__chevron {
    width: 14px; height: 14px;
    min-width: 14px;
    border-right: 1.5px solid currentColor;
    border-bottom: 1.5px solid currentColor;
    transform: rotate(45deg);
    transition: transform 0.25s;
    flex-shrink: 0;
    margin-top: -4px;
}
.faq-item__btn[aria-expanded="true"] .faq-item__chevron {
    transform: rotate(-135deg);
    margin-top: 4px;
}
.faq-item__panel {
    padding: 0 0 18px;
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.75;
}
.faq-item__panel[hidden] { display: none; }
.faq-side { position: sticky; top: 84px; }
.faq-side__title { font-size: 20px; margin-bottom: 10px; }
.faq-side__desc  { font-size: 13px; color: var(--text-muted); line-height: 1.7; margin-bottom: 20px; }
.faq-side__footer {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid var(--border);
    font-size: 12px;
    color: var(--text-subtle);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
    .hero__inner        { grid-template-columns: 1fr; max-width: 640px; }
    .hero__card-wrap    { display: none; }
    .cert-grid          { grid-template-columns: 1fr; }
    .steps-grid         { grid-template-columns: repeat(2, 1fr); gap: 36px; }
    .steps-grid::before { display: none; }
    .pricing-grid       { grid-template-columns: 1fr; max-width: 420px; }
    .faq-layout         { grid-template-columns: 1fr; }
    .faq-side           { position: static; }
    .features-bar__inner { grid-template-columns: repeat(2, 1fr); }
    .site-footer__inner  { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
    .site-header__inner { padding: 0 20px; }
    .primary-nav, .site-header__actions .nav-login { display: none; }
    .nav-hamburger { display: flex; }

    .primary-nav.is-open {
        display: block;
        position: fixed;
        top: 64px; left: 0; right: 0;
        background: var(--bg-mid);
        border-bottom: 1px solid var(--border);
        padding: 20px;
        z-index: 99;
    }
    .primary-nav.is-open .primary-nav__list {
        flex-direction: column;
        gap: 0;
    }
    .primary-nav.is-open .primary-nav__list a {
        display: block;
        padding: 12px 0;
        border-bottom: 1px solid var(--border);
        font-size: 15px;
    }

    .hero        { padding: 48px 20px 44px; }
    .cert-section .cert-grid,
    .cert-section .section-title,
    .cert-section .section-label,
    .cert-section .section-sub { padding-left: 20px; padding-right: 20px; }
    .steps-grid,
    .how-section .section-title,
    .how-section .section-label { padding-left: 20px; padding-right: 20px; }
    .pricing-grid,
    .pricing-section .section-title,
    .pricing-section .section-label,
    .pricing-section .section-sub { padding-left: 20px; padding-right: 20px; }
    .faq-layout,
    .faq-section .section-title,
    .faq-section .section-label  { padding-left: 20px; padding-right: 20px; }

    .features-bar__inner { grid-template-columns: repeat(2, 1fr); }
    .steps-grid { grid-template-columns: 1fr; }
    .site-footer__inner { grid-template-columns: 1fr; gap: 28px; padding: 0 20px; }
}
