/* =====================================================================
   YakCharts landing page — hero tour + how-to cards
   ---------------------------------------------------------------------
   Loaded after charts-yak-style.css. Layout follows the YakDrop landing:
   copy + CTAs left, the narrated tour right with chapter buttons that seek
   it (charts-home-tour.js), then a grid of how-to cards that link into the
   synced /docs tutorials. Font sizes are rem; headings use clamp() so they
   scale with the viewport (the html 100% / body rem baseline comes from
   yakware-style.css). The hero panel is dark in BOTH themes, so its ink is
   fixed light (like .yc-stats); everything else uses theme tokens.
   ===================================================================== */

.yc-home-hero { padding: 40px 0 0; }

.yc-home-hero__panel {
    position: relative;
    overflow: hidden;
    border-radius: 24px;
    border: 1px solid var(--hero-panel-border, rgba(255,255,255,.1));
    background: var(--hero-panel-bg, linear-gradient(165deg, #15356a 0%, #0c1c34 48%, #070d18 100%));
    padding: clamp(28px, 4.5vw, 64px) clamp(20px, 4vw, 56px) clamp(24px, 3vw, 40px);
    color: #dfe5f0;
}
.yc-home-hero__panel::before {          /* violet glow behind the player */
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        radial-gradient(48% 60% at 78% 30%, rgba(124,58,237,.30), transparent 70%),
        radial-gradient(40% 50% at 12% 0%, rgba(192,38,211,.16), transparent 70%);
}
.yc-home-hero__grid {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: minmax(0, .92fr) minmax(0, 1.08fr);
    gap: clamp(28px, 4vw, 60px);
    align-items: center;
}
.yc-home-hero__copy { min-width: 0; }

.yc-home-eyebrow {
    margin: 0 0 1rem;
    font-family: var(--font-body);
    font-size: .8125rem;
    font-weight: 700;
    letter-spacing: .18em;
    text-transform: uppercase;
    color: #c4b5fd;                     /* 9.9:1 on the panel */
}
.yc-home-hero h1 {
    margin: 0 0 1.1rem;
    color: #f5f3ee;
    font-weight: 500;
    font-size: clamp(2.2rem, 1.2rem + 2.9vw, 3.75rem);
    line-height: 1.04;
    letter-spacing: -.015em;
}
.yc-home-hero h1 .accent { color: #c4b5fd; font-style: italic; }
.yc-home-lead {
    margin: 0 0 1.4rem;
    max-width: 36rem;
    font-size: clamp(1.05rem, .98rem + .3vw, 1.25rem);
    line-height: 1.6;
    color: #c3cbdb;                     /* 10:1 on the panel */
}

.yc-home-outcomes {
    list-style: none;
    margin: 0 0 1.75rem;
    padding: 0;
    display: grid;
    gap: .85rem;
}
.yc-home-outcomes li {
    display: grid;
    grid-template-columns: 2.25rem minmax(0, 1fr);
    gap: .8rem;
    align-items: start;
    font-size: 1rem;
    line-height: 1.5;
    color: #aeb9cc;                     /* 7.9:1 */
}
.yc-home-outcomes b { display: block; color: #f5f3ee; font-weight: 600; }
.yc-home-outcomes__ic {
    width: 2.25rem; height: 2.25rem;
    display: grid; place-items: center;
    border-radius: 10px;
    background: rgba(167,139,250,.16);
    border: 1px solid rgba(196,181,253,.32);
    color: #ddd6fe;
    font-size: .95rem;
}

.yc-home-ctas { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
/* style.css gives this shared button a 30px/65px margin for the old centred heroes. */
/* The static page renders this as an <a>, whose text sits at the top of a min-height
   box; flex centres it the way a <button> centres its label. */
.yc-home-ctas .marketing-free-trial-btn { margin: 0 !important; min-height: 48px; font-size: 1.05rem; padding: 0 28px; display: inline-flex; align-items: center; justify-content: center; }
.yc-home-btn-ghost,
.yc-home-btn-ghost:focus {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    min-height: 48px;
    padding: 0 22px;
    border-radius: 9px;
    border: 1px solid rgba(255,255,255,.36);
    color: #f5f3ee !important;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 1.05rem;
    text-decoration: none;
}
.yc-home-btn-ghost:hover {
    color: #ddd6fe !important;
    border-color: #c4b5fd;
    background: rgba(255,255,255,.05);
}
.yc-home-ctas a:focus-visible,
.yc-tour__chapter:focus-visible,
.yc-tour__transcript summary:focus-visible,
.yc-home-fine a:focus-visible {
    outline: 3px solid #f0abfc;
    outline-offset: 2px;
}
.yc-home-fine {
    display: flex;
    flex-wrap: wrap;
    gap: .35rem 1.25rem;
    margin: 1.1rem 0 0;
    font-size: .9375rem;
    color: #aeb9cc;
}
.yc-home-fine span::before { content: "\2713\00a0"; color: #86efac; }
.yc-home-fine a { color: #ddd6fe; text-decoration: underline; text-underline-offset: 3px; }
.yc-home-fine a:hover { color: #fff; }

/* ── Tour player ── */
.yc-tour { min-width: 0; }
.yc-tour__player {
    position: relative;
    aspect-ratio: 16 / 9;
    border-radius: 16px;
    overflow: hidden;
    background: #0b1020;
    border: 1px solid rgba(255,255,255,.14);
    box-shadow: 0 30px 70px -30px rgba(0,0,0,.7), 0 0 0 6px rgba(255,255,255,.04);
}
.yc-tour__video { display: block; width: 100%; height: 100%; object-fit: contain; background: #0b1020; }
.yc-tour__badge {
    position: absolute;
    left: 12px; top: 12px;
    display: inline-flex; align-items: center; gap: .45rem;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(15,10,36,.82);
    color: #fff;
    font-size: .8125rem;
    font-weight: 600;
    pointer-events: none;
    transition: opacity .2s ease;
}
.yc-tour.is-playing .yc-tour__badge { opacity: 0; }

.yc-tour__chapters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
}
.yc-tour__chapter {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    flex: 1 1 auto;
    min-height: 52px;
    padding: 8px 10px;
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,.16);
    background: rgba(255,255,255,.05);
    color: #e6e9f2;
    font-family: var(--font-body);
    text-align: left;
    white-space: normal;
    cursor: pointer;
    transition: background .2s ease, border-color .2s ease;
}
.yc-tour__chapter span { font-size: .75rem; font-variant-numeric: tabular-nums; color: #b7c1d3; }
.yc-tour__chapter b { font-size: .875rem; font-weight: 600; line-height: 1.25; white-space: nowrap; }
.yc-tour__chapter:hover { background: rgba(255,255,255,.10); border-color: rgba(196,181,253,.6); }
.yc-tour__chapter.is-active {
    background: linear-gradient(135deg, #6d28d9, #a21caf);   /* white ink ≥ 6:1 */
    border-color: transparent;
    color: #fff;
}
.yc-tour__chapter.is-active span { color: #f3e8ff; }

.yc-tour__transcript { margin-top: 12px; font-size: .9375rem; color: #c3cbdb; }
.yc-tour__transcript summary { cursor: pointer; color: #ddd6fe; font-weight: 600; min-height: 44px; display: flex; align-items: center; }
.yc-tour__transcript ol { margin: .25rem 0 0; padding-left: 0; list-style: none; display: grid; gap: .45rem; line-height: 1.5; }
.yc-tour__transcript li span { display: inline-block; min-width: 2.6rem; color: #c4b5fd; font-variant-numeric: tabular-nums; }

.yc-tour__fallback { margin: 0; }
.yc-tour__fallback img { width: 100%; max-height: 420px; object-fit: contain; }

.yc-home-hero .yc-stats { position: relative; z-index: 1; margin-top: clamp(1.5rem, 3vw, 2.4rem); }

/* ── How-to cards (synced /docs tutorials) ── */
.yc-learn__head {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
    gap: 16px 48px;
    align-items: end;
    margin-bottom: 32px;
}
.yc-learn__head h2 { margin: 0; font-size: clamp(1.75rem, 1.2rem + 1.9vw, 2.75rem); line-height: 1.1; }
.yc-learn__head p { margin: 0; color: var(--text-muted); font-size: 1.0625rem; line-height: 1.6; }
.yc-howto {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px;
}
.yc-howto__card,
.yc-howto__card:hover,
.yc-howto__card:focus {
    display: flex;
    flex-direction: column;
    height: 100%;
    border-radius: 14px;
    overflow: hidden;
    background: var(--surface);
    border: 1px solid var(--surface-border);
    box-shadow: var(--card-shadow);
    color: var(--text);
    text-decoration: none;
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.yc-howto__card:hover { transform: translateY(-3px); border-color: var(--accent); box-shadow: var(--shadow-md); }
.yc-howto__card:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.yc-howto__thumb {
    position: relative;
    display: block;
    aspect-ratio: 16 / 9;
    background: var(--surface-2);
    border-bottom: 1px solid var(--surface-border-soft);
}
.yc-howto__thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: top center; }
.yc-howto__dur {
    position: absolute;
    right: 10px; bottom: 10px;
    display: inline-flex; align-items: center; gap: .35rem;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(15,10,36,.86);
    color: #fff;
    font-size: .8125rem;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}
.yc-howto__meta { display: flex; flex-direction: column; gap: 4px; padding: 16px 18px 18px; flex: 1; }
.yc-howto__meta small {
    font-size: .75rem;
    font-weight: 700;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--accent-ink);
}
.yc-howto__meta b { font-size: 1.0625rem; font-weight: 600; line-height: 1.35; color: var(--text); }
.yc-howto__go { margin-top: auto; padding-top: 8px; font-size: .9375rem; font-weight: 600; color: var(--accent-ink); }
.yc-howto__card:hover .yc-howto__go { text-decoration: underline; text-underline-offset: 3px; }
.yc-howto .sr-only {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
.yc-learn__all { margin: 28px 0 0; font-size: 1.0625rem; font-weight: 600; }
.yc-learn__all a { color: var(--accent-ink); text-decoration: underline; text-underline-offset: 3px; }

/* "Watch it in the tour" links on the feature cards */
.yc-watch,
.yc-watch:focus {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    min-height: 44px;
    margin-top: .25rem;
    font-size: .9375rem;
    font-weight: 600;
    color: var(--accent-ink);
    text-decoration: underline;
    text-underline-offset: 3px;
}
.yc-watch .fa { text-decoration: none; }

@media (max-width: 1100px) {
    .yc-howto { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 960px) {
    .yc-home-hero__grid { grid-template-columns: minmax(0, 1fr); }
    .yc-home-lead { max-width: none; }
    .yc-learn__head { grid-template-columns: minmax(0, 1fr); align-items: start; }
}
@media (max-width: 640px) {
    .yc-home-hero { padding-top: 20px; }
    .yc-home-hero__panel { border-radius: 18px; }
    /* One column of compact rows: thumbnail left, title right. */
    .yc-howto { grid-template-columns: minmax(0, 1fr); gap: 12px; }
    .yc-howto__card, .yc-howto__card:hover, .yc-howto__card:focus { flex-direction: row; align-items: stretch; }
    .yc-howto__thumb { flex: 0 0 42%; aspect-ratio: auto; min-height: 6.5rem; border-bottom: 0; border-right: 1px solid var(--surface-border-soft); }
    .yc-howto__dur { right: 6px; bottom: 6px; padding: 2px 8px; font-size: .75rem; }
    .yc-howto__meta { padding: 10px 12px; }
    .yc-howto__meta b { font-size: 1rem; }
    .yc-howto__go { font-size: .875rem; padding-top: 4px; }
    .yc-home-ctas > * { flex: 1 1 100%; }
    .yc-home-ctas .marketing-free-trial-btn,
    .yc-home-btn-ghost { width: 100%; justify-content: center; }
}
@media (prefers-reduced-motion: reduce) {
    .yc-howto__card, .yc-tour__chapter { transition: none; }
    .yc-howto__card:hover { transform: none; }
}

/* The shared gradient-text eyebrow is too faint on the dark page; use solid accent ink. */
html.yw-dark .yc-learn .yw-eyebrow {
    background: none;
    -webkit-text-fill-color: currentColor;
    color: var(--accent-ink);
}
