/* riff data room — brand tokens shared with the riff website (dev-riff/website) */
:root {
  --page: #08040F;          /* page background */
  --lavender: #BB9CFA;      /* signature */
  --soft-white: #EFEAF9;    /* light */
  --ultraviolet: #5B3FC4;   /* accent */
  --muted: #9A91AD;         /* secondary text (from the pitch) */
  --card: rgba(22, 18, 30, 0.72);            /* #16121E, the pitch slide colour */
  --card-line: rgba(187, 156, 250, 0.14);
  --card-line-hover: rgba(187, 156, 250, 0.5);

  --font-sans: 'Google Sans', 'Helvetica Neue', Arial, sans-serif;

  --edge: clamp(16px, 5.208vw, 100px);
  --max: 1440px;
  --logo-h: clamp(28px, 2.5vw, 40px);
  --text-sm: clamp(15px, 1.05vw, 18px);
  --text-md: clamp(18px, 1.35vw, 24px);
  --text-lg: clamp(36px, 4.4vw, 84px);
  --radius: 20px;

  --ease-out: cubic-bezier(.16, 1, .3, 1);
}

/* Redaction italics, from the smooth cut to the most pixelated (SIL Open Font License) */
@font-face { font-family: 'Redaction';     src: url('assets/fonts/redaction-latin-400-italic.woff2') format('woff2');     font-style: italic; font-display: swap; }
@font-face { font-family: 'Redaction 20';  src: url('assets/fonts/redaction-20-latin-400-italic.woff2') format('woff2');  font-style: italic; font-display: swap; }
@font-face { font-family: 'Redaction 35';  src: url('assets/fonts/redaction-35-latin-400-italic.woff2') format('woff2');  font-style: italic; font-display: swap; }
@font-face { font-family: 'Redaction 50';  src: url('assets/fonts/redaction-50-latin-400-italic.woff2') format('woff2');  font-style: italic; font-display: swap; }
@font-face { font-family: 'Redaction 70';  src: url('assets/fonts/redaction-70-latin-400-italic.woff2') format('woff2');  font-style: italic; font-display: swap; }
@font-face { font-family: 'Redaction 100'; src: url('assets/fonts/redaction-100-latin-400-italic.woff2') format('woff2'); font-style: italic; font-display: swap; }

*, *::before, *::after { box-sizing: border-box; }

html { overflow-x: clip; }

