/* ===== RESET & BASE ===== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
    --bg: #faf8f5;
    --text: #141414;
    --text-muted: #555555;
    --accent: #ec4899;
    --line: #e8e4df;
    --font-main: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-hand: 'Caveat', cursive;
}

html { scroll-behavior: smooth; }

body {
    font-family: var(--font-main);
    background: var(--bg);
    color: var(--text);
    overflow-x: hidden;
    line-height: 1.6;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

.handwritten {
    font-family: var(--font-hand);
    font-weight: 600;
    color: var(--text);
}

/* ===== READING PROGRESS ===== */
.progress {
    position: fixed;
    top: 0; left: 0;
    height: 4px;
    width: 0%;
    background: var(--accent);
    z-index: 300;
    border-radius: 0 4px 4px 0;
}

/* ===== TOP BAR ===== */
.art-nav {
    position: sticky;
    top: 0;
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    background: rgba(250, 248, 245, 0.92);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--line);
}

.art-logo {
    font-size: 20px;
    font-weight: 900;
    line-height: 1.05;
    letter-spacing: -0.6px;
}

.logo-star { color: var(--accent); }

.nav-pill {
    font-size: 13px;
    font-weight: 600;
    padding: 9px 18px;
    border: 2px solid var(--text);
    border-radius: 999px;
    transition: all 0.25s;
}

