/* ============================================================================
 * SlowBooks Pro — Components
 *
 * Aesthetic: "Decompiled Luxury" — the engineering-artifact nature of the
 * product rendered with editorial precision. Technical stamps, graph-paper
 * substrates, registration marks, pixel-precise retro chrome, all living
 * inside modern editorial layouts with real typographic hierarchy.
 * ============================================================================ */

/* ============================================================================
 * NAV — slim, chrome-gradient, build-ticker in the corner
 * ============================================================================ */

.site-nav {
    position: sticky;
    top: 0;
    z-index: 100;
    height: var(--nav-height);
    background:
        linear-gradient(180deg, rgba(232, 237, 242, 0.92), rgba(200, 208, 220, 0.88));
    backdrop-filter: saturate(180%) blur(12px);
    -webkit-backdrop-filter: saturate(180%) blur(12px);
    border-bottom: 1px solid var(--toolbar-border);
    transition: box-shadow var(--dur-med) var(--ease-out);
}

.site-nav.is-scrolled {
    box-shadow: 0 1px 12px rgba(0, 34, 68, 0.12);
}

.site-nav > .container {
    height: 100%;
    display: flex;
    align-items: center;
    gap: var(--sp-6);
}

.site-nav__brand {
    display: flex;
    align-items: baseline;
    gap: var(--sp-2);
    font-weight: 800;
    font-size: var(--text-base);
    color: var(--qb-navy);
    letter-spacing: -0.025em;
    font-feature-settings: "ss01";
    position: relative;
}
.site-nav__brand::before {
    /* tiny bookmark/tab square in the QB navy */
    content: "";
    width: 10px;
    height: 10px;
    background: var(--qb-navy);
    margin-right: var(--sp-2);
    border-radius: 2px;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.25);
    transform: translateY(-1px);
}

.site-nav__brand--edition {
    font-family: var(--font-mono);
    font-size: var(--text-2xs);
    color: var(--text-muted);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.site-nav__links {
    display: flex;
    gap: var(--sp-5);
    list-style: none;
    margin-left: auto;
    align-items: center;
}

.site-nav__link {
    color: var(--text-secondary);
    font-size: var(--text-sm);
    font-weight: 500;
    position: relative;
    padding: 0.25rem 0;
    transition: color var(--dur-fast) var(--ease-out);
}
.site-nav__link::after {
    content: "";
    position: absolute;
    left: 0; right: 0; bottom: -4px;
    height: 2px;
    background: var(--qb-gold);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform var(--dur-med) var(--ease-out);
}
.site-nav__link:hover { color: var(--qb-navy); }
.site-nav__link:hover::after { transform: scaleX(1); }

.site-nav__meta {
    font-family: var(--font-mono);
    font-size: var(--text-2xs);
    color: var(--text-muted);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    white-space: nowrap;
}

@media (max-width: 760px) {
    .site-nav__links li:not(:last-child) { display: none; }
    .site-nav__meta { display: none; }
}

/* ============================================================================
 * BUTTONS — modern + retro variants
 * ============================================================================ */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--sp-2);
    padding: 0.85rem 1.5rem;
    font-family: var(--font-modern);
    font-size: var(--text-sm);
    font-weight: 600;
    line-height: 1;
    text-decoration: none;
    border-radius: var(--radius-md);
    border: 1px solid transparent;
    cursor: pointer;
    transition: transform var(--dur-fast) var(--ease-out),
                box-shadow var(--dur-fast) var(--ease-out),
                background var(--dur-fast) var(--ease-out);
    white-space: nowrap;
    letter-spacing: -0.005em;
}

.btn--primary {
    background: var(--qb-navy);
    color: white;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.2),
        0 1px 2px rgba(0, 30, 60, 0.2);
}
.btn--primary:hover {
    background: var(--qb-navy-mid);
    color: white;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.25),
        0 6px 18px rgba(0, 30, 60, 0.22);
    transform: translateY(-1px);
}
.btn--primary:active { transform: translateY(0); }

.btn--primary .btn__arrow {
    display: inline-block;
    transition: transform var(--dur-fast) var(--ease-out);
}
.btn--primary:hover .btn__arrow { transform: translateX(3px); }

