/*
 * =============================================================================
 * Document ID:  WS-HB-CSS-LANDING
 * Title:        Landing Page Stylesheet
 * Status:       Active (Web Alpha - design review pending)
 * Version:      0.1
 * Date:         2026-10-06
 *
 * Purpose:
 *   Presentation for the Handbook Home landing article
 *   (content/system/handbook-home.js): the cinematic hero, the
 *   designation strip, the section sequence, the Quick Access command
 *   array, and the maker's-mark colophon. Everything is scoped under
 *   .landing-page so it cannot affect any other article.
 *
 *   While the landing article is on screen, the workspace itself turns
 *   dark and loses its padding (the :has() rules below) so the hero can
 *   run edge to edge; every other article keeps the existing archive-
 *   paper workspace unchanged.
 *
 *   Responsive behavior is driven by CONTAINER width, not viewport
 *   width: the left navigation consumes 270-300px of a desktop viewport,
 *   so the workspace is far narrower than the window, and the shell's
 *   own breakpoints (css/handbook.css) don't fire until 700px.
 *
 * Scope / Authority:
 *   Governed by WS-HANDBOOK-ARCH-001. Reuses the existing --ws-* color
 *   tokens from css/handbook.css. Introduces a small set of --lp-*
 *   tokens (a darker near-black surface scale and a brighter amber) that
 *   exist only inside .landing-page; the amber is deliberately lighter
 *   than the shell's --ws-rust-brown, which does not hold enough contrast
 *   against near-black surfaces for interactive emphasis. Both are
 *   flagged for design review.
 * =============================================================================
 */


/* =========================================================
   WORKSPACE TAKEOVER (only while the landing article is shown)
   ========================================================= */

.handbook-content:has(.landing-page) {
    padding: 0;
    background: #0d151a;
}


    .handbook-content:has(.landing-page) article {
        max-width: none;
    }


/* =========================================================
   LANDING TOKENS AND CONTAINER
   ========================================================= */

.landing-page {
    --lp-void: #0d151a;
    --lp-panel: #121d23;
    --lp-panel-raised: #18262e;
    --lp-rule: rgba(115, 169, 199, 0.22);
    --lp-rule-strong: rgba(115, 169, 199, 0.44);
    --lp-cyan: var(--ws-sky-blue);
    --lp-cyan-dim: var(--ws-steel-blue);
    --lp-text: #C9D4D9;
    --lp-text-muted: var(--ws-steel-gray);
    --lp-amber: #D9972F;
    --lp-amber-dim: #8A6224;
    --lp-online: #62B57F;
    --lp-gutter: clamp(20px, 4cqi, 56px);

    container: landing / inline-size;
    background: var(--lp-void);
    color: var(--lp-text);
}


/* =========================================================
   HERO
   ========================================================= */

.landing-hero {
    position: relative;
    height: clamp(280px, 33cqi, 460px);
    overflow: hidden;
    background: var(--lp-void);
    border-bottom: 1px solid var(--lp-rule-strong);
}


.landing-hero-media {
    position: absolute;
    inset: 0;
}


/*
   The artwork is a single replaceable asset: object-fit/object-position
   do all the cropping, so swapping the file never requires a layout
   change. object-position keeps the ship (center-right of the
   composition) in frame as the crop tightens.
*/
.landing-hero-image {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 62% 50%;
}


/* Restrained left-only shade for type legibility; leaves the ship and
   the planetary horizon untouched. */
.landing-hero-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        90deg,
        rgba(8, 14, 18, 0.80) 0%,
        rgba(8, 14, 18, 0.50) 24%,
        rgba(8, 14, 18, 0.00) 46%
    );
    pointer-events: none;
}


.landing-hero-text {
    position: absolute;
    top: clamp(20px, 6.5cqi, 60px);
    left: var(--lp-gutter);
    /* Bounded to the clear space left of the ship so the title wraps
       to two lines instead of running into the hull and masts. */
    max-width: max(190px, 28cqi);
}


.landing-page .landing-title {
    margin: 0;
    color: #E6EEF1;
    font-size: clamp(24px, 4.4cqi, 56px);
    font-weight: 700;
    letter-spacing: 0.14em;
    line-height: 1.04;
}


.landing-subtitle {
    margin: 10px 0 0 !important;
    color: var(--lp-cyan) !important;
    font-size: clamp(12px, 1.7cqi, 20px) !important;
    font-weight: 700;
    letter-spacing: 0.36em;
    line-height: 1.2 !important;
}


