/* Tacholedger site. Two voices, same as the app: the tacho in glowing green
   dot-matrix, plain English in big warm white. */
:root {
  --glass: #0A0D10; --panel: #12171C; --line: #25303A;
  --mint: #8DF0C4; --paper: #F3EDDF; --muted: #B9B3A5;
  --amber: #F2C879; --amber-ink: #2A1F08;
  --pad: clamp(20px, 5vw, 56px);
  --wide: 1120px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--glass); color: var(--paper); font-family: "Plus Jakarta Sans", system-ui, sans-serif; font-weight: 500; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
a { color: inherit; }
h1, h2, h3, p, ol, ul { margin: 0; padding: 0; }
ol, ul { list-style: none; }

#field { position: fixed; inset: 0; z-index: 0; pointer-events: none; background-image: radial-gradient(rgba(141, 240, 196, .09) 1px, transparent 1.2px); background-size: 22px 22px; }
#field::after { content: ""; position: absolute; width: 90vmax; height: 90vmax; left: -20vmax; top: -30vmax; border-radius: 50%; background: radial-gradient(closest-side, rgba(141, 240, 196, .10), transparent 70%); animation: glow 26s ease-in-out infinite alternate; will-change: transform; }
@keyframes glow { from { transform: translate3d(0, 0, 0); } to { transform: translate3d(55vw, 45vh, 0); } }
main, footer, .top { position: relative; z-index: 1; }

.machine { font-family: "Doto", ui-monospace, monospace; font-weight: 900; color: var(--mint); text-shadow: 0 0 14px rgba(141, 240, 196, .55); letter-spacing: .02em; }
.label { font-weight: 800; font-size: 12px; letter-spacing: 1.4px; text-transform: uppercase; color: var(--mint); }
.label.dark { color: var(--amber-ink); }
.small { font-size: 13px; line-height: 1.5; color: var(--muted); }
.body { font-size: clamp(16px, 1.6vw, 19px); line-height: 1.5; color: var(--muted); font-weight: 600; }

.top { position: fixed; top: 0; left: 0; right: 0; display: flex; align-items: center; justify-content: space-between; padding: 14px var(--pad); background: rgba(10, 13, 16, .86); z-index: 5; }
.mark { font-weight: 800; font-size: 16px; text-decoration: none; }
.pill { font-weight: 800; font-size: 14px; text-decoration: none; padding: 10px 16px; border-radius: 999px; border: 1.5px solid #5C6875; transition: border-color .2s, color .2s; }
.pill:hover { border-color: var(--mint); color: var(--mint); }

.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 56px; padding: 0 26px; border-radius: 16px; background: var(--paper); color: var(--glass); font-weight: 800; font-size: 16px; text-decoration: none; transition: transform .15s, box-shadow .2s; }
.btn:hover { transform: translateY(-2px); box-shadow: 0 0 34px rgba(141, 240, 196, .35); }
.link { font-weight: 700; font-size: 15px; text-underline-offset: 4px; }

section { padding: 0 var(--pad); }
h2 { font-weight: 800; font-size: clamp(30px, 4.6vw, 54px); line-height: 1.04; letter-spacing: -.035em; text-wrap: balance; }
h3 { font-weight: 800; font-size: 19px; letter-spacing: -.01em; }

/* 1 · hero. It opens on a short film: a driver in a parked cab points a
   phone at the tacho, the picture rushes into that phone, and the page's own
   phone (the real app) arrives out of it. */
