/* ============================================================
   Qualia: information page (qualia.qphilosophy.com)
   Shares the book site's palette and typeface; see
   Web Root/book-website/css/style.css for the reasoning behind
   the Palatino/Pagella setup. Self-contained: this vhost serves
   only its own files.
   ============================================================ */

/* Palatino where installed (0 bytes down), else self-hosted TeX Gyre
   Pagella. Never preload these: preload bypasses local(). */
@font-face {
    font-family: 'Pagella'; font-style: normal; font-weight: 400; font-display: swap;
    src: local('Palatino Linotype'), local('PalatinoLinotype-Roman'), local('Palatino'),
         local('Palatino-Roman'), local('Book Antiqua'), local('URW Palladio L'),
         url('../fonts/pagella-regular.woff2') format('woff2');
}
@font-face {
    font-family: 'Pagella'; font-style: italic; font-weight: 400; font-display: swap;
    src: local('Palatino Linotype Italic'), local('PalatinoLinotype-Italic'), local('Palatino Italic'),
         local('Palatino-Italic'), local('Book Antiqua Italic'),
         url('../fonts/pagella-italic.woff2') format('woff2');
}
@font-face {
    font-family: 'Pagella'; font-style: normal; font-weight: 700; font-display: swap;
    src: local('Palatino Linotype Bold'), local('PalatinoLinotype-Bold'), local('Palatino Bold'),
         local('Palatino-Bold'), local('Book Antiqua Bold'),
         url('../fonts/pagella-bold.woff2') format('woff2');
}
@font-face {
    font-family: 'Pagella'; font-style: italic; font-weight: 700; font-display: swap;
    src: local('Palatino Linotype Bold Italic'), local('PalatinoLinotype-BoldItalic'),
         local('Palatino Bold Italic'), local('Palatino-BoldItalic'), local('Book Antiqua Bold Italic'),
         url('../fonts/pagella-bolditalic.woff2') format('woff2');
}

:root {
    --navy-900: #0b1526;
    --navy-800: #10203a;
    --navy-700: #1a2d4d;
    --navy-600: #24406b;
    --blue-400: #5a9fd4;
    --blue-300: #7fb8e3;
    --blue-200: #a8d0ee;
    --blue-ink: #2f6fa3;     /* accent text on light ground (4.5:1+) */
    --paper:    #f7f8fa;
    --paper-2:  #eef1f6;
    --white:    #ffffff;
    --ink:        #1c2635;
    --ink-muted:  #55637a;
    --line:       #d5dce7;
    --on-dark:        #eaf0f8;
    --on-dark-muted:  rgba(234, 240, 248, 0.74);

    --font-book: 'Pagella', 'Palatino Linotype', Palatino, 'Book Antiqua',
                 'URW Palladio L', Georgia, 'Times New Roman', serif;
    --space-section: clamp(3.5rem, 8vw, 6.5rem);
    --radius: 4px;
    --radius-lg: 8px;
    --shadow-card: 0 1px 2px rgba(16, 32, 58, 0.05), 0 8px 24px -12px rgba(16, 32, 58, 0.18);
}

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

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

body {
    margin: 0;
    font-family: var(--font-book);
    font-size: clamp(1.08rem, 1.04rem + 0.22vw, 1.15rem);
    line-height: 1.62;
    color: var(--ink);
    background-color: var(--paper);
    -webkit-font-smoothing: antialiased;
}

img, svg { max-width: 100%; }
a { color: var(--blue-ink); text-underline-offset: 0.15em; }
a:hover { color: var(--navy-700); }
:focus-visible { outline: 2px solid var(--blue-400); outline-offset: 3px; }

h1, h2, h3 { font-weight: 700; line-height: 1.2; color: var(--navy-700); }
h2 { font-size: clamp(1.7rem, 1.3rem + 1.6vw, 2.4rem); margin-block: 0 1rem; }
h3 { font-size: 1.15rem; margin-block: 0 0.5rem; }
p  { margin-block: 0 1rem; }

.skip-link {
    position: absolute; left: 1rem; top: -3rem; z-index: 10;
    background: var(--white); color: var(--navy-700); padding: 0.5rem 1rem; border-radius: var(--radius);
}
.skip-link:focus { top: 1rem; }

.container { width: 100%; max-width: 1080px; margin-inline: auto; padding-inline: 16px; }
@media (min-width: 640px) { .container { padding-inline: 2rem; } }
.narrow { max-width: 760px; margin-inline: auto; }
.container.narrow { max-width: calc(760px + 4rem); }

section { padding-block: var(--space-section); position: relative; }
.tinted { background: var(--paper-2); }

.kicker {
    font-size: 0.78rem; letter-spacing: 0.16em; text-transform: uppercase;
    color: var(--blue-ink); margin-bottom: 0.6rem;
}