.btn--ghost {
    background: transparent;
    color: var(--qb-navy);
    border-color: rgba(0, 51, 102, 0.22);
}
.btn--ghost:hover {
    background: rgba(0, 51, 102, 0.04);
    border-color: var(--qb-navy);
    color: var(--qb-navy);
}

.btn--retro {
    padding: 0.5rem 1.25rem;
    font-family: var(--font-retro);
    font-size: var(--text-sm);
    background: linear-gradient(180deg, var(--toolbar-top) 0%, var(--toolbar-bottom) 100%);
    color: var(--text-primary);
    border: 1px solid var(--toolbar-border);
    border-radius: var(--radius-sm);
    box-shadow: var(--bevel-up);
}
.btn--retro:hover { background: linear-gradient(180deg, #f0f4f9 0%, #d0d8e4 100%); }
.btn--retro:active { box-shadow: var(--bevel-down); transform: translateY(0); }

/* ============================================================================
 * HERO — the whole show
 * Asymmetric layout, letterpress-weight headline, blueprint substrate,
 * retro window polaroid-rotated, registration marks at corners, stamps
 * arranged like postal cancellations.
 * ============================================================================ */

.hero {
    padding: calc(var(--nav-height) + var(--sp-10)) 0 var(--sp-12);
    background:
        radial-gradient(900px 560px at 85% 5%, rgba(91, 155, 213, 0.20) 0%, transparent 55%),
        radial-gradient(800px 500px at 0% 100%, rgba(51, 153, 102, 0.10) 0%, transparent 60%),
        var(--pattern-graph),
        var(--qb-cream);
    overflow: hidden;
    position: relative;
}

.hero::before {
    /* fine cross-hatch over the cream — adds depth without noise */
    content: "";
    position: absolute;
    inset: 0;
    background: var(--pattern-cross);
    opacity: 0.7;
    pointer-events: none;
}

.hero::after {
    /* bottom edge fade into content-bg */
    content: "";
    position: absolute;
    left: 0; right: 0; bottom: 0;
    height: 12rem;
    background: linear-gradient(180deg, transparent, var(--content-bg));
    pointer-events: none;
}

.hero .container {
    position: relative;
    display: grid;
    grid-template-columns: 1.05fr 1fr;
    gap: var(--sp-10);
    align-items: center;
    z-index: 1;
}

.hero__meta {
    display: flex;
    align-items: center;
    gap: var(--sp-3);
    font-family: var(--font-mono);
    font-size: var(--text-2xs);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--qb-navy-mid);
    margin-bottom: var(--sp-6);
    opacity: 0;
    animation: fade-up var(--dur-slow) var(--ease-out) 0.05s forwards;
}

.hero__meta-dot {
    width: 6px; height: 6px;
    background: var(--qb-green);
    border-radius: 50%;
    box-shadow: 0 0 0 3px rgba(51, 153, 102, 0.2);
    animation: pulse 2.4s ease-in-out infinite;
}

.hero__headline {
    font-size: clamp(2.75rem, 7vw, var(--text-6xl));
    font-weight: 900;
    line-height: 0.96;
    letter-spacing: -0.038em;
    color: var(--ink);
    margin-bottom: var(--sp-5);
}

.hero__headline-line {
    display: block;
    opacity: 0;
    transform: translateY(20px);
    animation: fade-up var(--dur-slow) var(--ease-out) forwards;
}
.hero__headline-line:nth-child(1) { animation-delay: 0.15s; }
.hero__headline-line:nth-child(2) { animation-delay: 0.28s; }
.hero__headline-line:nth-child(3) { animation-delay: 0.41s; }

.hero__headline-accent {
    color: var(--qb-navy);
    position: relative;
    display: inline-block;
}
.hero__headline-accent::after {
    /* gold underline in hand-drawn style */
    content: "";
    position: absolute;
    left: -2px; right: -2px; bottom: -0.15em;
    height: 6px;
    background: var(--qb-gold);
    transform: skewX(-10deg) scaleX(0);
    transform-origin: left;
    animation: underline-grow 0.7s var(--ease-out) 0.85s forwards;
    opacity: 0.7;
    border-radius: 3px;
}

.hero__sub {
    font-size: var(--text-xl);
    color: var(--text-secondary);
    line-height: 1.5;
    max-width: 36rem;
    margin-bottom: var(--sp-8);
    opacity: 0;
    animation: fade-up var(--dur-slow) var(--ease-out) 0.55s forwards;
}

.hero__ctas {
    display: flex;
    gap: var(--sp-3);
    flex-wrap: wrap;
    opacity: 0;
    animation: fade-up var(--dur-slow) var(--ease-out) 0.7s forwards;
}

.hero__stamps {
    display: flex;
    gap: var(--sp-3);
    flex-wrap: wrap;
    margin-top: var(--sp-8);
    opacity: 0;
    animation: fade-up var(--dur-slow) var(--ease-out) 0.85s forwards;
}

.hero__showcase {
    position: relative;
    opacity: 0;
    animation: window-enter 0.9s var(--ease-out) 0.4s forwards;
}

.hero__window {
    transform: rotate(1.3deg);
    transition: transform var(--dur-slow) var(--ease-spring);
}
.hero__window:hover { transform: rotate(0deg) scale(1.01); }

/* Registration crosshairs at the corners of the showcase */
.hero__showcase::before,
.hero__showcase::after {
    content: "";
    position: absolute;
    width: 18px; height: 18px;
    background:
        linear-gradient(var(--qb-navy), var(--qb-navy)) center / 100% 1px no-repeat,
        linear-gradient(var(--qb-navy), var(--qb-navy)) center / 1px 100% no-repeat;
    opacity: 0.4;
}
.hero__showcase::before { top: -30px; left: -18px; }
.hero__showcase::after  { bottom: -30px; right: -18px; }

/* Floating specimen tag pinned to the showcase */
.hero__specimen-tag {
    position: absolute;
    top: -22px;
    right: 2%;
    background: var(--qb-navy);
    color: var(--qb-gold-light);
    padding: 0.35rem var(--sp-3);
    font-family: var(--font-mono);
    font-size: var(--text-2xs);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    border-radius: 2px;
    transform: rotate(-3deg);
    box-shadow: 0 4px 12px rgba(0, 34, 68, 0.3);
    z-index: 2;
}

@media (max-width: 900px) {
    .hero .container { grid-template-columns: 1fr; }
    .hero__showcase::before, .hero__showcase::after { display: none; }
}

/* ============================================================================
 * STAMPS — small retro callouts. Used like postal cancellations.
 * ============================================================================ */

.stamp {
    display: inline-flex;
    align-items: center;
    gap: var(--sp-2);
    padding: 0.4rem 0.85rem;
    font-family: var(--font-retro);
    font-size: var(--text-2xs);
    text-transform: uppercase;
    letter-spacing: 0.14em;
    font-weight: 700;
    color: var(--qb-navy);
    background: rgba(255, 253, 240, 0.7);
    border: 1px dashed rgba(204, 153, 51, 0.65);
    border-radius: var(--radius-sm);
    line-height: 1.1;
}

.stamp::before {
    content: "";
    width: 7px; height: 7px;
    background: var(--qb-gold);
    border-radius: 50%;
    flex-shrink: 0;
}

.stamp--muted {
    color: var(--text-muted);
    border-color: rgba(122, 122, 154, 0.4);
}
.stamp--muted::before { background: var(--text-muted); }

.stamp--navy {
    background: var(--qb-navy);
    color: var(--qb-gold-light);
    border-color: var(--qb-gold);
}
.stamp--navy::before { background: var(--qb-gold); }

.stamp--green {
    color: var(--qb-green-dark);
    border-color: rgba(51, 153, 102, 0.55);
}
.stamp--green::before { background: var(--qb-green); }

/* ============================================================================
 * RETRO WINDOW — the star component. Frames every screenshot.
 * ============================================================================ */

.retro-window {
    background: var(--panel-bg);
    border: 1px solid var(--qb-navy-dark);
    border-radius: 4px 4px 3px 3px;
    box-shadow: var(--shadow-hero);
    overflow: hidden;
    position: relative;
}

.retro-window__titlebar {
    height: 30px;
    display: flex;
    align-items: center;
    padding: 0 var(--sp-3);
    background:
        linear-gradient(180deg, #7ba7d6 0%, #4b7bac 50%, #2e5985 51%, #3c6b99 100%);
    color: white;
    font-family: var(--font-retro);
    font-size: var(--text-xs);
    font-weight: 700;
    letter-spacing: 0.02em;
    text-shadow: 0 1px 0 rgba(0, 20, 40, 0.5);
    border-bottom: 1px solid var(--qb-navy-dark);
    gap: var(--sp-2);
}

.retro-window__titlebar-icon {
    width: 14px; height: 14px;
    background: var(--qb-gold);
    border: 1px solid var(--qb-navy-dark);
    border-radius: 2px;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.3);
    flex-shrink: 0;
}

.retro-window__dots {
    margin-left: auto;
    display: flex;
    gap: 3px;
}

.retro-window__dot {
    width: 16px;
    height: 15px;
    border: 1px solid var(--qb-navy-dark);
    background: linear-gradient(180deg, #e0e6ef 0%, #b0b8c4 100%);
    font-family: var(--font-retro);
    font-size: 9px;
    line-height: 11px;
    color: var(--qb-navy);
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 2px;
    box-shadow: var(--bevel-up);
}

.retro-window__body { display: block; position: relative; }
.retro-window__body img {
    display: block;
    width: 100%;
}

/* Optional status bar under the body (looks like the app's) */
.retro-window__statusbar {
    display: flex;
    align-items: center;
    padding: 4px var(--sp-3);
    background: linear-gradient(180deg, var(--toolbar-top), var(--toolbar-bottom));
    border-top: 1px solid var(--toolbar-border);
    font-family: var(--font-retro);
    font-size: var(--text-2xs);
    color: var(--text-muted);
    letter-spacing: 0.06em;
    gap: var(--sp-4);
}
.retro-window__statusbar span::before { content: "◆  "; color: var(--qb-blue-light); }

/* ============================================================================
 * FEATURE / PILLAR CARDS — editorial, numbered, with SVG icons
 * ============================================================================ */

.pillars {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--sp-6);
    margin-top: var(--sp-10);
    counter-reset: pillar;
}

.pillar {
    position: relative;
    background: var(--panel-bg);
    border: 1px solid var(--panel-border);
    border-radius: var(--radius-md);
    padding: var(--sp-6) var(--sp-5) var(--sp-6);
    overflow: hidden;
    transition:
        transform var(--dur-med) var(--ease-out),
        box-shadow var(--dur-med) var(--ease-out),
        border-color var(--dur-med) var(--ease-out);
    counter-increment: pillar;
}

.pillar::before {
    /* numeric serial plate, top-left */
    content: "0" counter(pillar);
    position: absolute;
    top: var(--sp-4);
    right: var(--sp-5);
    font-family: var(--font-mono);
    font-size: var(--text-sm);
    font-weight: 700;
    color: var(--qb-blue-light);
    letter-spacing: 0.04em;
}

.pillar::after {
    /* accent bar that grows on hover */
    content: "";
    position: absolute;
    left: var(--sp-5);
    bottom: -2px;
    height: 3px;
    width: 3rem;
    background: var(--qb-gold);
    transition: width var(--dur-med) var(--ease-out);
}

.pillar:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--qb-blue-light);
}
.pillar:hover::after { width: calc(100% - var(--sp-5) - var(--sp-5)); }

