/* VibecodingGPT.ai — archive site styles.
   Tokens, type and shared components follow the LLMadvisor stylesheet
   (llmadvisor.ai, Static/exec.css) so both sites read as one brand.
   Only what the three pages here use is included. */

:root {
    --ink: #071b1f;          /* darkest teal, header + footer */
    --teal: #0c3a42;         /* brand teal */
    --bone: #efe9dc;
    --paper: #f7f4ed;        /* page background */
    --tint: #efebe1;
    --card: #ffffff;
    --line: #ddd6c6;
    --text: #15272b;
    --muted: #54666a;
    --accent: #8f552b;       /* copper on light */
    --accent-on-dark: #d8b38a;
    --on-dark: #e9e4d8;
    --on-dark-muted: #a9bcbd;
    --line-on-dark: rgba(239, 233, 220, 0.16);

    --serif: "Source Serif 4", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
    --sans: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

    --wrap: 1120px;
    --gutter: clamp(20px, 5vw, 48px);
    --section-y: clamp(64px, 9vw, 120px);
    --radius: 6px;
    --header-h: 68px;
}

@font-face { font-family: "Inter"; font-style: normal; font-weight: 100 900; font-display: swap; src: url("/static/fonts/inter-latin.woff2") format("woff2"); }
@font-face { font-family: "Source Serif 4"; font-style: normal; font-weight: 200 900; font-display: swap; src: url("/static/fonts/source-serif-4-latin.woff2") format("woff2"); }

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    min-height: 100vh; min-height: 100svh;
    display: flex; flex-direction: column;
    background: var(--paper);
    color: var(--text);
    font-family: var(--sans);
    font-size: 17px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}
main { flex: 1 0 auto; }

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

h1, h2 {
    font-family: var(--serif);
    font-weight: 400;
    line-height: 1.12;
    letter-spacing: -0.012em;
    margin: 0;
    text-wrap: balance;
}
h1 { font-size: clamp(2.35rem, 5.6vw, 4.25rem); }
h2 { font-size: clamp(1.8rem, 3.4vw, 2.7rem); }

p { margin: 0; }
a { color: inherit; }

:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
    border-radius: 2px;
}
.site-header :focus-visible,
.handoff :focus-visible,
.site-footer :focus-visible { outline-color: var(--accent-on-dark); }

.wrap {
    width: 100%;
    max-width: calc(var(--wrap) + 2 * var(--gutter));
    margin: 0 auto;
    padding-left: max(var(--gutter), env(safe-area-inset-left, 0px));
    padding-right: max(var(--gutter), env(safe-area-inset-right, 0px));
}

.skip-link {
    position: absolute; left: 12px; top: -60px; z-index: 200;
    background: var(--bone); color: var(--ink);
    padding: 10px 16px; border-radius: var(--radius); font-weight: 600; text-decoration: none;
}
.skip-link:focus { top: 12px; }

.eyebrow {
    font-size: 0.76rem;
    font-weight: 600;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 18px;
}

