/* QuoteBash landing page.
   Loaded on top of app.css, which supplies the palette and the button system. */

.lp { --gutter: clamp(16px, 5vw, 40px); }

.lp-wrap { max-width: 1120px; margin: 0 auto; padding: 0 var(--gutter); }
.lp-narrow { max-width: 760px; margin: 0 auto; padding: 0 var(--gutter); }

/* ---------------------------------------------------------------- header */

.lp-nav {
  position: sticky; top: 0; z-index: 60;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(160%) blur(16px);
  -webkit-backdrop-filter: saturate(160%) blur(16px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s ease;
}
.lp-nav.stuck { border-bottom-color: var(--line); }
.lp-nav-inner {
  display: flex; align-items: center; gap: 14px;
  max-width: 1120px; margin: 0 auto;
  padding: 14px var(--gutter);
}
.lp-nav .word {
  font-family: var(--display); font-weight: 800; letter-spacing: -.03em;
  text-transform: uppercase; font-size: 1.1rem;
}
.lp-nav .word em { font-style: normal; color: var(--accent); }

/* ------------------------------------------------------------------ hero */

.hero {
  position: relative;
  min-height: min(100svh, 860px);
  display: flex; flex-direction: column; justify-content: center;
  padding: 60px 0 80px;
  overflow: hidden;
}

/* Real render texture behind the type, dimmed hard and faded out at the bottom so
   it reads as depth rather than as a photo competing with the wordmark. */
.hero::before {
  content: "";
  position: absolute; inset: 0;
  background: url("/static/img/hero-texture.jpg") center/cover no-repeat;
  opacity: .32;
  z-index: 0;
}
.hero::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg,
              color-mix(in srgb, var(--bg) 55%, transparent) 0%,
              color-mix(in srgb, var(--bg) 30%, transparent) 40%,
              var(--bg) 100%);
  z-index: 0;
}

/* Physics debris canvas sits behind the type, ignores pointer entirely. */
#debris {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  z-index: 1;
}

.hero-inner { position: relative; z-index: 2; }

.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 14px; margin-bottom: 26px;
  border: 1px solid var(--line); border-radius: 999px;
  background: var(--surface);
  font-size: .74rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase;
  color: var(--muted);
}
.hero-eyebrow .dot {
  width: 7px; height: 7px; border-radius: 50%; background: var(--good);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--good) 22%, transparent);
}

/* The wordmark that gets hammered in. */
.slam {
  font-family: var(--display);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: -.045em;
  line-height: .86;
  font-size: clamp(3.2rem, 15.5vw, 10.5rem);
  margin: 0;
  display: flex; flex-wrap: wrap;
  column-gap: .08em;
}
.slam .word-group { display: flex; }
.slam .ltr {
  display: inline-block;
  transform: translateY(-130%) scaleY(1.25);
  opacity: 0;
  will-change: transform, opacity;
}
.slam .ltr.hit { animation: slamDown .42s cubic-bezier(.2, 1.5, .35, 1) forwards; }
.slam .accent-word .ltr { color: var(--accent); }

@keyframes slamDown {
  0%   { transform: translateY(-130%) scaleY(1.3);  opacity: 0; }
  55%  { transform: translateY(6%)    scaleY(.82);  opacity: 1; }
  75%  { transform: translateY(-4%)   scaleY(1.06); opacity: 1; }
  100% { transform: translateY(0)     scaleY(1);    opacity: 1; }
}

/* Whole-hero shake when a letter lands. */
.shake { animation: shake .18s ease-out; }
@keyframes shake {
  0%, 100% { transform: translate(0, 0); }
  25%      { transform: translate(-3px, 2px); }
  50%      { transform: translate(2px, -2px); }
  75%      { transform: translate(-1px, 1px); }
}

/* Dust kicked up where a letter lands — soft billowing puffs plus hard grit. */
.dust {
  position: absolute; z-index: 3;
  width: 5px; height: 5px; border-radius: 50%;
  background: var(--muted); opacity: .55;
  pointer-events: none;
}
.dust-puff {
  position: absolute; z-index: 2;
  border-radius: 50%;
  pointer-events: none;
  opacity: 0;
  /* Soft-edged so it reads as smoke rather than a circle. */
  background: radial-gradient(circle at 50% 50%,
              rgba(190, 196, 204, .55) 0%,
              rgba(160, 166, 176, .28) 45%,
              rgba(140, 146, 156, 0) 72%);
  filter: blur(3px);
}