.pillar--local::after  { background: var(--qb-navy); }
.pillar--free::after   { background: var(--qb-green); }
.pillar--own::after    { background: var(--qb-gold); }

.pillar__icon {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--qb-cream);
    border: 1px solid rgba(0, 51, 102, 0.15);
    border-radius: var(--radius-sm);
    margin-bottom: var(--sp-5);
    position: relative;
    box-shadow: inset 0 0 0 3px var(--panel-bg);
}

.pillar__icon svg { width: 30px; height: 30px; }

.pillar__label {
    font-family: var(--font-mono);
    font-size: var(--text-2xs);
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--text-muted);
    margin-bottom: var(--sp-2);
    display: block;
}

.pillar h3 {
    font-size: var(--text-2xl);
    margin-bottom: var(--sp-3);
    letter-spacing: -0.024em;
}

.pillar p {
    font-size: var(--text-base);
    line-height: 1.55;
}

@media (max-width: 900px) {
    .pillars { grid-template-columns: 1fr; }
}

/* ============================================================================
 * SECTION HEADING — shared pattern
 * ============================================================================ */

.section-head {
    max-width: 44rem;
    margin: 0 auto var(--sp-8);
    text-align: center;
}

.section-head h2 {
    margin: var(--sp-3) 0 var(--sp-4);
}