body {
  margin: 0;
  background: var(--page);
  color: var(--soft-white);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, p, ol { margin: 0; }
a { color: inherit; text-decoration: none; }
a:focus-visible { outline: 2px solid var(--lavender); outline-offset: 4px; border-radius: 4px; }

/* ---------- Background: slow blurred purple orbs (orbs.js) ---------- */
.backdrop { position: fixed; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; background: var(--page); }
.orbs { position: absolute; inset: 0; opacity: 0; transition: opacity 3s ease-out; }
.orbs.is-ready { opacity: 0.7; }
.orb { position: absolute; left: 0; top: 0; border-radius: 50%; filter: blur(90px); mix-blend-mode: screen; will-change: transform; }
.vignette { position: absolute; inset: 0; background: radial-gradient(ellipse 80% 60% at 50% 110%, rgba(8, 4, 15, 0.8), transparent 80%); }

/* ---------- Entrance ---------- */
.reveal { animation: reveal 1.6s var(--ease-out) backwards; }
.top .logo     { animation-delay: 0.1s; }
.hero-mark     { animation-delay: 0.25s; animation-duration: 2.4s; }
.hero .hero-cta { animation-delay: 0.9s; }
.hero .tagline { animation-delay: 0.55s; }
.hero .lede    { animation-delay: 0.75s; }

@keyframes reveal {
  from { opacity: 0; transform: translateY(18px); filter: blur(10px); }
  to   { opacity: 1; transform: translateY(0);    filter: blur(0); }
}

/* Below the hero, things appear as they scroll into view (reveal.js) */
.section .reveal { animation: none; transition: opacity 1.1s var(--ease-out), transform 1.1s var(--ease-out), filter 1.1s var(--ease-out); }
.section .reveal.is-waiting { opacity: 0; transform: translateY(24px); filter: blur(8px); }

/* ---------- Header ---------- */
.top {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  min-height: 72px;
  padding: clamp(16px, 2.6vw, 44px) max(var(--edge), calc((100% - var(--max)) / 2)) 14px;
  border-bottom: 1px solid transparent;
  transition: padding 0.5s var(--ease-out), background-color 0.4s, border-color 0.4s, backdrop-filter 0.4s;
}

/* Once the page scrolls: tighter, with a frosted background */
.top.is-scrolled {
  padding-top: 14px;
  background-color: rgba(8, 4, 15, 0.72);
  border-bottom-color: rgba(187, 156, 250, 0.1);
  backdrop-filter: blur(16px) saturate(1.2);
  -webkit-backdrop-filter: blur(16px) saturate(1.2);
}

/* "Contact us" in the header appears once the hero button scrolls away */
.header-cta {
  opacity: 0;
  transform: translateY(-6px);
  pointer-events: none;
  transition: opacity 0.4s var(--ease-out), transform 0.4s var(--ease-out), background-color 0.3s, box-shadow 0.3s;
}
.top.show-cta .header-cta { opacity: 1; transform: none; pointer-events: auto; }

/* ---------- Buttons ---------- */
/* The riff app's primary button (dark theme): a purple gradient lit from the
   top, with a lit inner stroke and a soft inner glow */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: var(--text-sm);
  font-weight: 500;
  color: #16121E;
  background: radial-gradient(50% 100% at 50% 0%, #BB9CFA 0%, #8B6AE6 100%) border-box;
  border-radius: 12px;
  padding: 14px 26px;
  white-space: nowrap;
  box-shadow: inset 0 0 8px rgba(255, 255, 255, 0.72);
  transition: filter 0.3s;
}
.btn::before {
  content: '';
  position: absolute;
  inset: -1px;
  padding: 1px;
  border-radius: inherit;
  background: radial-gradient(50% 100% at 50% 0%, #fff 0%, rgba(255, 255, 255, 0) 100%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
          mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  pointer-events: none;
}
.btn:hover { filter: brightness(1.22); }
/* Phosphor icons (inlined SVG, regular weight) */
.ph { width: 1.15em; height: 1.15em; flex: none; }
.ph-arrow { transition: transform 0.4s var(--ease-out); }
.btn:hover .ph-right, .card:hover .ph-right { transform: translateX(3px); }
.btn-sm { font-size: 14px; padding: 9px 18px; }
.hero-cta { margin-top: 10px; }

.logo { display: inline-flex; align-items: center; gap: 14px; color: var(--soft-white); }
.logo svg { display: block; height: var(--logo-h); width: auto; fill: currentColor; }
/* riff | Data room */
.logo-sep { width: 1px; height: calc(var(--logo-h) * 0.8); background: rgba(239, 234, 249, 0.35); }
.logo-tag {
  font-size: clamp(16px, 1.25vw, 20px);
  color: var(--soft-white);
  white-space: nowrap;
}

.foot a {
  text-decoration: underline;
  text-decoration-thickness: from-font;
  text-underline-position: from-font;
  transition: color 0.3s;
}
.foot a:hover { color: var(--lavender); }

/* ---------- Hero ---------- */
main { max-width: calc(var(--max) + 2 * var(--edge)); margin: 0 auto; padding: 0 var(--edge); }

/* Text and symbol share one centre line: the text block is centred in the
   hero, and so is the symbol's stage */
.hero {
  --stage: clamp(340px, 40vw, 600px);
  position: relative;
  min-height: max(clamp(460px, 66vh, 720px), calc(var(--stage) * 0.9));
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 18px;
  padding: clamp(40px, 6vw, 96px) 0;
}

/* The riff symbol with the glowing heatmap shader, as on the riff app's login
   page (hero-mark.js). The shader draws the symbol at 65% of a square stage,
   so the stage hangs 17.5% past the content edge to line the symbol itself up
   with the right edge of the content. */
.hero-mark {
  position: absolute;
  z-index: -1;
  top: calc(50% - var(--stage) / 2);
  right: calc(var(--stage) * -0.175);
  width: var(--stage);
  aspect-ratio: 1;
}

/* Soft purple glow behind the symbol that slowly breathes and drifts. Two
   layers out of step with each other, so the motion never looks like a loop. */
.hero-mark::before,
.hero-mark::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  filter: blur(24px);
}
.hero-mark::before {
  inset: 12%;
  background: radial-gradient(closest-side, rgba(139, 106, 230, 0.4), transparent);
  animation: hero-glow-breathe 7s ease-in-out infinite;
}
.hero-mark::after {
  inset: 22% 28% 22% 18%;
  background: radial-gradient(closest-side, rgba(187, 156, 250, 0.22), transparent);
  animation: hero-glow-drift 11s ease-in-out infinite;
}
@keyframes hero-glow-breathe {
  0%, 100% { opacity: 0.55; transform: scale(0.92); }
  50%      { opacity: 1;    transform: scale(1.06); }
}
@keyframes hero-glow-drift {
  0%, 100% { opacity: 0.4; transform: translate(-6%, 3%) scale(0.95); }
  50%      { opacity: 0.9; transform: translate(8%, -4%) scale(1.08); }
}

.hero-shader {
  position: absolute;
  inset: 0;
  isolation: isolate; /* Paper's canvas is z-index -1; keep it inside this box */
  opacity: 0;         /* fade in once the first frame is ready */
  transition: opacity 0.8s ease;
}
.hero-shader.is-ready { opacity: 1; }

/* A glow that hugs the symbol itself, pulsing slowly. Clipped on the canvas
   to trim stray pixels on its outermost edge. */
.hero-shader canvas {
  clip-path: inset(2%);
  filter: drop-shadow(0 0 2px rgba(214, 196, 252, 0.7)) drop-shadow(0 0 8px rgba(139, 106, 230, 0.6));
  animation: hero-halo-pulse 5s ease-in-out infinite;
}
@keyframes hero-halo-pulse {
  0%, 100% { filter: drop-shadow(0 0 1.5px rgba(214, 196, 252, 0.7)) drop-shadow(0 0 6px rgba(139, 106, 230, 0.6)); }
  50%      { filter: drop-shadow(0 0 3px rgba(214, 196, 252, 0.7)) drop-shadow(0 0 14px rgba(139, 106, 230, 0.6)); }
}

/* Static symbol when WebGL 2 is unavailable */
.hero-mark-fallback {
  position: absolute;
  inset: 17.5%;
  background: url('assets/riff-symbol.svg') center / contain no-repeat;
  opacity: 0.5;
}

.tagline { font-size: var(--text-lg); font-weight: 400; line-height: 1.1; }
.tagline-riff { font-style: italic; white-space: nowrap; }
.tagline-riff .r0   { font-family: 'Redaction', Georgia, serif; }
.tagline-riff .r20  { font-family: 'Redaction 20', Georgia, serif; }
.tagline-riff .r35  { font-family: 'Redaction 35', Georgia, serif; }
.tagline-riff .r50  { font-family: 'Redaction 50', Georgia, serif; }
.tagline-riff .r70  { font-family: 'Redaction 70', Georgia, serif; }
.tagline-riff .r100 { font-family: 'Redaction 100', Georgia, serif; }
.tagline-riff > span { display: inline-block; transition: color 0.7s ease-out, opacity 0.12s ease-out, filter 0.12s ease-out; }
.tagline-riff > span.is-ticking { color: var(--lavender); opacity: 0.85; filter: blur(0.4px); transition: color 0.1s ease-out, opacity 0.12s, filter 0.12s; }

.lede { max-width: 34em; font-size: var(--text-md); line-height: 1.4; color: rgba(239, 234, 249, 0.82); }

/* ---------- Sections ---------- */
.section { padding: clamp(80px, 10vw, 176px) 0 0; }

/* Section titles match the hero title */
.section-title { font-size: var(--text-lg); font-weight: 400; line-height: 1.1; margin-bottom: clamp(28px, 3.2vw, 56px); }
/* Leave room for the sticky header when jumping to a section */
.section { scroll-margin-top: 80px; }

.grid { display: grid; gap: clamp(14px, 1.4vw, 24px); }
.rows { display: flex; flex-direction: column; gap: clamp(14px, 1.4vw, 24px); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); }

