/*
 * The frame every wikihunt.app page shares: tokens, header, footer.
 * Header/footer markup lives in website/site/partials and is stamped into
 * each page by website/site/build.mjs — edit it there, not in the pages.
 * Class names are prefixed `wh-` so page styles can't collide with them.
 */
@font-face { font-family: "Barlow Condensed"; font-weight: 600; font-display: swap; src: url(/assets/fonts/barlow-condensed-600.woff2) format("woff2"); }
@font-face { font-family: "Barlow Condensed"; font-weight: 700; font-display: swap; src: url(/assets/fonts/barlow-condensed-700.woff2) format("woff2"); }

:root {
    --orange: #C2410C;
    --blaze: #E8590C;
    --wh-display: "Barlow Condensed", "Arial Narrow", -apple-system, sans-serif;
    --orange-dark: #9A3412;
    --bg: #F5F1E8;
    --bg-card: #FFFDF8;
    --text: #1E271D;
    --text-secondary: #535C4D;
    --border: #DCD3C1;
    --wh-nav-h: 61px;
}

/* Anchor jumps (/#pricing) land below the fixed header. */
html { scroll-padding-top: calc(var(--wh-nav-h) + 16px); }

.wh-skip {
    position: absolute;
    left: 12px;
    top: -60px;
    z-index: 200;
    padding: 10px 16px;
    border-radius: 8px;
    background: var(--orange);
    color: #fff;
    font: 600 14px -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    text-decoration: none;
}
.wh-skip:focus { top: 12px; }

/* ---------- Header ---------- */
.wh-nav {
    position: fixed;
    inset: 0 0 auto 0;
    z-index: 100;
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 12px 24px;
    background: rgba(245, 241, 232, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', Roboto, sans-serif;
    line-height: 1.4;
}
.wh-logo {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 20px;
    font-weight: 700;
    color: var(--text);
    text-decoration: none;
    flex-shrink: 0;
}
.wh-logo img { width: 28px; height: 28px; border-radius: 6.26px; display: block; }
.wh-logo span span { color: var(--orange); }

.wh-links { display: flex; align-items: center; gap: 22px; margin-left: 8px; }
.wh-links > a, .wh-dropdown > summary {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: color 0.2s;
    cursor: pointer;
}
.wh-links > a:hover, .wh-dropdown > summary:hover, .wh-links > a[aria-current="page"], .wh-dropdown.wh-current > summary { color: var(--text); }

.wh-dropdown { position: relative; }
.wh-dropdown > summary { list-style: none; display: inline-flex; align-items: center; gap: 4px; }
.wh-dropdown > summary::-webkit-details-marker { display: none; }
.wh-dropdown > summary::after { content: "▾"; font-size: 11px; }
.wh-menu {
    position: absolute;
    top: calc(100% + 10px);
    left: -12px;
    min-width: 270px;
    display: grid;
    padding: 8px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: 0 12px 32px rgba(30, 39, 29, 0.16);
}
.wh-menu a {
    display: block;
    padding: 10px 12px;
    border-radius: 8px;
    color: var(--text);
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
}
.wh-menu a small { display: block; color: var(--text-secondary); font-weight: 400; font-size: 12px; }
.wh-menu a:hover, .wh-menu a:focus-visible, .wh-menu a[aria-current="page"] { background: rgba(194, 65, 12, 0.12); }

.wh-actions { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.wh-btn {
    display: inline-block;
    padding: 8px 16px;
    border-radius: 100px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    background: var(--orange);
    color: #fff;
    transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
}
.wh-btn:hover { transform: scale(1.04); box-shadow: 0 4px 16px rgba(194, 65, 12, 0.3); }
.wh-btn-ghost { background: transparent; color: var(--text); border: 1px solid var(--border); }
.wh-btn-ghost:hover { border-color: var(--orange); box-shadow: none; }

.wh-mobile { display: none; position: relative; }
.wh-mobile > summary {
    list-style: none;
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    border: 1px solid var(--border);
    color: var(--text);
}
.wh-mobile > summary::-webkit-details-marker { display: none; }
.wh-mobile > summary svg { width: 20px; height: 20px; }
.wh-mobile .wh-menu { left: auto; right: 0; min-width: 260px; max-height: calc(100vh - 80px); overflow-y: auto; }
.wh-menu .wh-menu-label {
    padding: 10px 12px 4px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--text-secondary);
}

.wh-links a:focus-visible, .wh-dropdown > summary:focus-visible, .wh-btn:focus-visible,
.wh-mobile > summary:focus-visible, .wh-logo:focus-visible, .wh-footer a:focus-visible {
    outline: 2px solid var(--orange);
    outline-offset: 3px;
    border-radius: 6px;
}

@media (max-width: 860px) {
    .wh-links, .wh-actions .wh-btn-ghost { display: none; }
    .wh-mobile { display: block; }
}
@media (max-width: 640px) {
    .wh-nav { padding: 10px 16px; gap: 12px; }
    .wh-btn { padding: 8px 14px; }
}

/* ---------- Footer ---------- */
.wh-footer {
    /* An ink band: the frame's tokens, re-scoped dark. */
    --text: #F3EEE4;
    --text-secondary: #BDB6A6;
    --border: #3A4436;
    --bg: #1E271D;
    --bg-card: #283326;
    --orange: #F07A3A;
    background: var(--bg);
    color: var(--text);
    border-top: 1px solid var(--border);
    padding: 56px 24px 40px;
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', Roboto, sans-serif;
    line-height: 1.5;
    text-align: left;
}
.wh-footer-grid {
    max-width: 1040px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.4fr repeat(4, 1fr);
    gap: 32px;
}
.wh-footer-brand p { color: var(--text-secondary); font-size: 14px; margin: 12px 0 0; max-width: 260px; }
.wh-footer h2 {
    margin: 0 0 12px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--text);
}
.wh-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.wh-footer li { margin: 0; font-size: 14px; }
.wh-footer a { color: var(--text-secondary); text-decoration: none; font-size: 14px; }
.wh-footer a:hover { color: var(--text); }
.wh-footer a.wh-logo { color: var(--text); font-size: 18px; }
.wh-footer-bottom p { margin: 0; font-size: 13px; color: var(--text-secondary); }
.wh-footer-bottom {
    max-width: 1040px;
    margin: 32px auto 0;
    padding-top: 24px;
    border-top: 1px solid var(--border);
    color: var(--text-secondary);
    font-size: 13px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px 24px;
}