/* ---------- Starfield (same motif as the book site) ---------- */
.starfield {
    position: absolute; inset: 0; pointer-events: none;
    background-image:
        radial-gradient(1.5px 1.5px at 12% 22%, rgba(255,255,255,0.75), transparent),
        radial-gradient(1px 1px   at 28% 68%, rgba(255,255,255,0.55), transparent),
        radial-gradient(1.5px 1.5px at 45% 15%, rgba(168,208,238,0.7), transparent),
        radial-gradient(1px 1px   at 62% 48%, rgba(255,255,255,0.5),  transparent),
        radial-gradient(2px 2px   at 78% 28%, rgba(255,255,255,0.65), transparent),
        radial-gradient(1px 1px   at 88% 72%, rgba(168,208,238,0.6),  transparent),
        radial-gradient(1px 1px   at 35% 88%, rgba(255,255,255,0.45), transparent),
        radial-gradient(1.5px 1.5px at 70% 82%, rgba(255,255,255,0.5), transparent),
        radial-gradient(1px 1px   at 8%  52%, rgba(255,255,255,0.4),  transparent),
        radial-gradient(1px 1px   at 92% 12%, rgba(255,255,255,0.5),  transparent);
}
.starfield-dim { opacity: 0.5; }

/* ---------- Hero ---------- */
.hero {
    position: relative; overflow: hidden;
    background: radial-gradient(ellipse at 70% 20%, var(--navy-600), var(--navy-800) 55%, var(--navy-900));
    color: var(--on-dark);
    /* Sized to its content (no cover image here): was ~573px tall. */
    padding-block: 1.25rem clamp(2.25rem, 5vw, 3.5rem);
}
.hero-inner { position: relative; }
.brand {
    display: inline-flex; align-items: center; gap: 0.6rem;
    color: inherit; text-decoration: none; font-size: 0.95rem;
}
.hero .brand { color: var(--on-dark-muted); margin-bottom: clamp(1.75rem, 4.5vw, 3rem); }
.hero .brand:hover { color: var(--white); }
.logo-mark { width: calc(1.9rem * 211.95 / 247.21); height: 1.9rem; flex: none; }
.eyebrow {
    font-size: 0.8rem; letter-spacing: 0.18em; text-transform: uppercase;
    color: var(--blue-200); margin-bottom: 0.5rem;
}
.hero h1 {
    color: var(--white); margin: 0 0 0.6rem;
    font-size: clamp(2.75rem, 1.9rem + 3.8vw, 4.5rem); letter-spacing: 0.01em; font-weight: 400;
}
.lede {
    font-size: clamp(1.25rem, 1.05rem + 0.9vw, 1.7rem); font-style: italic;
    color: var(--on-dark); max-width: none; margin-bottom: 1.4rem;
}
.status-pill {
    display: inline-flex; align-items: center; gap: 0.55rem; margin: 0;
    padding: 0.4rem 0.95rem; border: 1px solid rgba(168, 208, 238, 0.4); border-radius: 999px;
    font-size: 0.85rem; letter-spacing: 0.04em; color: var(--blue-200);
}
.status-pill .dot { width: 0.5rem; height: 0.5rem; border-radius: 50%; background: var(--blue-300); }

/* ---------- Notice ---------- */
.notice { padding-block: clamp(2.5rem, 6vw, 4rem); background: var(--white); border-bottom: 1px solid var(--line); }
.notice h2 { font-size: clamp(1.35rem, 1.15rem + 0.8vw, 1.7rem); }
.notice p:last-child { margin-bottom: 0; }

.pull {
    margin-block: 2rem 0; padding: 1.25rem 1.5rem;
    border-left: 3px solid var(--blue-400); background: var(--white); border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
    box-shadow: var(--shadow-card);
}
.pull p { margin: 0; }

/* ---------- Diagram ---------- */
/* Two arrangements of one diagram: the wide one would shrink its labels
   past legibility on a phone, so narrow screens get the portrait one. */
.diagram { margin: 2.5rem auto; max-width: 760px; }
.diagram svg { display: block; width: 100%; height: auto; font-family: var(--font-book); }
.diagram .dg-tall { display: none; max-width: 420px; margin-inline: auto; }
@media (max-width: 600px) {
    .diagram .dg-wide { display: none; }
    .diagram .dg-tall { display: block; }
}
.dg-interior { fill: rgba(90, 159, 212, 0.07); stroke: var(--blue-400); stroke-width: 1.5; stroke-dasharray: 6 5; }
.dg-world    { fill: var(--white); stroke: var(--line); stroke-width: 1.5; }
.dg-central  { fill: var(--navy-700); }
.dg-inner    { fill: var(--white); stroke: var(--blue-400); stroke-width: 2; }
.dg-memory   { fill: var(--white); stroke: var(--navy-600); stroke-width: 1.5; }
.dg-line     { stroke: var(--navy-600); stroke-width: 1.6; fill: none; }
.dg-faint    { stroke: var(--blue-400); stroke-dasharray: 4 4; }
.dg-arrowhead { fill: var(--navy-600); }
.dg-label    { font-size: 19px; font-weight: 700; fill: var(--navy-700); }
.dg-sub      { font-size: 14px; fill: var(--ink-muted); }
.dg-label-on { font-size: 20px; font-weight: 700; fill: var(--white); }
.dg-sub-on   { font-size: 14px; fill: var(--blue-200); }
.dg-note     { font-size: 13px; font-style: italic; fill: var(--blue-ink); }

