/* Shared styles for the SelfieDump guides (/selfie-dump, /guides/…). Builds on
   home.css (hero, feature cards, collage block, FAQ, scroll reveal) and
   ai-collage.css (breadcrumb, hero media, steps, plans card, closing); everything
   here is guide-specific and prefixed `sg-`. */

/* ---- on this page ---- */
.sg-toc {
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    background: #fff;
}

.sg-toc .wrap {
    display: flex;
    align-items: center;
    gap: 18px;
    padding-top: 14px;
    padding-bottom: 14px;
}

.sg-toc-label {
    flex-shrink: 0;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--ink-muted);
}

.sg-toc ul {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 8px;
    list-style: none;
}

.sg-toc a {
    display: inline-block;
    padding: 6px 12px;
    border: 1px solid var(--line);
    border-radius: 100px;
    font-size: 13.5px;
    font-weight: 600;
    color: var(--ink);
    transition: border-color .16s ease, background .16s ease;
}

.sg-toc a:hover {
    border-color: var(--ink);
}

.sg-toc a:focus-visible,
.sg-section a:focus-visible,
.sg-app-card a:focus-visible {
    outline: 2px solid var(--coral-accessible);
    outline-offset: 2px;
}

/* ---- sections ---- */
.sg-section {
    padding: 100px 0;
    scroll-margin-top: 72px;
}

#selfiedump,
#faq {
    scroll-margin-top: 72px;
}

.sg-split {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 56px;
    align-items: center;
}

.sg-split--top {
    align-items: start;
}

.sg-prose h2 {
    font-size: clamp(28px, 3.4vw, 38px);
    margin-bottom: 18px;
}

.sg-prose p {
    color: var(--ink-muted);
    font-size: 16px;
    margin-bottom: 16px;
}