.section-head .eyebrow {
    margin: 0 auto;
}

/* ============================================================================
 * DEMO — stage-dressed screenshot with spec row
 * ============================================================================ */

#demo {
    background:
        linear-gradient(180deg, transparent 0%, rgba(0, 51, 102, 0.035) 100%),
        var(--content-bg);
}

.demo-stage {
    max-width: 1060px;
    margin: 0 auto;
    position: relative;
}

.demo-stage__frame {
    position: relative;
    padding: 0;
}

/* measurement ticks along the left/right edges of the frame */
.demo-stage__ruler {
    position: absolute;
    top: 30px; bottom: 0;
    width: 12px;
    background:
        repeating-linear-gradient(
            to bottom,
            transparent 0, transparent 11px,
            rgba(0, 51, 102, 0.18) 11px, rgba(0, 51, 102, 0.18) 12px
        );
}
.demo-stage__ruler--l { left: -24px; }
.demo-stage__ruler--r { right: -24px; }

.demo-stage__callout {
    position: absolute;
    top: -10px;
    left: -6%;
    max-width: 14rem;
    background: var(--qb-navy);
    color: white;
    padding: var(--sp-3) var(--sp-4);
    border-radius: var(--radius-sm);
    box-shadow: 0 12px 32px rgba(0, 34, 68, 0.3);
    transform: rotate(-2deg);
    z-index: 3;
}
.demo-stage__callout::after {
    content: "";
    position: absolute;
    bottom: -8px;
    left: 18%;
    width: 14px;
    height: 14px;
    background: var(--qb-navy);
    transform: rotate(45deg);
}
.demo-stage__callout-kicker {
    font-family: var(--font-mono);
    font-size: var(--text-2xs);
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--qb-gold-light);
    margin-bottom: 2px;
}
.demo-stage__callout-body {
    font-size: var(--text-sm);
    line-height: 1.35;
    color: white;
}

