/* ============================================================
   OFF THE GREAT WALL — Editorial Travel Magazine
   Aesthetic: Cereal Magazine × ink-wash warmth
   Typography: Cormorant Garamond (display) + Outfit (body)
   ============================================================ */

/* --- Reset --- */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

/* --- Design Tokens --- */
:root {
    --ink: #1b1914;
    --stone: #3d3830;
    --clay: #6b6156;
    --drift: #a09889;
    --sand: #d4cdc2;
    --parchment: #ece7df;
    --cream: #f6f3ee;
    --white: #fdfcfa;
    --terracotta: #c2583a;
    --terracotta-light: #d4795f;
    --jade: #5c7a65;

    --font-display: 'Cormorant Garamond', 'Georgia', serif;
    --font-body: 'Outfit', -apple-system, sans-serif;

    --page-max: 1280px;
    --content-max: 740px;
    --page-pad: 40px;

    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

/* --- Base --- */
body {
    font-family: var(--font-body);
    font-weight: 300;
    color: var(--stone);
    background: var(--cream);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    display: block;
    max-width: 100%;
    height: auto;
}

/* --- Progress Bar --- */
.progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    height: 2px;
    width: 0%;
    background: var(--terracotta);
    z-index: 1000;
    transition: width 0.15s linear;
}

/* ============================================================
   HEADER
   ============================================================ */
.header {
    position: sticky;
    top: 0;
    z-index: 900;
    background: var(--cream);
    border-bottom: 1px solid var(--sand);
    transition: background 0.3s;
}

.header-inner {
    max-width: var(--page-max);
    margin: 0 auto;
    padding: 0 var(--page-pad);
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Logo — stacked typographic lockup */
.header-logo {
    display: flex;
    align-items: baseline;
    gap: 6px;
    text-decoration: none;
    transition: opacity 0.2s;
}

.header-logo:hover { opacity: 0.6; }

.logo-off {
    font-family: var(--font-display);
    font-size: 1.6rem;
    font-weight: 600;
    font-style: italic;
    color: var(--terracotta);
    line-height: 1;
}

.logo-the {
    font-family: var(--font-body);
    font-size: 0.65rem;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--drift);
    align-self: center;
}

.logo-wall {
    font-family: var(--font-display);
    font-size: 1.6rem;
    font-weight: 300;
    color: var(--ink);
    line-height: 1;
}

/* Nav */
.nav-links {
    list-style: none;
    display: flex;
    gap: 36px;
}

.nav-links a {
    font-family: var(--font-body);
    font-size: 0.78rem;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 1.8px;
    color: var(--clay);
    position: relative;
    transition: color 0.25s;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--terracotta);
    transition: width 0.35s var(--ease-out);
}

.nav-links a:hover {
    color: var(--ink);
}

.nav-links a:hover::after {
    width: 100%;
}

/* Burger */
.nav-burger {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--ink);
    padding: 8px;
}

.nav-burger svg line {
    transition: transform 0.35s var(--ease-out), opacity 0.2s;
    transform-origin: center;
}

.nav-burger.active .burger-top {
    transform: translateY(5px) rotate(45deg);
}

.nav-burger.active .burger-bot {
    transform: translateY(-5px) rotate(-45deg);
}

/* Mobile Menu */
.mobile-menu {
    position: fixed;
    top: 80px;
    left: 0;
    right: 0;
    background: var(--cream);
    border-bottom: 1px solid var(--sand);
    padding: 32px var(--page-pad);
    z-index: 899;
    transform: translateY(-110%);
    opacity: 0;
    transition: transform 0.5s var(--ease-out), opacity 0.4s;
    pointer-events: none;
}

.mobile-menu.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: all;
}

.mobile-menu-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.mobile-menu-links a {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 300;
    color: var(--ink);
    transition: color 0.2s;
}

.mobile-menu-links a:hover {
    color: var(--terracotta);
}

/* ============================================================
   HERO — full-width editorial splash
   ============================================================ */
.hero {
    position: relative;
    min-height: 85vh;
    display: grid;
    grid-template-columns: 1fr 1fr;
    overflow: hidden;
}

.hero-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 80px var(--page-pad) 80px;
    max-width: calc(var(--page-max) / 2);
    margin-left: auto;
}

.hero-issue {
    font-family: var(--font-body);
    font-size: 0.7rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: var(--terracotta);
    margin-bottom: 32px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.hero-issue::before {
    content: '';
    width: 32px;
    height: 1px;
    background: var(--terracotta);
}

.hero h1 {
    font-family: var(--font-display);
    font-size: clamp(2.8rem, 5.5vw, 4.5rem);
    font-weight: 300;
    line-height: 1.08;
    color: var(--ink);
    margin-bottom: 28px;
    letter-spacing: -1px;
}

.hero h1 em {
    font-style: italic;
    font-weight: 300;
    color: var(--terracotta);
}

.hero-description {
    font-size: 1.05rem;
    color: var(--clay);
    line-height: 1.85;
    max-width: 420px;
    margin-bottom: 40px;
}

.hero-cta {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-body);
    font-size: 0.78rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--ink);
    transition: gap 0.3s var(--ease-out), color 0.2s;
}

