/* Stellarbeast Studios: site styles (design D, "B + A fusion")
   Colours, fonts and spacing live in the :root block below. Change them there. */

/* ---------- Fonts (self-hosted, SIL Open Font License) ---------- */
@font-face { font-family: "Bodoni Moda"; font-style: normal; font-weight: 400 900; font-display: swap; src: url("../fonts/bodoni-moda.woff2") format("woff2"); }
@font-face { font-family: "Bodoni Moda"; font-style: italic; font-weight: 400 900; font-display: swap; src: url("../fonts/bodoni-moda-italic.woff2") format("woff2"); }
@font-face { font-family: "Archivo"; font-style: normal; font-weight: 100 900; font-display: swap; src: url("../fonts/archivo.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/ibm-plex-mono-400.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 500; font-display: swap; src: url("../fonts/ibm-plex-mono-500.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 600; font-display: swap; src: url("../fonts/ibm-plex-mono-600.woff2") format("woff2"); }

/* ---------- Design tokens ---------- */
:root {
  --paper: #F4F3EF;
  --card: #FFFFFF;
  --panel: #F8F7F4;
  --ink: #111317;
  --body: #2A2E34;
  --muted: #4D535C;
  --rule: #CFCDC6;
  --rule-soft: #E6E4DE;
  --accent: #2343E0;
  --accent-hover: #16289A;
  --gold-text: #7A5C26;
  --gold-line: #C9AE74;
  --bronze: #9A7430;
  --bronze-dark: #6E521F;
  --low-line: #8E949C;
  --night: #0B0E15;
  --ivory: #ECE6D8;
  --ivory-body: #C2BCAD;
  --ivory-muted: #A6A293;
  --champagne: #D3BC8D;
  --bar-1: #DCE2FB;
  --bar-2: #9FB0F4;
  --bar-3: #6F84EA;
  --bar-4: #7A5C26;

  --serif: "Bodoni Moda", "Bodoni 72", Didot, Georgia, serif;
  --sans: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Menlo, Consolas, monospace;

  --wrap: 1312px;
  --gutter: clamp(20px, 4vw, 48px);
  --section-space: clamp(72px, 9vw, 104px);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--sans); font-size: 17px; line-height: 1.55; overflow-x: hidden; }
svg { display: block; }
a { color: var(--accent); }
a:hover { color: var(--accent-hover); }
:focus-visible { outline: 2px solid var(--bronze); outline-offset: 3px; }
.section--night :focus-visible { outline-color: var(--champagne); }

.skip-link { position: absolute; left: 12px; top: -60px; z-index: 10; padding: 10px 16px; background: var(--ink); color: #FFFFFF; font-weight: 600; }
.skip-link:focus { top: 12px; color: #FFFFFF; }

.wrap { max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }

/* ---------- Header ---------- */
.site-header { border-bottom: 1px solid var(--rule); }
.site-header .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; padding-block: 16px; }
.brand { display: flex; align-items: center; gap: 12px; min-height: 44px; color: var(--ink); text-decoration: none; }
.brand:hover { color: var(--ink); }
.brand__name { font-family: var(--serif); font-size: 23px; letter-spacing: 0.01em; }
.brand__suffix { font-family: var(--mono); font-size: 11px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--muted); }
.nav { display: flex; flex-wrap: wrap; align-items: center; gap: 2px; font-family: var(--mono); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; }
.nav a { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 12px; color: var(--ink); text-decoration: none; }
.nav a:hover { color: var(--accent); }
.nav__num { color: var(--gold-text); }
.nav .btn { margin-left: 10px; }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 52px; padding: 0 24px; border: 1px solid transparent; font-family: var(--sans); font-size: 16px; font-weight: 600; letter-spacing: 0; text-transform: none; text-decoration: none; }
.btn svg { width: 18px; height: 18px; flex: none; }
.nav a.btn--small, .btn--small { min-height: 44px; padding: 0 18px; font-family: var(--mono); font-size: 12px; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; }
.btn--primary, .nav a.btn--primary { background: var(--accent); color: #FFFFFF; }
.btn--primary:hover, .nav a.btn--primary:hover { background: var(--accent-hover); color: #FFFFFF; }
.btn--outline { border-color: var(--ink); color: var(--ink); }
.btn--outline:hover { background: var(--ink); color: var(--paper); }
.btn--night { border-color: rgba(236, 230, 216, 0.45); color: var(--ivory); }
.btn--night:hover { border-color: var(--champagne); color: var(--champagne); }

/* ---------- Type ---------- */
.eyebrow { margin: 0; display: flex; align-items: center; gap: 14px; font-family: var(--mono); font-size: 13px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--gold-text); }
.eyebrow--rule::before { content: ""; flex: none; width: 32px; height: 1px; background: var(--gold-line); }
.display { margin: 0; max-width: 1120px; font-family: var(--serif); font-weight: 400; font-size: clamp(46px, 6vw, 92px); line-height: 1; letter-spacing: -0.01em; text-wrap: balance; }
.section-title { margin: 0; font-family: var(--serif); font-weight: 400; font-size: clamp(36px, 4.2vw, 60px); line-height: 1.04; letter-spacing: -0.01em; text-wrap: balance; }
.display em, .section-title em { font-style: italic; color: var(--gold-text); }
.lead { margin: 0; max-width: 720px; font-size: 19px; line-height: 1.6; color: var(--body); text-wrap: pretty; }
.small-print { margin: 0; max-width: 720px; font-family: var(--mono); font-size: 12px; line-height: 1.6; color: var(--muted); }

/* ---------- Sections ---------- */
.section { border-bottom: 1px solid var(--rule); }
.section > .wrap { padding-block: var(--section-space); display: flex; flex-direction: column; gap: 40px; }
.section__head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 20px 40px; }
.section__head > div { display: flex; flex-direction: column; gap: 16px; }
.section__head > p { margin: 0; max-width: 440px; font-size: 16px; line-height: 1.6; color: var(--body); }
.chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; font-family: var(--mono); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; }
.chips li { padding: 6px 12px; border: 1px solid var(--ink); }
.foot-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 32px; }