.demo-spec {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--sp-6);
    margin-top: var(--sp-8);
    padding-top: var(--sp-6);
    border-top: 1px dashed rgba(0, 51, 102, 0.2);
}

.demo-spec__cell {
    font-family: var(--font-mono);
}

.demo-spec__label {
    display: block;
    font-size: var(--text-2xs);
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--text-muted);
    margin-bottom: var(--sp-2);
}

.demo-spec__value {
    font-size: var(--text-xl);
    font-weight: 700;
    color: var(--qb-navy);
    font-variant-numeric: tabular-nums;
}

@media (max-width: 900px) {
    .demo-stage__callout { position: static; transform: none; margin-bottom: var(--sp-5); max-width: none; }
    .demo-stage__callout::after { display: none; }
    .demo-stage__ruler { display: none; }
    .demo-spec { grid-template-columns: repeat(2, 1fr); }
}

/* ============================================================================
 * INSTALL TABS — OS switcher with code panel
 * ============================================================================ */

.install {
    background:
        linear-gradient(180deg, rgba(0, 51, 102, 0.03), transparent 30%),
        var(--panel-bg);
}

.tabs-wrap {
    max-width: 860px;
    margin: 0 auto;
}

.tabs {
    display: flex;
    gap: 0;
    border-bottom: 1px solid var(--toolbar-border);
}

.tab {
    padding: var(--sp-4) var(--sp-5);
    font-family: var(--font-retro);
    font-size: var(--text-sm);
    font-weight: 600;
    background: var(--toolbar-bg);
    border: 1px solid var(--toolbar-border);
    border-bottom: none;
    border-radius: var(--radius-sm) var(--radius-sm) 0 0;
    color: var(--text-secondary);
    cursor: pointer;
    position: relative;
    margin-right: -1px;
    margin-bottom: -1px;
    display: flex;
    align-items: center;
    gap: var(--sp-2);
    transition: background var(--dur-fast) var(--ease-out);
}
.tab:hover { background: var(--toolbar-top); }

.tab[aria-selected="true"] {
    background: var(--panel-bg);
    color: var(--qb-navy);
    font-weight: 700;
    z-index: 1;
    box-shadow: inset 0 2px 0 var(--qb-gold);
}

.tab__icon { width: 16px; height: 16px; flex-shrink: 0; }