.hero-cta:hover {
    gap: 18px;
    color: var(--terracotta);
}

.hero-cta svg {
    width: 20px;
    height: 20px;
    stroke: currentColor;
    stroke-width: 1.5;
    fill: none;
}

.hero-image {
    position: relative;
    overflow: hidden;
}

.hero-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Placeholder for when no image exists */
.hero-image-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(165deg, var(--parchment) 0%, var(--sand) 40%, var(--drift) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.hero-image-placeholder::after {
    content: '';
    width: 200px;
    height: 200px;
    border: 1px solid var(--sand);
    border-radius: 50%;
    opacity: 0.6;
}

/* ============================================================
   EDITORIAL STRIP — horizontal divider with issue info
   ============================================================ */
.editorial-strip {
    border-top: 1px solid var(--sand);
    border-bottom: 1px solid var(--sand);
    padding: 16px 0;
    margin: 0 auto;
    max-width: var(--page-max);
}

.editorial-strip-inner {
    max-width: var(--page-max);
    margin: 0 auto;
    padding: 0 var(--page-pad);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.strip-label {
    font-size: 0.7rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 2.5px;
    color: var(--drift);
}

/* ============================================================
   SECTIONS
   ============================================================ */
.section {
    max-width: var(--page-max);
    margin: 0 auto;
    padding: 80px var(--page-pad);
}

.section-label {
    font-family: var(--font-body);
    font-size: 0.7rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: var(--terracotta);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.section-label::before {
    content: '';
    width: 24px;
    height: 1px;
    background: var(--terracotta);
}

.section-title {
    font-family: var(--font-display);
    font-size: clamp(2rem, 3.5vw, 2.8rem);
    font-weight: 300;
    color: var(--ink);
    margin-bottom: 48px;
    letter-spacing: -0.5px;
}

.section-title em {
    font-style: italic;
    color: var(--terracotta);
}

/* ============================================================
   FEATURE CARD — large editorial card
   ============================================================ */
.feature-card {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 48px;
    align-items: center;
    margin-bottom: 80px;
    transition: transform 0.4s var(--ease-out);
}

.feature-card:hover {
    transform: translateY(-3px);
}

.feature-card-image {
    aspect-ratio: 4 / 3;
    overflow: hidden;
    border-radius: 2px;
    background: var(--parchment);
}

.feature-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s var(--ease-out);
}

.feature-card:hover .feature-card-image img {
    transform: scale(1.03);
}

.feature-card-body {
    padding: 20px 0;
}

.feature-card-tag {
    font-size: 0.68rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 2.5px;
    color: var(--terracotta);
    margin-bottom: 16px;
}

.feature-card-title {
    font-family: var(--font-display);
    font-size: clamp(1.6rem, 2.5vw, 2.2rem);
    font-weight: 400;
    color: var(--ink);
    line-height: 1.2;
    margin-bottom: 16px;
}

.feature-card-excerpt {
    font-size: 0.95rem;
    color: var(--clay);
    line-height: 1.8;
    margin-bottom: 24px;
}

.feature-card-link {
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--ink);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: gap 0.3s var(--ease-out), color 0.2s;
}

.feature-card-link:hover {
    gap: 14px;
    color: var(--terracotta);
}

/* ============================================================
   STORY GRID — asymmetric magazine grid
   ============================================================ */
.story-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
}

.story-card {
    display: block;
    transition: transform 0.35s var(--ease-out);
}

.story-card:hover {
    transform: translateY(-4px);
}

.story-card-image {
    aspect-ratio: 3 / 2;
    overflow: hidden;
    border-radius: 2px;
    margin-bottom: 20px;
    background: var(--parchment);
    position: relative;
}

.story-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s var(--ease-out);
}

.story-card:hover .story-card-image img {
    transform: scale(1.04);
}

.story-card-image-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--parchment), var(--sand));
}

.story-card-tag {
    font-size: 0.65rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 2.5px;
    color: var(--terracotta);
    margin-bottom: 10px;
}

.story-card-title {
    font-family: var(--font-display);
    font-size: 1.45rem;
    font-weight: 400;
    color: var(--ink);
    line-height: 1.25;
    margin-bottom: 10px;
    transition: color 0.2s;
}

.story-card:hover .story-card-title {
    color: var(--terracotta);
}

.story-card-excerpt {
    font-size: 0.88rem;
    color: var(--drift);
    line-height: 1.7;
}

/* ============================================================
   PULL QUOTE — full-width editorial break
   ============================================================ */
