/* Kamir, ported from the Claude Design component `Bond Live.dc.html`.
   Every value the original spliced into an inline style attribute lives here instead;
   only the two viewport-derived numbers (--phone-scale / --phone-shim) are set from JS. */

:root {
  --ink: #16181C;
  --ink-rgb: 22, 24, 28;
  --paper: #EDECE6;
  --paper-alt: #E3E1D9;
  --screen: #F0EFE9;
  --screen-rgb: 240, 239, 233;
  --map: #E6E4DC;
  --overlay-miss: #DCDAD2;
  --green: #2F7D53;
  --red: #C0473C;

  --shell: 1240px;
  --gutter: clamp(20px, 5vw, 60px);
  --mono: 'IBM Plex Mono', ui-monospace, monospace;

  /* set by kamir-live.js from the measured widget and the live viewport */
  --phone-scale: 1;
}

*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Archivo, system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--ink); }
a:hover { color: rgba(var(--ink-rgb), .6); }

:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.site-foot :focus-visible { outline-color: var(--screen); }

.shell {
  max-width: var(--shell);
  margin: 0 auto;
  padding-inline: var(--gutter);
}

.mono {
  font: 500 11px/1 var(--mono);
  letter-spacing: .14em;
  color: rgba(var(--ink-rgb), .45);
}

/* ---------- buttons ---------- */

.btn {
  font-family: inherit;
  border: 0;
  cursor: pointer;
  padding: 9px 16px;
  border-radius: 11px;
  background: var(--ink);
  color: var(--paper);
  font-size: 13.5px;
  font-weight: 600;
}

.btn-lg {
  padding: 17px 28px;
  border-radius: 14px;
  font-size: 16.5px;
}

.btn-invert { background: var(--screen); color: var(--ink); }

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

.site-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding-block: 22px;
  border-bottom: 1px solid rgba(var(--ink-rgb), .14);
}

.brand { display: flex; align-items: center; gap: 10px; }

.brand-mark {
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 20px; height: 20px;
  border-radius: 6px;
  background: var(--ink);
  color: var(--paper);
  font: 700 12px/1 Archivo, sans-serif;
}
.brand-mark::before { content: "K"; }

.brand-word { font-size: 15px; font-weight: 700; letter-spacing: .15em; }

.site-nav {
  display: flex;
  align-items: center;
  gap: 28px;
  font-size: 14px;
}
.site-nav a { text-decoration: none; }

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

.hero {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: clamp(40px, 5vw, 80px);
  padding-block: clamp(44px, 6vw, 80px) clamp(52px, 6vw, 88px);
}

.hero-copy { flex: 1; min-width: 0; width: 100%; }

.hero-title {
  margin: 0;
  font-size: clamp(40px, 6.6vw, 76px);
  line-height: .96;
  letter-spacing: -.04em;
  font-weight: 700;
  font-stretch: 112%;
  max-width: 13ch;
  text-wrap: balance;
}

.hero-sub {
  margin: 22px 0 0;
  font-size: clamp(18px, 2.2vw, 22px);
  line-height: 1.45;
  color: rgba(var(--ink-rgb), .62);
}

.hero-cta { margin-top: 40px; }

.hero-note {
  margin-top: 44px;
  padding-top: 22px;
  border-top: 1px solid rgba(var(--ink-rgb), .16);
  max-width: 38ch;
}

.hero-note p {
  margin: 10px 0 0;
  font-size: 16px;
  line-height: 1.6;
  color: rgba(var(--ink-rgb), .62);
}

/* ---------- widget ---------- */

/* The widget is laid out at its natural 372px and then scaled. A transform does not
   affect layout, so .widget-fit carries the scaled footprint. Otherwise the hero would
   reserve the full unscaled height and push the page into a scroll. */
.widget-fit {
  flex: none;
  width: var(--widget-w, 372px);
  height: var(--widget-h, auto);
  max-width: 100%;
}

.widget {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  width: 372px;
  transform: scale(var(--phone-scale));
  transform-origin: top left;
}

.switchbar {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 5px 6px 5px 14px;
  border-radius: 13px;
  background: #fff;
  border: 1px solid rgba(var(--ink-rgb), .16);
}

.stage {
  font: 500 10.5px/1 var(--mono);
  letter-spacing: .11em;
  color: rgba(var(--ink-rgb), .5);
  white-space: nowrap;
}

.tabs {
  display: flex;
  gap: 4px;
  padding: 3px;
  border-radius: 10px;
  background: rgba(var(--ink-rgb), .07);
}