.hero-tag {
  margin: 26px 0 0;
  font-size: clamp(1.1rem, 3.4vw, 1.7rem);
  font-weight: 700; letter-spacing: -.015em;
  max-width: 20ch;
}

/* ---- the tagline, spread on ----
   Revealed left to right with a soft leading edge, the way material goes on with
   a trowel — the effect without the tool being drawn. .go is added by the script
   once the wordmark has finished landing. */
.hero-tag.spread { position: relative; }
.spread-text {
  display: block;
  /* Room for the blur to sit outside the glyphs without clipping descenders. */
  padding: 2px 0;
}

/* Hidden only once the script has armed it. If landing.js never runs the tagline
   is just there, rather than clipped to nothing with no animation coming to
   reveal it. */
@media (prefers-reduced-motion: no-preference) {
  .hero-tag.spread.armed .spread-text {
    clip-path: inset(0 100% 0 0);
    /* A hair of blur on the leading edge so it reads as material being laid on
       rather than a wipe transition. */
    filter: blur(1.5px);
  }
  .hero-tag.spread.armed.go .spread-text {
    animation: spread-on 1.15s cubic-bezier(.32, .06, .28, 1) forwards;
  }
}

@keyframes spread-on {
  0%   { clip-path: inset(0 100% 0 0); filter: blur(1.5px); }
  85%  { filter: blur(.4px); }
  100% { clip-path: inset(0 -4% 0 0); filter: blur(0); }
}
.hero-sub {
  margin: 16px 0 0; max-width: 46ch;
  color: var(--muted); font-size: clamp(.95rem, 2.2vw, 1.08rem); line-height: 1.6;
}
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.hero-cta .btn { min-height: 56px; padding: 0 26px; font-size: 1rem; }

.hero-proof {
  display: flex; flex-wrap: wrap; gap: 22px;
  margin-top: 34px; color: var(--dim); font-size: .82rem;
}
.hero-proof span { display: inline-flex; align-items: center; gap: 7px; }
.hero-proof svg { width: 15px; height: 15px; color: var(--good); }

/* ---- laid in like bricks ----
   Each one slides across into its bed, drops the last few pixels and settles.
   .laying is added per-item by the script so they go down one at a time. */
/* Same fail-safe as the tagline: nothing is hidden until the script says so. */
@media (prefers-reduced-motion: no-preference) {
  .hero-proof.laid.armed > span { opacity: 0; }
  .hero-proof.laid.armed > span.laying {
    animation: brick-lay .62s cubic-bezier(.3, .9, .35, 1) forwards;
  }
}
@keyframes brick-lay {
  0%   { opacity: 0; transform: translate(-38px, -16px) rotate(-3deg); }
  55%  { opacity: 1; transform: translate(0, -7px) rotate(0deg); }
  /* The tap down with the trowel handle, and the little bounce off the bed. */
  78%  { transform: translate(0, 2px); }
  100% { opacity: 1; transform: none; }
}

/* -------------------------------------------------------------- sections */

.lp-section { padding: clamp(64px, 11vw, 120px) 0; }
.lp-section.alt { background: var(--surface); border-block: 1px solid var(--line); }

.lp-head { max-width: 42ch; margin-bottom: 44px; }
.lp-head .eyebrow { margin-bottom: 12px; display: block; }
.lp-head h2 {
  font-family: var(--display); font-weight: 800; text-transform: uppercase;
  letter-spacing: -.03em; line-height: .98;
  font-size: clamp(1.9rem, 6vw, 3.4rem);
}
.lp-head p { margin: 14px 0 0; color: var(--muted); font-size: 1.02rem; line-height: 1.6; }

/* ------------------------------------------------------- the phone story */

.story {
  display: grid; gap: clamp(32px, 6vw, 72px);
  grid-template-columns: 1fr;
  align-items: center;
}
@media (min-width: 900px) { .story { grid-template-columns: 420px 1fr; } }

.phone {
  position: relative;
  width: min(300px, 78vw); margin: 0 auto;
  aspect-ratio: 9 / 19.2;
  background: #050607;
  border: 10px solid #1A1D22;
  border-radius: 42px;
  box-shadow: 0 30px 70px rgba(0,0,0,.6), 0 0 0 1px rgba(255,255,255,.05);
  overflow: hidden;
}
.phone::before {
  content: ""; position: absolute; top: 8px; left: 50%; transform: translateX(-50%);
  width: 90px; height: 22px; border-radius: 12px; background: #101216; z-index: 5;
}
.phone-screen { position: absolute; inset: 0; overflow: hidden; }