.sg-prose p a,
.sg-small a,
.ac-step p a {
    color: var(--ink);
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.sg-small {
    margin-top: 14px;
    font-size: 13.5px;
    color: var(--ink-muted);
}

/* ---- photo dump vs selfie dump ---- */
.sg-compare {
    display: grid;
    gap: 14px;
}

.sg-compare-row {
    padding: 24px 26px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
}

.sg-compare-row.is-selfie {
    border-color: var(--coral);
    box-shadow: 0 16px 34px -20px rgba(242, 84, 45, 0.45);
}

.sg-compare dt {
    font-family: 'Fraunces', serif;
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 6px;
}

.sg-compare-row.is-selfie dt {
    color: var(--coral-accessible);
}

.sg-compare dd {
    color: var(--ink-muted);
    font-size: 15px;
}

/* ---- good dump / steps ---- */
.sg-good {
    padding-top: 0;
}

.sg-grid-4 {
    grid-template-columns: repeat(4, 1fr);
}

.sg-grid-4 .feature-card {
    padding: 26px;
}

.sg-steps {
    grid-template-columns: repeat(5, 1fr);
    gap: 28px;
}

/* ---- choosing ---- */
.sg-checklist {
    list-style: none;
    margin-top: 6px;
}

.sg-checklist li {
    position: relative;
    padding: 11px 0 11px 30px;
    border-top: 1px solid var(--line);
    font-size: 15px;
    color: var(--ink-muted);
}

.sg-checklist li:first-child {
    border-top: none;
}

.sg-checklist li::before {
    content: "";
    position: absolute;
    left: 2px;
    top: 16px;
    width: 14px;
    height: 8px;
    border-left: 2.5px solid var(--mint);
    border-bottom: 2.5px solid var(--mint);
    transform: rotate(-45deg);
}

.sg-checklist b {
    color: var(--ink);
}

.sg-app-card {
    padding: 32px;
    border-radius: 24px;
    background: var(--surface);
    border: 1px solid var(--line);
}

.sg-app-card h3 {
    font-size: 22px;
    margin-bottom: 14px;
}

.sg-app-card ul {
    list-style: none;
}

.sg-app-card li {
    padding: 12px 0;
    border-top: 1px solid var(--line);
    font-size: 14.5px;
    color: var(--ink-muted);
}

.sg-app-card li:first-child {
    border-top: none;
    padding-top: 0;
}

.sg-app-card li b {
    color: var(--ink);
}

.sg-app-card--wide {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
    margin-top: 40px;
    background: #fff;
}

.sg-app-card--wide p {
    color: var(--ink-muted);
    font-size: 15px;
    max-width: 620px;
}

.sg-app-card--wide .btn {
    flex-shrink: 0;
}

/* ---- shot types: illustrations built from photo-cards ---- */
.sg-shots {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 22px;
}

.sg-shot {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 20px 20px 24px;
}

.sg-shot h3 {
    font-family: 'Inter', sans-serif;
    font-size: 17px;
    font-weight: 700;
    margin: 18px 0 6px;
}

.sg-shot p {
    color: var(--ink-muted);
    font-size: 14.5px;
}

.sg-art {
    position: relative;
    height: 150px;
    border-radius: 12px;
    background: var(--canvas);
    overflow: hidden;
}

.sg-art .photo-card {
    position: absolute;
}

.sg-art--close .photo-card { width: 92px; height: 112px; left: calc(50% - 46px); top: 20px; border-radius: 46px 46px 14px 14px; }
.sg-art--fit .photo-card { width: 60px; height: 128px; left: calc(50% - 30px); top: 11px; }
.sg-art--detail .photo-card { width: 64px; height: 64px; left: calc(50% - 32px); top: 43px; border-radius: 50%; }
.sg-art--context .photo-card:nth-child(1) { width: 150px; height: 96px; left: calc(50% - 90px); top: 22px; transform: rotate(-3deg); }
.sg-art--context .photo-card:nth-child(2) { width: 54px; height: 70px; left: calc(50% + 34px); top: 62px; transform: rotate(7deg); }
.sg-art--outtake .photo-card { width: 96px; height: 116px; left: calc(50% - 48px); top: 18px; transform: rotate(-8deg); filter: blur(1.5px); }

.sg-mirror {
    position: absolute;
    left: calc(50% - 48px);
    top: 12px;
    width: 96px;
    height: 126px;
    border-radius: 48px 48px 10px 10px;
    border: 5px solid #E2DCCF;
    background: linear-gradient(160deg, #fff, #ECE7DD);
    overflow: hidden;
}

.sg-mirror .photo-card {
    width: 44px;
    height: 84px;
    left: calc(50% - 22px);
    bottom: 0;
    border-radius: 22px 22px 6px 6px;
}

.sg-lol {
    position: absolute;
    right: calc(50% - 82px);
    top: 14px;
    font-size: 24px;
    color: var(--coral-accessible);
    transform: rotate(8deg);
}

.sg-themes {
    margin-top: 56px;
    padding: 34px 36px;
    border-radius: 24px;
    background: #fff;
    border: 1px solid var(--line);
}

.sg-themes h3 {
    font-size: 24px;
    margin-bottom: 18px;
}

.sg-themes ul {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0 36px;
}

.sg-themes li {
    padding: 11px 0;
    border-top: 1px solid var(--line);
    font-size: 15px;
    color: var(--ink-muted);
}

.sg-themes li:nth-child(-n + 2) {
    border-top: none;
}

.sg-themes li b {
    color: var(--ink);
}

/* ---- mirror ---- */
.sg-note-card {
    padding: 30px;
    border-radius: 24px;
    background: var(--surface);
    border: 1px solid var(--line);
}

.sg-note-card h3 {
    font-size: 20px;
    margin-bottom: 10px;
}

.sg-note-card p {
    color: var(--ink-muted);
    font-size: 15px;
}

/* ---- order ---- */
.sg-order {
    display: grid;
    grid-template-columns: 0.8fr 1.2fr;
    gap: 64px;
    align-items: center;
}

.sg-phone {
    width: 280px;
    margin: 0 auto;
}

.sg-sequence {
    list-style: none;
    counter-reset: sg-seq;
    margin: 6px 0 22px;
}

.sg-sequence li {
    counter-increment: sg-seq;
    position: relative;
    padding: 9px 0 9px 44px;
    font-size: 15px;
    color: var(--ink-muted);
}

.sg-sequence li::before {
    content: counter(sg-seq);
    position: absolute;
    left: 0;
    top: 6px;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: #fff;
    border: 1px solid var(--line);
    font-size: 13px;
    font-weight: 700;
    color: var(--ink);
}

.sg-sequence li:first-child::before {
    background: var(--coral-deep);
    border-color: var(--coral-deep);
    color: #fff;
}

.sg-sequence b {
    color: var(--ink);
}

/* ---- captions ---- */
.sg-captions {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
}

.sg-caption {
    padding: 22px 24px;
    border-radius: var(--radius);
    background: var(--surface);
    border: 1px solid var(--line);
}

.sg-vibe {
    display: inline-block;
    margin-bottom: 10px;
    padding: 3px 10px;
    border-radius: 100px;
    background: #fff;
    border: 1px solid var(--line);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .04em;
    color: var(--ink-muted);
}

.sg-caption q {
    display: block;
    font-family: 'Fraunces', serif;
    font-size: 19px;
    line-height: 1.3;
    color: var(--ink);
}

/* ---- collage card ---- */
.sg-collage {
    padding-bottom: 100px;
}

/* ---- long-form steps (photo dump guide) ---- */
.sg-read {
    max-width: 780px;
}

.sg-step .sg-read h2,
.sg-step .sg-prose h2 {
    font-size: clamp(28px, 3.4vw, 38px);
    margin-bottom: 18px;
}

.sg-read p {
    color: var(--ink-muted);
    font-size: 16px;
    margin-bottom: 16px;
}

.sg-step-num {
    display: inline-block;
    margin-bottom: 12px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--coral-accessible);
}

.sg-help {
    margin-top: 22px;
    padding: 20px 22px;
    border-left: 3px solid var(--mint);
    border-radius: 0 var(--radius) var(--radius) 0;
    background: #fff;
}

.alt .sg-help {
    background: var(--canvas);
}

.sg-help-label {
    display: block;
    margin-bottom: 6px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--mint);
}

