/* ──────────────────────────────────────────────────────────────
   PoetryMonsters — shared tutorial styles
   Matches the palette & typography used in landing.html.
   ────────────────────────────────────────────────────────────── */

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
/* Sticky nav is 64px tall; give hash targets room so they don't slide under it */
:target,
.step,
.step h2,
.section-sub,
section[id],
[id].anchor {
    scroll-margin-top: 88px;
}
body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background: #0a0a12;
    color: #e0e0e0;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* Skip link */
.skip-link {
    position: absolute;
    top: -100%;
    left: 16px;
    padding: 12px 24px;
    background: #e94560;
    color: #fff;
    font-weight: 600;
    border-radius: 0 0 8px 8px;
    z-index: 200;
    text-decoration: none;
    transition: top 0.2s;
}
.skip-link:focus { top: 0; }

a:focus-visible,
button:focus-visible {
    outline: 2px solid #ff6b6b;
    outline-offset: 2px;
}
/* Generic links/buttons pick up a soft radius when focused, but skip link keeps its tab shape */
a:not(.skip-link):focus-visible,
button:focus-visible {
    border-radius: 4px;
}

/* ── Navigation (shared with landing) ── */
.top-nav {
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 32px;
    background: rgba(10, 10, 18, 0.9);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.top-nav .logo {
    font-family: 'Cinzel', serif;
    font-size: 20px;
    font-weight: 900;
    background: linear-gradient(135deg, #e94560, #ff6b6b);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-decoration: none;
    letter-spacing: 1px;
}
.top-nav ul {
    display: flex;
    gap: 24px;
    list-style: none;
    align-items: center;
}
.top-nav a {
    color: #bbb;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: color 0.15s;
}
.top-nav a:hover { color: #fff; }
.top-nav a.cta {
    padding: 9px 20px;
    background: linear-gradient(135deg, #e94560, #c23152);
    color: #fff;
    border-radius: 8px;
    font-weight: 600;
}
.top-nav a.cta:hover {
    box-shadow: 0 4px 16px rgba(233, 69, 96, 0.35);
    color: #fff;
}

/* ── Tutorial layout ── */
.tutorial {
    max-width: 860px;
    margin: 0 auto;
    padding: 40px 24px 96px;
}
.breadcrumb {
    font-size: 14px;
    color: #a0a0a0;
    margin-bottom: 24px;
    letter-spacing: 0.4px;
    padding: 2px 0;
}
.breadcrumb a {
    color: #ff8fa0;
    text-decoration: none;
}
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb .sep {
    margin: 0 8px;
    color: #8a8a8a;
}

.tutorial-header {
    margin-bottom: 40px;
    padding-bottom: 32px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.tutorial-header .kicker {
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #ff7f8f;
    margin-bottom: 12px;
}
.tutorial-header h1 {
    font-family: 'Cinzel', serif;
    font-size: clamp(32px, 5vw, 46px);
    line-height: 1.15;
    color: #fff;
    margin-bottom: 16px;
    font-weight: 800;
    letter-spacing: 0.5px;
}
.tutorial-header .summary {
    font-size: 18px;
    color: #bbb;
    max-width: 640px;
}

/* In-page table of contents */
.tutorial-toc {
    margin-top: 20px;
    padding: 18px 22px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 12px;
}
.tutorial-toc .toc-label {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1.8px;
    text-transform: uppercase;
    color: #ff8fa0;
    margin-bottom: 10px;
}
.tutorial-toc ol {
    list-style: none;
    counter-reset: toc;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 6px 24px;
}
.tutorial-toc ol li {
    counter-increment: toc;
    font-size: 14px;
}
.tutorial-toc ol li a {
    display: flex;
    gap: 10px;
    padding: 4px 0;
    color: #cfd3db;
    text-decoration: none;
    align-items: baseline;
    transition: color 0.15s;
}
.tutorial-toc ol li a::before {
    content: counter(toc, decimal-leading-zero);
    color: #ff8fa0;
    font-family: 'Cinzel', serif;
    font-weight: 700;
    font-size: 12px;
    min-width: 28px;
}
.tutorial-toc ol li a:hover { color: #fff; }
.tutorial-toc ol li a:focus-visible {
    outline: 2px solid #ff6b6b;
    outline-offset: 4px;
    border-radius: 4px;
    color: #fff;
}

/* Prerequisites callout — uses a cool violet so it doesn't compete with the pink CTAs */
.prereq {
    display: flex;
    gap: 16px;
    padding: 20px 24px;
    background: rgba(124, 108, 214, 0.07);
    border: 1px solid rgba(124, 108, 214, 0.28);
    border-radius: 12px;
    margin-bottom: 48px;
}
.prereq .icon {
    flex: 0 0 auto;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #b3a9ef;
    margin-top: 2px;
}
.prereq .icon svg { display: block; }
.prereq .prereq-label {
    font-size: 13px;
    font-weight: 700;
    color: #c4bbf5;
    text-transform: uppercase;
    letter-spacing: 1.4px;
    margin-bottom: 6px;
    display: block;
}
.prereq p {
    font-size: 15px;
    color: #d8dae0;
    margin: 0;
}
.prereq ul {
    margin: 8px 0 0 20px;
    color: #d8dae0;
    font-size: 15px;
}
.prereq ul a {
    color: #c4bbf5;
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}
.prereq ul a:hover { color: #e0daff; }
.prereq ul li { margin-bottom: 4px; }

/* ── Step ── */
.step {
    display: grid;
    grid-template-columns: 56px 1fr;
    gap: 24px;
    margin-bottom: 64px;
}
.step-number {
    font-family: 'Cinzel', serif;
    font-size: 24px;
    font-weight: 900;
    color: #ff7f8f;
    width: 56px;
    height: 56px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(233, 69, 96, 0.15), rgba(99, 55, 210, 0.12));
    border: 1px solid rgba(233, 69, 96, 0.3);
    flex-shrink: 0;
}
.step-body h2 {
    font-family: 'Cinzel', serif;
    font-size: 26px;
    color: #fff;
    margin-bottom: 12px;
    font-weight: 700;
    line-height: 1.25;
}
.step-body p {
    font-size: 16px;
    color: #cbd0d8;
    margin-bottom: 16px;
}
.step-body p + p { margin-top: -4px; }

.step-body .tip {
    padding: 14px 18px;
    background: rgba(255, 181, 82, 0.06);
    border-left: 3px solid #ffb552;
    border-radius: 0 8px 8px 0;
    color: #d8dae0;
    font-size: 14.5px;
    line-height: 1.55;
    margin: 16px 0;
}
.step-body .tip strong { color: #ffc078; }
.step-body .tip em { color: #e5e7ec; font-style: italic; }

/* Figures & screenshots */
figure.shot {
    margin: 20px 0 8px;
}
figure.shot .frame {
    border-radius: 12px;
    overflow: hidden;
    background: #15151f;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.35);
    aspect-ratio: 16 / 10;
    display: block;
    position: relative;
}
figure.shot .frame img,
figure.shot .frame object,
figure.shot .frame .placeholder {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
figure.shot .placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 24px;
    font-family: 'Cinzel', serif;
    font-size: 15px;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.5);
    background:
        radial-gradient(ellipse at 30% 30%, rgba(233, 69, 96, 0.12), transparent 60%),
        radial-gradient(ellipse at 70% 70%, rgba(99, 55, 210, 0.12), transparent 60%),
        #15151f;
}
figure.shot .badge-placeholder {
    position: absolute;
    top: 10px;
    left: 10px;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(10, 10, 18, 0.85);
    border: 1px solid rgba(233, 69, 96, 0.5);
    color: #ffc3cc;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.4px;
    text-transform: uppercase;
    z-index: 2;
    pointer-events: none;
    backdrop-filter: blur(4px);
}
figure.shot figcaption {
    font-size: 14px;
    color: #a0a0a0;
    margin-top: 12px;
    padding-left: 4px;
    font-style: italic;
}

/* Troubleshooting & FAQ */
.section-sub {
    font-family: 'Cinzel', serif;
    font-size: 22px;
    color: #fff;
    margin: 48px 0 20px;
    padding-top: 32px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    font-weight: 700;
}
.faq {
    margin-bottom: 40px;
}
.faq details {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 10px;
    padding: 14px 20px;
    margin-bottom: 10px;
    transition: border-color 0.2s;
}
.faq details[open] {
    border-color: rgba(233, 69, 96, 0.25);
}
.faq summary {
    cursor: pointer;
    font-weight: 600;
    color: #e5e7ec;
    font-size: 15px;
    list-style: none;
    position: relative;
    padding-right: 28px;
    user-select: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
    content: '+';
    position: absolute;
    right: 4px;
    top: 50%;
    transform: translateY(-50%);
    color: #ff7f8f;
    font-size: 20px;
    transition: transform 0.2s;
    font-weight: 300;
}
.faq details[open] summary::after {
    content: '−';
}
.faq p, .faq ul {
    margin-top: 12px;
    color: #bbb;
    font-size: 14.5px;
}
.faq ul { padding-left: 22px; }

/* Next step / footer nav */
.next-step {
    margin-top: 48px;
    padding: 28px 32px;
    background: linear-gradient(145deg, rgba(233, 69, 96, 0.08), rgba(99, 55, 210, 0.06));
    border: 1px solid rgba(233, 69, 96, 0.2);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap;
}
.next-step .text .label {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #ff7f8f;
    margin-bottom: 4px;
}
.next-step .text h3 {
    font-family: 'Cinzel', serif;
    font-size: 22px;
    color: #fff;
    margin: 0 0 4px;
    font-weight: 700;
}
.next-step .text p {
    color: #bbb;
    font-size: 14px;
    margin: 0;
}
.next-step .btn {
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: linear-gradient(135deg, #e94560, #c23152);
    color: #fff;
    border-radius: 10px;
    font-weight: 700;
    text-decoration: none;
    font-size: 15px;
    transition: transform 0.15s, box-shadow 0.2s;
}
.next-step .btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(233, 69, 96, 0.4);
}

/* Footer */
.site-footer {
    padding: 32px 24px;
    text-align: center;
    font-size: 14px;
    color: #8a8a8a;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}
.site-footer .footer-links {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px 24px;
    padding: 0;
    margin: 0;
}
.site-footer a {
    color: #b0b0b0;
    text-decoration: none;
}
.site-footer a:hover { color: #e94560; }

/* ── Reduced motion (accessibility) ── */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .top-nav a, .next-step .btn, .faq details, .faq summary::after {
        transition: none !important;
    }
    .next-step .btn:hover { transform: none !important; }
}

/* ── Responsive ── */
@media (max-width: 960px) {
    .top-nav { padding: 14px 24px; }
    .top-nav ul { gap: 16px; }
}
@media (max-width: 700px) {
    .top-nav { padding: 14px 20px; }
    .top-nav ul { gap: 14px; }
    .top-nav ul li.hide-sm { display: none; }
    .tutorial { padding: 28px 18px 80px; }
    /* On mobile, the step number sits inline to the left of the h2 rather than
       above it — saves a row of vertical space and keeps the h2 visually anchored */
    .step {
        grid-template-columns: 40px 1fr;
        gap: 0 12px;
    }
    .step-number {
        width: 40px;
        height: 40px;
        font-size: 16px;
        border-radius: 10px;
        margin-top: 2px;
    }
    .step-body {
        padding-top: 4px;
    }
    .step-body h2 {
        font-size: 22px;
    }
    .next-step { padding: 22px 20px; }
    .next-step .btn { width: 100%; justify-content: center; }
}