/* ---------- Cards (each card is one link) ---------- */
.card {
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--card);
  border: 1px solid var(--card-line);
  border-radius: var(--radius);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  transition: border-color 0.4s;
}
/* Hover: only the border lights up and the arrow nudges */
a.card:hover, a.card:focus-visible { border-color: var(--card-line-hover); }
.card:focus-visible { outline-offset: 3px; }

/* Materials */
.doc-visual {
  position: relative;
  aspect-ratio: 16 / 9;
  background: var(--bg) center / cover no-repeat, #1a1426;
}


.doc-body { position: relative; display: flex; flex-direction: column; gap: 8px; padding: 20px 22px 22px; }

/* Wider screens: visual on the left, text on the right, one material per row */
@media (min-width: 720px) {
  .rows .doc { flex-direction: row; align-items: stretch; }
  .rows .doc-visual { flex: none; width: min(42%, 460px); }
  .rows .doc-body { flex: 1; justify-content: center; gap: 10px; padding: clamp(24px, 3vw, 48px); }
  .rows .doc-body h3 { font-size: clamp(24px, 2vw, 34px); }
  .rows .doc-body p { font-size: var(--text-md); max-width: 30em; }
}
.doc-body h3 { font-size: clamp(20px, 1.5vw, 26px); font-weight: 500; }
.doc-body p { font-size: var(--text-sm); line-height: 1.4; color: var(--muted); }