.sg-prose .sg-help p,
.sg-read .sg-help p {
    margin: 0;
    font-size: 15px;
}

.sg-help b {
    color: var(--ink);
}

.sg-help a {
    color: var(--ink);
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.sg-read .sg-checklist,
.sg-read .sg-sequence {
    margin-bottom: 18px;
}

/* steps at a glance */
.sg-glance {
    padding: 28px 30px;
    border-radius: 24px;
    background: var(--surface);
    border: 1px solid var(--line);
    scroll-margin-top: 90px;
}

.sg-glance-title {
    font-size: 22px;
    margin-bottom: 14px;
}

.sg-glance ol {
    list-style: none;
    counter-reset: sg-glance;
}

.sg-glance li {
    counter-increment: sg-glance;
    border-top: 1px solid var(--line);
}

.sg-glance li:first-child {
    border-top: none;
}

.sg-glance a {
    display: flex;
    gap: 14px;
    padding: 10px 0;
    font-size: 15px;
    font-weight: 600;
    color: var(--ink);
}

.sg-glance a::before {
    content: counter(sg-glance, decimal-leading-zero);
    min-width: 22px;
    font-family: 'Fraunces', serif;
    color: var(--coral-accessible);
}

.sg-glance a:hover {
    color: var(--coral-accessible);
}

.sg-glance a:focus-visible {
    outline: 2px solid var(--coral-accessible);
    outline-offset: 2px;
}

.sg-mix .feature-card h3 {
    font-size: 17px;
}

/* ideas */
.sg-idea-groups {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 22px;
}

.sg-idea-groups .sg-themes {
    margin-top: 0;
    padding: 28px 26px;
}

.sg-idea-groups .sg-themes h3 {
    font-size: 21px;
}

.sg-idea-groups .sg-themes ul {
    grid-template-columns: 1fr;
}

.sg-idea-groups .sg-themes li:nth-child(2) {
    border-top: 1px solid var(--line);
}

.sg-center {
    text-align: center;
    margin-top: 28px;
}

/* ---- guides hub (/guides) ---- */
.sg-visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.sg-hub-hero {
    padding-bottom: 48px;
}

.sg-hub-hero .wrap {
    grid-template-columns: 1fr;
}

.sg-hub-hero h1 {
    max-width: 760px;
}

.sg-hub-hero p.lead {
    max-width: 640px;
    margin-bottom: 0;
}

.sg-hub {
    padding: 0 0 100px;
}

.sg-guide-list {
    list-style: none;
    display: grid;
    gap: 24px;
}

.sg-guide-card {
    position: relative;
    display: grid;
    grid-template-columns: 180px 1fr;
    gap: 26px;
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: #fff;
    transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}

.sg-guide-card:hover {
    border-color: var(--ink-muted);
    box-shadow: 0 22px 40px -28px rgba(24, 24, 23, 0.35);
}

.sg-guide-card:focus-within {
    border-color: var(--coral-accessible);
}

.sg-guide-media {
    align-self: start;
    aspect-ratio: 3 / 4;
    border-radius: 14px;
    overflow: hidden;
    background: var(--surface);
}

.sg-guide-media picture {
    display: contents;
}

.sg-guide-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top;
}

.sg-guide-body {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.sg-guide-body h3 {
    font-size: clamp(24px, 2.6vw, 28px);
    margin-bottom: 10px;
}

/* The title link covers the whole card, so the card is one click target with
   one accessible name; the other text stays selectable above it. */
.sg-guide-link::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 24px;
}

