/*
 * Steadfast — 12-slide investor summary.
 *
 * The Jewell Tyres deck format — full-viewport scroll-snap slides, fixed bar,
 * progress line, nav dots, eyebrow/rule/head anatomy, full-bleed photography
 * behind a directional scrim — carried onto the Steadfast identity: Poppins,
 * Jewell Projects blue, near-black ground.
 *
 * Two departures from the reference, both deliberate:
 *
 *   1. Every rule lives here rather than in a <style> block, and the images
 *      are classes rather than inline background-image. The site's CSP is
 *      `style-src 'self'` with no unsafe-inline, so an inline style attribute
 *      is silently dropped — the same defect that once stopped the app's own
 *      boot script running.
 *   2. The slides are real markup in index.html, not built by JS. The script
 *      adds the chrome; with it blocked or broken you still get the deck.
 */

@font-face {
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/poppins-400.woff2') format('woff2');
}
@font-face {
  font-family: 'Poppins';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/poppins-400-italic.woff2') format('woff2');
}
@font-face {
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('/fonts/poppins-500.woff2') format('woff2');
}
@font-face {
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('/fonts/poppins-600.woff2') format('woff2');
}
@font-face {
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('/fonts/poppins-700.woff2') format('woff2');
}

:root {
  --black: #0b0d10;
  --panel: #14181d;
  --panel2: #1a1f26;
  --line: #272d35;
  --ink: #ffffff;
  --grey: #9aa3ad;
  --dim: #6b747e;

  /* JP blue, lifted for legibility on a dark ground; the solid stays true. */
  --blue: #4c93ff;
  --blue-solid: #0066ff;

  --tbc: #e6b455;
  --tbc-bg: rgba(230, 180, 85, 0.13);

  --font: 'Poppins', 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  background: var(--black);
  color: var(--ink);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

#deck {
  height: 100vh;
  height: 100dvh;
  overflow-y: scroll;
  scroll-snap-type: y mandatory;
}

.slide {
  min-height: 100vh;
  min-height: 100dvh;
  scroll-snap-align: start;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 96px clamp(28px, 7vw, 120px) 88px;
  overflow: hidden;
}

.slide.center {
  align-items: center;
  text-align: center;
}

a {
  color: var(--blue);
}

:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
}

/* ══ chrome ══ */

#bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 56px;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 clamp(20px, 5vw, 48px);
  background: linear-gradient(#0b0d10ee, #0b0d1099 70%, #0b0d1000);
  backdrop-filter: blur(4px);
}

#bar .wm {
  font-weight: 700;
  letter-spacing: 0.16em;
  font-size: 12px;
}

#bar .wm b {
  color: var(--blue);
  font-weight: 700;
}

#bar .conf {
  margin-left: auto;
  font-size: 9px;
  letter-spacing: 0.2em;
  color: var(--dim);
  border: 1px solid var(--line);
  padding: 5px 9px;
  border-radius: 4px;
  white-space: nowrap;
}

#prog {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  background: var(--blue);
  width: 0;
  z-index: 60;
  transition: width 0.15s;
}

.foot {
  text-align: left;
  position: absolute;
  left: clamp(28px, 7vw, 120px);
  right: clamp(28px, 7vw, 120px);
  bottom: 30px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 9px;
  letter-spacing: 0.14em;
  color: var(--dim);
  border-top: 1px solid var(--line);
  padding-top: 10px;
  z-index: 3;
}

