/* Royal Capital Solutions v2: the About page (S0-P13, /about)
   A profile, not a landing page. Built by build/about.py.

   CONTENTS
   1. Hero: portrait on the photo's own studio grey, licence badge, figures band
   2. Who is Robert Staab: editorial opening
   3. Credential record
   4. Habits ledger
   5. Quote
   6. Phones
   ============================================================ */

/* ============================================================
   1. HERO
   The tile matches the headshot's backdrop (#333), so the photo has
   no frame: Robert stands in the page. Text and figures are white and
   lumen on it (white 12.6:1, lumen 9.4:1, on-deep-2 7.6:1).
   ============================================================ */
.ab-hero {
    --studio: #333333;
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "text" "photo" "figs";
    overflow: hidden;
    border-radius: var(--r-card);
    background: var(--studio);
    color: var(--text-on-deep);
    isolation: isolate;
}
/* a faint lift behind the head, the way a studio light falls */
.ab-hero::before {
    content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
    background: radial-gradient(60% 70% at 78% 30%, rgb(255 255 255 / 0.05), transparent 70%);
}
.ab-hero :focus-visible { outline-color: var(--text-lumen); }

.ab-hero-text {
    grid-area: text;
    display: flex; flex-direction: column; align-items: flex-start;
    padding: clamp(1.5rem, 1rem + 2.4vw, 4rem);
    padding-bottom: clamp(1.5rem, 1rem + 2vw, 3rem);
}
.ab-crumbs { margin-bottom: clamp(2rem, 1rem + 5vw, 6rem); }

.ab-h1 { margin: 0; font-size: var(--fs-hero); font-weight: 500; line-height: var(--lh-hero); letter-spacing: var(--tr-hero); }
.ab-h1-pre {
    display: block; margin-bottom: var(--s-4);
    font-family: var(--font-mono); font-size: var(--fs-micro); font-weight: 400; line-height: 1;
    letter-spacing: var(--tr-mono); text-transform: uppercase; color: var(--text-lumen);
}
.ab-h1-b {
    display: block; max-width: 24ch; margin-top: var(--s-6);
    font-size: clamp(1.25rem, 1rem + 0.9vw, 1.75rem); font-weight: 400; line-height: 1.2; letter-spacing: -0.02em;
    color: var(--text-lumen); text-wrap: balance;
}
.ab-sub { max-width: 46ch; margin-top: var(--s-5); font-size: var(--fs-base); line-height: var(--lh-body); color: var(--text-on-deep-2); text-wrap: pretty; }
.ab-hero .hx-actions { margin-top: var(--s-8); }
.ab-ghost { color: var(--text-on-deep); }
.ab-ghost .ic { color: var(--text-lumen); }

