/* The opening film — six photographic scenes.
 *
 * Three earlier cuts were rejected on appearance. Two flew a camera forward past framed
 * screenshots (a journey, and the same shape as another demo we had made); the third put a
 * hand-drawn browser window on screen, which is the thing that actually read as cheap —
 * invented interface cannot be made to look expensive by animating it.
 *
 * This cut is carried by photography, typography and light: real pictures of the trades we
 * build for, full-bleed and graded, with the websites arriving as the payoff. The owner
 * approved the look from a single still before any of it was built.
 *
 * Craft rules below are taken from the installed design skills and pinned by tests:
 *   entrance easing cubic-bezier(.16,1,.3,1), never linear, never bouncy  (design-philosophy)
 *   hover capped 1.02-1.05, press .96, feedback 100-250ms                 (micro-interaction)
 *   animate transform and opacity ONLY                                    (60fps-animation)
 *   max 3-4 type sizes, weights 300-600, never 900                        (design-philosophy)
 *   3-5 colours total                                                     (modern-web-design)
 *   glass = frost + translucency .08-.18 + edge highlight + layered depth (glassmorphism)
 *   40-60% of the frame stays empty                                       (design-philosophy)
 * Scrolling stays native — "enhance scroll, don't replace it" is that guidance's one
 * explicit prohibition, so nothing here intercepts the wheel.
 *
 * `--bp-*` is the vocabulary home.css picks up in daylight, so the page below reads as the
 * same piece of work.
 */

.wk {
  --bp-ink: #FBFCFB;
  --bp-dim: rgba(251, 252, 251, .72);
  --bp-mute: rgba(251, 252, 251, .5);
  --bp-accent: #6FE3A8;
  --bp-ground: #070A09;
  --bp-rule: rgba(255, 255, 255, .14);
  --e-out: cubic-bezier(.16, 1, .3, 1);
  position: relative;
  background: var(--bp-ground);
}