.foot .lab {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.foot .made {
  color: var(--dim);
  letter-spacing: 0.2em;
  white-space: nowrap;
}

.foot .num {
  color: var(--blue);
  font-weight: 700;
  white-space: nowrap;
}

.foot .tick {
  width: 26px;
  height: 3px;
  background: var(--blue);
  flex: none;
}

/* ══ type ══ */

.eyebrow {
  color: var(--blue);
  font-weight: 700;
  letter-spacing: 0.28em;
  font-size: clamp(10px, 1.1vw, 13px);
  margin-bottom: 14px;
  text-transform: uppercase;
}

.rule {
  width: 46px;
  height: 4px;
  background: var(--blue);
  margin-bottom: 18px;
}

h1.head {
  font-size: clamp(24px, 3.5vw, 44px);
  font-weight: 700;
  line-height: 1.04;
  letter-spacing: -0.015em;
  max-width: 20ch;
}

.intro {
  color: var(--grey);
  font-style: italic;
  margin-top: 14px;
  font-size: clamp(13px, 1.4vw, 17px);
  max-width: 62ch;
  line-height: 1.45;
}

.content {
  max-width: 1180px;
  width: 100%;
  margin: 0 auto;
  position: relative;
  z-index: 3;
}

.slide.photo .content {
  max-width: 860px;
  margin: 0;
}

.body {
  color: var(--grey);
  margin-top: 22px;
  max-width: 66ch;
  font-size: clamp(13px, 1.4vw, 15.5px);
  line-height: 1.55;
}

.quote {
  margin-top: 24px;
  border-left: 4px solid var(--blue);
  padding-left: 16px;
  font-style: italic;
  font-weight: 600;
  font-size: clamp(15px, 1.8vw, 21px);
  max-width: 46ch;
  line-height: 1.35;
}

.quote cite {
  display: block;
  margin-top: 10px;
  font-style: normal;
  font-weight: 400;
  font-size: 12px;
  color: var(--dim);
  letter-spacing: 0.04em;
}

.tail {
  margin-top: 22px;
  color: var(--blue);
  font-style: italic;
  font-size: clamp(12px, 1.3vw, 14.5px);
  max-width: 82ch;
  line-height: 1.45;
}

.tail.plainq {
  color: var(--grey);
}

/* ══ photography ══ */

.bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  background-size: cover;
  background-position: center;
}

