/* TipPool's front page: one night at a bar as a scroll film (the engine's styles are in scroll-world.css).
   Dark room, cream type, hot yellow for the way in. */
:root {
  --ink: #07060a;
  --cream: #f6f0e4;
  --cream-dim: #b7ad9c;
  --hot: #ffd84a;
  --serif: "STIX Two Text", Georgia, serif;
  --mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;
  color-scheme: dark;
}
.sw-root, :root {
  --sw-bg: #07060a;
  --sw-ink: #f6f0e4;
  --sw-ink-soft: #b7ad9c;
  --sw-accent: #ffd84a;
  --sw-font-display: "STIX Two Text", Georgia, serif;
  --sw-font-body: "IBM Plex Mono", ui-monospace, Menlo, monospace;
}
* { box-sizing: border-box; }
html, body.lp { margin: 0; background: var(--ink); color: var(--cream); }
body.lp { font: 400 15px/1.55 var(--mono); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
a { color: inherit; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--hot); outline-offset: 3px; }

/* film grain over everything */
body.lp::after {
  content: ""; position: fixed; inset: -10%; z-index: 90; pointer-events: none; opacity: .07; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: lp-grain .9s steps(4) infinite;
}
@keyframes lp-grain { 0% { transform: translate(0, 0); } 25% { transform: translate(-3%, 2%); } 50% { transform: translate(2%, -3%); } 75% { transform: translate(-2%, -1%); } }