/* ── Buttons ──────────────────────────────────────────────────────────── */
.btn {
    display: inline-flex; align-items: center; justify-content: center;
    min-height: 48px; padding: 0 24px;
    font: 600 0.95rem/1 var(--sans);
    letter-spacing: 0.01em;
    text-decoration: none; white-space: nowrap;
    border: 1px solid transparent; border-radius: var(--radius);
    transition: background-color 0.18s ease, border-color 0.18s ease;
}
.btn-small { min-height: 38px; padding: 0 16px; font-size: 0.86rem; }
.btn-light { background: var(--bone); color: var(--ink); }
.btn-light:hover { background: #ffffff; }
.btn-dark { background: var(--teal); color: var(--bone); }
.btn-dark:hover { background: #124a53; }
.btn-outline { background: transparent; color: var(--text); border-color: #bfb7a4; }
.btn-outline:hover { border-color: var(--teal); background: rgba(12, 58, 66, 0.05); }

/* ── Header ───────────────────────────────────────────────────────────── */
.site-header {
    background: var(--ink);
    border-bottom: 1px solid var(--line-on-dark);
    color: var(--on-dark);
}
.header-inner {
    display: flex; align-items: center; justify-content: space-between; gap: 16px;
    min-height: var(--header-h);
}
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; }
.brand picture, .brand img { flex: none; }
.brand img { width: 48px; }
.header-inner .btn { flex: none; }
.brand-name { font-family: var(--serif); font-size: 1.3rem; letter-spacing: -0.01em; color: var(--bone); }
/* Phones: tighten the brand so it clears the button. On the narrowest, show the mark alone
   (the link keeps its aria-label). */
@media (max-width: 399px) {
    .brand { gap: 10px; }
    .brand img { width: 40px; }
    .brand-name { font-size: 1.15rem; }
}
@media (max-width: 359px) { .brand-name { display: none; } }

/* ── Intro ────────────────────────────────────────────────────────────── */
.archive { padding: clamp(48px, 7vw, 88px) 0 var(--section-y); }
.intro h1 { max-width: 15ch; }
.lede { max-width: 60ch; margin-top: 26px; font-size: clamp(1.05rem, 1.5vw, 1.22rem); color: var(--muted); }

/* ── The original artwork, framed like a plate ────────────────────────── */
.plate {
    margin: clamp(36px, 5vw, 60px) 0 0;
    padding: clamp(8px, 1.2vw, 14px);
    background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
}
.plate > img { width: 100%; border-radius: 3px; }
.plate figcaption {
    display: flex; align-items: center; gap: 12px;
    padding: clamp(10px, 1.4vw, 14px) 4px 2px;
    font-size: 0.82rem; line-height: 1.5; color: var(--muted);
}
.plate figcaption img { flex: none; width: 32px; border-radius: var(--radius); }

/* ── Three short parts ────────────────────────────────────────────────── */
.story {
    display: grid; grid-template-columns: repeat(3, 1fr); column-gap: clamp(24px, 4vw, 56px);
    margin-top: clamp(40px, 6vw, 72px);
    border-top: 1px solid var(--text);
}
.story section { padding-top: 24px; }
.story .num { display: block; margin-bottom: 14px; font-family: var(--serif); font-size: 1rem; color: var(--accent); }
.story h2 { font-size: clamp(1.4rem, 2.2vw, 1.7rem); line-height: 1.2; margin-bottom: 12px; }
.story p { font-size: 0.98rem; line-height: 1.65; color: var(--muted); }

@media (max-width: 820px) {
    .story { grid-template-columns: 1fr; }
    .story section + section { margin-top: 28px; border-top: 1px solid var(--line); }
}

/* ── Hand-off to LLMadvisor (dark, with its particle terrain behind) ──── */
.handoff {
    position: relative; overflow: hidden; isolation: isolate;
    display: flex; align-items: center;
    min-height: clamp(330px, 45vh, 450px);
    padding: clamp(54px, 7vw, 84px) 0;
    background: linear-gradient(180deg, var(--ink) 0%, #082328 55%, #0a2f36 100%); color: var(--on-dark);
}
/* Drawn by site.js. Sits behind the copy; without JS it is simply empty. */
.field { position: absolute; inset: 0; z-index: -1; width: 100%; height: 100%; pointer-events: none; }
.handoff-inner { display: grid; grid-template-columns: 1fr auto; gap: 32px clamp(32px, 6vw, 80px); align-items: center; }
.handoff h2 { max-width: 20ch; color: #ffffff; }
.handoff p { max-width: 44ch; margin-top: 18px; font-size: 1.08rem; }

.motion-toggle {
    position: absolute; right: max(var(--gutter), env(safe-area-inset-right, 0px)); bottom: 16px;
    min-height: 32px; padding: 0 12px;
    font: 500 0.78rem/1 var(--sans); color: var(--on-dark-muted);
    background: rgba(7, 27, 31, 0.8); border: 1px solid var(--line-on-dark); border-radius: var(--radius);
    cursor: pointer;
    transition: color 0.18s ease, border-color 0.18s ease;
}
.motion-toggle[hidden] { display: none; }
.motion-toggle:hover { color: var(--bone); border-color: rgba(239, 233, 220, 0.45); }

/* The LLMadvisor mark is the button. */
.mark-button {
    display: inline-flex; align-items: center; gap: 20px;
    padding: 18px 30px 18px 22px;
    text-decoration: none;
    background: rgba(7, 27, 31, 0.86);   /* near-solid so the label stays readable over the terrain */
    border: 1px solid rgba(239, 233, 220, 0.45); border-radius: var(--radius);
    transition: background-color 0.18s ease, border-color 0.18s ease;
}
.mark-button:hover { border-color: var(--bone); background: var(--teal); }
.mark-button picture { flex: none; }
.mark-button img { width: 104px; }
.mark-button-kicker {
    display: block; margin-bottom: 6px;
    font-size: 0.72rem; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase;
    color: var(--accent-on-dark);
}
.mark-button-label {
    display: block;
    font-family: var(--serif); font-size: clamp(1.35rem, 2.2vw, 1.7rem); line-height: 1.15; letter-spacing: -0.01em;
    color: #ffffff; white-space: nowrap;
}

@media (max-width: 820px) {
    .handoff-inner { grid-template-columns: 1fr; }
    .mark-button { justify-self: start; }
}
@media (max-width: 440px) {
    .mark-button { width: 100%; gap: 16px; padding: 16px 18px; }
    .mark-button img { width: 76px; }
    .mark-button-label { white-space: normal; }
}

/* ── Footer ───────────────────────────────────────────────────────────── */
.site-footer { background: var(--ink); color: var(--on-dark-muted); font-size: 0.86rem; }
.footer-inner {
    display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 28px;
    padding-top: 28px; padding-bottom: calc(28px + env(safe-area-inset-bottom, 0px));
}
.site-footer nav { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.site-footer a { text-decoration: none; }
.site-footer a:hover { color: var(--bone); }

/* ── Document pages (disclaimer, 404) ─────────────────────────────────── */
.doc-hero { border-bottom: 1px solid var(--line); padding: clamp(48px, 7vw, 88px) 0 clamp(36px, 5vw, 56px); }
.doc-hero h1 { font-size: clamp(2.1rem, 4.6vw, 3.4rem); max-width: 18ch; }
.doc-hero p:not(.eyebrow) { margin-top: 20px; max-width: 62ch; font-size: 1.08rem; color: var(--muted); }
.doc-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 38px; }
.notfound { border-bottom: 0; }

.doc-body { padding: clamp(36px, 5vw, 64px) 0 var(--section-y); }
.doc-body > .wrap { max-width: calc(820px + 2 * var(--gutter)); }

.doc-meta {
    display: grid; grid-template-columns: 130px 1fr; gap: 8px 20px; margin: 0 0 36px;
    padding: 20px 24px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
    font-size: 0.93rem;
}
.doc-meta dt { font-size: 0.72rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); padding-top: 3px; }
.doc-meta dd { margin: 0; }

.toc { margin-bottom: 48px; padding-bottom: 32px; border-bottom: 1px solid var(--text); }
.toc-label { font-size: 0.76rem; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: var(--accent); margin-bottom: 14px; }
.toc ol { margin: 0; padding-left: 1.4em; columns: 2; column-gap: 40px; font-size: 0.95rem; }
.toc li { padding: 4px 0; break-inside: avoid; }
.toc a { text-decoration: none; }
.toc a:hover { text-decoration: underline; text-underline-offset: 4px; }

.doc-section { padding: 36px 0; border-top: 1px solid var(--line); }
.doc-section:first-of-type { border-top: 0; padding-top: 0; }
.section-header { display: flex; align-items: baseline; gap: 14px; margin-bottom: 16px; }
.section-num { flex: none; font-family: var(--serif); font-size: 1rem; color: var(--accent); }
.doc-section h2 { font-size: clamp(1.4rem, 2.4vw, 1.75rem); }
.doc-section p, .doc-section li { font-size: 0.98rem; line-height: 1.7; }
.doc-section p + p, .doc-section ul + p { margin-top: 14px; }
.doc-section ul { margin: 14px 0 0; padding-left: 1.3em; }
.section-header + ul { margin-top: 0; }
.doc-section li + li { margin-top: 8px; }
.doc-section a { text-decoration: underline; text-decoration-color: #bfb7a4; text-underline-offset: 4px; }
.doc-section a:hover { text-decoration-color: var(--teal); }

@media (max-width: 640px) {
    .toc ol { columns: 1; }
    .doc-meta { grid-template-columns: 1fr; gap: 2px; }
    .doc-meta dd { margin-bottom: 10px; }
    .doc-actions .btn { flex: 1 1 100%; }
}

/* ── Touch screens: keep every control at least 44px tall ─────────────── */
@media (pointer: coarse) {
    .btn-small, .motion-toggle { min-height: 44px; }
    .brand { min-height: 44px; }
    .site-footer a { display: inline-block; padding: 11px 0; }
}

@media (prefers-reduced-motion: reduce) {
    * { transition-duration: 0.01ms !important; }
}