.sg-guide-link:focus-visible {
    outline: none;
}

.sg-guide-link:focus-visible::after {
    outline: 2px solid var(--coral-accessible);
    outline-offset: 3px;
}

.sg-guide-body p {
    max-width: 680px;
    color: var(--ink-muted);
    font-size: 15px;
    margin-bottom: 12px;
}

.sg-guide-best b {
    color: var(--ink);
}

.sg-guide-topics {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 4px 0 18px;
}

.sg-guide-topics li {
    padding: 4px 10px;
    border-radius: 100px;
    background: var(--surface);
    font-size: 12.5px;
    font-weight: 600;
    color: var(--ink-muted);
}

.sg-guide-foot {
    margin-top: auto;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px 16px;
}

.sg-guide-more {
    font-size: 15px;
    font-weight: 700;
    color: var(--coral-accessible);
}

.sg-guide-date {
    font-size: 12.5px;
    color: var(--ink-muted);
}

.sg-more {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 22px;
}

.sg-more .feature-card {
    position: relative;
}

.sg-more h3 a::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: var(--radius);
}

.sg-more h3 a:focus-visible {
    outline: none;
}

.sg-more h3 a:focus-visible::after {
    outline: 2px solid var(--coral-accessible);
    outline-offset: 3px;
}

.sg-more .feature-card:hover {
    border-color: var(--ink-muted);
}

/* ---- responsive ---- */
@media (max-width: 1040px) {
    .sg-steps {
        grid-template-columns: repeat(3, 1fr);
    }

    .sg-grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 860px) {
    .sg-section {
        padding: 70px 0;
    }

    .sg-hub {
        padding-bottom: 70px;
    }

    .sg-more {
        grid-template-columns: 1fr;
    }

    .sg-idea-groups {
        grid-template-columns: 1fr;
    }

    .sg-good {
        padding-top: 0;
    }

    .sg-collage {
        padding-bottom: 70px;
    }

    .sg-split,
    .sg-order {
        grid-template-columns: 1fr;
        gap: 36px;
    }

    .sg-order .sg-phone {
        order: 2;
        width: 240px;
    }

    .sg-shots,
    .sg-captions {
        grid-template-columns: repeat(2, 1fr);
    }

    .sg-app-card--wide {
        flex-direction: column;
        align-items: flex-start;
        padding: 28px 22px;
    }

    .sg-toc .wrap {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
}

@media (max-width: 600px) {
    .sg-guide-card {
        grid-template-columns: 1fr;
        gap: 18px;
        padding: 18px;
    }

    .sg-guide-media {
        aspect-ratio: 16 / 10;
    }

    /* A wide crop of a tall screenshot: show the app screen, not the headline. */
    .sg-guide-media img {
        object-position: 50% 62%;
    }

    .sg-steps,
    .sg-grid-4,
    .sg-shots,
    .sg-captions,
    .sg-themes ul {
        grid-template-columns: 1fr;
    }

    .sg-themes li:nth-child(2) {
        border-top: 1px solid var(--line);
    }

    .sg-themes,
    .sg-app-card,
    .sg-note-card,
    .sg-glance,
    .sg-idea-groups .sg-themes {
        padding: 26px 22px;
    }

    .sg-help {
        padding: 18px;
    }

    .sg-toc ul {
        flex-wrap: nowrap;
        overflow-x: auto;
        margin: 0 -32px;
        padding: 0 32px 4px;
        width: calc(100% + 64px);
        scrollbar-width: none;
    }

    .sg-toc ul::-webkit-scrollbar {
        display: none;
    }

    .sg-toc li {
        flex-shrink: 0;
    }
}

@media (prefers-reduced-motion: no-preference) {
    .sg-steps .ac-step.reveal:nth-child(5) { transition-delay: .32s; }
    .sg-shots .sg-shot.reveal:nth-child(3n + 2),
    .sg-captions .sg-caption.reveal:nth-child(3n + 2) { transition-delay: .08s; }
    .sg-shots .sg-shot.reveal:nth-child(3n + 3),
    .sg-captions .sg-caption.reveal:nth-child(3n + 3) { transition-delay: .16s; }
    .sg-grid-4 .feature-card.reveal:nth-child(2) { transition-delay: .08s; }
    .sg-grid-4 .feature-card.reveal:nth-child(3) { transition-delay: .16s; }
    .sg-grid-4 .feature-card.reveal:nth-child(4) { transition-delay: .24s; }
}