/* ---------- Hero ---------- */
.hero { border-bottom: 1px solid var(--rule); background-image: linear-gradient(rgba(17, 19, 23, 0.04) 1px, transparent 1px), linear-gradient(90deg, rgba(17, 19, 23, 0.04) 1px, transparent 1px); background-size: 24px 24px; }
.hero > .wrap { padding-block: clamp(48px, 7vw, 72px) clamp(56px, 7vw, 80px); display: flex; flex-direction: column; gap: 36px; }
.hero__row { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 28px 48px; }
.hero__row .lead { flex: 1 1 480px; max-width: 660px; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- Instrument panel (hero chart) ---------- */
.panel { display: flex; flex-wrap: wrap; background: var(--card); border: 1px solid var(--rule); }
.panel__main { flex: 3 1 560px; min-width: 0; padding: 24px 28px 20px; display: flex; flex-direction: column; gap: 16px; }
.panel__head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 10px 24px; }
.fig-title { margin: 0; font-family: var(--mono); font-size: 12px; font-weight: 500; letter-spacing: 0.1em; text-transform: uppercase; }
.legend { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 18px; font-family: var(--mono); font-size: 12px; color: var(--body); }
.legend li { display: flex; align-items: center; gap: 8px; }
.legend svg { width: 28px; height: 8px; }
.chart-scroll { overflow-x: auto; }
.chart-scroll > svg { width: 100%; min-width: 520px; height: auto; }
.s-low { stroke: var(--low-line); }
.s-med { stroke: var(--accent); }
.s-high { stroke: var(--bronze); }
.readouts { flex: 1 1 220px; margin: 0; padding: 24px 28px; background: var(--panel); display: flex; flex-direction: column; gap: 22px; }
.readouts dt { font-family: var(--mono); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.readouts dd { margin: 4px 0 0; font-size: 16px; }
.readouts .big { font-family: var(--serif); font-size: 44px; line-height: 1.05; }

/* ---------- RTP breakdown bars ---------- */
.bars { display: flex; flex-direction: column; gap: 20px; }
.bar-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 24px; }
.bar-row__label { flex: 0 0 160px; display: flex; flex-direction: column; gap: 2px; }
.bar-row__name { font-size: 18px; font-weight: 700; }
.bar-row__meta { font-family: var(--mono); font-size: 12px; color: var(--muted); }
.bar { flex: 1 1 520px; min-width: 0; height: 44px; display: flex; gap: 2px; font-family: var(--mono); font-size: 13px; }
.bar span { min-width: 0; overflow: hidden; display: flex; align-items: center; padding-left: 8px; }
.seg-1 { background: var(--bar-1); color: var(--ink); }
.seg-2 { background: var(--bar-2); color: var(--ink); }
.seg-3 { background: var(--bar-3); color: var(--ink); }
.seg-4 { background: var(--bar-4); color: #FFFFFF; }
.key { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px 24px; font-family: var(--mono); font-size: 12px; color: var(--body); }
.key li { display: flex; align-items: center; gap: 8px; }
.key span { width: 14px; height: 14px; }
.key .seg-1 { border: 1px solid var(--bar-2); }
@media (max-width: 640px) { .seg--tiny { font-size: 0; padding: 0 !important; } }

/* ---------- Data table ---------- */
.table-scroll { overflow-x: auto; }
.data-table { width: 100%; min-width: 600px; border-collapse: collapse; background: var(--card); border: 1px solid var(--rule); font-family: var(--mono); font-size: 13px; font-variant-numeric: tabular-nums; }
.data-table th, .data-table td { padding: 12px 16px; text-align: right; border-bottom: 1px solid var(--rule-soft); }
.data-table thead th { background: var(--panel); border-bottom-color: var(--rule); font-size: 11px; font-weight: 500; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.data-table th:first-child { text-align: left; }
.data-table tbody th { font-weight: 600; }
.data-table tbody tr:last-child > * { border-bottom: 0; }

/* ---------- Night sections (the "A" touches) ---------- */
.section--night { background: var(--night); color: var(--ivory); border-bottom: 0; }
.section--night .eyebrow { color: var(--champagne); }
.section--night .eyebrow--rule::before { background: var(--champagne); }
.section--night .section-title em { color: var(--champagne); }

.orbit > .wrap { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 48px 64px; }
.orbit__text { flex: 1 1 380px; min-width: 0; display: flex; flex-direction: column; gap: 24px; }
.orbit__text > p:not(.eyebrow) { margin: 0; max-width: 520px; font-size: 18px; line-height: 1.65; color: var(--ivory-body); }
.orbit__text > p.orbit__note { font-size: 14px; line-height: 1.6; color: var(--ivory-muted); }
.orbit__chart { flex: 1 1 440px; min-width: 0; max-width: 620px; }
.orbit__chart > svg { width: 100%; height: auto; }
.stats { margin: 0; max-width: 520px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 32px; }
.stats div { padding: 14px 0; border-top: 1px solid rgba(236, 230, 216, 0.18); }
.stats dt { font-family: var(--mono); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ivory-muted); }
.stats dd { margin: 4px 0 0; font-family: var(--serif); font-size: 30px; line-height: 1.1; }
.stats dd.gold { color: var(--champagne); }

/* ---------- Expertise list ---------- */
.spec { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--ink); }
.spec li { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 32px; padding: 22px 0; border-bottom: 1px solid var(--rule); }
.spec__num { flex: 0 0 56px; font-family: var(--mono); font-size: 13px; color: var(--gold-text); }
.spec h3 { margin: 0; flex: 1 1 280px; font-size: 22px; font-weight: 700; letter-spacing: -0.01em; }
.spec p { margin: 0; flex: 2 1 420px; font-size: 17px; line-height: 1.55; color: var(--body); }

