/* 1DOT home page, version 3, fifth cut: Acts 1 to 3.
   One film in sticky stages. Act 1 is paper; then one shot through fifty years of search, made of real moving
   footage with the visitor's name tracked into it and drawn by WebGL; then now, on paper again.
   Single look by design (paper and film black), so no light/dark theme switch: every colour is set here.
   Type on phones is sized by the shorter side of the screen (vmin), so a phone on its side keeps every line on screen. */
:root {
  --paper: #ffffff;
  --ink: #0e0e0e;
  --film: #0a0a0a;
  --grey: #8a8782;
  --rule: #e6e4e0;
  --dot: #ff6300;
  --f: 'Epilogue', 'Helvetica Neue', Arial, sans-serif;
  --logo: 'Montserrat', 'Epilogue', 'Helvetica Neue', Arial, sans-serif;
  --gut: 16px;
  --bar: 56px;
  color-scheme: light;
}
@supports (color: color(display-p3 1 0 0)) {
  :root { --dot: color(display-p3 1 0.4 0.02); }
}
@media (min-width: 900px) { :root { --gut: 4vw; --bar: 72px; } }

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
/* a panel is open: the page behind it holds still */
html.paused, html.paused body { overflow: hidden; overscroll-behavior: none; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--f); font-size: 16px; line-height: 1.45; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; overflow-x: clip; }
* { box-sizing: border-box; }
img { max-width: 100%; display: block; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--dot); outline-offset: 3px; }
.vh { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }

/* ---------- the bar ---------- */
a, button, input { -webkit-tap-highlight-color: transparent; }
.bar { position: fixed; z-index: 50; left: 0; right: 0; top: 0; height: calc(var(--bar) + env(safe-area-inset-top, 0px)); padding: env(safe-area-inset-top, 0px) var(--gut) 0; display: flex; align-items: center; gap: 28px; color: var(--ink); }
.bar[data-on="ink"] { color: var(--paper); }
.bar[data-logo="ink"] .logo { color: var(--paper); }
.bar[data-logo="paper"] .logo { color: var(--ink); }
/* the logo: 1DOT in Montserrat 800, spaced as the live site's wordmark (0.6em between letters, measured from
   1dot-wordmark-dark.png), one colour, and the film's orange full stop tucked after the T */
.logo { display: inline-flex; align-items: baseline; font-family: var(--logo); font-weight: 800; font-size: 19px; line-height: 1; letter-spacing: 0; text-decoration: none; padding: 12px 0; margin: -12px 0; }
.logo-w, .lw { letter-spacing: .6em; margin-right: -.6em; }
.logo-stop { color: var(--dot); }
.bar[data-logo="orange"] .logo, .bar[data-logo="orange"] .logo-stop { color: var(--ink); }
.bar-links { display: none; gap: 24px; margin-left: auto; }
.bar-links a { text-decoration: none; font-size: 15px; font-weight: 500; opacity: .86; white-space: nowrap; padding: 12px 0; margin: -12px 0; }
.bar-links a:hover { opacity: 1; }
.bar-call { margin-left: auto; font-size: 14px; font-weight: 600; text-decoration: none; padding: 9px 14px; border-radius: 6px; background: var(--ink); color: var(--paper); white-space: nowrap; }
.bar[data-on="ink"] .bar-call { background: var(--paper); color: var(--ink); }
.bar-menu { position: relative; flex: none; width: 44px; height: 44px; margin: 0 -10px 0 -18px; padding: 0; border: 0; background: transparent; color: inherit; cursor: pointer; border-radius: 6px; }
.bar-menu i { position: absolute; left: 11px; right: 11px; height: 2px; border-radius: 1px; background: currentColor; }
.bar-menu i:first-child { top: 17px; }
.bar-menu i:last-child { top: 25px; }
@media (min-width: 900px) { .bar-call { margin-left: 8px; } .logo { font-size: 23px; } .bar-call { margin-left: auto; } }
/* six links fit from 1100px; below that the menu button carries them */
@media (min-width: 1100px) { .bar-links { display: flex; } .bar-menu { display: none; } .bar-call { margin-left: 4px; } }
.film .bar .logo { opacity: 0; }
.film .bar.logo-in .logo { opacity: 1; }

/* ---------- scenes ---------- */
.scene { position: relative; }
.film .s-open { height: 240vh; z-index: 2; pointer-events: none; }
.film .s-open > .stage { pointer-events: auto; }
.film .s-open[data-ground] { background: transparent; }
.film .s-open > .stage { background: var(--paper); }
.film .s-open.held > .stage { position: fixed; top: 0; left: 0; right: 0; }
.film .s-open.waiting > .stage { visibility: hidden; }
/* the stage fills the tallest screen a phone's browser gives (its bars tucked away), so no strip of the page shows
   under the film when Safari's bar shrinks; what must stay in reach is lifted clear of the bars (.final) */
