/* StayZ Journal v2.0 — production Ghost 6 theme */
:root {
    --paper: #fbfaf7;
    --paper-2: #f5f2ec;
    --paper-3: #eee9e1;
    --ink: #101010;
    --ink-soft: #262626;
    --muted: #6f6d68;
    --muted-2: #9c9992;
    --line: rgba(16, 16, 16, .12);
    --line-strong: rgba(16, 16, 16, .22);
    --accent: #ff674f;
    --green: #246b1b;
    --grey-dot: #c8c8c8;
    --white: #fff;
    --shell: min(1240px, calc(100vw - 64px));
    --article: 760px;
    --radius: 24px;
    --radius-sm: 16px;
    --shadow: 0 24px 80px rgba(24, 20, 15, .08);
    --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
    --display: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; background: var(--paper); }
body {
    margin: 0;
    background:
        radial-gradient(circle at 90% 2%, rgba(255,103,79,.08), transparent 28rem),
        var(--paper);
    color: var(--ink);
    font-family: var(--sans);
    font-size: 16px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; }
button { color: inherit; }
::selection { background: rgba(255,103,79,.25); }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 70%, white); outline-offset: 3px; }

.shell { width: var(--shell); margin-inline: auto; }
.site-main { min-height: 62vh; overflow: clip; }
.skip-link {
    position: fixed; left: 16px; top: 16px; z-index: 9999;
    transform: translateY(-160%); background: var(--ink); color: white;
    padding: 10px 14px; border-radius: 10px; transition: transform .2s ease;
}
.skip-link:focus { transform: none; }