.tab {
  font-family: inherit;
  border: 0;
  cursor: pointer;
  padding: 7px 12px;
  border-radius: 8px;
  font-size: 12.5px;
  font-weight: 600;
  white-space: nowrap;
  background: transparent;
  color: rgba(var(--ink-rgb), .5);
  box-shadow: none;
  transition: background .25s, color .25s, box-shadow .25s;
}

.tab.is-active {
  background: #fff;
  color: var(--ink);
  box-shadow: 0 1px 3px rgba(var(--ink-rgb), .16);
}

/* ---------- phone ---------- */

.phone {
  width: 372px;
  height: 632px;
  background: var(--ink);
  border-radius: 44px;
  padding: 11px;
  box-shadow: 0 18px 44px rgba(var(--ink-rgb), .22);
}

.phone-screen {
  width: 100%;
  height: 100%;
  border-radius: 34px;
  overflow: hidden;
  background: var(--screen);
  display: flex;
  flex-direction: column;
}

.phone-head {
  flex: none;
  padding: 22px 16px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand--sm { gap: 8px; }
.brand--sm .brand-mark { width: 15px; height: 15px; border-radius: 5px; font-size: 9px; }
.brand--sm .brand-word { font-size: 12.5px; letter-spacing: .14em; }

.clock {
  font: 500 11px/1 var(--mono);
  letter-spacing: .11em;
  color: rgba(var(--ink-rgb), .5);
}

/* ---------- map ---------- */

.map {
  flex: 1;
  min-height: 0;
  margin: 18px 16px 0;
  border-radius: 18px;
  overflow: hidden;
  position: relative;
  background:
    repeating-linear-gradient(0deg, rgba(var(--ink-rgb), .06) 0 1px, transparent 1px 30px),
    repeating-linear-gradient(90deg, rgba(var(--ink-rgb), .06) 0 1px, transparent 1px 36px),
    var(--map);
}

.map-layer { position: absolute; inset: 0; }

.street-v { position: absolute; top: 0; bottom: 0; left: 34%; width: 13px; background: rgba(var(--ink-rgb), .05); }
.street-h { position: absolute; left: 0; right: 0; top: 70%; height: 15px; background: rgba(var(--ink-rgb), .05); }

.ring {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 156px; height: 156px;
  border-radius: 50%;
  border: 1.5px solid rgba(var(--ink-rgb), .45);
  background: rgba(var(--ink-rgb), .04);
  transition: background .35s, border-color .35s;
}

.ring-label {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -88px);
  font: 500 9.5px/1 var(--mono);
  letter-spacing: .12em;
  color: rgba(var(--ink-rgb), .45);
  transition: color .35s;
}

.door {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 13px; height: 13px;
  border-radius: 50%;
  background: var(--ink);
}

.addr {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, 36px);
  font: 500 10px/1 var(--mono);
  letter-spacing: .11em;
  white-space: nowrap;
  background: #fff;
  padding: 5px 8px;
  border-radius: 8px;
  border: 1px solid rgba(var(--ink-rgb), .16);
  opacity: 1;
  transition: opacity .3s;
}

/* the traveller, moved by custom property so the tick only touches the compositor */
.you {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(var(--dot-x, -10px), var(--dot-y, -10px));
  width: 20px; height: 20px;
  border-radius: 50%;
  background: rgba(var(--ink-rgb), .45);
  border: 3px solid var(--map);
  transition: transform .12s linear, background .3s;
}

.dist {
  position: absolute;
  right: 12px; top: 12px;
  padding: 7px 10px;
  border-radius: 10px;
  font: 500 10.5px/1 var(--mono);
  letter-spacing: .1em;
  background: rgba(255, 255, 255, .9);
  color: rgba(var(--ink-rgb), .6);
  transition: background .3s, color .3s;
}

.mark {
  position: absolute;
  top: 50%; left: 50%;
  width: 56px; height: 56px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 28px;
  font-weight: 700;
  color: #fff;
  background: var(--green);
  box-shadow: 0 6px 18px rgba(var(--ink-rgb), .28);
  transform: translate(-50%, -50%) scale(0);
  opacity: 0;
  transition: transform .45s cubic-bezier(.34, 1.56, .5, 1), opacity .3s;
}

/* map state, driven by classes on #bond */

.bond.is-inside .ring { border-color: var(--ink); background: rgba(var(--ink-rgb), .12); }
.bond.is-inside .ring-label { color: var(--ink); }
.bond.is-inside .you { background: var(--ink); }
.bond.is-inside .dist { background: var(--ink); color: var(--screen); }