.tab-panel {
    background: var(--panel-bg);
    border: 1px solid var(--toolbar-border);
    border-top: none;
    padding: var(--sp-6);
    border-radius: 0 var(--radius-sm) var(--radius-sm) var(--radius-sm);
}

.tab-panel[hidden] { display: none; }

.tab-panel h4 {
    color: var(--qb-navy);
    margin-bottom: var(--sp-3);
    font-size: var(--text-xl);
}

.tab-panel pre {
    background: var(--qb-navy-dark);
    color: var(--text-on-dark);
    border-radius: var(--radius-sm);
    position: relative;
    padding: var(--sp-5) var(--sp-5) var(--sp-5) calc(var(--sp-5) + 2.5rem);
    font-size: var(--text-sm);
    border: 1px solid var(--qb-navy);
    counter-reset: code-line;
}
.tab-panel pre code { color: #cde0f4; }
.tab-panel pre::before {
    /* tiny "CONSOLE" tag top-right of the block */
    content: "CONSOLE";
    position: absolute;
    top: var(--sp-3);
    right: var(--sp-3);
    font-family: var(--font-mono);
    font-size: var(--text-2xs);
    letter-spacing: 0.14em;
    color: var(--qb-gold);
    font-weight: 700;
}

/* ============================================================================
 * PHILOSOPHY — artifact-museum treatment of the splash dialog
 * ============================================================================ */

.philosophy {
    background:
        radial-gradient(700px 400px at 20% 10%, rgba(91, 155, 213, 0.18) 0%, transparent 55%),
        linear-gradient(180deg, var(--qb-navy) 0%, var(--qb-navy-dark) 100%);
    color: white;
    position: relative;
    overflow: hidden;
}

.philosophy::before {
    /* faint grid substrate, navy-on-navy */
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255,255,255,0.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.035) 1px, transparent 1px);
    background-size: 60px 60px;
    mask-image: radial-gradient(70% 60% at 50% 50%, black, transparent);
}

.philosophy__inner {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 1fr 1.25fr;
    gap: var(--sp-10);
    align-items: center;
}

.philosophy__copy h2 {
    font-size: var(--text-5xl);
    color: white;
    margin-bottom: var(--sp-5);
}
.philosophy__copy .hl { color: var(--qb-gold-light); }
.philosophy__copy p { color: var(--text-on-navy); font-size: var(--text-lg); }

.philosophy__pullquote {
    font-family: var(--font-modern);
    font-weight: 500;
    font-style: italic;
    font-size: var(--text-2xl);
    line-height: 1.3;
    color: white;
    margin-top: var(--sp-6);
    padding-left: var(--sp-5);
    border-left: 3px solid var(--qb-gold);
    max-width: 28rem;
}

/* The about-dialog — treated like a cherished archival artifact */
.dialog-panel {
    background: var(--panel-bg);
    border: 1px solid #6b7a94;
    border-radius: 4px;
    box-shadow:
        0 40px 80px -20px rgba(0, 0, 0, 0.6),
        0 12px 28px rgba(0, 0, 0, 0.35),
        inset 0 0 0 1px rgba(255, 255, 255, 0.5);
    overflow: hidden;
    transform: rotate(-1.2deg);
    position: relative;
    max-width: 520px;
    margin: 0 auto;
}