/* Header */
.site-header {
    position: sticky; top: 0; z-index: 100;
    background: rgba(251,250,247,.84);
    border-bottom: 1px solid transparent;
    transition: border-color .25s ease, background .25s ease, box-shadow .25s ease;
    -webkit-backdrop-filter: blur(18px) saturate(150%);
    backdrop-filter: blur(18px) saturate(150%);
}
.site-header.is-scrolled { border-color: var(--line); box-shadow: 0 8px 30px rgba(16,16,16,.035); }
.header-inner { height: 82px; display: flex; align-items: center; justify-content: space-between; gap: 28px; }
.brand { display: inline-flex; align-items: center; gap: 11px; flex: 0 0 auto; }
.brand-logo { width: 112px; height: 42px; object-fit: contain; object-position: left center; display: block; }
.brand-edition { font-size: 13px; font-weight: 650; letter-spacing: .02em; color: var(--muted); padding-left: 10px; border-left: 1px solid var(--line-strong); }
.header-actions { display: flex; align-items: center; gap: 24px; min-width: 0; }
.site-nav .nav { list-style: none; display: flex; align-items: center; gap: 24px; margin: 0; padding: 0; }
.site-nav a { font-size: 14px; font-weight: 600; color: #343330; transition: color .2s ease; }
.site-nav a:hover, .site-nav .nav-current a { color: var(--accent); }
.header-tools { display: flex; align-items: center; gap: 10px; }
.icon-button {
    width: 42px; height: 42px; border: 1px solid var(--line); border-radius: 999px;
    background: rgba(255,255,255,.55); display: grid; place-items: center; cursor: pointer;
    transition: transform .2s ease, border-color .2s ease, background .2s ease;
}
.icon-button:hover { transform: translateY(-1px); border-color: var(--line-strong); background: white; }
.icon-button svg { width: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.nav-toggle { display: none; width: 42px; height: 42px; padding: 0; border: 0; background: transparent; flex-direction: column; justify-content: center; align-items: center; gap: 6px; cursor: pointer; }
.nav-toggle span { width: 22px; height: 1.5px; background: var(--ink); transition: transform .25s ease; }
.nav-open .nav-toggle span:first-child { transform: translateY(3.75px) rotate(45deg); }
.nav-open .nav-toggle span:last-child { transform: translateY(-3.75px) rotate(-45deg); }

/* Shared type + controls */
.eyebrow, .section-kicker {
    margin: 0 0 16px; text-transform: uppercase; letter-spacing: .135em; font-size: 11px; font-weight: 800; color: var(--muted);
}
.eyebrow { display: inline-flex; align-items: center; gap: 9px; }
.eyebrow > span { width: 22px; height: 7px; border-radius: 999px; background: var(--accent); box-shadow: 28px 0 0 var(--grey-dot), 56px 0 0 var(--green); margin-right: 58px; }
.button {
    display: inline-flex; align-items: center; justify-content: center; gap: 10px;
    min-height: 50px; padding: 0 19px; border-radius: 999px; border: 1px solid var(--ink);
    background: var(--ink); color: white; font-size: 14px; font-weight: 750;
    transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}
.button:hover { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(16,16,16,.14); }
.button--small { min-height: 42px; padding-inline: 16px; font-size: 13px; }
.button--dark { background: var(--ink); color: white; border-color: var(--ink); }
.text-link {
    display: inline-flex; align-items: center; gap: 9px; padding: 4px 0; border: 0; background: transparent;
    color: var(--ink); font-size: 14px; font-weight: 750; cursor: pointer; border-bottom: 1px solid var(--line-strong);
}
.text-link span { transition: transform .2s ease; }
.text-link:hover span { transform: translate(2px,-2px); }

/* Hero */
.home-hero { border-bottom: 1px solid var(--line); }
.home-hero-grid {
    min-height: 670px; padding-block: 76px 84px; display: grid; grid-template-columns: minmax(0,1.18fr) minmax(360px,.82fr); gap: 88px; align-items: center;
}
.home-hero-copy { max-width: 760px; }
.home-hero h1 {
    margin: 0; max-width: 820px; font-family: var(--display); font-size: clamp(62px, 7.2vw, 112px); line-height: .91;
    letter-spacing: -.067em; font-weight: 790; text-wrap: balance;
}
.hero-description { max-width: 670px; margin: 28px 0 0; color: var(--muted); font-size: clamp(18px,1.6vw,22px); line-height: 1.5; letter-spacing: -.015em; }
.hero-actions { display: flex; align-items: center; gap: 22px; margin-top: 34px; flex-wrap: wrap; }
.journey-line { display: flex; align-items: center; gap: 9px; margin-top: 46px; color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .08em; font-weight: 750; white-space: nowrap; }
.journey-line i { width: 28px; height: 1px; background: var(--line-strong); }
.hero-dispatch {
    position: relative; min-height: 490px; background: #101010; color: #fff; border-radius: 32px; padding: 28px;
    display: grid; grid-template-rows: auto 1fr auto; overflow: hidden; box-shadow: var(--shadow);
}
.hero-dispatch::before {
    content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .42;
    background-image: linear-gradient(rgba(255,255,255,.045) 1px, transparent 1px), linear-gradient(90deg,rgba(255,255,255,.045) 1px,transparent 1px);
    background-size: 34px 34px;
}
.hero-dispatch::after {
    content: ""; position: absolute; width: 260px; height: 260px; border-radius: 50%; right: -90px; top: 68px;
    border: 1px solid rgba(255,255,255,.15); box-shadow: 0 0 0 36px rgba(255,255,255,.025),0 0 0 72px rgba(255,255,255,.018);
}
.dispatch-topline, .dispatch-bottom { position: relative; z-index: 1; display: flex; justify-content: space-between; align-items: center; gap: 18px; text-transform: uppercase; font-size: 9px; letter-spacing: .17em; color: rgba(255,255,255,.58); font-weight: 750; }
.live-dot { display: inline-flex; align-items: center; gap: 7px; }
.live-dot::before { content:""; width: 7px; height:7px; border-radius:50%; background:var(--accent); box-shadow: 13px 0 0 var(--grey-dot), 26px 0 0 #5ba34d; margin-right: 26px; }
.dispatch-main { position: relative; z-index: 1; align-self: center; display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 20px; }
.dispatch-main p { margin: 0; font-size: 15px; color: rgba(255,255,255,.56); line-height: 1.35; }
.dispatch-main strong { font-size: clamp(38px,4.2vw,62px); line-height: .86; text-align: right; letter-spacing: -.06em; font-weight: 800; }
.dispatch-main strong::first-line { color: var(--accent); }
.dispatch-bottom { border-top: 1px solid rgba(255,255,255,.15); padding-top: 18px; }

/* Sections */
.section { padding-block: 92px; }
.section + .section { border-top: 1px solid var(--line); }
.section-heading { display: flex; justify-content: space-between; gap: 32px; align-items: end; margin-bottom: 42px; }
.section-heading--compact { margin-bottom: 32px; }
.section-heading h2 { margin: 0; max-width: 800px; font-size: clamp(38px,4.1vw,64px); line-height: 1; letter-spacing: -.055em; font-weight: 760; text-wrap: balance; }
.section-number { font-size: 11px; font-weight: 800; color: var(--muted-2); text-transform: uppercase; letter-spacing: .14em; padding-bottom: 8px; }

/* Post cards */
.featured-grid { display: grid; grid-template-columns: minmax(0,1.28fr) minmax(0,.72fr); gap: 24px; }
.post-card { min-width: 0; }
.post-card-media { position: relative; display: block; overflow: hidden; background: var(--paper-2); border-radius: var(--radius); aspect-ratio: 16 / 10; }
.post-card-media > img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .6s cubic-bezier(.2,.7,.2,1); }
.post-card:hover .post-card-media > img { transform: scale(1.025); }
.post-card-body { padding: 20px 2px 0; }
.post-card-meta { display: flex; align-items: center; gap: 10px; min-height: 24px; color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .08em; font-weight: 700; }
.post-card-meta > * + *::before { content: "·"; margin-right: 10px; color: var(--muted-2); }
.post-tag { color: var(--ink); }
.post-card-title { margin: 12px 0 0; font-size: clamp(25px,2.35vw,38px); line-height: 1.06; letter-spacing: -.045em; font-weight: 750; }
.post-card-title a { background-image: linear-gradient(var(--ink),var(--ink)); background-size: 0 1px; background-repeat: no-repeat; background-position: 0 100%; transition: background-size .3s ease; }
.post-card:hover .post-card-title a { background-size: 100% 1px; }
.post-card-body > p { margin: 14px 0 0; color: var(--muted); font-size: 15px; line-height: 1.55; }
.post-card-footer { display: flex; justify-content: space-between; align-items: center; margin-top: 20px; color: var(--muted-2); font-size: 11px; text-transform: uppercase; letter-spacing: .07em; }
.arrow-link { color: var(--ink); font-size: 16px; transition: transform .2s ease; }
.post-card:hover .arrow-link { transform: translate(2px,-2px); }
.featured-grid > .post-card:first-child { grid-row: span 3; }
.featured-grid > .post-card:first-child .post-card-media { aspect-ratio: 1.18 / 1; }
.featured-grid > .post-card:first-child .post-card-title { font-size: clamp(36px,4vw,62px); }
.featured-grid > .post-card:not(:first-child) { display: grid; grid-template-columns: 190px 1fr; gap: 20px; align-items: start; border-bottom: 1px solid var(--line); padding-bottom: 22px; }
.featured-grid > .post-card:not(:first-child):last-child { border-bottom: 0; }
.featured-grid > .post-card:not(:first-child) .post-card-media { aspect-ratio: 4/3; border-radius: 18px; }
.featured-grid > .post-card:not(:first-child) .post-card-body { padding-top: 2px; }
.featured-grid > .post-card:not(:first-child) .post-card-title { font-size: 25px; }
.featured-grid > .post-card:not(:first-child) .post-card-body > p { display: none; }
.featured-grid > .post-card:not(:first-child) .post-card-footer { margin-top: 12px; }

.editorial-fallback { position: absolute; inset: 0; display: block; overflow: hidden; background: #ece9e2; }
.fallback-grid { position:absolute; inset:0; opacity:.6; background-image:linear-gradient(rgba(16,16,16,.07) 1px,transparent 1px),linear-gradient(90deg,rgba(16,16,16,.07) 1px,transparent 1px); background-size:32px 32px; }
.fallback-route { position:absolute; left:22px; top:22px; font-size:10px; font-weight:800; letter-spacing:.16em; color:var(--muted); }
.fallback-word { position:absolute; left:22px; bottom:18px; font-size:clamp(34px,5vw,66px); font-weight:800; letter-spacing:-.06em; }
.fallback-dots { position:absolute; right:24px; bottom:29px; display:flex; gap:7px; }
.fallback-dots i { width:12px; height:12px; border-radius:50%; background:var(--accent); }
.fallback-dots i:nth-child(2){background:var(--grey-dot)}
.fallback-dots i:nth-child(3){background:var(--green)}

/* Topics */
.topics-section { background: var(--paper-2); }
.topic-list { display: grid; grid-template-columns: repeat(4,1fr); border-top: 1px solid var(--line-strong); border-left: 1px solid var(--line-strong); }
.topic-pill { min-height: 128px; padding: 21px; border-right: 1px solid var(--line-strong); border-bottom: 1px solid var(--line-strong); display: grid; grid-template-columns: 1fr auto; align-content: space-between; gap: 16px; transition: background .2s ease, color .2s ease; }
.topic-pill span { grid-column: 1/-1; font-size: 22px; line-height: 1.1; font-weight: 760; letter-spacing: -.035em; }
.topic-pill small { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .08em; font-weight: 700; }
.topic-pill b { font-weight: 500; font-size: 16px; }
.topic-pill:hover { background: var(--ink); color: white; }
.topic-pill:hover small { color: rgba(255,255,255,.6); }

/* Before I Land */
.before-land-section { background: #fff; }
.before-land-wrap { display: grid; grid-template-columns: minmax(280px,.72fr) minmax(0,1.28fr); gap: 92px; align-items: start; }
.before-land-intro { position: sticky; top: 118px; }
.before-land-intro h2 { margin: 0; font-size: clamp(48px,5.5vw,80px); line-height: .95; letter-spacing: -.06em; }
.before-land-intro > p:not(.section-kicker) { max-width: 480px; margin: 22px 0 26px; color: var(--muted); font-size: 17px; }
.before-land-posts { border-top: 1px solid var(--line-strong); }
.before-land-item { display: grid; grid-template-columns: 48px 1fr 48px; gap: 18px; align-items: center; padding: 27px 0; border-bottom: 1px solid var(--line); }
.before-land-index { color: var(--muted-2); font-size: 11px; letter-spacing: .1em; font-weight: 750; }
.before-land-item h3 { margin: 0; font-size: clamp(24px,2.3vw,34px); line-height: 1.08; letter-spacing: -.04em; }
.before-land-item p { margin: 8px 0 0; color: var(--muted); font-size: 14px; }
.circle-arrow { width: 44px; height: 44px; border: 1px solid var(--line-strong); border-radius: 50%; display: grid; place-items: center; transition: background .2s ease, color .2s ease, transform .2s ease; }
.before-land-item:hover .circle-arrow { background: var(--ink); color: white; transform: translate(2px,-2px); }

/* Latest */
.latest-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 54px 24px; }
.latest-grid .post-card-media { aspect-ratio: 1.22/1; }
.latest-grid--three { grid-template-columns: repeat(3,minmax(0,1fr)); }
.pagination-wrap { margin-top: 58px; }
.pagination { display: flex; align-items: center; justify-content: space-between; gap: 20px; border-top: 1px solid var(--line); padding-top: 22px; font-size: 13px; font-weight: 700; }
.pagination a { display: inline-flex; align-items: center; min-height: 42px; padding: 0 16px; border: 1px solid var(--line); border-radius: 999px; }
.pagination .page-number { color: var(--muted); }

/* Newsletter */
.newsletter-band { background: var(--accent); padding-block: 86px; }
.newsletter-inner { display: grid; grid-template-columns: 1fr .8fr; gap: 80px; align-items: end; }
.newsletter-band .section-kicker { color: rgba(16,16,16,.58); }
.newsletter-inner h2 { margin: 0; max-width: 760px; font-size: clamp(48px,5.5vw,82px); line-height: .93; letter-spacing: -.06em; }
.newsletter-cta { max-width: 470px; justify-self: end; }
.newsletter-cta p { margin: 0 0 24px; font-size: 17px; }

/* Archives */
.archive-header, .page-header { padding-top: 100px; padding-bottom: 58px; }
.archive-header h1, .page-header h1 { margin: 0; max-width: 1050px; font-size: clamp(62px,8vw,118px); line-height: .91; letter-spacing: -.067em; }
.archive-header > p:not(.eyebrow), .page-header .article-deck { max-width: 720px; margin: 26px 0 0; color: var(--muted); font-size: 20px; }
.archive-title-row { display: flex; align-items: end; justify-content: space-between; gap: 24px; }
.archive-title-row > span { padding-bottom: 12px; color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .1em; }
.archive-feed { border-top: 1px solid var(--line); }
.author-header { display: grid; grid-template-columns: 170px 1fr; gap: 40px; align-items: center; }
.author-avatar { width: 170px; height: 170px; object-fit: cover; border-radius: 50%; background: var(--paper-2); }
.author-avatar--fallback { display: grid; place-items: center; padding: 20px; font-size: 22px; font-weight: 750; text-align: center; color: var(--muted); }
.author-meta { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 16px; color: var(--muted); font-size: 13px; }
.special-header { padding-bottom: 34px; }
.page-intro-content { padding-top: 0 !important; }
.special-feed { padding-top: 46px; }

/* Article */
.article-wrap { padding-top: 74px; }
.article-shell { max-width: 940px; }
.article-header { padding-bottom: 44px; }
.article-meta-row { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .08em; font-weight: 700; }
.article-meta-row > * + *::before { content: "·"; margin-right: 10px; color: var(--muted-2); }
.article-header h1 { margin: 20px 0 0; max-width: 1100px; font-size: clamp(54px,7vw,104px); line-height: .94; letter-spacing: -.064em; text-wrap: balance; }
.article-deck { max-width: 780px; margin: 24px 0 0; color: var(--muted); font-size: clamp(19px,2vw,25px); line-height: 1.45; }
.article-byline { margin-top: 32px; padding-top: 24px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 24px; align-items: center; }
.article-authors { display: flex; flex-wrap: wrap; gap: 14px; }
.author-chip { display: inline-flex; align-items: center; gap: 10px; font-size: 13px; font-weight: 700; }
.author-chip img { width: 38px; height: 38px; border-radius: 50%; object-fit: cover; }
.author-chip small { display: block; color: var(--muted); font-size: 9px; text-transform: uppercase; letter-spacing: .1em; line-height: 1.2; }
.share-button { min-height: 40px; border: 1px solid var(--line); border-radius: 999px; padding: 0 14px; background: transparent; cursor: pointer; font-size: 12px; font-weight: 700; }
.article-hero { margin-top: 8px; }
.article-hero img { display: block; width: 100%; max-height: 760px; object-fit: cover; border-radius: 26px; }
.article-hero figcaption { margin: 10px auto 0; max-width: 940px; color: var(--muted); font-size: 12px; }
.article-content { width: min(var(--article), calc(100vw - 40px)); margin-inline: auto; padding-block: 72px; font-size: 18px; line-height: 1.78; color: #242321; }
.article-content > *:first-child { margin-top: 0; }
.article-content > *:last-child { margin-bottom: 0; }
.article-content p, .article-content ul, .article-content ol, .article-content blockquote { margin-top: 0; margin-bottom: 1.55em; }
.article-content h2, .article-content h3, .article-content h4 { color: var(--ink); line-height: 1.12; letter-spacing: -.04em; }
.article-content h2 { margin: 2em 0 .7em; font-size: 42px; }
.article-content h3 { margin: 1.7em 0 .6em; font-size: 30px; }
.article-content h4 { margin: 1.4em 0 .5em; font-size: 22px; }
.article-content a { color: var(--ink); text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--accent) 72%, transparent); text-decoration-thickness: 2px; text-underline-offset: 3px; }
.article-content blockquote { margin-left: 0; padding: 4px 0 4px 24px; border-left: 3px solid var(--accent); color: var(--ink); font-size: 24px; line-height: 1.45; letter-spacing: -.02em; }
.article-content hr { border: 0; border-top: 1px solid var(--line); margin: 3em 0; }
.article-content pre { overflow-x: auto; padding: 20px; border-radius: 14px; background: #161616; color: #f4f4f4; font-size: 14px; line-height: 1.6; }
.article-content :not(pre) > code { background: var(--paper-2); padding: .15em .35em; border-radius: 5px; font-size: .9em; }
.article-content table { width: 100%; border-collapse: collapse; margin: 2em 0; font-size: 15px; }
.article-content th, .article-content td { padding: 12px 10px; text-align: left; border-bottom: 1px solid var(--line); }
.article-content th { color: var(--ink); }
.article-content iframe { max-width: 100%; }
.article-footer { padding-bottom: 92px; }
.article-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding-top: 24px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; }
.article-tags a { color: var(--ink); border: 1px solid var(--line); border-radius: 999px; padding: 7px 11px; }
.article-end-card { margin-top: 36px; border-radius: 24px; background: var(--paper-2); padding: 24px; display: grid; grid-template-columns: 110px 1fr auto; gap: 22px; align-items: center; }
.article-end-brand { width: 100px; height: 62px; display: grid; place-items: center; }
.article-end-brand img { max-width: 100%; max-height: 62px; object-fit: contain; }
.article-end-card strong { font-size: 20px; letter-spacing: -.025em; }
.article-end-card p { margin: 4px 0 0; color: var(--muted); font-size: 14px; }
.related-section { border-top: 1px solid var(--line); background: #fff; }

/* Ghost editor cards */
.kg-width-wide { width: min(1080px, calc(100vw - 40px)); margin-left: 50%; transform: translateX(-50%); }
.kg-width-full { width: 100vw; margin-left: 50%; transform: translateX(-50%); }
.kg-image-card img { border-radius: 18px; }
.kg-image-card figcaption, .kg-gallery-card figcaption, .kg-video-card figcaption { color: var(--muted); font-size: 12px; text-align: center; margin-top: 8px; }
.kg-gallery-container { display: flex; flex-direction: column; gap: 8px; }
.kg-gallery-row { display: flex; gap: 8px; }
.kg-gallery-image img { width: 100%; height: 100%; object-fit: cover; border-radius: 8px; }
.kg-bookmark-card a { display: grid; grid-template-columns: 1fr 190px; min-height: 150px; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; color: inherit; text-decoration: none; }
.kg-bookmark-content { padding: 20px; }
.kg-bookmark-title { font-weight: 750; line-height: 1.25; }
.kg-bookmark-description { color: var(--muted); font-size: 14px; margin-top: 6px; }
.kg-bookmark-metadata { margin-top: 14px; font-size: 12px; }
.kg-bookmark-thumbnail img { width: 100%; height: 100%; object-fit: cover; border-radius: 0; }
.kg-callout-card { border-radius: 16px; }
.kg-toggle-card, .kg-product-card, .kg-file-card, .kg-audio-card, .kg-video-card, .kg-header-card, .kg-signup-card { max-width: 100%; }
.kg-signup-card, .kg-header-card { border-radius: 20px; overflow: hidden; }
.kg-button-card .kg-btn { border-radius: 999px; font-weight: 750; }

/* 404 */
.not-found { min-height: 68vh; display: flex; flex-direction: column; justify-content: center; align-items: flex-start; padding-block: 84px; }
.error-code { margin: 0; color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .14em; font-weight: 800; }
.not-found h1 { margin: 18px 0 0; max-width: 900px; font-size: clamp(62px,8vw,118px); line-height: .9; letter-spacing: -.07em; }
.not-found > p:not(.error-code) { max-width: 600px; margin: 24px 0; color: var(--muted); font-size: 19px; }

/* Footer */
.site-footer { background: #eeeae3; padding: 76px 0 26px; border-top: 1px solid var(--line); }
.footer-grid { display: grid; grid-template-columns: minmax(0,1.15fr) minmax(420px,.85fr); gap: 80px; padding-bottom: 60px; }
.footer-primary { max-width: 600px; }
.footer-brand { display: inline-flex; }
.footer-logo { width: 144px; height: 52px; object-fit: contain; object-position: left center; }
.footer-copy { margin: 22px 0 4px; font-size: 28px; line-height: 1.1; font-weight: 780; letter-spacing: -.04em; }
.footer-note { max-width: 520px; margin: 10px 0 0; color: var(--muted); }
.social-row { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 24px; font-size: 12px; font-weight: 700; }
.social-row a:hover { color: var(--accent); }
.footer-links { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; }
.footer-label { display: block; margin-bottom: 14px; color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: .14em; font-weight: 800; }
.footer-links .nav { list-style: none; padding: 0; margin: 0; }
.footer-links a, .footer-links button { display: block; width: fit-content; padding: 6px 0; border: 0; background: none; cursor: pointer; color: var(--ink); font-size: 14px; font-weight: 620; text-align: left; }
.footer-links a:hover, .footer-links button:hover { color: var(--accent); }
.footer-bottom { display: flex; align-items: center; justify-content: space-between; gap: 24px; border-top: 1px solid var(--line); padding-top: 20px; color: var(--muted); font-size: 11px; }
.footer-credits { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; justify-content: flex-end; }
.billionedge-credit { display: inline-flex; align-items: center; gap: 8px; }
.billionedge-credit img { width: 96px; height: 24px; object-fit: contain; object-position: left center; }

/* Reading progress */
.reading-progress { position: fixed; left: 0; right: 0; top: 0; z-index: 250; height: 2px; pointer-events: none; }
.reading-progress span { display: block; width: 100%; height: 100%; transform-origin: left center; transform: scaleX(0); background: var(--accent); }
body:not(.post-template) .reading-progress { display: none; }

/* Reveal motion */
.js [data-reveal] { opacity: 0; transform: translateY(18px); transition: opacity .62s ease, transform .62s cubic-bezier(.2,.7,.2,1); }
.js [data-reveal].is-visible { opacity: 1; transform: none; }

@media (max-width: 1100px) {
    :root { --shell: min(100% - 40px, 1240px); }
    .header-actions { gap: 16px; }
    .site-nav .nav { gap: 16px; }
    .home-hero-grid { gap: 44px; grid-template-columns: minmax(0,1fr) 380px; }
    .hero-dispatch { min-height: 440px; }
    .featured-grid { grid-template-columns: 1fr; }
    .featured-grid > .post-card:first-child { grid-row: auto; }
    .featured-grid > .post-card:first-child .post-card-media { aspect-ratio: 16/10; }
    .featured-grid > .post-card:not(:first-child) { grid-template-columns: 220px 1fr; }
    .topic-list { grid-template-columns: repeat(2,1fr); }
    .latest-grid, .latest-grid--three { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .footer-grid { grid-template-columns: 1fr 1fr; gap: 46px; }
}

@media (max-width: 860px) {
    .nav-toggle { display: flex; z-index: 3; }
    .header-actions {
        position: fixed; inset: 82px 0 auto; display: none; flex-direction: column; align-items: stretch; gap: 18px;
        padding: 18px 20px 28px; background: rgba(251,250,247,.98); border-bottom: 1px solid var(--line); box-shadow: 0 18px 40px rgba(16,16,16,.06);
    }
    .nav-open { overflow: hidden; }
    .nav-open .header-actions { display: flex; }
    .site-nav .nav { flex-direction: column; align-items: stretch; gap: 0; }
    .site-nav a { display: block; padding: 11px 0; font-size: 18px; }
    .header-tools { justify-content: space-between; }
    .header-tools .button { flex: 1; }
    .home-hero-grid { grid-template-columns: 1fr; min-height: 0; padding-block: 62px 70px; }
    .home-hero-copy { max-width: 800px; }
    .hero-dispatch { min-height: 400px; }
    .journey-line { overflow-x: auto; padding-bottom: 4px; }
    .before-land-wrap { grid-template-columns: 1fr; gap: 46px; }
    .before-land-intro { position: static; }
    .newsletter-inner, .footer-grid { grid-template-columns: 1fr; gap: 40px; }
    .newsletter-cta { justify-self: start; }
    .article-end-card { grid-template-columns: 90px 1fr; }
    .article-end-card .button { grid-column: 1/-1; width: fit-content; }
}

@media (max-width: 620px) {
    :root { --shell: calc(100vw - 28px); --radius: 18px; }
    .header-inner { height: 70px; }
    .header-actions { top: 70px; }
    .brand-logo { width: 99px; height: 37px; }
    .brand-edition { font-size: 11px; }
    .home-hero-grid { padding-block: 48px 54px; gap: 36px; }
    .home-hero h1 { font-size: clamp(54px,16vw,76px); }
    .hero-description { margin-top: 22px; font-size: 18px; }
    .hero-actions { gap: 16px; margin-top: 28px; }
    .journey-line { margin-top: 34px; font-size: 9px; gap: 7px; }
    .journey-line i { width: 18px; }
    .hero-dispatch { min-height: 330px; border-radius: 22px; padding: 21px; }
    .dispatch-main strong { font-size: 38px; }
    .dispatch-main p { display: none; }
    .dispatch-main { grid-template-columns: 1fr; }
    .section { padding-block: 66px; }
    .section-heading { margin-bottom: 28px; align-items: flex-start; }
    .section-heading h2 { font-size: 42px; }
    .section-number { display: none; }
    .featured-grid { gap: 42px; }
    .featured-grid > .post-card:not(:first-child) { grid-template-columns: 1fr; gap: 0; border-bottom: 0; padding-bottom: 0; }
    .featured-grid > .post-card:not(:first-child) .post-card-media { aspect-ratio: 16/10; }
    .featured-grid > .post-card:not(:first-child) .post-card-body { padding-top: 18px; }
    .featured-grid > .post-card:not(:first-child) .post-card-title { font-size: 28px; }
    .featured-grid > .post-card:not(:first-child) .post-card-body > p { display: block; }
    .topic-list { grid-template-columns: 1fr; }
    .topic-pill { min-height: 100px; }
    .before-land-intro h2 { font-size: 56px; }
    .before-land-item { grid-template-columns: 38px 1fr; gap: 12px; }
    .before-land-item .circle-arrow { display: none; }
    .before-land-item h3 { font-size: 24px; }
    .latest-grid, .latest-grid--three { grid-template-columns: 1fr; gap: 44px; }
    .newsletter-band { padding-block: 66px; }
    .newsletter-inner h2 { font-size: 54px; }
    .archive-header, .page-header { padding-top: 68px; padding-bottom: 42px; }
    .archive-header h1, .page-header h1 { font-size: 64px; }
    .archive-title-row { display: block; }
    .archive-title-row > span { display: inline-block; margin-top: 16px; padding: 0; }
    .author-header { grid-template-columns: 1fr; gap: 22px; }
    .author-avatar { width: 110px; height: 110px; }
    .article-wrap { padding-top: 48px; }
    .article-header h1 { font-size: 52px; }
    .article-deck { font-size: 19px; }
    .article-byline { align-items: flex-start; flex-direction: column; }
    .article-hero { width: calc(100vw - 20px); }
    .article-hero img { border-radius: 18px; }
    .article-content { width: calc(100vw - 32px); padding-block: 52px; font-size: 17px; }
    .article-content h2 { font-size: 34px; }
    .article-content h3 { font-size: 27px; }
    .kg-width-wide, .kg-width-full { width: 100vw; }
    .kg-bookmark-card a { grid-template-columns: 1fr; }
    .kg-bookmark-thumbnail { min-height: 160px; order: -1; }
    .article-end-card { grid-template-columns: 1fr; }
    .article-end-brand { width: 94px; justify-items: start; }
    .article-end-card .button { grid-column: auto; width: 100%; }
    .footer-grid { padding-bottom: 44px; }
    .footer-links { grid-template-columns: 1fr 1fr; gap: 26px; }
    .footer-bottom { align-items: flex-start; flex-direction: column; }
    .footer-credits { justify-content: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
    .js [data-reveal] { opacity: 1; transform: none; }
}