/* ---------- Cards ---------- */
.agents { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); margin-bottom: 3rem; }
.card {
    background: var(--white); border-radius: var(--radius-lg); padding: 1.5rem;
    box-shadow: var(--shadow-card); border-top: 3px solid var(--blue-400);
}
.agents .card:first-child { border-top-color: var(--navy-700); }
.card p:last-child { margin-bottom: 0; }
.role { font-style: italic; color: var(--blue-ink); margin-bottom: 0.75rem; }

.principles { display: grid; gap: 2rem 3rem; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.principles p:last-child, .principles ol { margin-bottom: 0; }
.principles ol { padding-left: 1.3rem; }
.principles li + li { margin-top: 0.35rem; }

/* ---------- Mapping table ---------- */
.table-wrap { overflow-x: auto; margin-top: 1.75rem; }
.mapping { width: 100%; border-collapse: collapse; font-size: 0.98rem; }
.mapping th {
    text-align: left; font-size: 0.78rem; letter-spacing: 0.12em; text-transform: uppercase;
    color: var(--ink-muted); font-weight: 400; padding: 0 1rem 0.6rem 0; border-bottom: 2px solid var(--navy-700);
}
.mapping td { vertical-align: top; padding: 0.85rem 1rem 0.85rem 0; border-bottom: 1px solid var(--line); }
.mapping td:first-child { width: 46%; font-style: italic; color: var(--ink-muted); }

/* ---------- Facts ---------- */
.facts { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); margin: 1.75rem 0; }
.facts div { background: var(--white); border-radius: var(--radius-lg); padding: 1.1rem 1.2rem; box-shadow: var(--shadow-card); }
.facts dt { font-size: 1.45rem; font-weight: 700; color: var(--navy-700); line-height: 1.2; }
.facts dd { margin: 0.3rem 0 0; font-size: 0.95rem; color: var(--ink-muted); line-height: 1.45; }

/* ---------- Progress ---------- */
.dateline { font-style: italic; color: var(--blue-ink); margin-top: -0.5rem; }
.progress { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); margin-top: 2rem; }
.progress > .card:last-child { grid-column: 1 / -1; }
.progress-update { margin-top: 3.5rem; }
.progress.three > .card:last-child { grid-column: auto; }

/* ---------- Road ahead ---------- */
.split { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); margin: 1.75rem 0 2rem; }
.ticks { list-style: none; padding: 0; margin: 0; }
.ticks li { position: relative; padding-left: 1.6rem; margin-bottom: 0.7rem; }
.ticks li::before {
    content: ''; position: absolute; left: 0.2rem; top: 0.6em;
    width: 0.5rem; height: 0.5rem; border-radius: 50%; border: 2px solid var(--blue-400);
}

/* ---------- Quantum ---------- */
.quantum {
    background: radial-gradient(ellipse at 30% 0%, var(--navy-600), var(--navy-800) 60%, var(--navy-900));
    color: var(--on-dark); overflow: hidden;
}
.quantum .container { position: relative; }
.quantum h2, .quantum h3 { color: var(--white); }
.quantum .kicker { color: var(--blue-200); }
.quantum-points { display: grid; gap: 1.25rem; margin: 1.75rem 0 2rem; }
.quantum-points > div {
    padding: 1.25rem 1.5rem; border: 1px solid rgba(168, 208, 238, 0.25); border-radius: var(--radius-lg);
    background: rgba(255, 255, 255, 0.04);
}
.quantum-points p { margin: 0; color: var(--on-dark-muted); }
.quantum .candid {
    margin: 2rem 0 0; padding-top: 1.5rem; border-top: 1px solid rgba(168, 208, 238, 0.25);
    color: var(--on-dark-muted); font-style: italic;
}

/* ---------- Caveat ---------- */
.small-heading { font-size: 1.15rem; }
.quiet { color: var(--ink-muted); margin: 0; }

/* ---------- Footer ---------- */
.footer { background: var(--navy-900); color: var(--on-dark-muted); padding-block: 2.5rem; font-size: 0.95rem; }
.footer-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.25rem 2rem; }
.footer .brand { color: var(--on-dark); }
.footer-title { display: block; font-weight: 700; color: var(--white); }
.footer-sub { display: block; font-size: 0.85rem; }
.footer-links { display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; }
.footer-links a { color: var(--blue-200); text-decoration: none; }
.footer-links a:hover { color: var(--white); text-decoration: underline; }
.copyright { margin: 0; width: 100%; font-size: 0.85rem; }

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