.hero-wrap { position: relative; padding: 0; overflow: hidden; }
.hero-wrap .hero { position: relative; z-index: 2; padding-left: var(--pad); padding-right: var(--pad); }
.intro { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 50%; z-index: 0; opacity: .3; transition: opacity 1.2s; }
.intro-shade { position: absolute; inset: 0; z-index: 1; background: linear-gradient(90deg, rgba(10, 13, 16, .92) 0%, rgba(10, 13, 16, .55) 55%, rgba(10, 13, 16, .35) 100%), linear-gradient(0deg, var(--glass) 0%, rgba(10, 13, 16, 0) 30%); transition: opacity 1.2s; }
.skip { position: absolute; z-index: 3; right: var(--pad); bottom: 28px; background: rgba(10, 13, 16, .6); color: var(--paper); border: 1.5px solid #5C6875; border-radius: 999px; padding: 10px 18px; font: 800 14px "Plus Jakarta Sans", sans-serif; cursor: pointer; opacity: 0; pointer-events: none; transition: opacity .4s; }
.top { transition: opacity .8s; }
.hero-copy > * { transition: opacity .9s, transform 1.1s cubic-bezier(.2, .8, .2, 1); }
.hero-copy > *:nth-child(2) { transition-delay: .08s; } .hero-copy > *:nth-child(3) { transition-delay: .16s; }
.hero-copy > *:nth-child(4) { transition-delay: .24s; } .hero-copy > *:nth-child(5) { transition-delay: .32s; }
body.film .intro { opacity: 1; }
body.film .intro-shade { opacity: 0; }
body.film .skip { opacity: 1; pointer-events: auto; }
body.film .hero-copy > * { opacity: 0; transform: translateY(24px); }
body.film .top { opacity: 0; }
/* The dive. */
body.dive .intro { transform: scale(9); opacity: 0; transition: transform 1.15s cubic-bezier(.7, 0, .9, .5), opacity .45s .7s; }
body.dive .intro-shade { opacity: 0; }
body.dive .hero-copy > *, body.dive .guide { transition-delay: .75s; }

.hero { min-height: 100svh; display: grid; grid-template-columns: 1fr auto; align-items: center; gap: clamp(24px, 4vw, 64px); max-width: 1240px; margin: 0 auto; padding-top: 90px; padding-bottom: 60px; }
.hero-copy { display: flex; flex-direction: column; gap: 22px; min-width: 0; }
.hero h1 { font-weight: 800; font-size: clamp(46px, 7.6vw, 104px); line-height: .96; letter-spacing: -.05em; }
.swap { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; min-height: 44px; }
.swap .machine { font-size: clamp(26px, 4vw, 40px); min-width: 5ch; }
.swap .plain { font-weight: 800; font-size: clamp(18px, 2.6vw, 28px); letter-spacing: -.02em; }
.arrow { position: relative; width: clamp(40px, 8vw, 110px); height: 2px; background: var(--line); flex: none; }
.arrow::after { content: ""; position: absolute; top: -3px; left: 0; width: 8px; height: 8px; border-radius: 50%; background: var(--mint); box-shadow: 0 0 12px var(--mint); animation: travel 2.6s ease-in-out infinite; }
@keyframes travel { 0% { left: 0; opacity: 0; } 15% { opacity: 1; } 85% { opacity: 1; } 100% { left: calc(100% - 8px); opacity: 0; } }
.sub { max-width: 34em; font-size: clamp(17px, 1.9vw, 21px); line-height: 1.45; color: var(--muted); font-weight: 600; }
.cta-row { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; margin-top: 8px; }

/* The phone. The app is drawn at a real phone's width (390) and scaled down,
   so it lays out exactly as it does in the hand. */
:root { --k: .77; --phone-w: calc(390px * var(--k)); }
.phone-body { position: relative; width: var(--phone-w); height: calc(800px * var(--k)); border-radius: 38px; overflow: hidden; background: var(--glass); outline: 1.5px solid #2E3A45; outline-offset: 6px; box-shadow: 0 0 0 7px #05070A, 0 0 90px rgba(141, 240, 196, .22), 0 40px 80px rgba(0, 0, 0, .6); }
.phone-body { display: block; }
.phone-body img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .5s; }
.phone-body img.on { opacity: 1; }
.phone-space { width: var(--phone-w); }
.phone-slot { display: none; }

/* On a wide screen one phone stays with the reader from the film to the end of the story. */
.guide { will-change: transform, opacity; position: fixed; z-index: 4; top: 50%; right: max(var(--pad), calc((100vw - 1240px) / 2 + var(--pad))); transform: translateY(-50%); display: flex; flex-direction: column; align-items: center; gap: 14px; transition: opacity .7s, transform 1.1s cubic-bezier(.2, .8, .2, 1); }
.guide .small { min-height: 1.5em; text-align: center; }
body.film .guide { opacity: 0; transform: translateY(-50%) scale(2.6); }
.guide.away { opacity: 0; transform: translateY(-50%) translateX(60px); pointer-events: none; }

/* 2 · the story */
.story { position: relative; max-width: 1240px; margin: 0 auto; padding: 0 var(--pad); }
.rail { position: absolute; top: 14vh; bottom: 14vh; left: calc(var(--pad) - 22px); width: 2px; background: var(--line); }
.rail i { position: sticky; top: 50vh; display: block; width: 10px; height: 10px; margin-left: -4px; border-radius: 50%; background: var(--mint); box-shadow: 0 0 16px 4px rgba(141, 240, 196, .6); }
.step { min-height: 100svh; display: flex; flex-direction: column; justify-content: center; gap: 16px; padding: 12vh 0; width: min(560px, calc(100% - var(--phone-w) - 80px)); }
.step > * { opacity: 0; transform: translateY(26px); transition: opacity .7s, transform .8s cubic-bezier(.2, .8, .2, 1); }
.step.seen > * { opacity: 1; transform: none; }
.step.seen > *:nth-child(2) { transition-delay: .06s; } .step.seen > *:nth-child(3) { transition-delay: .12s; }
.step.seen > *:nth-child(4) { transition-delay: .2s; } .step.seen > *:nth-child(5) { transition-delay: .32s; }
.step.seen > *:nth-child(6) { transition-delay: .44s; }
.count { font-size: 20px; opacity: .8; }

.lcd { position: relative; overflow: hidden; border-radius: 14px; background: #06110D; border: 1px solid #1B3A2E; padding: 18px 20px; margin-top: 8px; box-shadow: 0 0 60px rgba(141, 240, 196, .16), inset 0 0 30px rgba(141, 240, 196, .06); }
.lcd-row { display: flex; justify-content: space-between; font-family: "Doto", monospace; font-weight: 900; font-size: clamp(26px, 4.4vw, 44px); color: var(--mint); text-shadow: 0 0 18px rgba(141, 240, 196, .7); line-height: 1.25; }
.lcd-scan { position: absolute; top: 0; bottom: 0; left: 0; width: 8px; background: var(--mint); box-shadow: 0 0 24px 8px rgba(141, 240, 196, .6); animation: scan 2.4s linear infinite; opacity: .8; }
@keyframes scan { from { transform: translateX(-10px); } to { transform: translateX(min(560px, 92vw)); } }

.rows li { display: flex; align-items: baseline; gap: 16px; padding: 14px 0; border-top: 1px solid var(--line); font-weight: 700; font-size: clamp(15px, 1.7vw, 18px); opacity: 0; transform: translateY(14px); transition: opacity .5s, transform .5s; }
.step.seen .rows li { opacity: 1; transform: none; }
.step.seen .rows li:nth-child(1) { transition-delay: .7s; } .step.seen .rows li:nth-child(2) { transition-delay: 1.05s; } .step.seen .rows li:nth-child(3) { transition-delay: 1.4s; }
.rows .machine { flex: none; width: 5ch; font-size: clamp(18px, 2vw, 22px); }
.rows li b { margin-left: auto; font-weight: 800; }
.rows.tight li { padding: 10px 0; }

.clip { border-radius: 18px; overflow: hidden; border: 1px solid var(--line); background: #000; margin-top: 8px; box-shadow: 0 30px 60px rgba(0, 0, 0, .45); }
.clip video { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.slot { height: 4px; background: var(--mint); animation: slot 1.4s ease-in-out infinite; }
@keyframes slot { 0%, 100% { opacity: .6; box-shadow: 0 0 14px 2px rgba(141, 240, 196, .45); } 50% { opacity: 1; box-shadow: 0 0 30px 8px rgba(141, 240, 196, .8); } }
.finding { background: var(--amber); color: var(--amber-ink); border-radius: 16px; padding: 16px 18px; margin-top: 8px; display: flex; flex-direction: column; gap: 6px; font-weight: 600; font-size: 15px; line-height: 1.4; }
.finding-head { font-weight: 800; font-size: clamp(20px, 2.4vw, 26px); letter-spacing: -.02em; }
.step .cal { margin-top: 8px; max-width: 440px; }

/* Looping decorations rest while off screen. */
.step:not(.live) .lcd-scan, .step:not(.live) .slot { animation-play-state: paused; }
body.away-top .arrow::after { animation-play-state: paused; }

/* reveal on scroll */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s, transform .7s; transition-delay: var(--d, 0s); }
.reveal.on { opacity: 1; transform: none; }

/* 4 · promise */
.promise { max-width: var(--wide); margin: 0 auto; padding-top: 18vh; padding-bottom: 14vh; display: flex; flex-direction: column; gap: 22px; }
.promise h2 { max-width: 14em; }
.three { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 18px; }
.three > div { background: var(--panel); border: 1px solid var(--line); border-radius: 20px; padding: 22px; display: flex; flex-direction: column; gap: 10px; }
.three .machine { font-size: 22px; }
.three p { color: var(--muted); font-size: 15px; line-height: 1.5; font-weight: 600; }

/* 5 · ledger */
.cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; background: var(--panel); border: 1px solid var(--line); border-radius: 24px; padding: 20px; }
.cal .d { position: relative; aspect-ratio: 1 / 1.08; border-radius: 12px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; font-weight: 700; font-size: 14px; color: #5C6875; }
.cal .d.has { background: #171E25; border: 1px solid var(--line); color: var(--paper); transform: scale(.6); opacity: 0; transition: transform .45s cubic-bezier(.2, 1.4, .4, 1), opacity .3s; transition-delay: var(--d, 0s); }
.step.seen .cal .d.has { transform: none; opacity: 1; }
.cal .d.pick { background: var(--mint); border-color: var(--mint); color: var(--glass); }
.cal i { display: block; height: 4px; border-radius: 2px; }
.cal i.bar { width: 12px; background: var(--paper); }
.cal i.amber { width: 12px; background: var(--amber); }
.cal i.dot { width: 6px; height: 6px; border-radius: 50%; background: var(--mint); }
.cal .pick i.bar { background: var(--glass); }
.cal .d.link::after { content: ""; position: absolute; right: -9px; top: 50%; width: 0; height: 4px; border-radius: 2px; background: var(--mint); z-index: 2; transition: width .5s 1.1s; }
.step.seen .cal .d.link::after { width: 12px; }

/* 6 · plans */
.plans { max-width: var(--wide); margin: 0 auto; padding-top: 6vh; padding-bottom: 12vh; display: flex; flex-direction: column; gap: 20px; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 12px; }
.plan { background: var(--panel); border: 1px solid var(--line); border-radius: 22px; padding: 26px; display: flex; flex-direction: column; gap: 14px; }
.plan.paid { border-color: rgba(141, 240, 196, .5); box-shadow: 0 0 60px rgba(141, 240, 196, .08); }
.plan h3 { font-size: 24px; display: flex; align-items: baseline; gap: 10px; }
.plan h3 span { font-size: 12px; letter-spacing: 1.2px; text-transform: uppercase; color: var(--mint); }
.plan li { padding: 10px 0; border-top: 1px solid var(--line); font-weight: 600; font-size: 16px; }

.end { min-height: 80svh; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 22px; padding-bottom: 8vh; }
.machine.big { font-size: clamp(26px, 5vw, 46px); }

footer { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 24px var(--pad) 34px; border-top: 1px solid var(--line); font-size: 14px; color: var(--muted); font-weight: 600; }

@media (max-width: 980px) {
  .hero { grid-template-columns: 1fr; padding-bottom: 40px; }
  .guide, .phone-space, .rail { display: none; }
  .phone-slot { display: flex; justify-content: center; margin-top: 22px; }
  .step { width: 100%; min-height: 0; padding: 9vh 0; }
  .three, .two { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation: none !important; transition: none !important; }
  .step > *, .rows li, .reveal, .cal .d.has { opacity: 1; transform: none; }
  .cal .d.link::after { width: 12px; }
  .lcd-scan, #field, .skip, .rail i { display: none; }
}