.bond.is-marked[data-out="arrive"] .ring { border-color: var(--green); background: rgba(47, 125, 83, .16); }
.bond.is-marked[data-out="arrive"] .ring-label { color: var(--green); }

.bond.is-marked .addr { opacity: 0; }
.bond.is-marked .mark { transform: translate(-50%, -50%) scale(1); opacity: 1; }

.bond[data-out="miss"] .mark { background: var(--red); }

/* ---------- outcome overlay ---------- */

.overlay {
  --over-muted: rgba(var(--screen-rgb), .66);
  --over-rule: rgba(var(--screen-rgb), .2);
  position: absolute;
  inset: 0;
  padding: 26px 22px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 14px;
  background: var(--ink);
  color: var(--screen);
  opacity: 0;
  transform: translateY(14px);
  transition: opacity .45s, transform .55s cubic-bezier(.22, .9, .24, 1);
  pointer-events: none;
}

.bond.is-overlay .overlay { opacity: 1; transform: translateY(0); }

.bond[data-out="miss"] .overlay {
  --over-muted: rgba(var(--ink-rgb), .55);
  --over-rule: rgba(var(--ink-rgb), .18);
  background: var(--overlay-miss);
  color: var(--ink);
}

.overlay-head { display: flex; align-items: center; gap: 12px; }

.overlay-badge {
  width: 34px; height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 18px;
  font-weight: 700;
  color: #fff;
  background: var(--green);
}
.bond[data-out="miss"] .overlay-badge { background: var(--red); }

.overlay-kicker {
  font: 500 10.5px/1 var(--mono);
  letter-spacing: .14em;
  color: var(--over-muted);
}

.overlay-amount {
  font-size: 64px;
  line-height: 1;
  letter-spacing: -.04em;
  font-weight: 700;
  font-stretch: 118%;
}

.overlay-note {
  font-size: 15px;
  line-height: 1.45;
  color: var(--over-muted);
  max-width: 24ch;
}

.overlay-foot {
  margin-top: 6px;
  padding-top: 14px;
  border-top: 1px solid var(--over-rule);
  display: flex;
  justify-content: space-between;
  font: 500 11px/1 var(--mono);
  letter-spacing: .1em;
  color: var(--over-muted);
}

/* ---------- status line ---------- */

.status { flex: none; padding: 22px 16px 26px; }

.status-title {
  font-size: 21px;
  line-height: 1.12;
  letter-spacing: -.02em;
  font-weight: 700;
  font-stretch: 110%;
}

/* min-height holds the phone body still as the sentence length changes */
.status-sub {
  margin-top: 6px;
  min-height: 58px;
  font-size: 13.5px;
  line-height: 1.45;
  color: rgba(var(--ink-rgb), .55);
}

.hint {
  font-family: inherit;
  border: 0;
  background: transparent;
  padding: 0;
  cursor: pointer;
  height: 12px;
  font: 500 10.5px/1 var(--mono);
  letter-spacing: .12em;
  color: rgba(var(--ink-rgb), .42);
}

/* ---------- how it works ---------- */

.how {
  background: var(--paper-alt);
  border-top: 1px solid rgba(var(--ink-rgb), .14);
}

.how .shell { padding-block: clamp(48px, 6vw, 76px); }

.steps {
  list-style: none;
  margin: 30px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
}

.step {
  display: flex;
  gap: clamp(14px, 2.4vw, 28px);
  align-items: baseline;
  padding: 22px 16px 22px 12px;
  margin: 0 -16px 0 -12px;
  border-top: 1px solid rgba(var(--ink-rgb), .18);
}

.step:last-child { border-bottom: 1px solid rgba(var(--ink-rgb), .18); }

.step-num {
  flex: none;
  width: 44px;
  font: 500 14px/1 var(--mono);
  color: rgba(var(--ink-rgb), .45);
}

.step-text {
  font-size: clamp(21px, 3.2vw, 30px);
  line-height: 1.25;
  letter-spacing: -.02em;
  font-weight: 600;
  font-stretch: 108%;
}

.step-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.outcome {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px 18px;
  padding: 14px 16px;
  margin-left: -16px;
  border-radius: 12px;
  border: 1px solid rgba(var(--ink-rgb), .14);
  background: transparent;
  color: rgba(var(--ink-rgb), .72);
  transition: border-color .35s, background .35s, color .35s;
}

.outcome-label {
  flex: none;
  width: 124px;
  font: 500 11px/1.9 var(--mono);
  letter-spacing: .11em;
}

