/* ==========================================================================
   SUBPAGES.CSS — shared styles for Appli AI content/landing pages.
   Built entirely on the design tokens defined in styles.css (colors, DM Sans,
   .container, .btn, .navbar, .footer). Load AFTER styles.css.
   ========================================================================== */

/* ------- Page shell: give fixed navbar breathing room, kill the loader ---- */
.subpage { background: var(--cream); }

/* Sub-pages have no hero video, so the JS loading overlay would flash cream
   over cream — hide it immediately. */
.subpage .loading { display: none; }

/* ========================================================================== */
/* BREADCRUMB                                                                 */
/* ========================================================================== */
.breadcrumb {
    max-width: 1200px;
    margin: 0 auto;
    padding: 7.5rem 2rem 0;
    font-size: 0.85rem;
    color: var(--soft-gray);
}
.breadcrumb ol { list-style: none; display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; }
.breadcrumb a { color: var(--soft-gray); text-decoration: none; transition: color 0.2s ease; }
.breadcrumb a:hover { color: var(--charcoal); }
.breadcrumb li:not(:last-child)::after { content: '/'; margin-left: 0.5rem; color: var(--light-gray); }
.breadcrumb li[aria-current] { color: var(--mid-gray); }

/* ========================================================================== */
/* SUB-PAGE HERO                                                              */
/* ========================================================================== */
.subhero {
    padding: 3rem 2rem 4rem;
    background: var(--cream);
    overflow: hidden;
}
.subhero.subhero--tight { padding-top: 2rem; }
.subhero-inner { max-width: 820px; margin: 0 auto; text-align: center; }
.subhero.subhero--left .subhero-inner { text-align: left; margin: 0 auto; max-width: 1200px; }

.eyebrow {
    display: inline-block;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--accent-orange);
    margin-bottom: 1.25rem;
}
.subhero h1 {
    font-size: clamp(2.25rem, 5vw, 3.6rem);
    font-weight: 700;
    line-height: 1.08;
    letter-spacing: -0.03em;
    color: var(--charcoal);
    margin-bottom: 1.35rem;
}
.subhero h1 .accent { color: var(--soft-gray); }
.subhero h1 .em {
    background: linear-gradient(135deg, var(--charcoal), var(--mid-gray));
    -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; color: transparent;
}
.subhero-lead {
    font-size: clamp(1.05rem, 1.7vw, 1.25rem);
    color: var(--mid-gray);
    line-height: 1.7;
    max-width: 620px;
    margin: 0 auto 2rem;
}
.subhero.subhero--left .subhero-lead { margin-left: 0; }
.subhero-cta { display: flex; gap: 1rem; flex-wrap: wrap; justify-content: center; }
.subhero.subhero--left .subhero-cta { justify-content: flex-start; }

