/*
 * Stetworth — shared vertical-page stylesheet.
 *
 * Used by every vertical landing page (/legal, /private-equity,
 * /founders).  Loaded AFTER site/css/style.css, which owns the
 * palette, type scale, buttons, the review-record component, the
 * numbered `.steps` list and the modal.  Everything here is either a
 * component only the verticals use (the sign-off card, the task
 * table, the standing-rule pull-quote, the example cycler) or a
 * page-level arrangement of shared parts.  No token is redefined —
 * every value comes from the base stylesheet's custom properties, so
 * the vertical pages can never drift off-palette.
 */

/* ============================================================
   Nav
   ============================================================ */

.site-nav-brand {
    display: flex;
    align-items: baseline;
    gap: var(--s-3);
}

/* ============================================================
   Hero — the sign-off card
   ============================================================ */

.signoff {
    background: var(--c-paper);
    border: 1px solid var(--c-rule-strong);
    border-radius: var(--radius-lg);
    box-shadow: 0 18px 44px -28px rgba(20, 17, 15, 0.4);
    overflow: hidden;
}

.signoff-head {
    display: flex;
    align-items: center;
    gap: var(--s-3);
    padding: var(--s-4) var(--s-5);
    background: rgba(149, 115, 64, 0.1);
    border-bottom: 1px solid var(--c-rule);
}
.signoff-status {
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--c-burnished-text);
}
/* A slow pulse: the task is holding, not working. */
.signoff-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--c-burnished);
    flex: none;
    animation: signoff-pulse 2.4s ease-in-out infinite;
}
@keyframes signoff-pulse {
    0%, 100% { opacity: 1;   box-shadow: 0 0 0 0 rgba(149, 115, 64, 0.5); }
    50%      { opacity: 0.6; box-shadow: 0 0 0 6px rgba(149, 115, 64, 0); }
}

.signoff-body { padding: var(--s-5); }

.signoff-fields {
    display: grid;
    gap: var(--s-3);
    padding-bottom: var(--s-4);
    border-bottom: 1px dotted var(--c-rule);
}
.signoff-fields > div {
    display: grid;
    grid-template-columns: 5.25rem 1fr;
    gap: var(--s-3);
    align-items: start;
}
.signoff-fields dt {
    font-size: 0.72rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--c-ink-muted);
    padding-top: 0.15rem;
}
.signoff-fields dd {
    font-size: 0.92rem;
    color: var(--c-ink-soft);
    word-break: break-word;
}

.signoff-excerpt {
    margin-top: var(--s-4);
    font-family: var(--font-accent);
    font-size: 1rem;
    line-height: 1.5;
    color: var(--c-ink-muted);
}

.signoff-actions {
    display: flex;
    gap: var(--s-3);
    padding: 0 var(--s-5) var(--s-4);
}
/* Non-interactive: this is an illustration of the gate, not the gate. */
.signoff-btn { cursor: default; pointer-events: none; }
.signoff-btn:hover { transform: none; }

.signoff-foot {
    padding: var(--s-4) var(--s-5);
    border-top: 1px solid var(--c-rule);
    background: rgba(231, 222, 203, 0.4);
    font-size: 0.82rem;
    color: var(--c-ink-muted);
}

/* Hero gate cycler: legal.js rotates held sends behind a crossfade.
   The body floor absorbs subject/excerpt length differences so the
   hero doesn't shift as sends rotate. */
[data-gate-cycler] .signoff { transition: opacity 0.25s ease; }
[data-gate-cycler].hero-swapping .signoff { opacity: 0; }
[data-gate-cycler] .signoff-body { min-height: 16rem; }
@media (max-width: 720px) {
    [data-gate-cycler] .signoff-body { min-height: 0; }
}
@media (prefers-reduced-motion: reduce) {
    [data-gate-cycler] .signoff { transition: none; }
}

/* ============================================================
   Section ledes shared by this page's heads
   ============================================================ */

.section-lede {
    margin-top: var(--s-4);
    font-size: 1.05rem;
    color: var(--c-ink-muted);
    max-width: 38rem;
}

/* ============================================================
   What you can hand it — set like a table of contents
   ============================================================ */

.section-work { border-top: 1px solid var(--c-rule); }

/* Titles-only chip grid: the work you can hand off, at a glance.
   (The former two-column prose list died in the redesign — the
   worked-example cycler below carries the depth.) */
.task-list {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: var(--s-3);
}
.task {
    padding: var(--s-3) var(--s-5);
    background: var(--c-paper);
    border: 1px solid var(--c-rule-strong);
    border-radius: 999px;
}
.task h3 {
    font-family: var(--font-accent);
    font-size: 1.08rem;
    font-weight: 400;
    white-space: nowrap;
}

.task-tail {
    margin-top: var(--s-6);
    font-family: var(--font-accent);
    font-size: 1.1rem;
    font-style: italic;
    color: var(--c-ink-soft);
    max-width: 34rem;
}

/* ============================================================
   Worked example
   ============================================================ */

.section-example { border-top: 1px solid var(--c-rule); }

.example-inner {
    display: grid;
    grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
    gap: var(--s-9);
    align-items: center;
    /* Examples differ in length; a floor keeps the auto-cycle from
       shoving the content below the section up and down every 9s. */
    min-height: 36rem;
}

.example-area {
    font-family: var(--font-accent);
    font-style: italic;
    font-size: 1.05rem;
    color: var(--c-oxblood);
    margin-bottom: var(--s-3);
}