.scrim {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(0deg, #0b0d10ee 0%, #0b0d1000 18%), linear-gradient(180deg, #0b0d10dd 0%, #0b0d1000 11%),
    linear-gradient(100deg, #0b0d10f7 0%, #0b0d10e8 46%, #0b0d1078 78%, #0b0d1040 100%);
}

.scrim.soft {
  background:
    linear-gradient(180deg, #0b0d10dd 0%, #0b0d1000 11%),
    linear-gradient(0deg, #0b0d10ef 0%, #0b0d10b0 42%, #0b0d1078 100%);
}

@media (max-width: 760px) {
  .slide.photo .content {
    max-width: 100%;
  }
  .slide.photo .scrim {
    background: #0b0d10e0;
  }
}

.bg--kitchen {
  background-image: url('/media/kitchen-night.webp');
}
.bg--phone {
  background-image: url('/media/phone-bench.webp');
}
.bg--handover {
  background-image: url('/media/handover.webp');
  background-position: center 40%;
}
.bg--street {
  background-image: url('/media/dawn-street.webp');
}
.bg--table {
  background-image: url('/media/prepared-table.webp');
}
.bg--headland {
  background-image: url('/media/headland.webp');
}

/* ══ numbered points ══ */

.points {
  margin-top: 26px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  max-width: 800px;
}

.pt {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 18px;
  align-items: start;
}

.pt .n {
  color: var(--blue);
  font-weight: 700;
  font-size: clamp(17px, 1.9vw, 23px);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.pt .t {
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-size: 12.5px;
  margin-bottom: 5px;
}

.pt .b {
  color: var(--grey);
  font-size: clamp(13px, 1.32vw, 15px);
  line-height: 1.45;
}

/* ══ bullets ══ */

ul.bul {
  margin-top: 24px;
  max-width: 92ch;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 13px;
}

ul.bul li {
  position: relative;
  padding-left: 26px;
  color: var(--ink);
  font-size: clamp(13px, 1.45vw, 15.5px);
  line-height: 1.45;
}

ul.bul li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 14px;
  height: 2px;
  background: var(--blue);
}

/* ══ stat tiles ══ */

.tiles {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-top: 24px;
  max-width: 860px;
}

.tile {
  background: var(--panel);
  border: 1px solid var(--line);
  border-top: 4px solid var(--blue);
  border-radius: 6px;
  padding: 22px 14px;
  text-align: center;
}

.tile .big {
  color: var(--blue);
  font-weight: 700;
  font-size: clamp(21px, 2.5vw, 33px);
  line-height: 1;
}

.tile .lab {
  color: var(--ink);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-top: 10px;
  line-height: 1.3;
}

/* ══ table ══ */

table.t {
  margin-top: 24px;
  width: 100%;
  max-width: 1100px;
  border-collapse: collapse;
  font-size: clamp(12px, 1.3vw, 15px);
}

table.t th {
  color: var(--blue);
  text-align: left;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 11px;
  font-weight: 700;
  padding: 12px 14px;
  background: var(--panel);
  border: 1px solid var(--line);
}

table.t td {
  padding: 12px 14px;
  border: 1px solid var(--line);
  color: var(--ink);
  vertical-align: top;
  background: #0e1217;
}

table.t tr:nth-child(even) td {
  background: #131820;
}

table.t td:first-child {
  font-weight: 600;
  white-space: nowrap;
}

table.t td:last-child {
  color: var(--grey);
}

/* ══ two columns ══ */

.cols2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
  margin-top: 24px;
}

.col {
  background: var(--panel);
  border: 1px solid var(--line);
  border-top: 5px solid var(--blue);
  border-radius: 8px;
  padding: 24px;
}

.col.dim {
  border-top-color: var(--dim);
}

.col h3 {
  color: var(--blue);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 14px;
}

.col.dim h3 {
  color: var(--grey);
}

.col ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 11px;
}

.col li {
  position: relative;
  padding-left: 22px;
  font-size: 13.5px;
  line-height: 1.42;
}

.col li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 12px;
  height: 2px;
  background: var(--blue);
}

.col.dim li::before {
  background: var(--dim);
}

.col li b {
  font-weight: 600;
}

/* ══ roadmap ══ */

.road {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-top: 26px;
}

.ph {
  background: var(--panel);
  border: 1px solid var(--line);
  border-top: 5px solid var(--blue);
  border-radius: 8px;
  padding: 22px 16px;
}

.ph .num {
  color: var(--blue);
  font-weight: 700;
  font-size: 34px;
  line-height: 1;
}

.ph .ph0 {
  color: var(--grey);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-top: 10px;
}

.ph .ph1 {
  font-weight: 700;
  font-size: 14.5px;
  margin-top: 5px;
  line-height: 1.2;
}

.ph .ph2 {
  color: var(--grey);
  font-size: 11.5px;
  margin-top: 8px;
  line-height: 1.35;
}

/* ══ the raise ══ */

.money {
  display: grid;
  grid-template-columns: 290px 1fr;
  gap: 34px;
  margin-top: 24px;
  align-items: start;
}

.bigbox {
  background: var(--panel);
  border: 1px solid var(--line);
  border-top: 5px solid var(--tbc-edge, var(--tbc));
  border-radius: 8px;
  padding: 30px 18px;
  text-align: center;
}

.bigbox .v {
  color: var(--tbc);
  font-weight: 700;
  font-size: clamp(19px, 2.3vw, 27px);
  line-height: 1.15;
}

.bigbox .l {
  color: var(--ink);
  font-size: 12px;
  letter-spacing: 0.06em;
  margin-top: 14px;
  line-height: 1.35;
}

.money .lines {
  max-width: 780px;
}

.lines .row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 11px 2px;
  border-bottom: 1px solid var(--line);
  font-size: 13.5px;
  line-height: 1.4;
}

.lines .row .v {
  color: var(--tbc);
  font-weight: 600;
  white-space: nowrap;
  font-size: 12px;
}

/* ══ to-confirm marker, carried from the memorandum ══ */

.tbc {
  color: var(--tbc);
  background: var(--tbc-bg);
  border-bottom: 2px solid var(--tbc);
  padding: 0.04em 0.34em;
  font-weight: 600;
  font-style: normal;
  white-space: nowrap;
}

.tbc::before {
  content: '[';
}

.tbc::after {
  content: ']';
}

.legend {
  margin-top: 26px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 11.5px;
  color: var(--grey);
  border-top: 1px solid var(--line);
  padding-top: 16px;
  max-width: 82ch;
  line-height: 1.4;
}

/* ══ title slide ══ */

.title .est {
  color: var(--blue);
  font-weight: 700;
  letter-spacing: 0.22em;
  font-size: clamp(10px, 1.2vw, 13px);
}