.landing-status {
    /* Narrow enough that "ONLINE" always drops to its own row, keeping
       the status line clear of the ship's hull at every width. */
    max-width: max(210px, 22cqi);
    display: flex;
    flex-wrap: wrap;
    gap: 0 0.6em;
    align-items: center;
    margin: 16px 0 0 !important;
    padding-top: 12px;
    border-top: 1px solid var(--lp-rule-strong);
    color: var(--lp-text-muted) !important;
    font-size: clamp(9px, 0.95cqi, 11px) !important;
    font-weight: 700;
    letter-spacing: 0.18em;
    line-height: 1.5 !important;
}


.landing-status-online {
    color: var(--lp-online);
}


    .landing-status-online::before {
        content: "";
        display: inline-block;
        width: 0.55em;
        height: 0.55em;
        margin-right: 0.7em;
        background: var(--lp-online);
    }


/* Subordinate maker treatment - quiet, used in the colophon only. */
.landing-maker {
    margin: 0 !important;
    color: var(--lp-text-muted) !important;
    font-size: 10px !important;
    font-weight: 700;
    letter-spacing: 0.26em;
    line-height: 1.4 !important;
}


/* =========================================================
   DESIGNATION STRIP
   ========================================================= */

.landing-designation {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 0 !important;
    padding: 11px var(--lp-gutter);
    background: var(--lp-panel);
    border-bottom: 1px solid var(--lp-rule);
    color: var(--lp-cyan-dim) !important;
    font-size: 10px !important;
    font-weight: 700;
    letter-spacing: 0.24em;
    line-height: 1.4 !important;
}


    .landing-designation::before {
        content: "";
        flex: 0 0 auto;
        width: 22px;
        height: 3px;
        background: var(--lp-amber);
    }


/* =========================================================
   SECTION SEQUENCE
   ========================================================= */

.landing-body {
    max-width: 1220px;
    padding: 0 var(--lp-gutter) 8px;
}


.landing-section {
    display: grid;
    grid-template-columns: 300px minmax(0, 1fr);
    gap: 0 clamp(24px, 4cqi, 56px);
    padding: clamp(28px, 4cqi, 44px) 0;
    border-bottom: 1px solid var(--lp-rule);
}


.landing-section:last-of-type {
    border-bottom: 0;
}


.landing-section--wide {
    grid-template-columns: minmax(0, 1fr);
}


.landing-page .landing-section-heading {
    display: flex;
    align-items: baseline;
    gap: 14px;
    margin: 0 0 18px;
    color: var(--lp-cyan);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.24em;
    line-height: 1.5;
}


.landing-page .landing-section:not(.landing-section--wide) .landing-section-heading {
    margin-bottom: 0;
}


.landing-section-index {
    flex: 0 0 auto;
    color: var(--lp-amber-dim);
    font-size: 10px;
    letter-spacing: 0.2em;
}


.landing-section-body {
    min-width: 0;
}


.landing-page .landing-section-body p {
    max-width: 68ch;
    color: var(--lp-text);
}


/* =========================================================
   QUICK ACCESS - COMMAND SELECTION ARRAY
   ========================================================= */

.qa-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-auto-rows: minmax(118px, auto);
    gap: 10px;
}


.qa-control {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 14px;
    min-width: 0;
    padding: 14px 16px 14px 18px;
    background: var(--lp-panel);
    border: 1px solid var(--lp-rule);
    border-left: 3px solid var(--lp-cyan-dim);
    border-radius: 0;
    color: var(--lp-text);
    text-align: left;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease;
}


    /* Hover raises local luminance only - no movement, growth or shadow. */
    .qa-control:hover,
    .qa-control:focus-visible {
        background: var(--lp-panel-raised);
        border-color: var(--lp-amber);
    }


    .qa-control:focus-visible {
        outline: 2px solid var(--lp-amber);
        outline-offset: 2px;
    }


.qa-meta {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
    color: var(--lp-cyan-dim);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.22em;
}


.qa-id {
    display: block;
    color: #E6EEF1;
    font-size: 24px;
    font-weight: 700;
    letter-spacing: 0.14em;
    line-height: 1.1;
}


.qa-name {
    display: block;
    margin-top: 6px;
    color: var(--lp-cyan);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    line-height: 1.4;
}


.qa-descriptor {
    display: block;
    margin-top: 4px;
    color: var(--lp-text-muted);
    font-size: 12px;
    line-height: 1.45;
}