/* Screens slide over one another like a real app moving between views. */
.ps-view {
  position: absolute; inset: 0;
  padding: 40px 12px 12px;
  display: flex; flex-direction: column;
  transform: translateX(100%);
  opacity: 0;
  transition: transform .5s cubic-bezier(.3,.9,.3,1), opacity .35s ease;
}
.ps-view.on { transform: translateX(0); opacity: 1; }
.ps-view.out { transform: translateX(-28%); opacity: 0; }

/* ---- the finished document ---- */

.ps-doc-inner {
  flex: 1; display: flex; flex-direction: column;
  background: #0F1114;
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: 10px;
  padding: 12px 11px;
  overflow: hidden;
}
.ps-doc-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.ps-biz { font-size: .58rem; font-weight: 800; letter-spacing: .02em; line-height: 1.2; }
.ps-dim { font-size: .5rem; color: var(--muted); line-height: 1.4; }
.ps-label { font-size: .45rem; font-weight: 800; letter-spacing: .12em; color: var(--muted); }
.ps-doc .right { text-align: right; }
.ps-num {
  font-family: var(--display); font-weight: 800; letter-spacing: -.02em;
  font-size: .95rem; color: var(--accent); line-height: 1;
}
.ps-doc .ps-label + .ps-num { margin-top: 1px; }

.ps-bill {
  margin: 9px 0 7px; padding: 7px 8px;
  background: var(--surface); border-radius: 6px;
  font-size: .52rem; line-height: 1.45;
}

/* What the job actually was. Without it the thing reads like a receipt. */
.ps-scope {
  margin: 0 0 9px; padding: 7px 8px;
  border-left: 2px solid color-mix(in srgb, var(--accent) 55%, transparent);
  font-size: .5rem; line-height: 1.5; color: var(--muted);
}
.ps-scope .ps-dim { margin-bottom: 2px; letter-spacing: .1em; font-weight: 800; }

.ps-rows { display: flex; flex-direction: column; gap: 1px; }
.ps-row {
  display: flex; justify-content: space-between; gap: 8px;
  font-size: .55rem; padding: 4px 0;
  border-bottom: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
  font-variant-numeric: tabular-nums;
}
.ps-row span { color: var(--muted); }
.ps-row.sub { font-size: .5rem; }
.ps-row .cut { color: var(--warn); }

.ps-grand {
  margin-top: auto;
  display: flex; justify-content: space-between; align-items: baseline; gap: 8px;
  padding: 9px 0 8px;
  border-top: 2px solid var(--accent);
}
.ps-grand span { font-size: .52rem; color: var(--muted); font-weight: 700; }
.ps-grand b {
  font-family: var(--display); font-weight: 800; letter-spacing: -.02em;
  font-size: 1.1rem; color: var(--accent); font-variant-numeric: tabular-nums;
}

.ps-bank {
  padding-top: 7px; border-top: 1px solid var(--line);
  font-size: .5rem; color: var(--muted); line-height: 1.5;
}

/* A light sweeping across the document as it lands. */
.ps-doc.sheen .ps-doc-inner { position: relative; }
.ps-doc.sheen .ps-doc-inner::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(105deg,
              transparent 35%,
              color-mix(in srgb, var(--accent) 22%, transparent) 48%,
              rgba(255,255,255,.16) 52%,
              transparent 66%);
  transform: translateX(-120%);
  animation: sheen 1.1s cubic-bezier(.3,.7,.4,1) .1s;
  pointer-events: none;
}
@keyframes sheen { to { transform: translateX(120%); } }

/* The thumb doing the tapping. */
.ps-thumb {
  position: absolute; z-index: 7;
  width: 30px; height: 30px; margin: -6px 0 0 -6px;
  border-radius: 50%;
  background: radial-gradient(circle at 32% 30%,
              rgba(255,255,255,.5), rgba(255,255,255,.14) 60%, transparent 72%);
  border: 1.5px solid rgba(255,255,255,.45);
  opacity: 0;
  transition: left .28s cubic-bezier(.4,.9,.4,1), top .28s cubic-bezier(.4,.9,.4,1),
              opacity .25s ease;
  pointer-events: none;
}
.ps-thumb.visible { opacity: 1; }
.ps-thumb.press { animation: thumbPress .34s ease-out; }
@keyframes thumbPress {
  0%   { transform: scale(1); }
  38%  { transform: scale(.62); }
  100% { transform: scale(1); }
}