.title .huge {
  font-weight: 700;
  font-size: clamp(56px, 12vw, 138px);
  line-height: 0.9;
  letter-spacing: -0.03em;
  margin: 18px 0 14px;
}

.title .sub {
  font-size: clamp(15px, 2.1vw, 24px);
  color: var(--ink);
  font-weight: 400;
  max-width: 24ch;
  margin: 0 auto;
  line-height: 1.25;
}

.title .meta {
  color: var(--grey);
  letter-spacing: 0.18em;
  font-size: clamp(9px, 1.1vw, 12px);
  margin-top: 26px;
  line-height: 1.8;
}

.title .meta a {
  color: var(--blue);
  text-decoration: none;
  border-bottom: 1px solid var(--line);
}

/* ══ close ══ */

.close .sig {
  margin-top: 24px;
  font-weight: 700;
  font-size: 15px;
}

.close .sig span {
  color: var(--blue);
  font-weight: 400;
}

.notice p {
  color: var(--grey);
  font-size: clamp(11.5px, 1.2vw, 13px);
  line-height: 1.55;
  margin-top: 12px;
  max-width: 96ch;
}

/* ══ nav dots ══ */

#dots {
  position: fixed;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 55;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

#dots a {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #3a4048;
  transition: 0.2s;
  position: relative;
  display: block;
}

#dots a.on {
  background: var(--blue);
  transform: scale(1.3);
}

#dots a span {
  position: absolute;
  right: 18px;
  top: 50%;
  transform: translateY(-50%);
  white-space: nowrap;
  font-size: 10px;
  color: var(--ink);
  background: #1c2128;
  border: 1px solid var(--line);
  padding: 3px 8px;
  border-radius: 4px;
  opacity: 0;
  pointer-events: none;
  transition: 0.15s;
  letter-spacing: 0.04em;
}

#dots a:hover span,
#dots a:focus-visible span {
  opacity: 1;
}

#hint {
  position: fixed;
  bottom: 7px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 55;
  color: var(--dim);
  font-size: 10px;
  letter-spacing: 0.16em;
  animation: fade 3s ease 5s forwards;
}

@keyframes fade {
  to {
    opacity: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  #hint {
    animation: none;
  }
}

#totop {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 57;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--blue-solid);
  color: #fff;
  border: none;
  cursor: pointer;
  font-size: 19px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.45);
  opacity: 0;
  pointer-events: none;
  transition:
    opacity 0.2s,
    transform 0.2s;
  font-family: var(--font);
}

#totop.show {
  opacity: 1;
  pointer-events: auto;
}

#totop:hover {
  transform: translateY(-2px);
}

/* ══ narrow ══ */

/*
 * On a phone a slide's content is routinely taller than the viewport, and
 * `overflow:hidden` was quietly cutting the bottom off — on the defensibility
 * slide, half the argument. Below this width a slide grows to fit, starts at
 * the top instead of centring, and snapping relaxes to proximity so a tall
 * slide can still be read through.
 */
@media (max-width: 900px) {
  #deck {
    scroll-snap-type: y proximity;
  }

  .slide {
    overflow: visible;
    justify-content: flex-start;
    height: auto;
  }

  .tiles {
    grid-template-columns: repeat(2, 1fr);
  }
  .road {
    grid-template-columns: repeat(2, 1fr);
  }
  .cols2 {
    grid-template-columns: 1fr;
  }
  .money {
    grid-template-columns: 1fr;
  }
  #dots {
    display: none;
  }
  .slide {
    padding: 78px 24px 74px;
  }
  .foot {
    left: 24px;
    right: 24px;
    bottom: 24px;
  }
  table.t {
    font-size: 12px;
  }
  table.t th,
  table.t td {
    padding: 9px 10px;
  }
  table.t td:first-child {
    white-space: normal;
  }
}

/* The deck is a screen artefact. On paper, send people to the memorandum. */
@media print {
  #bar,
  #dots,
  #hint,
  #totop,
  #prog {
    display: none !important;
  }
  #deck {
    height: auto;
    overflow: visible;
  }
  .slide {
    min-height: 0;
    break-after: page;
    padding: 0 0 24px;
  }
  body {
    background: #fff;
    color: #000;
  }
  .bg,
  .scrim {
    display: none;
  }
}