.nav-pill:hover { background: var(--text); color: #fff; }

/* ===== ARTICLE HEADER ===== */
.article-header {
    max-width: 860px;
    margin: 0 auto;
    padding: 40px 20px 10px;
    text-align: center;
}

.breadcrumb ol {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    list-style: none;
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 26px;
}

.breadcrumb li + li::before { content: "/"; margin-right: 8px; color: #bbb; }
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb [aria-current] { color: var(--text); font-weight: 600; }

.kicker {
    display: inline-block;
    font-size: 26px;
    color: var(--accent);
    transform: rotate(-3deg);
    margin-bottom: 10px;
}

.title {
    font-size: clamp(34px, 7.5vw, 62px);
    font-weight: 900;
    line-height: 1.02;
    letter-spacing: -1.5px;
    margin-bottom: 18px;
}

.standfirst {
    font-size: clamp(15px, 2.6vw, 18px);
    color: var(--text-muted);
    max-width: 60ch;
    margin: 0 auto 22px;
}

.meta-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 10px 16px;
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 34px;
}

.chip {
    padding: 5px 14px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.chip-food { background: var(--text); color: #fff; }

/* Featured polaroid */
.featured { position: relative; margin: 0 auto; max-width: 760px; }

.slot-featured { aspect-ratio: 16 / 9; }

.featured .photo-slot { transform: rotate(-1.5deg); }

.tape {
    position: absolute;
    width: 90px; height: 30px;
    background: linear-gradient(135deg, #f0e6d3, #e0d4be);
    opacity: 0.9;
    z-index: 6;
    box-shadow: 0 2px 5px rgba(0,0,0,0.12);
}

.tape-left { top: -14px; left: 24px; transform: rotate(-18deg); }

.featured figcaption {
    margin-top: 14px;
    font-size: 22px;
    color: var(--text-muted);
    transform: rotate(-1deg);
}

/* ===== IMAGE SLOTS ===== */
.photo-slot {
    position: relative;
    aspect-ratio: 3 / 2;
    width: 100%;
    background: #efeae3;
    overflow: hidden;
    border-radius: 3px;
}

.photo-slot img {
    position: relative;
    z-index: 2;
    width: 100%; height: 100%;
    object-fit: cover;
    display: block;
}

/* placeholder ONLY when the file is genuinely missing */
.photo-slot.missing img { display: none; }

.photo-slot.missing {
    border: 2px dashed rgba(20,20,20,0.18);
    background:
        repeating-linear-gradient(45deg, transparent, transparent 12px, rgba(20,20,20,0.02) 12px, rgba(20,20,20,0.02) 24px),
        #efeae3;
    display: flex;
    align-items: center;
    justify-content: center;
}

.photo-slot.missing::before {
    content: attr(data-name) "  ·  " attr(data-size);
    font-family: var(--font-main);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.4px;
    color: rgba(20,20,20,0.4);
    text-align: center;
    padding: 0 14px;
}

/* ===== LAYOUT ===== */
.layout {
    max-width: 1120px;
    margin: 0 auto;
    padding: 50px 20px 20px;
    display: grid;
    grid-template-columns: 230px minmax(0, 1fr);
    gap: 56px;
}

/* TOC */
.toc-wrap { position: sticky; top: 84px; align-self: start; }

.toc-title {
    font-size: 24px;
    color: var(--accent);
    transform: rotate(-2deg);
    margin-bottom: 12px;
}

.toc ol { list-style: none; display: flex; flex-direction: column; gap: 4px; }

.toc a {
    display: flex;
    gap: 10px;
    align-items: baseline;
    font-size: 13.5px;
    font-weight: 500;
    color: var(--text-muted);
    padding: 6px 10px;
    border-left: 2px solid transparent;
    border-radius: 0 6px 6px 0;
    transition: all 0.25s;
}

.toc a span { font-weight: 800; font-size: 11px; color: var(--accent); }

.toc a:hover { color: var(--text); background: rgba(236,72,153,0.06); }

.toc a.active {
    color: var(--text);
    border-left-color: var(--accent);
    background: rgba(236,72,153,0.08);
}

/* ===== ARTICLE BODY ===== */
.prose { max-width: 70ch; }

.place { scroll-margin-top: 90px; padding-bottom: 26px; }

.place + .place::before {
    content: '';
    display: block;
    height: 14px;
    margin: 0 auto 26px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='14' viewBox='0 0 120 14'%3E%3Cpath d='M2 8 Q17 2 32 8 T62 8 T92 8 T118 8' fill='none' stroke='%23ec4899' stroke-width='2.5' stroke-linecap='round'/%3E%3C/svg%3E") center / auto 14px no-repeat;
    opacity: 0.55;
}

.place-head {
    display: flex;
    align-items: baseline;
    gap: 14px;
    flex-wrap: wrap;
    margin-bottom: 18px;
}

.place-index {
    font-weight: 900;
    font-size: clamp(38px, 8vw, 60px);
    line-height: 1;
    letter-spacing: -2px;
    color: transparent;
    -webkit-text-stroke: 2px var(--accent);
}

@supports not (-webkit-text-stroke: 1px black) {
    .place-index { color: var(--accent); opacity: 0.3; }
}

.place h2 {
    font-size: clamp(24px, 5vw, 34px);
    font-weight: 800;
    letter-spacing: -0.8px;
}

.area-chip {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--accent);
    border: 1.5px solid var(--accent);
    border-radius: 999px;
    padding: 4px 12px;
}

.prose p {
    font-size: clamp(15.5px, 2.4vw, 17.5px);
    line-height: 1.8;
    color: #333;
    margin-bottom: 16px;
}

/* Pull quote */
.pullquote {
    position: relative;
    font-family: var(--font-hand);
    font-size: clamp(24px, 4.6vw, 32px);
    line-height: 1.3;
    color: var(--accent);
    margin: 30px 0 30px 6px;
    padding-left: 22px;
    border-left: 3px solid var(--accent);
    transform: rotate(-1deg);
}

/* Handwritten margin note */
.margin-note {
    float: right;
    width: max-content;
    max-width: 46%;
    font-size: 22px;
    color: var(--accent);
    transform: rotate(-4deg);
    margin: 4px 0 14px 18px;
    padding-bottom: 3px;
    border-bottom: 2px solid var(--accent);
}

/* Photo figures */
.photo-figure { margin: 28px 0; }

.photo-figure .photo-slot { box-shadow: 0 12px 28px rgba(0,0,0,0.1); }

.place:nth-child(odd) .photo-figure .photo-slot { transform: rotate(-1.2deg); }
.place:nth-child(even) .photo-figure .photo-slot { transform: rotate(1.2deg); }

.photo-figure figcaption {
    margin-top: 12px;
    font-size: 13px;
    color: var(--text-muted);
    text-align: center;
}

/* ===== OUTRO ===== */
.outro {
    text-align: center;
    padding: 60px 20px 70px;
    border-top: 1px solid var(--line);
    margin-top: 30px;
}

.outro-hand { font-size: 26px; color: var(--accent); transform: rotate(-2deg); display: inline-block; }

.outro-title { font-size: clamp(26px, 5vw, 40px); font-weight: 900; letter-spacing: -1px; margin: 8px 0 10px; }

.outro-text { color: var(--text-muted); max-width: 46ch; margin: 0 auto 26px; }

.outro-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: var(--text);
    color: #fff;
    padding: 15px 32px;
    border-radius: 999px;
    font-weight: 600;
    border: 2px solid var(--text);
    transition: all 0.25s;
}

.outro-btn:hover { background: transparent; color: var(--text); }

/* ===== FOOTER ===== */
.art-footer { text-align: center; padding: 26px 20px 40px; border-top: 1px solid var(--line); }
.footer-text { font-size: 15px; font-weight: 600; margin-bottom: 6px; }
.footer-copy { font-size: 12px; color: var(--text-muted); }

/* ===== REVEAL ===== */
.place { opacity: 0; transform: translateY(26px); }
.place.visible { opacity: 1; transform: none; transition: all 0.7s ease; }

/* ===== MOBILE (<=900px) ===== */
@media (max-width: 900px) {
    html, body {
        overflow-x: hidden;
        max-width: 100%;
    }

    /* KEY FIX: minmax(0,1fr) = column kabhi viewport se chaura nahi hoga */
    .layout {
        grid-template-columns: minmax(0, 1fr);
        gap: 26px;
        padding: 30px 18px 10px;
    }

    .toc-wrap,
    .prose {
        min-width: 0;
        max-width: 100%;
    }

    .prose p,
    .prose h2,
    .pullquote,
    .photo-figure figcaption {
        overflow-wrap: break-word;
        word-break: break-word;
    }

    /* lambe placeholder file-names wrap ho jayen */
    .photo-slot.missing::before {
        overflow-wrap: anywhere;
        word-break: break-all;
        font-size: 11px;
        line-height: 1.5;
    }

    /* Header tuning */
    .article-header { padding: 26px 18px 6px; }
    .breadcrumb ol { gap: 6px; font-size: 11px; }
    .kicker { font-size: 22px; }
    .title { font-size: clamp(30px, 8.4vw, 44px); letter-spacing: -1px; }
    .standfirst { font-size: 15px; }
    .meta-row { gap: 8px 12px; font-size: 12px; }

    /* Featured */
    .featured .photo-slot { transform: rotate(-1deg); }
    .featured figcaption { font-size: 19px; }
    .tape { width: 70px; height: 24px; }

    /* TOC chips */
    .toc-wrap { position: static; }
    .toc-title { font-size: 22px; }
    .toc ol {
        flex-direction: row;
        overflow-x: auto;
        gap: 8px;
        padding-bottom: 10px;
        scroll-snap-type: x proximity;
        -webkit-overflow-scrolling: touch;
    }
    .toc a {
        flex: 0 0 auto;
        border: 1.5px solid var(--line);
        border-radius: 999px;
        padding: 8px 14px;
        background: #fff;
        scroll-snap-align: start;
        font-size: 12.5px;
        white-space: nowrap;
    }
    .toc a.active { border-color: var(--accent); }

    /* Places */
    .place { scroll-margin-top: 76px; }
    .place-head { gap: 10px; margin-bottom: 14px; }
    .place-index { font-size: 34px; -webkit-text-stroke: 1.5px var(--accent); }
    .place h2 { font-size: 24px; }
    .area-chip { font-size: 10px; padding: 3px 10px; }

    .prose p { font-size: 16px; line-height: 1.75; margin-bottom: 16px; }

    .pullquote {
        font-size: 22px;
        margin: 22px 0;
        padding-left: 16px;
    }

    .margin-note {
        float: none;
        display: block;
        max-width: max-content;
        margin: 4px auto 18px;
        font-size: 20px;
        text-align: center;
    }

    .photo-figure { margin: 22px 0; }
    .photo-figure .photo-slot { transform: rotate(0deg); }
    .photo-figure figcaption { font-size: 12px; }

    /* Outro + footer */
    .outro { padding: 46px 18px 56px; }
    .outro-hand { font-size: 22px; }
    .outro-title { font-size: 26px; }
    .outro-btn { padding: 13px 26px; font-size: 15px; }
}

@media (max-width: 480px) {
    .art-nav { padding: 12px 16px; }
    .art-logo { font-size: 18px; }
    .nav-pill { padding: 8px 14px; font-size: 12px; }
    .article-header { padding: 22px 16px 4px; }
    .title { font-size: 30px; }
    .layout { padding: 26px 16px 8px; }
    .place-index { font-size: 30px; }
    .place h2 { font-size: 22px; }
    .prose p { font-size: 15.5px; }
    .pullquote { font-size: 20px; }
    .tape { width: 60px; height: 22px; }
}

/* ===== GET FEATURED CTA ===== */
.feature-cta { padding: 60px 20px 70px; border-top: 1px solid var(--line); }

.feature-cta-card {
    position: relative;
    max-width: 760px;
    margin: 0 auto;
    background: #fff;
    border: 2px dashed rgba(20, 20, 20, 0.25);
    border-radius: 8px;
    padding: 44px 28px 36px;
    text-align: center;
    transform: rotate(-1deg);
    transition: transform 0.35s ease, border-color 0.35s ease, box-shadow 0.35s ease;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.06);
}

.feature-cta-card:hover {
    transform: rotate(0deg) translateY(-4px);
    border-color: var(--accent);
    box-shadow: 0 18px 44px rgba(236, 72, 153, 0.14);
}

.feature-tape {
    position: absolute;
    top: -14px; left: 50%;
    margin-left: -42px;
    width: 84px; height: 26px;
    background: linear-gradient(135deg, #f0e6d3, #e0d4be);
    transform: rotate(-4deg);
    opacity: 0.9;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.12);
}

.feature-kicker { display: inline-block; font-size: 24px; color: var(--accent); transform: rotate(-2deg); margin-bottom: 6px; }

.feature-title { font-size: clamp(26px, 5vw, 40px); font-weight: 900; letter-spacing: -1px; margin-bottom: 12px; }

.feature-text { font-size: 15px; line-height: 1.7; color: var(--text-muted); max-width: 52ch; margin: 0 auto 24px; }

.feature-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: var(--accent);
    color: #fff;
    padding: 14px 30px;
    border-radius: 999px;
    font-size: 15px;
    font-weight: 700;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    box-shadow: 0 8px 22px rgba(236, 72, 153, 0.35);
}