.qa-action {
    color: var(--lp-amber-dim);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.22em;
    transition: color 0.15s ease;
}


    .qa-control:hover .qa-action,
    .qa-control:focus-visible .qa-action {
        color: var(--lp-amber);
    }


    .qa-control:hover .qa-meta,
    .qa-control:focus-visible .qa-meta {
        color: var(--lp-cyan);
    }


/* ATTD: the primary control - double width and height, amber key edge. */
.qa-control--primary {
    grid-column: span 2;
    grid-row: span 2;
    border-left-width: 4px;
    border-left-color: var(--lp-amber);
    border-top: 2px solid var(--lp-amber);
    background: linear-gradient(180deg, #17242b 0%, var(--lp-panel) 70%);
    padding: 18px 22px 18px 24px;
}


    .qa-control--primary .qa-id {
        font-size: clamp(38px, 6.4cqi, 76px);
        letter-spacing: 0.12em;
    }


    .qa-control--primary .qa-name {
        font-size: 14px;
    }


    .qa-control--primary .qa-descriptor {
        font-size: 13px;
    }


    .qa-control--primary .qa-action {
        color: var(--lp-amber);
        font-size: 11px;
    }


/* Quick Reference is the index of everything above - a full-width bar
   on the tablet/phone arrangements (see container queries). */


/* =========================================================
   COLOPHON / MAKER'S MARK
   ========================================================= */

.landing-colophon {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: clamp(28px, 4cqi, 44px) var(--lp-gutter) clamp(32px, 4cqi, 48px);
    background: var(--lp-panel);
    border-top: 1px solid var(--lp-rule-strong);
}


.landing-colophon-title {
    margin: 0 !important;
    color: #E6EEF1 !important;
    font-size: 16px !important;
    font-weight: 700;
    letter-spacing: 0.22em;
    line-height: 1.3 !important;
}


.landing-colophon-product {
    margin: 0 !important;
    color: var(--lp-cyan-dim) !important;
    font-size: 10px !important;
    font-weight: 700;
    letter-spacing: 0.32em;
    line-height: 1.4 !important;
}


.landing-colophon .landing-maker {
    margin-top: 14px !important;
    padding-top: 12px;
    border-top: 1px solid var(--lp-rule);
    max-width: 320px;
}


/* =========================================================
   RESPONSIVE - driven by workspace (container) width
   ========================================================= */

@container landing (max-width: 760px) {

    .landing-section {
        grid-template-columns: minmax(0, 1fr);
    }


    .landing-page .landing-section:not(.landing-section--wide) .landing-section-heading {
        margin-bottom: 14px;
    }


    .qa-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }


    .qa-control--primary {
        grid-column: span 2;
        grid-row: auto;
    }


    .qa-control--wide {
        grid-column: span 2;
    }
}


/* Narrow workspace: the hero stops being an overlay. The image becomes a
   cropped banner centered on the ship, and the identity block sits on a
   solid panel beneath it, so type never competes with the artwork. */
@container landing (max-width: 700px) {

    .landing-hero {
        height: auto;
        overflow: visible;
    }


    .landing-hero-media {
        position: relative;
        inset: auto;
        height: clamp(170px, 50cqi, 280px);
    }


    .landing-hero-image {
        object-position: 66% 50%;
    }


    .landing-hero-shade {
        display: none;
    }


    .landing-hero-text {
        position: static;
        max-width: none;
        padding: 20px var(--lp-gutter) 6px;
    }


    .landing-page .landing-title {
        font-size: clamp(26px, 8cqi, 38px);
    }


    .landing-subtitle {
        font-size: clamp(12px, 3.4cqi, 16px) !important;
    }


    .landing-status {
        font-size: 10px !important;
        letter-spacing: 0.16em;
    }


    .qa-control {
        padding: 12px 12px 12px 14px;
    }


    .qa-id {
        font-size: 17px;
        letter-spacing: 0.1em;
    }


    .qa-control--primary .qa-id {
        font-size: 40px;
        letter-spacing: 0.12em;
    }


    /* Small tiles: keep the index number, drop the repeated word, and
       keep the action label on one line. */
    .qa-meta span:last-child {
        display: none;
    }


    .qa-action {
        font-size: 9px;
        letter-spacing: 0.14em;
        white-space: nowrap;
    }


    .qa-descriptor {
        font-size: 11px;
    }
}