.dialog-panel::after {
    /* curled corner / pin */
    content: "";
    position: absolute;
    top: -14px; left: 24px;
    width: 48px; height: 28px;
    background: rgba(255, 253, 240, 0.85);
    border: 1px dashed rgba(204, 153, 51, 0.7);
    transform: rotate(-6deg);
    backdrop-filter: blur(4px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.dialog-panel__titlebar {
    height: 26px;
    background:
        linear-gradient(180deg, #7ba7d6 0%, #4b7bac 50%, #2e5985 51%, #3c6b99 100%);
    color: white;
    display: flex;
    align-items: center;
    padding: 0 var(--sp-3);
    font-family: var(--font-retro);
    font-size: var(--text-2xs);
    font-weight: 700;
    text-shadow: 0 1px 0 rgba(0,20,40,0.5);
    letter-spacing: 0.03em;
    gap: var(--sp-2);
}

.dialog-panel__titlebar-icon {
    width: 12px; height: 12px;
    background: var(--qb-gold);
    border: 1px solid rgba(0, 20, 40, 0.5);
    border-radius: 1px;
}

.dialog-panel__dots { margin-left: auto; display: flex; gap: 2px; }
.dialog-panel__dot {
    width: 14px; height: 13px;
    background: linear-gradient(180deg, #dfe5ee, #aeb5c3);
    border: 1px solid rgba(0, 20, 40, 0.5);
    border-radius: 1px;
    font-size: 9px; color: #001530; display: flex; align-items: center; justify-content: center;
}

.dialog-panel__body {
    padding: var(--sp-8) var(--sp-6) var(--sp-6);
    text-align: center;
    background:
        linear-gradient(180deg, #fafbfc 0%, #f0f2f5 100%);
}

.dialog-panel__title {
    font-family: var(--font-modern);
    font-weight: 800;
    font-size: var(--text-3xl);
    color: var(--qb-navy);
    letter-spacing: -0.03em;
    margin-bottom: var(--sp-1);
}

.dialog-panel__edition {
    font-family: var(--font-mono);
    font-size: var(--text-2xs);
    letter-spacing: 0.28em;
    color: var(--qb-gold);
    text-transform: uppercase;
    margin-bottom: var(--sp-5);
    font-weight: 500;
}

.dialog-panel__divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--qb-navy) 20%, var(--qb-navy) 80%, transparent);
    margin: 0 auto var(--sp-5);
    width: 80%;
    position: relative;
}
.dialog-panel__divider::before,
.dialog-panel__divider::after {
    content: "◆";
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: var(--qb-gold);
    background: #f5f6f9;
    padding: 0 6px;
    font-size: 8px;
}
.dialog-panel__divider::before { left: 38%; }
.dialog-panel__divider::after  { left: 58%; }

.dialog-panel__info {
    font-family: var(--font-retro);
    font-size: var(--text-sm);
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: var(--sp-5);
}
.dialog-panel__info strong { color: var(--qb-navy); }

.dialog-panel__legal {
    font-family: var(--font-retro);
    font-size: var(--text-xs);
    color: var(--text-muted);
    line-height: 1.7;
    padding-top: var(--sp-4);
    border-top: 1px solid rgba(0, 51, 102, 0.15);
}

.dialog-panel__signoff {
    display: block;
    font-style: italic;
    color: var(--qb-gold);
    margin-top: var(--sp-3);
    font-family: var(--font-modern);
    font-weight: 500;
    font-size: var(--text-sm);
}

@media (max-width: 900px) {
    .philosophy__inner { grid-template-columns: 1fr; }
    .dialog-panel { transform: none; max-width: 100%; }
    .dialog-panel::after { display: none; }
}

/* ============================================================================
 * FAQ — disassembly-listing style with line numbers
 * ============================================================================ */

.faq {
    counter-reset: faq-item;
}

.faq details {
    border-top: 1px solid rgba(0, 51, 102, 0.12);
    padding: var(--sp-5) 0 var(--sp-5) 3.5rem;
    position: relative;
    counter-increment: faq-item;
    transition: background var(--dur-fast) var(--ease-out);
}
.faq details:last-child { border-bottom: 1px solid rgba(0, 51, 102, 0.12); }

.faq details::before {
    content: counter(faq-item, decimal-leading-zero);
    position: absolute;
    left: 0;
    top: var(--sp-5);
    font-family: var(--font-mono);
    font-size: var(--text-sm);
    font-weight: 500;
    color: var(--qb-blue-light);
    letter-spacing: 0.04em;
}

.faq details[open] {
    background: rgba(0, 51, 102, 0.025);
}

.faq summary {
    font-size: var(--text-lg);
    font-weight: 700;
    color: var(--qb-navy);
    cursor: pointer;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--sp-4);
    letter-spacing: -0.01em;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
    content: "";
    width: 14px; height: 14px;
    flex-shrink: 0;
    background-image:
        linear-gradient(var(--qb-blue-light), var(--qb-blue-light)),
        linear-gradient(var(--qb-blue-light), var(--qb-blue-light));
    background-size: 14px 2px, 2px 14px;
    background-position: center;
    background-repeat: no-repeat;
    transition: transform var(--dur-med) var(--ease-out);
}
.faq details[open] summary::after { transform: rotate(45deg); }

.faq details > p { margin-top: var(--sp-3); font-size: var(--text-base); color: var(--text-secondary); }

/* ============================================================================
 * FOOTER — closing stamp of a legal document
 * ============================================================================ */

.site-footer {
    background:
        radial-gradient(600px 300px at 85% 100%, rgba(204, 153, 51, 0.08) 0%, transparent 60%),
        linear-gradient(180deg, var(--qb-navy-dark) 0%, #001833 100%);
    color: var(--text-on-navy);
    padding: var(--sp-12) 0 var(--sp-6);
    position: relative;
}

.site-footer::before {
    /* thin gold rule at the very top, like a certificate */
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--qb-gold) 30%, var(--qb-gold) 70%, transparent);
}