/* Coins on payday. */
.ps-coin {
  position: absolute; z-index: 9;
  font-size: 1.1rem; opacity: 0;
  pointer-events: none;
}

.ps-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 10px; }
.ps-head b { font-size: .78rem; letter-spacing: .04em; }
.ps-head span { font-size: .62rem; color: var(--muted); }

.ps-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.ps-tile {
  position: relative;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 10px; padding: 9px 8px; min-height: 54px;
  display: flex; flex-direction: column; justify-content: space-between;
  transition: border-color .18s ease, background .18s ease, transform .12s ease;
}
.ps-tile .n { font-size: .58rem; font-weight: 700; line-height: 1.2; }
.ps-tile .p { font-size: .62rem; font-weight: 800; color: var(--muted); }
.ps-tile.on { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, var(--surface)); }
.ps-tile.tap { transform: scale(.92); }
.ps-badge {
  position: absolute; top: -6px; right: -6px;
  min-width: 20px; height: 20px; padding: 0 5px;
  display: none; align-items: center; justify-content: center;
  border-radius: 10px; background: var(--accent); color: var(--accent-ink);
  font-size: .62rem; font-weight: 800;
}
.ps-tile.on .ps-badge { display: flex; }
.ps-badge.pop { animation: pop .24s cubic-bezier(.34,1.56,.64,1); }

/* A finger-tap ripple on the phone screen. */
.ps-ripple {
  position: absolute; z-index: 6;
  width: 34px; height: 34px; margin: -17px 0 0 -17px;
  border-radius: 50%; border: 2px solid var(--accent);
  opacity: 0; pointer-events: none;
}
.ps-ripple.go { animation: ripple .45s ease-out; }
@keyframes ripple {
  0%   { transform: scale(.3); opacity: .9; }
  100% { transform: scale(1.7); opacity: 0; }
}

/* The VAT switch on the builder screen — one flick, on the whole job. */
.ps-switch {
  margin-top: auto;
  display: flex; align-items: center; gap: 8px;
  padding: 8px 11px 9px;
}
.ps-sw {
  flex: none; width: 26px; height: 15px; border-radius: 999px;
  background: var(--line); position: relative;
  transition: background .22s ease;
}
.ps-sw .knob {
  position: absolute; top: 2px; left: 2px;
  width: 11px; height: 11px; border-radius: 50%;
  background: var(--muted);
  transition: transform .22s cubic-bezier(.3, 1.5, .5, 1), background .22s ease;
}
.ps-switch.on .ps-sw { background: color-mix(in srgb, var(--accent) 45%, transparent); }
.ps-switch.on .ps-sw .knob { transform: translateX(11px); background: var(--accent); }
.ps-sw-label {
  font-size: .55rem; letter-spacing: .04em; color: var(--muted);
  transition: color .22s ease;
}
.ps-switch.on .ps-sw-label { color: var(--text); }