.doc-action {
  margin-top: 8px;
  font-size: 15px;
  font-weight: 500;
  color: var(--lavender);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.card:hover .ph-up-right { transform: translate(3px, -3px); }
.card:hover .ph-down { transform: translateY(3px); }

/* Team metrics, as on the pitch's team slide */
.metrics {
  list-style: none;
  margin: 0 0 clamp(24px, 3vw, 44px);
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
  gap: 16px 24px;
}
.metric { display: flex; align-items: center; gap: 18px; }
.metric img { width: clamp(64px, 5.6vw, 96px); height: auto; flex: none; filter: drop-shadow(0 12px 26px rgba(91, 63, 196, 0.45)); }
.metric-big { font-size: clamp(26px, 2.4vw, 44px); font-weight: 500; line-height: 1.05; }
.metric-sub { margin-top: 4px; font-size: var(--text-sm); color: var(--muted); }

/* Glass containers (founders, Genesis): frosted, lit from the top-left edge */
.glass {
  background: linear-gradient(150deg, rgba(239, 234, 249, 0.09), rgba(239, 234, 249, 0.025) 55%, rgba(187, 156, 250, 0.05));
  border-color: rgba(239, 234, 249, 0.14);
  backdrop-filter: blur(28px) saturate(1.4);
  -webkit-backdrop-filter: blur(28px) saturate(1.4);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.14),
    inset 0 0 0 1px rgba(255, 255, 255, 0.02),
    0 30px 70px -40px rgba(0, 0, 0, 0.8);
}
.glass::before {
  /* Soft sheen across the top edge */
  content: '';
  position: absolute;
  inset: 0 0 auto;
  height: 50%;
  border-radius: inherit;
  background: radial-gradient(120% 90% at 20% 0%, rgba(239, 234, 249, 0.1), transparent 60%);
  pointer-events: none;
}
a.glass:hover, a.glass:focus-visible { border-color: var(--card-line-hover); }