.feature-btn:hover { transform: translateY(-3px); box-shadow: 0 14px 30px rgba(236, 72, 153, 0.45); }
.feature-btn svg { width: 18px; height: 18px; }

.feature-note { margin-top: 14px; font-size: 12px; font-weight: 600; letter-spacing: 1px; text-transform: uppercase; color: var(--text-muted); }

@media (max-width: 768px) {
    .feature-cta { padding: 40px 16px 50px; }
    .feature-cta-card { padding: 36px 18px 30px; }
}
.chip-places { background: #1d4ed8; }
.chip-culture { background: #7c3aed; }

/* ===== LEGAL PAGES ===== */
.legal-head { max-width: 760px; margin: 0 auto; padding: 60px 20px 10px; text-align: center; }
.legal-updated { font-size: 13px; color: var(--text-muted); margin-top: 10px; }

.legal-body { max-width: 760px; margin: 0 auto; padding: 30px 20px 70px; }
.legal-body h2 { font-size: 21px; font-weight: 800; letter-spacing: -0.5px; margin: 34px 0 12px; }
.legal-body h2::before { content: "* "; color: var(--accent); }
.legal-body p { font-size: 15px; line-height: 1.8; color: #333; margin-bottom: 14px; }
.legal-body ul { margin: 0 0 16px 20px; font-size: 15px; line-height: 1.8; color: #333; }
.legal-body li { margin-bottom: 6px; }

.legal-contact {
    background: #fff;
    border: 2px dashed rgba(20, 20, 20, 0.2);
    border-radius: 8px;
    padding: 26px 20px;
    margin-top: 44px;
    text-align: center;
}
.legal-contact p { margin-bottom: 14px; font-weight: 600; color: var(--text); }