.outcome-text {
  font-size: clamp(19px, 2.9vw, 27px);
  line-height: 1.2;
  letter-spacing: -.02em;
  font-weight: 600;
  font-stretch: 108%;
}

.step-foot {
  font-size: 13.5px;
  line-height: 1.5;
  color: rgba(var(--ink-rgb), .45);
}

/* the ending the phone landed on lights up; the other one dims */
.bond.is-settled[data-out="arrive"] .outcome-paid,
.bond.is-settled[data-out="miss"] .outcome-back {
  border-color: rgba(var(--ink-rgb), .28);
  background: rgba(var(--ink-rgb), .07);
  color: var(--ink);
}

.bond.is-settled[data-out="arrive"] .outcome-back,
.bond.is-settled[data-out="miss"] .outcome-paid {
  border-color: rgba(var(--ink-rgb), .14);
  background: transparent;
  color: rgba(var(--ink-rgb), .38);
}

/* ---------- footer ---------- */

.site-foot { background: var(--ink); color: var(--screen); }
.site-foot .shell { padding-block: clamp(48px, 6vw, 76px) 34px; }

.foot-title {
  font-size: clamp(30px, 4.4vw, 44px);
  line-height: 1.05;
  letter-spacing: -.03em;
  font-weight: 700;
  font-stretch: 112%;
  max-width: 20ch;
  text-wrap: balance;
}

.foot-cta { margin-top: 30px; }

.foot-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 56px;
  padding-top: 20px;
  border-top: 1px solid rgba(var(--screen-rgb), .16);
  flex-wrap: wrap;
  gap: 14px;
  font: 500 11px/1 var(--mono);
  letter-spacing: .1em;
  color: rgba(var(--screen-rgb), .5);
}

.foot-links { display: flex; gap: 20px; }
.foot-links a { color: rgba(var(--screen-rgb), .5); text-decoration: none; }
.foot-links a:hover { color: rgba(var(--screen-rgb), .8); }

/* ---------- waitlist dialog ---------- */

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.waitlist {
  width: min(420px, calc(100vw - 48px));
  padding: 32px;
  border: 0;
  border-radius: 20px;
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 24px 60px rgba(var(--ink-rgb), .28);
}

.waitlist::backdrop {
  background: rgba(var(--ink-rgb), .5);
}

.waitlist-close {
  position: absolute;
  top: 14px; right: 14px;
  width: 30px; height: 30px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: rgba(var(--ink-rgb), .5);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}
.waitlist-close:hover { background: rgba(var(--ink-rgb), .08); color: var(--ink); }

.waitlist-title {
  margin: 14px 0 0;
  font-size: 24px;
  line-height: 1.15;
  letter-spacing: -.02em;
  font-weight: 700;
  font-stretch: 110%;
}

.waitlist-sub {
  margin: 10px 0 0;
  font-size: 14.5px;
  line-height: 1.5;
  color: rgba(var(--ink-rgb), .6);
  max-width: 34ch;
}

.waitlist-form { margin-top: 22px; }

.waitlist-row {
  display: flex;
  gap: 8px;
}

.waitlist-row input {
  flex: 1;
  min-width: 0;
  font: inherit;
  font-size: 14.5px;
  padding: 12px 14px;
  border-radius: 11px;
  border: 1px solid rgba(var(--ink-rgb), .2);
  background: #fff;
  color: var(--ink);
}
.waitlist-row input:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.waitlist-row input[aria-invalid="true"] { border-color: var(--red); }

.waitlist-submit { flex: none; }

.form-field-error {
  display: block;
  margin-top: 8px;
  font-size: 12.5px;
  color: var(--red);
}
.form-field-error:empty { display: none; }

.form-success {
  margin-top: 14px;
  font-size: 14.5px;
  font-weight: 600;
  color: var(--green);
}
.form-success:empty { display: none; }

.form-error {
  margin-top: 14px;
  font-size: 13.5px;
  color: var(--red);
}
.form-error:empty { display: none; }

/* ---------- legal / static pages ---------- */

.legal {
  padding-block: clamp(48px, 6vw, 76px);
  max-width: 74ch;
}

.legal-title {
  margin: 14px 0 0;
  font-size: clamp(34px, 5vw, 52px);
  line-height: 1.05;
  letter-spacing: -.03em;
  font-weight: 700;
  font-stretch: 112%;
}

.legal-updated {
  margin: 10px 0 0;
  font-size: 13px;
  color: rgba(var(--ink-rgb), .5);
}

.legal-intro {
  margin: 22px 0 0;
  font-size: 16px;
  line-height: 1.6;
  color: rgba(var(--ink-rgb), .68);
  max-width: 60ch;
}