/* the bar along the top: the name and the ways in, always there */
.lp-bar {
  position: fixed; inset: 0 0 auto 0; z-index: 80;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: clamp(12px, 2vw, 22px) clamp(16px, 4vw, 56px);
  background: linear-gradient(rgba(7, 6, 10, .75), rgba(7, 6, 10, 0));
}
.lp-brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.lp-brand img { width: 28px; height: 28px; }
.lp-brand em { font: italic 600 24px/1 var(--serif); }
.lp-ways { display: flex; align-items: center; gap: 4px; }
.lp-ways form { margin: 0; }
.lp-ways a, .lp-ways button {
  display: inline-flex; align-items: center; min-height: 40px; padding: 0 12px;
  font: 500 12px var(--mono); letter-spacing: .12em; text-transform: uppercase; text-decoration: none;
  background: none; border: 0; cursor: pointer; color: var(--cream);
}
.lp-ways a:hover { color: var(--hot); }
.lp-ways button { background: var(--hot); color: var(--ink); margin-left: 6px; padding: 0 16px; }
.lp-ways button:hover { background: #ffe680; }

/* the film's words, on the dark side of the frame */
.sw-copy__num { color: var(--cream-dim); }
.sw-copy__eyebrow { font: 500 .78rem var(--mono); letter-spacing: .18em; }
.sw-copy__title { font-weight: 500; letter-spacing: -.02em; line-height: 1.02; font-size: clamp(1.9rem, min(4.8vw, 6.6vh), 4rem);  /* shorter screens get a smaller title, so the text always fits */ text-wrap: balance; }
.sw-copy__body { color: #ddd4c4; font-size: clamp(.95rem, 1.15vw, 1.05rem); }
.sw-copy__tags li { color: var(--cream); background: color-mix(in srgb, var(--sw-accent) 16%, transparent);
  border-color: color-mix(in srgb, var(--sw-accent) 45%, transparent); font: 500 .74rem var(--mono); letter-spacing: .06em; }
.sw-copy__cta form { margin: 0; }
.sw-btn { font: 600 .82rem var(--mono); letter-spacing: .12em; text-transform: uppercase; border-radius: 0; cursor: pointer;
  display: inline-flex; align-items: center; min-height: 48px; padding: 0 24px; border: 0; }
.sw-btn--primary { background: var(--hot); color: var(--ink); }
.sw-btn--primary:hover { background: #ffe680; }
.sw-btn--ghost { color: var(--cream); border: 1.5px solid rgba(246, 240, 228, .45); background: rgba(7, 6, 10, .3); }
.sw-btn--ghost:hover { border-color: var(--cream); }
.sw-route__label { color: var(--ink); background: rgba(246, 240, 228, .9); }
.sw-hint { color: var(--cream-dim); }
.sw-hint i { border-color: rgba(246, 240, 228, .4); }
.sw-sky__glow { opacity: .5; }
.sw-pt--dot::before { background: radial-gradient(circle at 34% 30%, color-mix(in srgb, var(--sw-accent) 70%, #fff), transparent 75%); }

/* without scripts: the chapters are the page */
.js .lp-chapters { display: none; }
.lp-chapters { list-style: none; margin: 0; padding: 88px clamp(16px, 4vw, 56px) 40px; display: grid; gap: 56px; max-width: 1100px; margin-inline: auto; }
.lp-chapters li { display: grid; gap: 14px; }
.lp-chapters img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.lp-chapters h1, .lp-chapters h2 { margin: 0; font: 500 clamp(2rem, 5vw, 3.4rem)/1.05 var(--serif); }
.lp-chapters p { margin: 0; color: #ddd4c4; max-width: 60ch; }
.lp-go-static { display: flex; flex-wrap: wrap; gap: 10px; }
.lp-go-static form { margin: 0; }


@media (max-width: 860px) {
  .sw-copy__cta { gap: 8px; }
  .sw-copy__cta > * { flex: 1 1 auto; }
  .sw-copy__cta form .sw-btn { width: 100%; justify-content: center; }
  .sw-copy__cta .sw-btn { justify-content: center; }
}
@media (max-width: 640px) {
  .lp-brand em { display: none; }
  .lp-ways a, .lp-ways button { padding: 0 9px; font-size: 11px; letter-spacing: .08em; }
  .lp-ways button { padding: 0 12px; }
  .sw-copy__tags { display: none; }
}
@media (max-width: 360px) { .lp-ways a { padding: 0 6px; } }
@media (prefers-reduced-motion: reduce) { body.lp::after { animation: none; } }
.lp-more { flex: 1 1 100%; margin: 4px 0 0; font: 500 11px var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--cream-dim); }
@media (max-width: 860px) { .sw-hint { display: none; } }
@media (max-width: 640px) { .sw-route { display: none; } }

/* ---------- after the film: the details, rising over it like the end credits ---------- */
.lp-after { position: relative; z-index: 55; background: var(--ink); padding: 0 clamp(16px, 5vw, 64px) 0; }
.lp-after::before { content: ""; position: absolute; left: 0; right: 0; bottom: 100%; height: 38vh; pointer-events: none;
  background: linear-gradient(to bottom, rgba(7, 6, 10, 0), var(--ink)); }
.lp-after > * { max-width: 1160px; margin-inline: auto; }
.lp-label { margin: 0 0 14px; font: 500 11px var(--mono); letter-spacing: .2em; text-transform: uppercase; color: var(--hot); }
.lp-after h2, .lp-after h3 { margin: 0; font-family: var(--serif); font-weight: 500; letter-spacing: -.02em; text-wrap: balance; }
.lp-after h2 em, .lp-after h3 em { font-style: italic; color: var(--hot); }
.lp-after-head { padding: clamp(40px, 8vw, 96px) 0 clamp(36px, 6vw, 64px); border-bottom: 1px solid rgba(246, 240, 228, .14); }
.lp-after-head h2 { font-size: clamp(2.4rem, 6vw, 5rem); line-height: 1; max-width: 16ch; }
.lp-lead { margin: 22px 0 0; max-width: 58ch; color: #ddd4c4; font-size: clamp(.95rem, 1.2vw, 1.05rem); }

/* who it's for: three columns of plain lists, ruled like a menu */
.lp-who { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-bottom: 1px solid rgba(246, 240, 228, .14); }
.lp-who article { padding: 40px 32px 44px 0; }
.lp-who article + article { padding-left: 32px; border-left: 1px solid rgba(246, 240, 228, .14); }
.lp-who h3 { font-size: clamp(1.5rem, 2.2vw, 1.9rem); line-height: 1.12; margin-bottom: 20px; }
.lp-who ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.lp-who li { position: relative; padding-left: 20px; color: #ddd4c4; font-size: .92rem; line-height: 1.5; }
.lp-who li::before { content: "—"; position: absolute; left: 0; color: var(--hot); }

/* safe with money: four numbered promises */
.lp-safe { padding: clamp(40px, 6vw, 72px) 0; border-bottom: 1px solid rgba(246, 240, 228, .14);
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 12px 48px; align-items: start; }
.lp-safe .lp-label { grid-column: 1 / -1; }
.lp-safe h3 { font-size: clamp(1.9rem, 3.4vw, 2.9rem); line-height: 1.05; }
.lp-safe ol { list-style: none; margin: 0; padding: 0; counter-reset: safe; display: grid; gap: 18px; }
.lp-safe li { counter-increment: safe; position: relative; padding-left: 44px; color: #ddd4c4; font-size: .95rem; line-height: 1.55; }
.lp-safe li::before { content: "0" counter(safe); position: absolute; left: 0; top: 0; font: 500 .8rem/1.9 var(--mono); color: var(--hot); }
.lp-safe b { color: var(--cream); font-weight: 600; }

/* questions */
.lp-faq { padding: clamp(40px, 6vw, 72px) 0 clamp(48px, 7vw, 88px); }
.lp-faq details { border-top: 1px solid rgba(246, 240, 228, .14); }
.lp-faq details:last-child { border-bottom: 1px solid rgba(246, 240, 228, .14); }
.lp-faq summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; gap: 20px; align-items: baseline;
  padding: 20px 0; font: 500 clamp(1.15rem, 1.8vw, 1.45rem)/1.25 var(--serif); }
.lp-faq summary::-webkit-details-marker { display: none; }
.lp-faq summary::after { content: "+"; font: 400 1.4rem/1 var(--mono); color: var(--hot); transition: transform .2s; }
.lp-faq details[open] summary::after { transform: rotate(45deg); }
.lp-faq summary:hover { color: var(--hot); }
.lp-faq details p { margin: 0 0 22px; max-width: 70ch; color: #ddd4c4; font-size: .95rem; line-height: 1.6; }

/* the last word */
.lp-credits { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 24px; padding: 22px 0 calc(28px + env(safe-area-inset-bottom));
  border-top: 1px solid rgba(246, 240, 228, .14); font-size: 11px; letter-spacing: .06em; color: var(--cream-dim); }
.lp-credits p { margin: 0; }

@media (max-width: 900px) {
  .lp-who { grid-template-columns: 1fr; }
  .lp-who article, .lp-who article + article { padding: 32px 0; border-left: 0; }
  .lp-who article + article { border-top: 1px solid rgba(246, 240, 228, .14); }
  .lp-safe { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
}
@media (prefers-reduced-motion: reduce) { .lp-faq summary::after { transition: none; } }
/* past the film, the bar gets a solid backing, so the details don't run under it */
.lp-bar { transition: background-color .3s, box-shadow .3s; }
.lp-bar.solid { background: var(--ink); box-shadow: 0 1px 0 rgba(246, 240, 228, .1); }
/* the front page is a film: no scrollbar (the line along the top shows how far you are); scrolling works as usual */
html:has(body.lp) { scrollbar-width: none; }
html:has(body.lp)::-webkit-scrollbar, body.lp::-webkit-scrollbar { display: none; width: 0; height: 0; }
/* the chapter dots: no button padding, so each dot sits right on the line */
.sw-route__dot { padding: 0; }
/* centre each chapter's words on wide screens: the engine's script rewrites `transform` while scrolling
   (dropping the CSS centring), so the centring uses `translate`, which adds to it instead */
@media (min-width: 861px) { .sw-copy { translate: 0 -50%; } }
/* no "02 / 07" counter over each chapter */
.sw-copy__num { display: none; }
.sw-copy__eyebrow { margin-top: 0; }
/* a scene's still sits exactly where its video will: the engine zoomed and shifted it while the video loaded,
   so on a phone (where videos arrive later) the picture jumped when the video took over */
.sw-scene__still { transform: none !important; }

/* ---------- the buttons: a ticket and a viewfinder ---------- */
/* Try the demo is an admission ticket: notches on both sides, a perforated stub with the arrow */
.sw-btn { position: relative; gap: 12px; min-height: 52px; padding: 0 26px; justify-content: center; text-decoration: none;
  transition: transform .15s ease, background-color .2s, background-size .25s ease; }
.sw-btn:active { transform: translateY(1px); }
.sw-btn--primary {
  background: var(--hot); color: var(--ink); padding-right: 70px;
  -webkit-mask: radial-gradient(circle 7px at 0 50%, #0000 97%, #000) left / 51% 100% no-repeat,
                radial-gradient(circle 7px at 100% 50%, #0000 97%, #000) right / 51% 100% no-repeat;
  mask: radial-gradient(circle 7px at 0 50%, #0000 97%, #000) left / 51% 100% no-repeat,
        radial-gradient(circle 7px at 100% 50%, #0000 97%, #000) right / 51% 100% no-repeat;
}
.sw-btn--primary::after { content: ""; position: absolute; right: 50px; top: 9px; bottom: 9px; border-left: 2px dotted rgba(7, 6, 10, .4); }
.sw-btn--primary::before { content: "→"; position: absolute; right: 19px; top: 50%; translate: 0 -52%; font: 500 1.05rem var(--mono);
  transition: transform .2s ease; }
.sw-btn--primary:hover { background: #ffe37a; }
.sw-btn--primary:hover::before { transform: translateX(3px); }

/* Sign up and Log in are a camera viewfinder: four corner marks that close in on hover */
.sw-btn--ghost {
  --c: rgba(246, 240, 228, .85); --l: 12px; border: 0; color: var(--cream);
  background:
    linear-gradient(var(--c), var(--c)) top left / var(--l) 1.5px no-repeat, linear-gradient(var(--c), var(--c)) top left / 1.5px var(--l) no-repeat,
    linear-gradient(var(--c), var(--c)) top right / var(--l) 1.5px no-repeat, linear-gradient(var(--c), var(--c)) top right / 1.5px var(--l) no-repeat,
    linear-gradient(var(--c), var(--c)) bottom left / var(--l) 1.5px no-repeat, linear-gradient(var(--c), var(--c)) bottom left / 1.5px var(--l) no-repeat,
    linear-gradient(var(--c), var(--c)) bottom right / var(--l) 1.5px no-repeat, linear-gradient(var(--c), var(--c)) bottom right / 1.5px var(--l) no-repeat,
    rgba(7, 6, 10, .38);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
.sw-btn--ghost:hover { --c: var(--hot); --l: 18px; color: #fff; }

/* phones: Try the demo and Sign up side by side at the same width, Log in under them */
@media (max-width: 860px) {
  .sw-copy__cta { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
  .sw-copy__cta > * { min-width: 0; }
  .sw-copy__cta form .sw-btn, .sw-copy__cta .sw-btn { width: 100%; }
  .sw-copy__cta > a:nth-of-type(2), .sw-copy__cta > .lp-more { grid-column: 1 / -1; }
  .sw-btn { padding: 0 12px; font-size: .76rem; letter-spacing: .1em; }
  .sw-btn--primary { padding-right: 12px; }
  .sw-btn--primary::before, .sw-btn--primary::after { display: none; }
}
/* phones: the scene's frames are drawn on a canvas, exactly where the still and the video sit */
.sw-scene__canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 1; display: block; }
/* wider screens: Try the demo across the full width, Sign up and Log in under it as two equal halves */
@media (min-width: 861px) {
  .sw-copy__cta { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; width: min(100%, 440px); }
  .sw-copy__cta > form, .sw-copy__cta > .lp-more { grid-column: 1 / -1; }
  .sw-copy__cta .sw-btn { width: 100%; }
}
/* the closing chapter's buttons are exactly as wide as the line under them */
@media (min-width: 861px) {
  .sw-copy__cta { width: max-content; max-width: 100%; }
  .sw-copy__cta > .lp-more { white-space: nowrap; }
}