.ps-total {
  background: var(--surface); border-top: 2px solid var(--accent);
  border-radius: 10px; padding: 9px 11px;
}
.ps-total .lbl { font-size: .55rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.ps-total .amt {
  font-family: var(--display); font-weight: 800; letter-spacing: -.02em;
  font-size: 1.3rem; color: var(--accent); font-variant-numeric: tabular-nums; line-height: 1.1;
}
.ps-total .amt.bump { animation: bump .22s ease; }

/* The send → paid → pub beats. */
.ps-overlay {
  position: absolute; inset: 0; z-index: 8;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 12px; background: rgba(5,6,7,.9);
  opacity: 0; pointer-events: none; transition: opacity .3s ease;
}
.ps-overlay.show { opacity: 1; }
.ps-overlay .big { font-size: 3.6rem; line-height: 1; }
.ps-overlay .cap {
  font-family: var(--display); font-weight: 800; text-transform: uppercase;
  letter-spacing: .02em; font-size: 1.25rem;
  /* Keep long captions off the bezel and honestly centred rather than
     centred-until-they-wrap. */
  max-width: 86%; text-align: center; text-wrap: balance; line-height: 1.15;
}

.ps-stamp {
  border: 4px solid var(--good); color: var(--good);
  font-family: var(--display); font-weight: 800; text-transform: uppercase;
  font-size: 2rem; letter-spacing: .06em;
  padding: 6px 18px; border-radius: 8px;
  transform: rotate(-13deg) scale(2.6); opacity: 0;
}
.ps-stamp.thunk { animation: thunk .4s cubic-bezier(.2,1.4,.4,1) forwards; }
@keyframes thunk {
  0%   { transform: rotate(-13deg) scale(2.6); opacity: 0; }
  60%  { transform: rotate(-13deg) scale(.92); opacity: 1; }
  100% { transform: rotate(-13deg) scale(1);   opacity: 1; }
}

/* Beat captions beside the phone. */
.beats { list-style: none; margin: 0; padding: 0; }
.beats li {
  display: flex; gap: 16px; align-items: flex-start;
  padding: 16px 0; opacity: .32;
  transition: opacity .3s ease, transform .3s ease;
  border-bottom: 1px solid var(--line);
}
.beats li:last-child { border-bottom: 0; }
.beats li.on { opacity: 1; }
.beats .num {
  flex: 0 0 auto; width: 34px; height: 34px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--surface-2); border: 1px solid var(--line);
  font-weight: 800; font-size: .82rem; color: var(--muted);
  transition: background .3s ease, color .3s ease, border-color .3s ease;
}
.beats li.on .num { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.beats h3 { font-size: 1.06rem; margin-bottom: 3px; }
.beats p { margin: 0; color: var(--muted); font-size: .92rem; line-height: 1.55; }

/* ------------------------------------------------------------- features */

.grid-features { display: grid; gap: 14px; grid-template-columns: 1fr; }
@media (min-width: 620px) { .grid-features { grid-template-columns: 1fr 1fr; } }
@media (min-width: 980px) { .grid-features { grid-template-columns: repeat(3, 1fr); } }

.feature {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r); padding: 22px;
  transition: border-color .2s ease, transform .2s ease;
}
.feature:hover { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); transform: translateY(-2px); }
.feature .ico {
  width: 40px; height: 40px; border-radius: 10px;
  display: grid; place-items: center; margin-bottom: 14px;
  background: color-mix(in srgb, var(--accent) 15%, transparent);
  color: var(--accent);
}
.feature .ico svg { width: 21px; height: 21px; }
.feature h3 { font-size: 1.02rem; margin-bottom: 7px; }
.feature p { margin: 0; color: var(--muted); font-size: .92rem; line-height: 1.6; }

/* --------------------------------------------------------- the maths bit */

.sums {
  display: grid; gap: 2px;
  background: var(--line); border: 1px solid var(--line);
  border-radius: var(--r); overflow: hidden;
}
.sums .row {
  display: flex; justify-content: space-between; align-items: center; gap: 14px;
  padding: 15px 18px; background: var(--surface);
  font-variant-numeric: tabular-nums;
}
.sums .row.total { background: var(--surface-2); }
.sums .row.total b { color: var(--accent); font-size: 1.22rem; }
.sums .row span:first-child { color: var(--muted); font-size: .93rem; }
.sums .row .cut { color: var(--warn); }
/* Declared on the invoice but not added to the bill — shown struck through so
   it reads as "stated, not charged" at a glance. */
.sums .row .off { color: var(--dim); text-decoration: line-through; font-weight: 600; }
.sums .row.head {
  background: var(--surface-2); padding-top: 11px; padding-bottom: 11px;
}
.sums .row.head span:first-child {
  font-size: .74rem; font-weight: 800; letter-spacing: .1em;
  text-transform: uppercase; color: var(--dim);
}

/* ------------------------------------------------------------ CTA + form */

.access-card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-lg); padding: clamp(22px, 4vw, 38px);
}

.lp-foot {
  border-top: 1px solid var(--line);
  padding: 34px 0; color: var(--dim); font-size: .84rem;
}
.lp-foot .row-between { flex-wrap: wrap; gap: 12px; }

/* --------------------------------------------------------------- motion */

.reveal { opacity: 0; transform: translateY(22px); }
.reveal.in { animation: rise .6s cubic-bezier(.2, .8, .3, 1) forwards; }
@keyframes rise { to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
  .slam .ltr { transform: none !important; opacity: 1 !important; animation: none !important; }
  .reveal { opacity: 1 !important; transform: none !important; animation: none !important; }
  #debris { display: none; }
  .shake { animation: none !important; }
}