/* Metric strip under a hero */
.metric-strip {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 2.5rem 3.5rem;
    max-width: 900px;
    margin: 3rem auto 0;
    padding-top: 2.5rem;
    border-top: 1px solid rgba(0,0,0,0.08);
}
.metric { text-align: center; }
.metric-value {
    font-size: clamp(1.9rem, 4vw, 2.75rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    color: var(--charcoal);
    line-height: 1;
}
.metric-value.red { color: var(--accent-red); }
.metric-value.orange { color: var(--accent-orange); }
.metric-label { font-size: 0.85rem; color: var(--soft-gray); margin-top: 0.5rem; font-weight: 500; }

/* ========================================================================== */
/* GENERIC SECTIONS                                                           */
/* ========================================================================== */
.section { padding: 6rem 2rem; overflow: hidden; }
.section--tight { padding: 4rem 2rem; }
.section--white { background: var(--white); }
.section--cream { background: var(--cream); }
.section--warm { background: var(--warm-white); }
.section--dark { background: var(--charcoal); color: var(--white); }
.section-inner { max-width: 1200px; margin: 0 auto; }

.section-head { max-width: 720px; margin: 0 auto 3.5rem; text-align: center; }
.section-head.section-head--left { margin-left: 0; text-align: left; }
.section-head h2 {
    font-size: clamp(1.9rem, 3.5vw, 2.6rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.15;
    color: var(--charcoal);
    margin-bottom: 1rem;
}
.section--dark .section-head h2 { color: var(--white); }
.section-head p { font-size: 1.1rem; color: var(--mid-gray); line-height: 1.7; }
.section--dark .section-head p { color: var(--light-gray); }

/* ========================================================================== */
/* INFO / FEATURE CARDS (neutral — charcoal icons, not the red risk cards)   */
/* ========================================================================== */
.info-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.info-grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
.info-grid.cols-4 { grid-template-columns: repeat(4, 1fr); }
.info-card {
    background: var(--white);
    border: 1px solid rgba(0,0,0,0.06);
    border-radius: 16px;
    padding: 2rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.info-card:hover { transform: translateY(-5px); box-shadow: 0 20px 50px rgba(0,0,0,0.07); }
.section--cream .info-card, .section--warm .info-card { background: var(--white); }
.info-icon {
    width: 52px; height: 52px;
    background: var(--charcoal);
    border-radius: 13px;
    display: flex; align-items: center; justify-content: center;
    margin-bottom: 1.25rem;
}
.info-icon svg { width: 24px; height: 24px; stroke: var(--white); fill: none; }
.info-card h3 { font-size: 1.15rem; font-weight: 600; color: var(--charcoal); margin-bottom: 0.6rem; }
.info-card p { font-size: 0.95rem; color: var(--mid-gray); line-height: 1.6; }

/* Dark variant */
.section--dark .info-card { background: var(--dark-gray); border-color: rgba(255,255,255,0.08); }
.section--dark .info-card h3 { color: var(--white); }
.section--dark .info-card p { color: var(--light-gray); }
.section--dark .info-icon { background: var(--white); }
.section--dark .info-icon svg { stroke: var(--charcoal); }

/* ========================================================================== */
/* SPLIT (text + visual, mirrors homepage feature layout)                    */
/* ========================================================================== */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 4.5rem; align-items: center; max-width: 1200px; margin: 0 auto; }
.split.split--media-right { grid-template-columns: 1fr 1fr; }
.split-body h2 {
    font-size: clamp(1.75rem, 3vw, 2.3rem);
    font-weight: 700; letter-spacing: -0.02em; line-height: 1.2;
    color: var(--charcoal); margin-bottom: 1.25rem;
}
.split-body > p { font-size: 1.05rem; color: var(--mid-gray); line-height: 1.75; margin-bottom: 1.25rem; }
.split-list { list-style: none; margin-top: 1.5rem; }
.split-list li {
    display: flex; gap: 0.85rem; align-items: flex-start;
    padding: 0.7rem 0; font-size: 1rem; color: var(--charcoal); line-height: 1.55;
}
.split-list li svg { width: 20px; height: 20px; stroke: #22c55e; fill: none; stroke-width: 3; flex-shrink: 0; margin-top: 2px; }
.split-media {
    background: var(--white);
    border: 1px solid rgba(0,0,0,0.05);
    border-radius: 20px;
    padding: 1.25rem;
    box-shadow: 0 30px 90px rgba(0,0,0,0.07);
    overflow: hidden;
}
.split-media video, .split-media img { width: 100%; border-radius: 12px; display: block; }
.split-media--plain { background: none; border: none; box-shadow: none; padding: 0; }

/* ========================================================================== */
/* NUMBERED STEPS                                                             */
/* ========================================================================== */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; counter-reset: step; }
.steps.cols-2 { grid-template-columns: repeat(2, 1fr); }
.step-block {
    background: var(--white);
    border: 1px solid rgba(0,0,0,0.06);
    border-radius: 16px;
    padding: 2rem;
}
.step-block .num {
    font-size: 0.8rem; font-weight: 700; letter-spacing: 0.15em; color: var(--soft-gray);
    margin-bottom: 1rem; display: block;
}
.step-block h3 { font-size: 1.2rem; color: var(--charcoal); margin-bottom: 0.6rem; }
.step-block p { font-size: 0.95rem; color: var(--mid-gray); line-height: 1.6; }

/* ========================================================================== */
/* CITED STATISTIC CALLOUT                                                    */
/* ========================================================================== */
.stat-callout {
    max-width: 820px; margin: 0 auto;
    text-align: center;
    padding: 3rem 2rem;
    border: 1px solid rgba(0,0,0,0.08);
    border-radius: 20px;
    background: var(--white);
}
.stat-callout .big {
    font-size: clamp(2.5rem, 7vw, 4.5rem);
    font-weight: 800; letter-spacing: -0.04em; line-height: 1;
    color: var(--accent-red); margin-bottom: 1rem;
}
.stat-callout p { font-size: 1.15rem; color: var(--charcoal); line-height: 1.6; max-width: 560px; margin: 0 auto; }
.stat-callout cite { display: block; font-size: 0.8rem; color: var(--soft-gray); font-style: normal; margin-top: 1.25rem; }
.stat-callout cite a { color: var(--soft-gray); text-decoration: underline; text-underline-offset: 2px; }
.stat-callout cite a:hover { color: var(--mid-gray); }

/* Inline source superscript used in prose */
.src { font-size: 0.7em; vertical-align: super; }
.src a { color: var(--soft-gray); text-decoration: none; }
.src a:hover { text-decoration: underline; }

/* ========================================================================== */
/* FAQ (native <details>, no JS)                                              */
/* ========================================================================== */
.faq { max-width: 800px; margin: 0 auto; }
.faq-item {
    border-bottom: 1px solid rgba(0,0,0,0.1);
    padding: 0;
}
.faq-item summary {
    list-style: none;
    cursor: pointer;
    padding: 1.5rem 3rem 1.5rem 0;
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--charcoal);
    position: relative;
    transition: color 0.2s ease;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary:hover { color: var(--black); }
.faq-item summary::after {
    content: '';
    position: absolute;
    right: 0.5rem; top: 1.85rem;
    width: 12px; height: 12px;
    border-right: 2px solid var(--mid-gray);
    border-bottom: 2px solid var(--mid-gray);
    transform: rotate(45deg);
    transition: transform 0.25s ease;
}
.faq-item[open] summary::after { transform: rotate(-135deg); }
.faq-item .faq-answer {
    padding: 0 3rem 1.75rem 0;
    font-size: 1rem;
    color: var(--mid-gray);
    line-height: 1.75;
}
.faq-item .faq-answer p { margin-bottom: 1rem; }
.faq-item .faq-answer p:last-child { margin-bottom: 0; }
.section--dark .faq-item { border-color: rgba(255,255,255,0.12); }
.section--dark .faq-item summary { color: var(--white); }
.section--dark .faq-item .faq-answer { color: var(--light-gray); }
.section--dark .faq-item summary::after { border-color: var(--soft-gray); }

/* ========================================================================== */
/* COMPARISON TABLE                                                           */
/* ========================================================================== */
.compare-wrap { max-width: 900px; margin: 0 auto; overflow-x: auto; }
.compare {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    min-width: 560px;
    background: var(--white);
    border: 1px solid rgba(0,0,0,0.08);
    border-radius: 16px;
    overflow: hidden;
}
.compare th, .compare td { padding: 1.1rem 1.25rem; text-align: left; font-size: 0.95rem; border-bottom: 1px solid rgba(0,0,0,0.06); }
.compare thead th { background: var(--charcoal); color: var(--white); font-weight: 600; }
.compare thead th.col-appli { background: var(--black); }
.compare tbody td:first-child { font-weight: 600; color: var(--charcoal); }
.compare td { color: var(--mid-gray); }
.compare .col-appli { background: rgba(229,57,53,0.03); color: var(--charcoal); font-weight: 500; }
.compare tr:last-child th, .compare tr:last-child td { border-bottom: none; }
.compare .yes { color: #22c55e; font-weight: 700; }
.compare .no { color: var(--light-gray); font-weight: 700; }

/* ========================================================================== */
/* PROSE (blog articles)                                                      */
/* ========================================================================== */
.prose { max-width: 720px; margin: 0 auto; }
.prose > * { margin-bottom: 1.5rem; }
.prose p { font-size: 1.12rem; line-height: 1.85; color: var(--dark-gray); }
.prose h2 { font-size: clamp(1.5rem, 2.6vw, 2rem); color: var(--charcoal); margin-top: 3rem; letter-spacing: -0.02em; }
.prose h3 { font-size: 1.3rem; color: var(--charcoal); margin-top: 2rem; }
.prose ul, .prose ol { padding-left: 1.4rem; }
.prose li { font-size: 1.1rem; line-height: 1.8; color: var(--dark-gray); margin-bottom: 0.6rem; }
.prose a { color: var(--charcoal); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--light-gray); }
.prose a:hover { text-decoration-color: var(--charcoal); }
.prose blockquote {
    border-left: 3px solid var(--accent-orange);
    padding: 0.5rem 0 0.5rem 1.5rem;
    font-size: 1.25rem;
    font-weight: 500;
    color: var(--charcoal);
    line-height: 1.5;
}
.prose strong { color: var(--charcoal); }
.prose figure { margin: 2rem 0; }
.prose .callout {
    background: var(--cream);
    border: 1px solid rgba(0,0,0,0.06);
    border-radius: 14px;
    padding: 1.5rem 1.75rem;
    font-size: 1.02rem;
    line-height: 1.7;
    color: var(--charcoal);
}
.article-meta { max-width: 720px; margin: 0 auto 2.5rem; text-align: center; }
.article-meta .kicker { font-size: 0.8rem; font-weight: 600; letter-spacing: 0.15em; text-transform: uppercase; color: var(--accent-orange); }
.article-meta h1 { font-size: clamp(2rem, 4.5vw, 3.2rem); letter-spacing: -0.03em; line-height: 1.1; color: var(--charcoal); margin: 1rem 0; }
.article-meta .byline { font-size: 0.9rem; color: var(--soft-gray); }

/* ========================================================================== */
/* BLOG INDEX GRID                                                            */
/* ========================================================================== */
.blog-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.75rem; max-width: 1200px; margin: 0 auto; }
.blog-card {
    display: flex; flex-direction: column;
    background: var(--white);
    border: 1px solid rgba(0,0,0,0.06);
    border-radius: 18px;
    padding: 2rem;
    text-decoration: none;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.blog-card:hover { transform: translateY(-6px); box-shadow: 0 25px 60px rgba(0,0,0,0.08); }
.blog-card .tag { font-size: 0.75rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent-orange); margin-bottom: 1rem; }
.blog-card h3 { font-size: 1.3rem; color: var(--charcoal); line-height: 1.25; margin-bottom: 0.75rem; letter-spacing: -0.01em; }
.blog-card p { font-size: 0.95rem; color: var(--mid-gray); line-height: 1.6; flex: 1; }
.blog-card .read { font-size: 0.9rem; font-weight: 600; color: var(--charcoal); margin-top: 1.5rem; display: inline-flex; align-items: center; gap: 0.4rem; }
.blog-card:hover .read svg { transform: translateX(4px); }
.blog-card .read svg { width: 16px; height: 16px; transition: transform 0.3s ease; stroke: currentColor; fill: none; stroke-width: 2; }

/* ========================================================================== */
/* CLOSING CTA BAND                                                           */
/* ========================================================================== */
.subcta { background: var(--charcoal); color: var(--white); padding: 5.5rem 2rem; text-align: center; position: relative; overflow: hidden; }
.subcta-inner { max-width: 720px; margin: 0 auto; position: relative; z-index: 2; }
.subcta h2 { font-size: clamp(1.9rem, 3.5vw, 2.6rem); font-weight: 700; line-height: 1.15; letter-spacing: -0.02em; margin-bottom: 1rem; }
.subcta p { font-size: 1.1rem; color: var(--light-gray); margin-bottom: 2rem; }
.subcta .subhero-cta { justify-content: center; }
.subcta .btn-ghost { color: var(--white); }
.subcta .btn-ghost svg { stroke: var(--white); }

/* ========================================================================== */
/* RESPONSIVE                                                                 */
/* ========================================================================== */
@media (max-width: 1024px) {
    .info-grid, .info-grid.cols-4 { grid-template-columns: repeat(2, 1fr); }
    .steps { grid-template-columns: 1fr; }
    .split { grid-template-columns: 1fr; gap: 3rem; }
    .split-media { order: -1; }
    .blog-grid { grid-template-columns: repeat(2, 1fr); }
    .section { padding: 4.5rem 2rem; }
    .breadcrumb { padding-top: 6.5rem; }
}
@media (max-width: 640px) {
    .info-grid, .info-grid.cols-2, .info-grid.cols-4 { grid-template-columns: 1fr; }
    .blog-grid { grid-template-columns: 1fr; }
    .metric-strip { gap: 2rem; }
    .subhero-cta, .subcta .subhero-cta { flex-direction: column; align-items: stretch; }
    .subhero-cta .btn { text-align: center; justify-content: center; }
    .prose p, .prose li { font-size: 1.05rem; }
}