.pull-quote {
    background: var(--ink);
    color: var(--parchment);
    padding: 100px var(--page-pad);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.pull-quote::before {
    content: '\201C';
    font-family: var(--font-display);
    font-size: 20rem;
    position: absolute;
    top: -40px;
    left: 50%;
    transform: translateX(-50%);
    color: var(--stone);
    opacity: 0.15;
    line-height: 1;
    pointer-events: none;
}

.pull-quote blockquote {
    font-family: var(--font-display);
    font-size: clamp(1.6rem, 3vw, 2.4rem);
    font-weight: 300;
    font-style: italic;
    max-width: 700px;
    margin: 0 auto 24px;
    line-height: 1.5;
    position: relative;
    z-index: 1;
}

.pull-quote cite {
    font-family: var(--font-body);
    font-size: 0.75rem;
    font-weight: 400;
    font-style: normal;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: var(--drift);
    position: relative;
    z-index: 1;
}

/* ============================================================
   ARTICLE PAGE
   ============================================================ */
.article {
    max-width: var(--content-max);
    margin: 0 auto;
    padding: 60px var(--page-pad) 100px;
}

.article h1 {
    font-family: var(--font-display);
    font-size: clamp(2.2rem, 4vw, 3.2rem);
    font-weight: 300;
    color: var(--ink);
    line-height: 1.15;
    margin-bottom: 16px;
}

.article-meta {
    font-size: 0.8rem;
    color: var(--drift);
    letter-spacing: 0.5px;
    margin-bottom: 48px;
    padding-bottom: 32px;
    border-bottom: 1px solid var(--sand);
}

.article h2 {
    font-family: var(--font-display);
    font-size: 1.8rem;
    font-weight: 400;
    color: var(--ink);
    margin: 56px 0 20px;
    line-height: 1.25;
}

.article p {
    font-size: 1.05rem;
    line-height: 1.9;
    margin-bottom: 24px;
    color: var(--stone);
}

.article a {
    color: var(--terracotta);
    border-bottom: 1px solid var(--terracotta-light);
    transition: border-color 0.2s;
}

.article a:hover {
    border-color: transparent;
}

.article img {
    border-radius: 2px;
    margin: 40px 0;
}

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
    background: var(--ink);
    color: var(--drift);
    padding: 64px var(--page-pad);
}

.footer-inner {
    max-width: var(--page-max);
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}

.footer-logo {
    font-family: var(--font-display);
    font-size: 1.3rem;
    font-weight: 300;
    color: var(--parchment);
    display: block;
    margin-bottom: 8px;
}

.footer-tagline {
    font-size: 0.82rem;
    color: var(--clay);
}

.footer-links {
    display: flex;
    gap: 28px;
}

.footer-links a {
    font-size: 0.75rem;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--clay);
    transition: color 0.2s;
}

.footer-links a:hover {
    color: var(--parchment);
}

.footer-copy {
    font-size: 0.75rem;
    color: var(--clay);
}

/* ============================================================
   ANIMATIONS — staggered reveal on load
   ============================================================ */
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(24px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.hero-text > * {
    opacity: 0;
    animation: fadeUp 0.8s var(--ease-out) forwards;
}

.hero-issue { animation-delay: 0.1s; }
.hero h1 { animation-delay: 0.25s; }
.hero-description { animation-delay: 0.4s; }
.hero-cta { animation-delay: 0.55s; }

.hero-image {
    opacity: 0;
    animation: fadeIn 1s var(--ease-out) 0.3s forwards;
}

.story-card {
    opacity: 0;
    animation: fadeUp 0.7s var(--ease-out) forwards;
}

.story-card:nth-child(1) { animation-delay: 0.1s; }
.story-card:nth-child(2) { animation-delay: 0.2s; }
.story-card:nth-child(3) { animation-delay: 0.3s; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 900px) {
    :root {
        --page-pad: 24px;
    }

    .nav-links { display: none; }
    .nav-burger { display: block; }

    .hero {
        grid-template-columns: 1fr;
        min-height: auto;
    }

    .hero-text {
        padding: 60px var(--page-pad) 48px;
        max-width: 100%;
        margin: 0;
    }

    .hero-image {
        height: 50vh;
        min-height: 320px;
    }

    .feature-card {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .story-grid {
        grid-template-columns: 1fr;
        gap: 48px;
    }

    .footer-inner {
        flex-direction: column;
        align-items: flex-start;
        gap: 28px;
    }

    .pull-quote {
        padding: 64px var(--page-pad);
    }
}

@media (max-width: 600px) {
    .header-inner {
        height: 64px;
    }

    .logo-off, .logo-wall {
        font-size: 1.3rem;
    }

    .mobile-menu {
        top: 64px;
    }

    .hero h1 {
        font-size: 2.2rem;
    }

    .section-title {
        font-size: 1.8rem;
    }
}