/* the portrait: no frame, its edges dissolve into the tile */
.ab-portrait { grid-area: photo; position: relative; align-self: end; min-height: 0; }
.ab-portrait img {
    display: block; width: 100%; height: auto; aspect-ratio: 1;
    object-fit: cover; object-position: 50% 0;
    /* top and side edges fade into the studio grey; the bottom stays on the figures rule */
    -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 22%), linear-gradient(to right, transparent 0, #000 24%, #000 80%, transparent 100%);
    -webkit-mask-composite: source-in;
    mask-image: linear-gradient(to bottom, transparent 0, #000 22%), linear-gradient(to right, transparent 0, #000 24%, #000 80%, transparent 100%);
    mask-composite: intersect;
}

/* the licence badge, an instrument on glass */
.ab-badge {
    position: absolute; left: var(--s-5); bottom: var(--s-5);
    display: grid; gap: var(--s-3);
    width: min(19rem, calc(100% - 2.5rem)); padding: var(--s-4);
    border-radius: var(--r-control);
}
.ab-badge-head {
    display: flex; align-items: center; justify-content: space-between; gap: var(--s-3);
    font-family: var(--font-mono); font-size: var(--fs-micro); letter-spacing: var(--tr-mono); text-transform: uppercase; color: var(--text-lumen);
}
.ab-badge-dot { width: 0.5rem; height: 0.5rem; border-radius: 50%; background: var(--signal); box-shadow: 0 0 0 4px rgb(34 165 91 / 0.22); }
.ab-badge dl { display: grid; grid-template-columns: repeat(3, auto); justify-content: space-between; gap: var(--s-3); margin: 0; padding-block: var(--s-3); border-block: 1px solid var(--line-on-deep); }
.ab-badge dt { font-size: var(--fs-micro); color: var(--text-on-deep-2); }
.ab-badge dd { margin: var(--s-1) 0 0; font-size: var(--fs-sm); font-weight: 500; color: var(--text-on-deep); }
.ab-badge-link { display: inline-flex; align-items: center; gap: var(--s-1); min-height: 2.75rem; margin-block: calc(var(--s-2) * -1); font-size: var(--fs-xs); font-weight: 500; color: var(--text-on-deep); text-underline-offset: 0.25em; }

/* figures: a ruled band across the foot of the tile */
.ab-figs {
    grid-area: figs;
    display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
    margin: 0; padding: 0; list-style: none;
    border-top: 1px solid var(--line-on-deep);
}
.ab-figs li {
    position: relative; display: grid; align-content: start; gap: var(--s-2);
    padding: var(--s-8) clamp(1rem, 0.6rem + 1.4vw, 2rem) var(--s-6);
    box-shadow: -1px -1px 0 0 var(--line-on-deep);
}
/* ruler ticks along the top edge of each cell */
.ab-figs li::before {
    content: ""; position: absolute; top: 0; left: 0; right: 0; height: 0.5rem;
    background: repeating-linear-gradient(90deg, var(--line-on-deep) 0 1px, transparent 1px 12px);
}
.ab-fig { display: flex; align-items: baseline; gap: var(--s-2); font-size: var(--fs-sm); color: var(--text-on-deep-2); }
.ab-fig b { font-size: var(--fs-figure); font-weight: 400; line-height: 1; letter-spacing: -0.04em; font-variant-numeric: tabular-nums; color: var(--text-lumen); }
.ab-fig-l { max-width: 24ch; font-size: var(--fs-xs); line-height: 1.45; color: var(--text-on-deep-2); }

@media (min-width: 48rem) {
    .ab-figs { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (min-width: 48rem) and (max-width: 63.99rem) {
    .ab-portrait { width: min(100%, 34rem); justify-self: center; }
}
@media (min-width: 64rem) {
    .ab-hero {
        grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
        grid-template-areas: "text photo" "figs figs";
    }
    .ab-hero-text { justify-content: flex-end; }
    .ab-portrait { margin-top: var(--s-8); }
    .ab-badge { left: auto; right: var(--s-6); bottom: var(--s-6); }
}
/* short laptop screens (1280 x 600): keep the hero buttons above the fold */
@media (min-width: 64rem) and (max-height: 700px) {
    .ab-hero-text { padding-top: var(--s-6); }
    .ab-crumbs { margin-bottom: var(--s-6); }
    .ab-h1 { font-size: clamp(2.75rem, 1rem + 4.4vw, 5rem); }
    .ab-h1-b { margin-top: var(--s-4); }
    .ab-hero .hx-actions { margin-top: var(--s-6); }
}

/* ============================================================
   2. WHO IS ROBERT STAAB: the answer, set large, the question as a rule-topped label
   ============================================================ */
.ab-intro { display: grid; gap: var(--s-5); }
.ab-intro-q { font-size: var(--fs-base); font-weight: 500; line-height: 1.4; color: var(--text-brand); }
.ab-intro-text.lc-answer-text { max-width: 34ch; font-size: clamp(1.5rem, 1.05rem + 1.5vw, 2.625rem); line-height: 1.2; }
.ab-intro-more { max-width: 58ch; margin-top: var(--s-8); font-size: var(--fs-base); line-height: var(--lh-body); color: var(--text-2); text-wrap: pretty; }
@media (min-width: 64rem) {
    .ab-intro { grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: var(--s-10); }
    .ab-intro-q, .ab-intro-a { padding-top: var(--s-5); border-top: 1px solid var(--line-strong); }
    .ab-intro-q { position: sticky; top: calc(var(--hdr-h) + var(--s-6)); align-self: start; }
}

/* ============================================================
   3. CREDENTIAL RECORD: a licence record, not a table
   ============================================================ */
.ab-record { overflow: hidden; border-radius: var(--r-card); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); }
.ab-record-head {
    display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s-2) var(--s-6);
    padding: var(--s-3) var(--card-pad); border-bottom: 1px solid var(--line-strong); background: var(--surface-grey);
}
.ab-record-head .t-mono { font-size: var(--fs-micro); letter-spacing: var(--tr-mono); text-transform: uppercase; color: var(--text-3); }
.ab-record-head a { display: inline-flex; align-items: center; gap: var(--s-1); min-height: 2.75rem; font-size: var(--fs-xs); font-weight: 500; color: var(--text-brand-strong); text-underline-offset: 0.25em; }
.ab-record-grid { display: grid; grid-template-columns: minmax(0, 1fr); margin: 0; }
.ab-record-grid > div { padding: var(--s-5) var(--card-pad); box-shadow: 1px 0 0 0 var(--line), 0 1px 0 0 var(--line); }
.ab-record-grid dt { font-family: var(--font-mono); font-size: var(--fs-micro); letter-spacing: var(--tr-mono); text-transform: uppercase; color: var(--text-3); }
.ab-record-grid dd { margin: var(--s-2) 0 0; font-size: var(--fs-base); line-height: 1.45; color: var(--text); overflow-wrap: anywhere; }
.ab-record-grid a { color: var(--text-brand-strong); text-decoration: underline; text-underline-offset: 2px; }
@media (min-width: 40rem) { .ab-record-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 64rem) { .ab-record-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } .ab-record-grid > div { min-height: 7.5rem; } }