/* ---------- Stage ---------- */
.wk-stage { position: fixed; inset: 0; z-index: 0; overflow: hidden; background: var(--bp-ground); }
.wk-track { position: relative; height: 660vh; pointer-events: none; }
.wk.is-calm .wk-track { height: 420vh; }
.wk-rest { position: relative; z-index: 5; background: var(--ground, #FBFBFA); }

/* ---------- A scene ---------- */
.wk-scene { position: absolute; inset: 0; opacity: 0; visibility: hidden; }
/* The scrubbed film sets opacity and visibility inline; `.on` is what the no-library
   fallback and the calm tier use instead. */
.wk-scene.on { opacity: 1; visibility: visible; }
.wk.is-calm .wk-scene, .wk.is-fallback .wk-scene { transition: opacity .45s var(--e-out); }

.wk-shot { position: absolute; inset: 0; overflow: hidden; }
.wk-shot img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 42%;
  filter: saturate(.82) contrast(1.06) brightness(.78);
  transform: scale(1.08); transform-origin: 50% 45%; will-change: transform; }
/* The stage is taller than the viewport so a drifting photograph never shows an edge. */
.wk-shot { position: absolute; inset: -6% 0; overflow: hidden; }
/* The grade: warmth thrown in from the light side, a floor for the type to sit on, and a
   vignette to hold the eye in the middle. */
.wk-grade { position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(120% 90% at 72% 18%, rgba(255,214,170,.20) 0%, transparent 55%),
    linear-gradient(to top, rgba(7,10,9,.96) 0%, rgba(7,10,9,.88) 22%, rgba(7,10,9,.62) 46%, rgba(7,10,9,.10) 72%, rgba(7,10,9,.40) 100%),
    radial-gradient(130% 110% at 50% 45%, transparent 38%, rgba(7,10,9,.66) 100%); }
/* Grain: static, cheap, and the single clearest cue that a picture was art-directed rather
   than dropped in. One element for the whole stage. */
.wk-grain { position: fixed; inset: -50%; z-index: 2; opacity: .16; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)' opacity='.55'/%3E%3C/svg%3E"); }

/* ---------- Copy ---------- */
.wk-wrap { position: relative; height: 100%; display: grid; align-content: end;
  gap: clamp(18px, 2.4vh, 26px); padding: 0 clamp(24px, 6vw, 92px) clamp(80px, 11vh, 118px);
  width: min(1500px, 100%); margin-inline: auto; color: var(--bp-ink); }

/* Copy sits at its resting position by default, so the page reads with JavaScript off.
   The film moves each layer through that position at its own rate (see RATE in walk.js);
   only the calm tier and the fallback use a plain fade. */
.wk.is-calm .wk-scene .wk-kicker, .wk.is-calm .wk-scene .wk-title,
.wk.is-calm .wk-scene .wk-sub, .wk.is-calm .wk-scene .wk-row, .wk.is-calm .wk-scene .wk-foot {
  transform: none !important; }

.wk-kicker { margin: 0; font-family: var(--font-mono, 'Geist Mono', ui-monospace, monospace);
  font-size: 12px; font-weight: 500; letter-spacing: .18em; text-transform: uppercase;
  color: var(--bp-accent); display: inline-flex; align-items: center; gap: 12px; }
.wk-kicker::before { content: ""; width: 34px; height: 1px; background: currentColor; opacity: .8; }

.wk-title { margin: 0; font-family: var(--font-sans, 'Geist', system-ui, sans-serif);
  font-weight: 500; font-size: clamp(40px, 6.4vw, 96px); line-height: .96; letter-spacing: -.045em;
  max-width: 15ch; text-wrap: balance; text-shadow: 0 2px 50px rgba(0,0,0,.6); }
.wk-title .soft { font-weight: 300; color: var(--bp-dim); }

.wk-sub { margin: 0; max-width: 46ch; font-size: clamp(15px, 1.2vw, 17.5px); line-height: 1.55;
  color: var(--bp-dim); }

.wk-row { display: flex; flex-wrap: wrap; align-items: center; gap: 18px 34px; }

/* Glass, four ingredients, none optional (glassmorphism): frost, translucency inside
   .08-.18, an edge highlight brighter than the fill, and layered outer + inset depth.
   Nothing behind it scales, so the blur never re-blurs a moving layer. */
.wk-offer { display: flex; align-items: center; gap: 12px; padding: 10px 10px 10px 22px;
  border-radius: 999px; pointer-events: auto;
  background: rgba(255, 255, 255, .12);
  backdrop-filter: blur(22px) saturate(1.5);
  -webkit-backdrop-filter: blur(22px) saturate(1.5);
  border: 1px solid rgba(255, 255, 255, .22);
  box-shadow: 0 24px 60px -18px rgba(0,0,0,.7), inset 0 1px 0 rgba(255, 255, 255, .4); }
.wk-offer input { flex: 1; min-width: 150px; border: 0; background: transparent; outline: 0;
  font: inherit; font-size: 15px; color: var(--bp-ink); }
/* A hairline between the two fields, so one pill still reads as one control. */
.wk-div { flex: none; width: 1px; align-self: stretch; margin: 4px 2px;
  background: rgba(255, 255, 255, .22); }
.wk-offer input::placeholder { color: rgba(251,252,251,.6); }
.wk-offer input:focus-visible { outline: 2px solid var(--bp-accent); outline-offset: 6px; border-radius: 4px; }
.wk-go { border: 0; cursor: pointer; font: inherit; font-weight: 600; font-size: 15px;
  padding: 13px 26px; border-radius: 999px; background: var(--bp-ink); color: #0A0F0C;
  transition: transform .18s var(--e-out), background-color .18s var(--e-out); }
.wk-go:hover { transform: scale(1.03); background: var(--bp-accent); }
.wk-go:active { transform: scale(.96); }

.wk-price { display: grid; gap: 3px; }
.wk-price b { font-size: 21px; font-weight: 600; letter-spacing: -.02em; }
.wk-price span { font-size: 13px; color: var(--bp-dim); }

.wk-foot { display: flex; justify-content: space-between; align-items: end; gap: 20px;
  padding-top: 8px; border-top: 1px solid var(--bp-rule); }
.wk-foot p { margin: 0; font-size: 13.5px; color: var(--bp-dim); max-width: 46ch; line-height: 1.5; }
.wk-meta { font-family: var(--font-mono, 'Geist Mono', ui-monospace, monospace); font-size: 11px;
  letter-spacing: .14em; text-transform: uppercase; color: var(--bp-mute); white-space: nowrap; }

.wk-skip { pointer-events: auto; color: var(--bp-accent); font-weight: 500; text-underline-offset: 4px; }

/* ---------- The work: six sites, on a dark ground ---------- */
.wk-scene--work .wk-shot { background: #05080A; }
.wk-work { position: absolute; left: 50%; top: 34%; transform: translate(-50%, -50%);
  width: min(70rem, 86vw); display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.wk-work figure { margin: 0; border-radius: 8px; overflow: hidden; background: #0A1014;
  border: 1px solid rgba(255,255,255,.12); box-shadow: 0 30px 70px -30px rgba(0,0,0,.9); }
.wk-work img { display: block; width: 100%; height: clamp(96px, 12.5vh, 142px);
  object-fit: cover; object-position: top center; }
.wk-work figcaption { padding: 9px 12px; font-family: var(--font-mono, 'Geist Mono', ui-monospace, monospace);
  font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--bp-mute); }

/* ---------- Closing call to action ---------- */
.wk-cta { display: inline-flex; align-items: center; pointer-events: auto; padding: 17px 32px;
  border-radius: 999px; background: var(--bp-ink); color: #0A0F0C; font-weight: 600; font-size: 17px;
  text-decoration: none; transition: transform .18s var(--e-out), background-color .18s var(--e-out); }
.wk-cta:hover { transform: scale(1.03); background: var(--bp-accent); }
.wk-cta:active { transform: scale(.96); }

/* ---------- Slate ---------- */
.wk-slate { position: fixed; z-index: 3; left: clamp(24px, 6vw, 92px); right: clamp(24px, 6vw, 92px);
  bottom: calc(env(safe-area-inset-bottom, 0px) + 22px); display: flex; align-items: center; gap: 16px;
  font-family: var(--font-mono, 'Geist Mono', ui-monospace, monospace); font-size: 11px;
  letter-spacing: .14em; text-transform: uppercase; color: var(--bp-mute);
  font-variant-numeric: tabular-nums; pointer-events: none; }
.wk-rail { flex: 1; height: 1px; background: rgba(255,255,255,.18); position: relative; }
.wk-fill { position: absolute; inset: 0; background: var(--bp-accent); transform-origin: 0 50%;
  transform: scaleX(0); }
.wk-exit { pointer-events: auto; color: var(--bp-ink); text-decoration: none; white-space: nowrap;
  border-bottom: 1px solid rgba(255,255,255,.3); padding-bottom: 2px;
  transition: color .18s var(--e-out), border-color .18s var(--e-out); }
.wk-exit:hover { color: var(--bp-accent); border-bottom-color: var(--bp-accent); }

.wk.is-past .wk-scene, .wk.is-past .wk-slate, .wk.is-past .wk-grain {
  opacity: 0 !important; visibility: hidden !important; pointer-events: none; }

/* ---------- Reduced motion ---------- */
/* Calm tier: the scenes still change, because the pictures are the content — they simply
   cross-fade, and nothing drifts, scales or lifts. */
.wk.is-calm .wk-shot img { transform: scale(1.02) !important; will-change: auto; }
.wk.is-calm .wk-work figure { transform: none; }
@media (prefers-reduced-motion: reduce) {
  .wk-scene { transition-duration: .3s; }
  .wk-shot img { transform: scale(1.02) !important; will-change: auto; }
}

/* ---------- Phones (portrait) ---------- */
@media (max-aspect-ratio: 9/10) {
  .wk-track { height: 560vh; }
  .wk-wrap { padding: 0 22px clamp(74px, 10vh, 96px); gap: 16px; }
  .wk-title { font-size: clamp(34px, 9.6vw, 50px); max-width: 13ch; }
  .wk-sub { font-size: 14.5px; }
  /* Two fields and a button will not sit on one line at 390px, so the pill becomes a
     stacked card rather than clipping its own button off the edge. */
  .wk-offer { width: 100%; flex-direction: column; align-items: stretch; gap: 0;
    padding: 6px; border-radius: 20px; }
  .wk-offer input { min-width: 0; font-size: 15px; padding: 12px 14px; }
  .wk-div { width: auto; height: 1px; align-self: auto; margin: 0 14px; }
  .wk-go { width: 100%; margin-top: 6px; padding: 13px; font-size: 15px; }
  .wk-row { gap: 14px; }
  .wk-price b { font-size: 18px; }
  .wk-foot { flex-direction: column; align-items: start; gap: 8px; }
  .wk-foot p { font-size: 12.5px; }
  .wk-work { top: 30%; width: 92vw; grid-template-columns: repeat(2, 1fr); gap: 9px; }
  .wk-work figure:nth-child(n+5) { display: none; }
  .wk-work img { height: clamp(88px, 12vh, 120px); }
  .wk-slate { left: 22px; right: 22px; font-size: 9.5px; gap: 10px; }
}

/* The opening request stays on this frame, including the details needed for a real build. */
.leadform.wk-offer { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); width: min(590px, 100%); max-width: none; margin: 0; gap: 6px; padding: 10px; border-radius: 18px; }
.leadform.wk-offer input:not([type="checkbox"]):not([type="hidden"]) { width: 100%; min-width: 0; color: #fff; padding: 10px 12px; background: rgba(0, 0, 0, .2); border-radius: 8px; }
.leadform.wk-offer input::placeholder { color: rgba(255,255,255,.73); }
.leadform.wk-offer .photo-permission, .leadform.wk-offer .trade-availability { color: #fff; }
.leadform.wk-offer button { grid-column: 1 / -1; border-radius: 9px; }
@media (max-width: 560px) {
  .leadform.wk-offer { grid-template-columns: 1fr; }
  .leadform.wk-offer input:not([type="checkbox"]):not([type="hidden"]) { padding: 7px 10px; }
  .wk-wrap { gap: 10px; }
  .wk-title { font-size: clamp(30px, 8vw, 42px); }
  .wk-foot { display: none; }
}
.wk-price .wk-sample { display: inline-block; margin-top: 7px; color: var(--bp-accent); font-size: 13px; font-weight: 600; text-underline-offset: 3px; }