/* Founders (cards are not links; only the LinkedIn icon is) */
.founder { padding: 22px; gap: 0; }
.founder-in {
  position: absolute;
  top: 22px;
  right: 22px;
  z-index: 1;
  display: block;
  line-height: 0;
  color: #fff;
  opacity: 0.72;
  transition: opacity 0.3s;
}
.founder-in svg { width: 22px; height: 22px; }
.founder-in:hover, .founder-in:focus-visible { opacity: 1; }
.founder-photo {
  width: 96px;
  height: 96px;
  border-radius: 16px;
  object-fit: cover;
  background: #1a1426;
}
.founder-head { margin: 16px 0 20px; }
.founder h3 { font-size: clamp(20px, 1.45vw, 26px); font-weight: 500; }
.founder .role { margin-top: 2px; font-size: var(--text-sm); color: var(--lavender); }

/* Career path: a vertical line of company logos, newest first */
.career { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 14px; position: relative; }
.career::before { content: ''; position: absolute; left: 17px; top: 18px; bottom: 18px; width: 2px; background: #3A3050; }
.career li { position: relative; display: flex; align-items: center; gap: 12px; }
.co-logo { flex: none; width: 36px; height: 36px; border-radius: 9px; background: #fff; display: grid; place-items: center; overflow: hidden; }
.co-logo img { width: 26px; height: 26px; object-fit: contain; border-radius: 4px; }
.career b { display: block; font-size: 14px; font-weight: 500; line-height: 1.25; }
.career small { display: block; font-size: 13px; line-height: 1.3; color: var(--muted); }

/* Genesis banner */
.genesis {
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: clamp(24px, 4vw, 64px);
  padding: clamp(28px, 4vw, 64px);
}
/* Ultraviolet-tinted glass, with a glow behind the logo */
.genesis.glass {
  background:
    radial-gradient(60% 120% at 85% 50%, rgba(187, 156, 250, 0.22), transparent 70%),
    linear-gradient(150deg, rgba(91, 63, 196, 0.42), rgba(91, 63, 196, 0.16) 60%, rgba(187, 156, 250, 0.1));
}
.genesis-copy { position: relative; display: flex; flex-direction: column; gap: 14px; max-width: 36em; }
.genesis .doc-action { color: var(--soft-white); }
.founder > :not(.founder-in) { position: relative; }
.genesis-logo {
  flex: none;
  width: clamp(180px, 22vw, 340px);
  height: auto;
  position: relative;
  transform: rotate(-3deg);
  filter: drop-shadow(0 18px 40px rgba(8, 4, 15, 0.45));
}
.genesis h2 { font-size: clamp(26px, 2.6vw, 48px); font-weight: 500; line-height: 1.1; }
.cohort { font-family: 'Redaction 35', Georgia, serif; font-style: italic; font-weight: 400; color: var(--soft-white); white-space: nowrap; }
.genesis-copy > p { font-size: var(--text-md); line-height: 1.4; color: rgba(239, 234, 249, 0.8); }

/* ---------- Footer ---------- */
.foot {
  max-width: calc(var(--max) + 2 * var(--edge));
  margin: 0 auto;
  padding: clamp(48px, 6vw, 96px) var(--edge) clamp(24px, 3vw, 48px);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
  font-size: 14px;
  color: var(--muted);
}

/* ---------- Phones ---------- */
@media (max-width: 640px) {
  .genesis { flex-direction: column-reverse; align-items: flex-start; }
  .genesis-logo { width: 160px; }
  .hero { min-height: 0; justify-content: flex-start; padding-top: calc(var(--m-stage) * 0.8); }
  .hero-mark { --stage: var(--m-stage); top: calc(var(--m-stage) * -0.12); }
  .hero { --m-stage: min(76vw, 320px); }
  .tagline { white-space: normal; }
  .lede br { display: none; }
}

/* ---------- Respect "reduce motion" ---------- */
@media (prefers-reduced-motion: reduce) {
  .reveal { animation: none; opacity: 1; }
  .card, .card *, .section .reveal { transition: none !important; transform: none !important; }
  .hero-mark::before, .hero-mark::after, .hero-shader canvas { animation: none; }
}