/* "More from Tall Poppy": sibling apps by audience overlap. */
.wh-footer-more { max-width: 1040px; margin: 40px auto 0; }
.wh-sibling {
    display: inline-flex; align-items: center; gap: 12px;
    padding: 12px 16px 12px 12px; border-radius: 12px;
    border: 1px solid var(--border); background: var(--bg-card);
}
.wh-footer a.wh-sibling { color: var(--text); }
.wh-sibling:hover { border-color: var(--orange); }
.wh-sibling-mark { width: 36px; height: 36px; border-radius: 9px; flex-shrink: 0; }
.wh-sibling b { display: block; font-size: 15px; }
.wh-sibling small { display: block; color: var(--text-secondary); font-size: 13px; }

/* The studio badge: poppy glyph + "A Tall Poppy Studio app", in WikiHunt's colours. */
.wh-footer a.wh-tallpoppy { display: inline-flex; align-items: center; gap: 8px; color: var(--text); font-size: 13px; font-weight: 600; }
.wh-tallpoppy svg { width: 18px; height: 18px; color: var(--orange); }
.wh-poppy-eye { fill: var(--bg); }

/* Desktop-only QR next to App Store buttons: phones tap the badge instead. */
.wh-qr { display: none; margin: 0; align-items: center; gap: 10px; text-align: left; font-size: 12px; line-height: 1.3; color: var(--text-secondary); }
.wh-qr img { width: 84px; height: 84px; border-radius: 8px; background: #fff; padding: 4px; box-sizing: border-box; }
@media (min-width: 1024px) and (hover: hover) and (pointer: fine) { .wh-qr { display: inline-flex; vertical-align: middle; } }
@media (max-width: 860px) {
    .wh-footer-grid { grid-template-columns: 1fr 1fr; }
    .wh-footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
    .wh-footer { padding: 40px 16px 32px; }
}

/* A page's own legal line (trademark notice, data caveat), above the footer. */
.wh-page-note {
    max-width: 880px;
    margin: 40px auto 0;
    padding: 0 24px;
    text-align: center;
    color: var(--text-secondary);
    font-size: 13px;
}

/* "More guides", at the end of each guide. */
.wh-guides { max-width: 880px; margin: 64px auto; padding: 0 24px; font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', Roboto, sans-serif; }
.wh-guides h2 { font-size: 22px; font-weight: 800; letter-spacing: -0.02em; margin: 0 0 16px; color: var(--text); }
.wh-guides-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; }
.wh-guides-grid a {
    display: block; padding: 16px; border-radius: 12px; background: var(--bg-card); border: 1px solid var(--border);
    color: var(--text); text-decoration: none; font-weight: 700; font-size: 15px; transition: border-color 0.2s;
}
.wh-guides-grid a small { display: block; margin-top: 4px; color: var(--text-secondary); font-weight: 400; font-size: 13px; }
.wh-guides-grid a:hover { border-color: var(--orange); }
@media (max-width: 640px) { .wh-guides { padding: 0 16px; margin: 48px auto; } }

/* Display type for page headings (light, earthy reskin 2026-10). */
main h1, main h2 { font-family: var(--wh-display); font-weight: 700; letter-spacing: 0; }

/* Gentle scroll reveal. Never fully transparent, and off for reduced motion. */
@media (prefers-reduced-motion: no-preference) {
    @supports (animation-timeline: view()) {
        .wh-reveal { animation: wh-rise linear both; animation-timeline: view(); animation-range: entry 0% entry 40%; }
    }
}
@keyframes wh-rise { from { opacity: .35; transform: translateY(16px); } to { opacity: 1; transform: none; } }