.stage { position: sticky; top: 0; height: 100vh; height: 100lvh; overflow: hidden; overflow: clip; }
/* until the script has set the opening up, none of its type shows (no headlines printed over each other) */
.film:not(.booted) .hero, .film:not(.booted) .opening { visibility: hidden; }
.scene[data-ground="paper"] { background: var(--paper); color: var(--ink); }
.scene[data-ground="ink"] { background: var(--film); color: var(--paper); }

/* masked line reveals: JS moves the inner span */
.ln { display: block; overflow: hidden; padding-bottom: .06em; margin-bottom: -.06em; }
.ln > span { display: inline-block; will-change: transform; }
.unmasked .ln { overflow: visible; }

/* the stop slot keeps the full stop's room; the orange dot is drawn over it */
.stop-slot { color: transparent; text-shadow: none; }

/* the dot: the one thing that is always where to look. It lives above everything, the film grain included */
.dot { position: fixed; z-index: 80; left: 0; top: 0; width: 20px; height: 20px; margin: 0; border-radius: 50%; background: var(--dot); pointer-events: none; transform: translate3d(-200px, -200px, 0); will-change: transform; opacity: 0; }

.btn { display: inline-flex; align-items: center; height: 52px; padding: 0 24px; border-radius: 6px; background: var(--ink); color: var(--paper); font-weight: 600; font-size: 16px; letter-spacing: -0.01em; text-decoration: none; }
.btn:hover { background: #2a2a2a; }

/* ---------- Act 1: the cold open ---------- */
.crowd { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: center; font-weight: 800; font-size: clamp(30px, 8.6vmin, 76px); line-height: 1.04; letter-spacing: -0.035em; color: var(--ink); pointer-events: none; }
.row { white-space: nowrap; will-change: transform; }
/* the first paint's 1DOT row (in the HTML, before the script runs): 520 px short of where 1DOT will stop, its centre
   20.53 em into the row */
.crowd .me-row { transform: translate3d(calc(52vw - 520px - 20.53em), 0, 0); }
@media (min-width: 900px) { .crowd .me-row { transform: translate3d(calc(50vw - 520px - 20.53em), 0, 0); } }
.nm { display: inline-block; margin-right: .32em; will-change: transform; }
/* 1DOT is the only name on the wall in the logo's face */
.nm.me { position: relative; font-family: var(--logo); letter-spacing: 0; margin-right: .5em; }

.hero { position: absolute; left: var(--gut); right: var(--gut); top: calc(var(--bar) + 13svh); }
.hero-h { margin: 0; font-weight: 800; font-size: clamp(44px, 12.1vmin, 156px); line-height: .9; letter-spacing: -0.045em; text-wrap: balance; }
.hero-sub { display: block; color: var(--grey); margin-top: .12em; }
.hero .btn { margin-top: 34px; }
.opening { position: absolute; left: var(--gut); right: var(--gut); top: calc(var(--bar) + 13svh); margin: 0; font-weight: 800; font-size: clamp(40px, 10.9vmin, 128px); line-height: .92; letter-spacing: -0.045em; pointer-events: none; }
@media (min-width: 900px) {
  .hero { top: calc(var(--bar) + 8vh); }
  .hero-h { font-size: min(7.4vw, 15.5vh); }
  .hero-h .ln { display: inline-block; }
  .opening { top: auto; bottom: 12vh; max-width: 13em; }
}
/* a phone on its side: the lines run across, nearer the top */
@media (orientation: landscape) and (max-height: 520px) and (max-width: 899px) {
  .hero, .opening { top: calc(var(--bar) + 4svh); }
  .hero-h .ln, .opening .ln { display: inline-block; }
  .hero .btn { margin-top: 18px; }
}

/* Act 1 ends with the lights going out, so the film starts in the dark it left */
.lights { position: absolute; inset: 0; z-index: 20; background: var(--film); opacity: 0; pointer-events: none; }

/* ---------- Acts 2 and 3: one shot through fifty years of search ---------- */
/* the film is pinned under the end of Act 1, so it starts the moment Act 1 lets go, in the same dark */
.film .s-film { height: calc(1680svh + 100lvh); margin-top: -100lvh; z-index: 1; }
/* pinned with fixed, not sticky, while the film is on screen: a hard flick cannot jolt it */
.film .s-film.pinned > .stage { position: fixed; top: 0; left: 0; right: 0; }
.film-stage { background: var(--film); }
.gl { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.posters { display: none; }

/* the card takes typing: an invisible field laid exactly over the card in the shot */
.card-input { position: absolute; left: 0; top: 0; width: 1200px; height: 800px; margin: 0; padding: 0; border: 0; outline: 0; background: transparent; color: transparent; caret-color: transparent; font-size: 64px; transform-origin: 0 0; z-index: 8; pointer-events: none; -webkit-tap-highlight-color: transparent; cursor: text; }
.card-input::selection { background: transparent; }

/* the eras' names, for readers and the still version; in the film the year itself carries them */
.film .era { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; margin: 0; }

/* the lines: each comes into focus whole, white over the shot, no boxes */
.cap { position: absolute; z-index: 14; left: var(--gut); right: var(--gut); top: 0; margin: 0; font-weight: 800; font-size: clamp(34px, 9.4vmin, 80px); line-height: .95; letter-spacing: -0.042em; color: var(--paper); text-wrap: balance; visibility: hidden; pointer-events: none; text-shadow: 0 1px 2px rgba(0,0,0,.4), 0 6px 40px rgba(0,0,0,.5); }
.cap .w, .now-h .w { display: inline-block; }
.now-h { position: absolute; z-index: 15; left: var(--gut); right: var(--gut); top: 30%; margin: 0; font-weight: 800; font-size: clamp(64px, 21vmin, 230px); line-height: .86; letter-spacing: -0.05em; color: var(--ink); text-align: center; text-wrap: balance; visibility: hidden; pointer-events: none; }
.nobr { white-space: nowrap; }

/* the year, alone in the middle, with the dot as its full stop */
.title { position: absolute; z-index: 46; left: 0; right: 0; top: 50%; transform: translateY(-50%); text-align: center; color: var(--paper); pointer-events: none; opacity: 0; }
.title-n { margin: 0; font-weight: 800; font-size: clamp(80px, 23vmin, 210px); line-height: .8; letter-spacing: -0.045em; font-variant-numeric: tabular-nums; text-shadow: 0 0 2px rgba(0,0,0,.45), 0 0 30px rgba(0,0,0,.65); }
.title-t { margin: 18px 0 0; font-size: 12px; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; text-shadow: 0 0 2px rgba(0,0,0,.6), 0 0 16px rgba(0,0,0,.7); }
/* on a wide screen the footage sits right of centre, and so does its year */
@media (min-width: 900px) { .title { left: 20vw; } }

/* ---------- now ---------- */
.now { position: absolute; inset: 0; z-index: 16; pointer-events: none; }
.pill { position: absolute; left: 50%; top: 50%; height: 60px; width: 60px; margin: -30px 0 0; transform: translateX(-50%); border: 1px solid #d9d7d3; border-radius: 30px; background: #fff; box-shadow: 0 10px 40px rgba(0,0,0,.08); display: flex; align-items: center; padding: 0 64px 0 22px; font-size: 18px; color: #1b1b1b; overflow: hidden; opacity: 0; white-space: nowrap; }
.pill-text { position: relative; }
.pill-ph { position: absolute; left: 22px; color: #77746f; }
.answer { position: absolute; left: var(--gut); right: var(--gut); top: calc(var(--bar) + 18svh); opacity: 0; transition: opacity .25s ease-out; }
.ans-rec { margin: 0; font-weight: 800; font-size: clamp(42px, 11.6vmin, 140px); line-height: .9; letter-spacing: -0.045em; color: #8a8782; }
.ans-name { position: relative; z-index: 1; margin: .08em 0 0; font-weight: 800; font-size: clamp(42px, 11.6vmin, 140px); line-height: 1.04; letter-spacing: -0.045em; color: var(--ink); transform-origin: 0 0; opacity: 0; will-change: transform, opacity; }
/* the businesses AI weighs, the ones the film has shown and yours, before the others fall away */
.ans-list { position: absolute; left: 0; right: 0; top: 0; font-weight: 700; font-size: clamp(22px, 6vmin, 50px); line-height: 1.22; letter-spacing: -0.03em; color: #bdbab4; pointer-events: none; }
.ans-list > div { white-space: nowrap; opacity: 0; transform-origin: 0 50%; will-change: transform, opacity; font-weight: 800; letter-spacing: -0.045em; }
/* yours is set in the wrap it will have in the answer, so it rises without a jump */
.ans-list > div.me { white-space: normal; line-height: 1.04; padding: .09em 0; }
.ans-line { position: absolute; left: 0; right: 0; margin: 0; font-weight: 800; font-size: clamp(26px, 7vmin, 64px); line-height: .98; letter-spacing: -0.035em; color: var(--ink); opacity: 0; }
.ans-line span { display: block; color: var(--grey); }
.wave { position: absolute; left: 0; top: 0; width: 20px; height: 20px; margin: -10px 0 0 -10px; border-radius: 50%; border: 2px solid var(--dot); opacity: 0; pointer-events: none; }
.flood { position: absolute; inset: 0; z-index: 40; pointer-events: none; opacity: 0; }
.final { position: absolute; inset: 0; z-index: 47; display: flex; flex-direction: column; justify-content: flex-end; padding: 0 var(--gut) calc(9svh + 100lvh - 100svh + env(safe-area-inset-bottom, 0px)); color: var(--ink); opacity: 0; pointer-events: none; }
.final.on { pointer-events: auto; }
.final-h { margin: 0 0 28px; font-weight: 800; font-size: clamp(48px, 14vmin, 190px); line-height: .88; letter-spacing: -0.05em; }
.final-btn { align-self: flex-start; }
.final-note { margin: 14px 0 0; font-size: 13px; font-weight: 500; letter-spacing: -0.005em; color: rgba(14,14,14,.86); }

@media (min-width: 900px) {
  .cap { right: auto; max-width: 30vw; font-size: min(4.2vw, 8.4vh); }
  .now-h { font-size: min(11vw, 22vh); top: 26%; }
}

/* the shot is waiting for footage on a slow connection: a hairline fills along the foot of the screen */
.hold { position: absolute; z-index: 48; left: 0; right: 0; bottom: 0; height: 2px; background: var(--dot); transform-origin: 0 50%; transform: scaleX(0); opacity: 0; transition: opacity .4s; pointer-events: none; }
/* the logo and Book a call jump under a short veil */
.veil { position: fixed; inset: 0; z-index: 60; opacity: 0; pointer-events: none; transition: opacity .17s ease-out; }

/* ---------- the film's grain, on the screens the shader does not draw: paper, black, white, the menu, the booking ----------
   One fixed layer above everything but the dots; it moves at 24 frames a second on the compositor, and holds still
   under reduced motion. Its tile is drawn by the script. */
.grain { position: fixed; z-index: 70; left: -128px; top: -128px; width: calc(100% + 256px); height: calc(100% + 256px); pointer-events: none; opacity: 0; background-repeat: repeat; background-size: 128px 128px; will-change: transform; }
.grain.on { opacity: 1; }
.grain.run { animation: grain .42s steps(1, end) infinite; }
@keyframes grain {
  0% { transform: translate3d(0, 0, 0); }
  10% { transform: translate3d(-37px, 21px, 0); }
  20% { transform: translate3d(54px, -48px, 0); }
  30% { transform: translate3d(-12px, 63px, 0); }
  40% { transform: translate3d(29px, 9px, 0); }
  50% { transform: translate3d(-58px, -27px, 0); }
  60% { transform: translate3d(44px, 36px, 0); }
  70% { transform: translate3d(-23px, -61px, 0); }
  80% { transform: translate3d(61px, 52px, 0); }
  90% { transform: translate3d(-49px, 14px, 0); }
  100% { transform: translate3d(17px, -33px, 0); }
}

/* ---------- reduced motion, or no WebGL 2: every word in order, the eras as stills ---------- */
.still .s-open, .still .s-film { height: auto; }
.still .stage { position: relative; height: auto; overflow: visible; padding: calc(var(--bar) + 24px) var(--gut) 48px; }
.still .dot, .still .crowd, .still .wave, .still .flood, .still .pill, .still .title, .still .gl, .still .lights, .still .card-input, .still .ans-list { display: none; }
.still .posters { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 0 0 28px; }
.still .posters img { width: 100%; height: auto; border-radius: 2px; }
.still .hero, .still .opening { position: relative; inset: auto; margin: 0 0 32px; }
.still .era { margin: 34px 0 14px; font-weight: 800; font-size: 28px; line-height: 1; letter-spacing: -0.03em; color: var(--paper); }
.still .era span { display: block; margin-top: 8px; font-size: 12px; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; color: #a9a6a1; }
.still .cap, .still .now-h, .still .answer, .still .ans-line, .still .final, .still .ans-name { position: relative; inset: auto; left: auto; right: auto; top: auto; bottom: auto; opacity: 1; margin: 0 0 22px; color: var(--paper); max-width: none; transform: none; height: auto; text-shadow: none; }
.still .now { position: relative; inset: auto; }
.still .answer .ans-rec, .still .ans-line span { color: #a9a6a1; }
.still .ans-name, .still .now-h { color: var(--paper); }
.still .cap, .still .now-h { visibility: visible; text-align: left; }
.still .final { pointer-events: auto; padding: 0; }
.still .final-btn { background: var(--paper); color: var(--ink); }
.still .final-note { color: rgba(255,255,255,.72); }
.still .hold, .still .veil { display: none; }
.still .stop-slot { color: var(--dot); }
.still .bar { background: var(--paper); color: var(--ink); box-shadow: 0 1px 0 rgba(0,0,0,.06); }
.still .bar .logo { opacity: 1; color: var(--ink); }
.still .bar .bar-call { background: var(--ink); color: var(--paper); }