/* ============================================================
   4. HABITS LEDGER: heading left, the working detail right, ruled rows
   ============================================================ */
.ab-ledger { margin: 0; padding: 0; list-style: none; border-bottom: 1px solid var(--line-strong); }
.ab-ledger li { display: grid; gap: var(--s-4); padding-block: var(--s-8); border-top: 1px solid var(--line-strong); }
.ab-ledger-h { display: flex; align-items: flex-start; gap: var(--s-4); }
.ab-ledger-h .lc-cost-art { width: 2rem; height: 2rem; margin-top: 0.1em; }
.ab-ledger h3 { max-width: 22ch; font-size: var(--fs-xl); font-weight: 500; line-height: var(--lh-tight); letter-spacing: var(--tr-head); text-wrap: balance; }
.ab-ledger-b p { max-width: 56ch; font-size: var(--fs-base); line-height: var(--lh-body); color: var(--text-2); text-wrap: pretty; }
.ab-ledger-b .lc-links { margin-top: var(--s-4); }
@media (min-width: 64rem) {
    .ab-ledger li { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: var(--s-10); padding-block: var(--s-10); }
}

/* ============================================================
   5. QUOTE: Robert's own line, on the deep tile with the logo's contour art
   ============================================================ */
.ab-quote { position: relative; overflow: hidden; margin: 0; padding: clamp(2rem, 1rem + 5vw, 6rem) clamp(1.5rem, 1rem + 4vw, 5rem); isolation: isolate; }
.ab-quote::before {
    content: ""; position: absolute; right: -4%; bottom: -12%; z-index: -1; width: min(42rem, 60%); aspect-ratio: 560 / 420;
    background: url("../assets/contour-deep.svg") no-repeat right bottom / contain; opacity: 0.55; pointer-events: none;
}
.ab-quote blockquote { margin: 0; }
.ab-quote .ab-quote-text {
    max-width: 15ch; padding: 0; border: 0;
    font-size: clamp(2.125rem, 1.2rem + 3.6vw, 5rem); line-height: 1; letter-spacing: -0.045em; color: var(--text-on-deep);
}
.ab-quote .ab-quote-text::before { content: "\201C"; display: block; height: 0.55em; margin-bottom: var(--s-2); font-size: 1.4em; line-height: 0.9; color: var(--text-lumen); }
.ab-quote figcaption { max-width: 44ch; margin-top: var(--s-10); font-size: var(--fs-sm); line-height: 1.55; color: var(--text-on-deep-2); text-wrap: pretty; }
.ab-quote figcaption .t-mono { display: block; margin-bottom: var(--s-2); font-size: var(--fs-micro); letter-spacing: var(--tr-mono); text-transform: uppercase; color: var(--text-lumen); }

/* ============================================================
   6. PHONES: centred head and hero, as on every other page
   ============================================================ */
@media (max-width: 47.99rem) {
    .ab-hero-text { align-items: center; text-align: center; }
    .ab-crumbs { margin-bottom: var(--s-8); }
    .ab-h1-b, .ab-sub { margin-inline: auto; }
    .ab-hero .hx-actions { width: 100%; }
    .ab-portrait { display: grid; justify-items: center; padding-bottom: var(--s-5); }
    .ab-portrait img { width: min(100%, 22rem); }
    .ab-badge { position: relative; left: auto; bottom: auto; width: calc(100% - 2.5rem); margin-top: calc(var(--s-12) * -1); text-align: start; }
    .ab-figs li { padding-top: var(--s-6); }
    .ab-fig b { font-size: 2.75rem; }
    .ab-intro { text-align: left; }
    .ab-quote::before { width: 90%; opacity: 0.35; }
}