.example-controls {
    margin-top: var(--s-6);
    display: flex;
    align-items: center;
    gap: var(--s-4);
}
.example-arrow {
    width: 2.25rem;
    height: 2.25rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-body);
    font-size: 1rem;
    line-height: 1;
    color: var(--c-ink-soft);
    background: var(--c-paper);
    border: 1px solid var(--c-rule-strong);
    border-radius: 50%;
    cursor: pointer;
    transition: border-color var(--t-base), color var(--t-base),
                transform var(--t-fast);
}
.example-arrow:hover {
    border-color: var(--c-ink-muted);
    color: var(--c-oxblood);
    transform: translateY(-1px);
}
.example-arrow:focus-visible {
    outline: 2px solid var(--c-burnished);
    outline-offset: 2px;
}
.example-counter {
    font-size: 0.85rem;
    letter-spacing: 0.08em;
    color: var(--c-ink-muted);
    font-variant-numeric: tabular-nums;
}

/* Crossfade while legal.js swaps an example in. */
.example-copy, .example-record { transition: opacity 0.18s ease; }
.example-swapping .example-copy,
.example-swapping .example-record { opacity: 0; }

.example-tail { margin-top: var(--s-7); }
.example-copy h2 {
    font-size: clamp(1.6rem, 2.6vw, 2.1rem);
    line-height: 1.2;
    margin-bottom: var(--s-4);
}
.example-note {
    margin-top: var(--s-5);
    padding-left: var(--s-4);
    border-left: 2px solid var(--c-burnished);
    font-size: 0.95rem;
    color: var(--c-ink-muted);
    max-width: 32rem;
}

/* ============================================================
   Standing rules — the page's one inverse band
   ============================================================ */

.section-playbook {
    position: relative;
    z-index: 2;
    background: var(--c-oxblood);
    color: var(--c-inverse-text);
    padding: var(--s-9) var(--s-6);
    background-image:
        repeating-linear-gradient(
            135deg,
            rgba(255, 255, 255, 0.03) 0 1px,
            transparent 1px 9px
        );
}
.playbook-inner {
    max-width: 46rem;
    margin: 0 auto;
    text-align: center;
}

.playbook-rule {
    margin: var(--s-7) auto;
    max-width: 38rem;
    padding: var(--s-5) var(--s-6);
    border: 1px solid rgba(246, 239, 223, 0.28);
    border-radius: var(--radius);
    background: rgba(20, 17, 15, 0.12);
}
.playbook-rule p {
    font-family: var(--font-accent);
    font-size: 1.25rem;
    line-height: 1.45;
    color: var(--c-inverse-text);
}
.playbook-rule footer {
    margin-top: var(--s-4);
    padding-top: var(--s-3);
    border-top: 1px dotted rgba(246, 239, 223, 0.28);
    font-size: 0.82rem;
    letter-spacing: 0.04em;
    color: var(--c-inverse-muted);
}
.mark-inverse { color: var(--c-inverse-text); margin-right: var(--s-2); }

.playbook-tail { margin-bottom: 0; }

/* ============================================================
   Confidentiality and control
   ============================================================ */

.section-assurance { border-top: 1px solid var(--c-rule); }

/* The confidentiality claims as a ruled ledger: one line, one mark.
   Same four deployment statements as before the redesign, minus the
   paragraph bodies (see the HTML NOTE above each section). */
.assurance-lines {
    list-style: none;
    max-width: 46rem;
}
.assurance-lines li {
    display: flex;
    align-items: baseline;
    gap: var(--s-4);
    padding: var(--s-4) 0;
    border-bottom: 1px solid var(--c-rule);
    font-family: var(--font-accent);
    font-size: 1.18rem;
    color: var(--c-ink-soft);
}
.assurance-lines li:first-child { border-top: 1px solid var(--c-rule); }
.assurance-lines .assurance-text { flex: 1; }
.assurance-lines .assurance-text::after {
    content: "";
    /* dotted leader, v3-style */
}
.assurance-lines .mark { font-size: 1.15rem; }

/* ============================================================
   Motion + responsive
   ============================================================ */

@media (prefers-reduced-motion: reduce) {
    .signoff-dot { animation: none; }
    .example-copy, .example-record { transition: none; }
}

@media (max-width: 980px) {
    .example-inner {
        grid-template-columns: minmax(0, 1fr);
        gap: var(--s-7);
        min-height: 0;
    }
    /* Reserve the control row.  On desktop `.example-inner`'s 36rem
       floor absorbs it, but this breakpoint drops the floor to content
       height, so `vertical.js` un-hiding the controls would push the
       record card and every section below it down 68px — the shift the
       floors exist to prevent (docs/SITE.md#motion-and-access).  The
       spacer stands in while the controls are hidden and yields the
       moment they are not, so the column is the same height either way,
       with or without JavaScript. */
    .example-copy::after {
        content: "";
        display: block;
        height: 4.25rem;
    }
    .example-copy:has([data-ex-controls]:not([hidden]))::after {
        display: none;
    }
    .task-list { column-gap: var(--s-7); }
    .assurance-grid { gap: var(--s-6) var(--s-7); }
}

@media (max-width: 720px) {
    .section-playbook { padding-left: var(--s-4); padding-right: var(--s-4); }

    .task-list { grid-template-columns: minmax(0, 1fr); }
    .assurance-grid { grid-template-columns: minmax(0, 1fr); }

    .signoff-fields > div { grid-template-columns: minmax(0, 1fr); gap: var(--s-1); }
    .signoff-actions { flex-wrap: wrap; }

    .playbook-rule { padding: var(--s-4); }
    .playbook-rule p { font-size: 1.1rem; }
}