/* ---------- Work cards ---------- */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(320px, 100%), 1fr)); gap: 24px; }
.card { display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--rule); }
.card__media { position: relative; overflow: hidden; aspect-ratio: 16 / 10; background: var(--night); border-bottom: 1px solid var(--rule); }
.card__media > svg { position: absolute; top: 6%; left: 0; width: 100%; height: 88%; }
.card__body { padding: 20px 22px 24px; display: flex; flex-direction: column; gap: 10px; }
.card__meta { margin: 0; font-family: var(--mono); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.card h3 { margin: 0; font-size: 22px; font-weight: 700; letter-spacing: -0.01em; }
.card p { margin: 0; font-size: 15px; line-height: 1.55; color: var(--muted); }

/* ---------- Background ---------- */
.section > .wrap.about { flex-direction: row; flex-wrap: wrap; gap: 32px 64px; }
.about__head { flex: 1 1 300px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.about__body { flex: 2 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 32px; }
.about__bio { margin: 0; font-family: var(--serif); font-size: clamp(20px, 2vw, 24px); line-height: 1.5; color: var(--body); text-wrap: pretty; }
.facts { margin: 0; border-top: 1px solid var(--ink); }
.facts div { display: flex; flex-wrap: wrap; gap: 4px 24px; padding: 16px 0; border-bottom: 1px solid var(--rule); }
.facts dt { flex: 0 0 180px; padding-top: 3px; font-family: var(--mono); font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.facts dd { margin: 0; flex: 1 1 280px; font-size: 17px; line-height: 1.5; }

/* ---------- Contact ---------- */
.contact > .wrap { padding-block: clamp(88px, 10vw, 120px); align-items: center; gap: 28px; text-align: center; }
.contact .section-title { font-size: clamp(46px, 6.2vw, 90px); line-height: 1.02; }
.contact .wrap > p:not(.eyebrow) { margin: 0; max-width: 560px; font-size: 19px; line-height: 1.6; color: var(--ivory-body); }
.contact__email { padding: 6px 2px; font-family: var(--serif); font-size: clamp(22px, 2.6vw, 34px); color: var(--ivory); text-decoration: none; border-bottom: 1px solid var(--champagne); overflow-wrap: anywhere; }
.contact__email:hover { color: var(--champagne); }

/* ---------- Footer ---------- */
.site-footer { background: var(--night); border-top: 1px solid rgba(236, 230, 216, 0.12); }
.site-footer .wrap { padding-block: 28px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px 32px; font-family: var(--mono); font-size: 12px; line-height: 1.6; color: var(--ivory-muted); }