.legal h2 {
  margin: 44px 0 0;
  font-size: 21px;
  letter-spacing: -.01em;
  font-weight: 700;
  font-stretch: 108%;
}

.legal p, .legal li {
  margin: 14px 0 0;
  font-size: 15px;
  line-height: 1.65;
  color: rgba(var(--ink-rgb), .72);
}

.legal ul { margin: 14px 0 0; padding-left: 20px; }
.legal li { margin: 8px 0 0; }

.legal a { color: inherit; text-decoration: underline; text-decoration-color: rgba(var(--ink-rgb), .3); }
.legal a:hover { text-decoration-color: var(--ink); }

.legal-note {
  margin-top: 44px;
  padding: 18px 20px;
  border-radius: 12px;
  background: var(--paper-alt);
  border: 1px solid rgba(var(--ink-rgb), .14);
  font-size: 13.5px;
  line-height: 1.55;
  color: rgba(var(--ink-rgb), .62);
}

/* ---------- contact form ---------- */

.contact-form {
  margin-top: 30px;
  max-width: 480px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.field-group { display: flex; flex-direction: column; gap: 6px; }

.field-group label {
  font: 500 11px/1 var(--mono);
  letter-spacing: .1em;
  color: rgba(var(--ink-rgb), .5);
}

.field-group input,
.field-group textarea {
  font: inherit;
  font-size: 14.5px;
  padding: 12px 14px;
  border-radius: 11px;
  border: 1px solid rgba(var(--ink-rgb), .2);
  background: #fff;
  color: var(--ink);
  resize: vertical;
}
.field-group input:focus-visible,
.field-group textarea:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.field-group input[aria-invalid="true"],
.field-group textarea[aria-invalid="true"] { border-color: var(--red); }

.contact-submit { align-self: flex-start; }

/* the .brand mark doubles as a home link on subpages; keep it looking like plain text */
a.brand { text-decoration: none; }

/* ---------- responsive ----------
   Kept together at the end of the sheet so these overrides win against the base rules
   above without needing inflated selectors. */

/* vw < 940 stacks the hero. kamir-live.js reads the resulting flex-direction rather than
   re-testing this number, so the two can never drift apart. */
@media (max-width: 939px) {
  .hero { flex-direction: column; gap: 36px; }
}

/* Short viewports: buy back vertical budget from padding and display type so the phone
   can stay on the fold at a readable size. kamir-live.js fits it to whatever is left.
   Only side by side: once stacked the copy and the phone no longer compete for the
   fold, so a short screen there is just a scroll and the type should stay full size. */
@media (max-height: 859px) and (min-width: 940px) {
  .hero { padding-block: 40px 52px; }
}

@media (max-height: 699px) and (min-width: 940px) {
  .site-head { padding-block: 14px; }

  .hero { padding-block: 24px 32px; gap: clamp(28px, 4vw, 56px); }
  .hero-title { font-size: clamp(32px, 4.6vw, 52px); }
  .hero-sub { margin-top: 14px; font-size: clamp(16px, 1.7vw, 18px); }
  .hero-cta { margin-top: 24px; }
  .hero-note { margin-top: 24px; padding-top: 16px; max-width: 46ch; }
  .hero-note p { margin-top: 8px; font-size: 14px; line-height: 1.5; }
}

/* Very short *and* side by side: the copy column alone would outgrow the fold, so the
   secondary note gives way. Stacked layouts scroll anyway, so they keep it. */
@media (max-height: 560px) and (min-width: 940px) {
  .hero-title { font-size: clamp(28px, 3.6vw, 40px); }
  .hero-note { display: none; }
}

/* Keep the header on one row on small screens rather than wrapping the nav under the mark */
@media (max-width: 600px) {
  .site-head { gap: 10px; padding-block: 18px; }
  .site-nav { gap: 14px; font-size: 13px; }
  .site-nav .btn { padding: 8px 13px; font-size: 13px; }
}

@media (max-width: 420px) {
  .site-nav { gap: 10px; }
  .site-nav .btn { padding: 8px 11px; font-size: 12.5px; }
  .brand-word { font-size: 14px; }
  .outcome-label { width: 100%; }
}

/* ---------- reduced motion ----------
   kamir-live.js also skips the travel animation and paints the settled state directly. */

@media (prefers-reduced-motion: reduce) {
  .ring, .ring-label, .addr, .you, .dist, .mark, .overlay, .outcome, .tab {
    transition-duration: 1ms;
  }
}