.site-footer a { color: var(--text-on-dark); }
.site-footer a:hover { color: var(--qb-gold); }

.site-footer__grid {
    display: grid;
    grid-template-columns: 1.7fr 1fr 1fr 1fr;
    gap: var(--sp-6);
    margin-bottom: var(--sp-8);
}

.site-footer__brand {
    font-family: var(--font-modern);
    font-size: var(--text-xl);
    color: white;
    font-weight: 800;
    letter-spacing: -0.025em;
    margin-bottom: var(--sp-2);
}

.site-footer__tagline {
    font-size: var(--text-sm);
    color: var(--text-on-navy);
    max-width: 22rem;
    line-height: 1.55;
}

.site-footer__seal {
    display: inline-flex;
    align-items: center;
    gap: var(--sp-2);
    margin-top: var(--sp-4);
    padding: var(--sp-2) var(--sp-3);
    border: 1px solid rgba(204, 153, 51, 0.5);
    font-family: var(--font-mono);
    font-size: var(--text-2xs);
    color: var(--qb-gold-light);
    letter-spacing: 0.14em;
    text-transform: uppercase;
    border-radius: var(--radius-sm);
}
.site-footer__seal::before {
    content: "◆";
    color: var(--qb-gold);
}

.site-footer h5 {
    color: var(--qb-gold-light);
    font-family: var(--font-mono);
    font-size: var(--text-2xs);
    text-transform: uppercase;
    letter-spacing: 0.2em;
    margin-bottom: var(--sp-4);
    font-weight: 600;
}

.site-footer ul { list-style: none; }
.site-footer li { margin-bottom: var(--sp-2); font-size: var(--text-sm); }

.site-footer__bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: var(--sp-5);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: var(--text-xs);
    color: var(--text-on-navy);
    gap: var(--sp-4);
    flex-wrap: wrap;
    font-family: var(--font-mono);
    letter-spacing: 0.03em;
}

@media (max-width: 900px) {
    .site-footer__grid { grid-template-columns: 1fr 1fr; }
}

/* ============================================================================
 * KEYFRAMES — single tidy block at the bottom
 * ============================================================================ */

@keyframes fade-up {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes window-enter {
    from { opacity: 0; transform: rotate(4deg) translate(40px, 20px) scale(0.96); }
    to   { opacity: 1; transform: rotate(1.3deg) translate(0, 0) scale(1); }
}

@keyframes underline-grow {
    to { transform: skewX(-10deg) scaleX(1); }
}

@keyframes pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(51, 153, 102, 0.35); }
    50%      { box-shadow: 0 0 0 6px rgba(51, 153, 102, 0); }
}

/* Scroll reveal — JS adds .to-reveal then .is-in-view. */
.to-reveal {
    opacity: 0;
    transform: translateY(16px);
    transition:
        opacity 0.7s var(--ease-out),
        transform 0.7s var(--ease-out);
    will-change: opacity, transform;
}
.to-reveal.is-in-view {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger pillars as they enter */
.pillars .pillar.to-reveal { transition-delay: 0s; }
.pillars .pillar:nth-child(2).to-reveal { transition-delay: 0.1s; }
.pillars .pillar:nth-child(3).to-reveal { transition-delay: 0.2s; }

@media (prefers-reduced-motion: reduce) {
    .hero__headline-line,
    .hero__headline-accent::after,
    .hero__sub,
    .hero__ctas,
    .hero__stamps,
    .hero__showcase,
    .hero__meta {
        opacity: 1;
        animation: none;
        transform: none;
    }
    .hero__window { transform: none; }
    .hero__meta-dot { animation: none; }
    .to-reveal { opacity: 1; transform: none; transition: none; }
}
