:root {
  --bg: #e6eff6;
  --ink: #10263d;
  --muted: #58758f;
  --faint: #a8bfd3;
  --line: rgba(16, 38, 61, 0.14);
  --glass: rgba(247, 250, 252, 0.8);
  --blue: #3f7fb5;
  --accent: #ff5a1f;
  --mono: 'IBM Plex Mono', ui-monospace, monospace;
  --serif: 'Instrument Serif', Georgia, serif;
  --gutter: clamp(16px, 3vw, 40px);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--ink); overflow: hidden; }
body { font: 400 12px/1.6 var(--mono); letter-spacing: 0.01em; -webkit-font-smoothing: antialiased; }
button, input { font: inherit; color: inherit; }
::selection { background: var(--accent); color: #fff; }

#scene { position: fixed; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; cursor: grab; }
#scene.is-dragging { cursor: grabbing; }
#scene.is-hot { cursor: pointer; }

/* ---------- chrome ---------- */
.top {
  position: fixed; top: 0; left: 0; right: 0; z-index: 2;
  display: flex; justify-content: space-between; align-items: center;
  padding: var(--gutter); pointer-events: none;
}
.top > * { pointer-events: auto; }
.mark { display: flex; flex-direction: column; gap: 2px; }
.mark__name { font-weight: 500; text-transform: uppercase; letter-spacing: 0.18em; }
.mark__sub { color: var(--muted); }
.intro {
  position: fixed; z-index: 1; left: var(--gutter); top: clamp(88px, 16vh, 170px);
  max-width: 340px; pointer-events: none; transition: opacity .4s;
}
body.has-panel .intro, body.is-zoomed .intro { opacity: 0; }
.intro__title { font: 400 clamp(34px, 4vw, 58px)/0.98 var(--serif); letter-spacing: -0.01em; margin: 0 0 18px; }
.intro__title span { display: block; }
.intro__title span:nth-child(2) { font-style: italic; color: var(--blue); }
.intro__lede { color: var(--muted); margin: 0; max-width: 31ch; }

.bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 2;
  display: grid; grid-template-columns: minmax(220px, 340px) 1fr auto; align-items: end; gap: 24px;
  padding: 64px var(--gutter) max(var(--gutter), env(safe-area-inset-bottom));
  pointer-events: none; transition: opacity .4s;
  /* only a low strip behind the small print; the big figure carries itself */
  background: linear-gradient(to top, rgba(222, 234, 244, 0.94), rgba(222, 234, 244, 0.86) 72px, rgba(222, 234, 244, 0) 150px);
  /* a soft halo keeps the type legible without washing out the names below */
  text-shadow: 0 0 2px rgba(226, 237, 246, 0.95), 0 0 10px rgba(226, 237, 246, 0.9);
}
body.has-panel .bar { opacity: 0; }
.bar__progress, .bar__side { position: relative; }
.bar__progress::before, .bar__side::before {
  content: ''; position: absolute; inset: -36px -70px -28px -50px; z-index: -1;
  background: radial-gradient(closest-side, rgba(222, 234, 244, 0.95), rgba(222, 234, 244, 0.6) 60%, rgba(222, 234, 244, 0));
}
.bar__side::before { inset: -30px -40px -28px -70px; }
.bar__raised {
  font: 400 clamp(52px, 6.2vw, 96px)/0.92 var(--serif); letter-spacing: -0.025em;
  margin: 6px 0 2px; white-space: nowrap;
}
.bar__line { height: 1px; background: var(--line); margin: 10px 0 8px; position: relative; }
.bar__line i { position: absolute; left: 0; top: -1px; height: 3px; background: var(--ink); width: 0; transition: width 1.2s cubic-bezier(.2, .7, .2, 1); }
.bar__meta, .bar__hint { color: var(--muted); }
.bar__hint { text-align: center; }
/* a second way in under the call to action, where the header's button is hidden */
.bar__alt {
  display: none; pointer-events: auto; background: none; border: 0; padding: 4px 8px; cursor: pointer;
  color: var(--muted); text-decoration: underline; text-underline-offset: 3px;
}
/* on every screen while it leads to the free sea, which has no other button */
.bar__alt--always { display: block; }
.bar__cta { display: grid; justify-items: center; gap: 12px; }
.bar__side { color: var(--muted); text-align: right; }
/* the bar lets drags through to the boat; its links take clicks */
.bar__legal { margin-top: 4px; font-size: 11px; }
.bar__legal a { pointer-events: auto; }
.bar__side b, .bar__meta b { color: var(--ink); font-weight: 500; font-variant-numeric: tabular-nums; }

.live { display: inline-flex; align-items: center; gap: 6px; margin-left: 8px; }
.live::before {
  content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--accent);
  animation: live 2.4s infinite;
}
@keyframes live {
  0% { box-shadow: 0 0 0 0 rgba(255, 90, 31, 0.45); }
  70% { box-shadow: 0 0 0 7px rgba(255, 90, 31, 0); }
  100% { box-shadow: 0 0 0 0 rgba(255, 90, 31, 0); }
}

/* ---------- controls ---------- */
.btn {
  border: 1px solid var(--line); background: transparent; padding: 10px 16px; cursor: pointer;
  text-transform: uppercase; letter-spacing: 0.14em; font-size: 11px; font-weight: 500;
  transition: background .2s, color .2s, border-color .2s;
}
.btn:hover { border-color: var(--ink); }
.btn--solid { background: var(--ink); color: #fff; border-color: var(--ink); }
.btn--solid:hover { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn--wide { width: 100%; padding: 13px; }
.btn--glass { background: var(--glass); backdrop-filter: blur(8px); }
.btn--cta {
  pointer-events: auto; padding: 16px 30px; font-size: 12px; letter-spacing: 0.16em;
  box-shadow: 0 12px 30px rgba(16, 38, 61, 0.2); text-shadow: none;
}
.btn__arrow { display: inline-block; margin-left: 10px; transition: transform .2s; }
.btn--cta:hover .btn__arrow { transform: translateX(3px); }
.btn:disabled { opacity: 0.4; cursor: default; pointer-events: none; }
.btn:focus-visible, input:focus-visible { outline: 1px solid var(--accent); outline-offset: 2px; }

.eyebrow { color: var(--muted); text-transform: uppercase; letter-spacing: 0.18em; font-size: 10px; }
.dim { color: var(--muted); }

/* ---------- zoom ---------- */
.zoom {
  position: fixed; z-index: 2; right: var(--gutter); top: 50%; transform: translateY(-50%);
  display: grid; border: 1px solid var(--line); background: var(--glass); backdrop-filter: blur(10px);
  transition: opacity .4s;
}
.zoom__btn {
  width: 36px; height: 36px; border: 0; background: none; cursor: pointer;
  font-size: 18px; line-height: 1; color: var(--ink);
}
.zoom__btn + .zoom__btn { border-top: 1px solid var(--line); }
.zoom__btn:hover { color: var(--accent); }
body.has-panel .zoom { opacity: 0; pointer-events: none; }

/* ---------- tooltip & toast ---------- */
.tip {
  position: fixed; z-index: 3; pointer-events: none; transform: translate(14px, 14px);
  background: var(--glass); backdrop-filter: blur(10px); border: 1px solid var(--line);
  padding: 8px 10px; white-space: nowrap; box-shadow: 0 8px 24px rgba(16, 38, 61, 0.08);
}
.tip b { font-weight: 500; }
.tip .accent { color: var(--accent); }

/* system messages: a slim ink pill at the top */
.toast {
  position: fixed; z-index: 7; left: 50%; top: calc(var(--gutter) + 2px); transform: translate(-50%, -10px);
  padding: 10px 18px; border-radius: 20px; background: var(--ink); color: #fff;
  box-shadow: 0 10px 30px rgba(16, 38, 61, 0.22);
  opacity: 0; transition: opacity .35s, transform .35s; pointer-events: none;
  /* one line where it fits, wrapped inside the window where it doesn't */
  width: max-content; max-width: min(620px, calc(100vw - 32px)); text-align: center;
}
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }
.toast b { font-weight: 500; }
.toast .accent { color: #ff9a70; }

/* new backers: the amount floats in the scene above the wave it started */
.drops { position: fixed; inset: 0; z-index: 1; pointer-events: none; overflow: hidden; }
.drop {
  position: absolute; left: 0; top: 0; text-align: center; white-space: nowrap; opacity: 0;
  will-change: transform, opacity; transform-origin: 50% 100%;
  text-shadow: 0 0 3px rgba(236, 243, 249, 0.95), 0 0 14px rgba(236, 243, 249, 0.9);
}
.drop__amount { font: 400 34px/1 var(--serif); letter-spacing: -0.02em; color: var(--ink); }
.drop__amount .accent { color: var(--accent); margin-right: 1px; }
.drop__who { font: 500 12px/1.4 var(--mono); color: var(--ink); margin-top: 5px; }
.drop__msg { font: italic 400 17px/1.25 var(--serif); color: var(--muted); }

/* ---------- slot panel ---------- */
.panel {
  position: fixed; z-index: 5; top: 0; right: 0; bottom: 0; width: min(400px, 100%);
  padding: calc(var(--gutter) + 8px) var(--gutter) var(--gutter);
  background: var(--glass); backdrop-filter: blur(18px); border-left: 1px solid var(--line);
  transform: translateX(100%); transition: transform .5s cubic-bezier(.2, .7, .2, 1);
  overflow-y: auto;
}
.panel.is-open { transform: none; }
.panel__close {
  position: absolute; top: calc(var(--gutter) - 6px); right: calc(var(--gutter) - 8px);
  width: 36px; height: 36px; border: 0; background: none; cursor: pointer; font-size: 22px; color: var(--muted);
}
.panel__close:hover { color: var(--ink); }
.panel__title { font: 400 44px/1 var(--serif); margin: 10px 0 8px; }
.panel__note { color: var(--muted); margin: 0 0 26px; }
.rise { color: var(--muted); font-size: 11px; margin: -16px 0 24px; }
.plans { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: -12px 0 26px; }
.plan {
  display: grid; gap: 2px; text-align: left; padding: 12px 14px; cursor: pointer;
  border: 1px solid var(--line); background: none; transition: border-color .2s, box-shadow .2s;
}
.plan b { font-weight: 500; font-size: 10px; text-transform: uppercase; letter-spacing: 0.14em; color: var(--muted); }
.plan span { font-size: 16px; font-weight: 500; font-variant-numeric: tabular-nums; }
.plan em { font-style: normal; font-size: 11px; color: var(--accent); }
.plan:hover { border-color: var(--ink); }
.plan[aria-checked=true] { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.rise:empty { display: none; }
.rise .accent { color: var(--accent); }

.stats { display: grid; grid-template-columns: repeat(3, 1fr); margin: 0 0 28px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.stats div { padding: 14px 0; }
.stats div + div { padding-left: 14px; border-left: 1px solid var(--line); }
.stats dt { color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: 0.14em; }
.stats dd { margin: 4px 0 0; font-size: 15px; font-weight: 500; font-variant-numeric: tabular-nums; }

.includes { list-style: none; margin: 10px 0 28px; padding: 0; display: grid; gap: 7px; }
.includes li { position: relative; padding-left: 22px; }
.includes li::before { content: ''; position: absolute; left: 0; top: 0.8em; width: 12px; height: 1px; background: var(--accent); }

.form { display: grid; gap: 16px; }
.form label { display: grid; gap: 6px; }
.form input[type=number], .form input[type=email], .form input[type=text] {
  width: 100%; background: transparent; border: 0; border-bottom: 1px solid var(--line);
  padding: 8px 0; font-size: 15px; border-radius: 0;
}
.form input::placeholder { color: var(--faint); }
.form input:focus { outline: none; border-bottom-color: var(--accent); }
.form select {
  width: 100%; background: transparent; border: 0; border-bottom: 1px solid var(--line);
  padding: 8px 0; font: inherit; font-size: 15px; color: inherit; border-radius: 0;
}
.form select:focus { outline: none; border-bottom-color: var(--accent); }
.bill { border: 0; margin: 0; padding: 0; min-width: 0; display: grid; gap: 16px; }
.bill legend { padding: 0; margin-bottom: 2px; font-weight: 500; }
.bill__row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 14px; }
.file { border: 1px dashed var(--faint); padding: 14px; cursor: pointer; transition: border-color .2s; }
.file:hover { border-color: var(--ink); }
.file input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.file__btn { font-weight: 500; text-transform: uppercase; letter-spacing: 0.14em; font-size: 11px; }
.file__hint { color: var(--muted); }
.fine { color: var(--muted); font-size: 11px; margin: 0; }
.fine a, .bar__legal a { color: inherit; text-underline-offset: 2px; }
.fine--who { color: var(--ink); }
.fine--who b { font-weight: 500; }
.link { background: none; border: 0; padding: 0; font: inherit; color: inherit; text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }

/* ---------- modal ---------- */
.modal {
  position: fixed; inset: 0; z-index: 6; display: grid; place-items: center; padding: var(--gutter);
  background: rgba(16, 38, 61, 0.24); backdrop-filter: blur(6px);
  opacity: 0; pointer-events: none; transition: opacity .35s;
}
.modal.is-open { opacity: 1; pointer-events: auto; }
.modal__card {
  position: relative; width: min(820px, 100%); max-height: 100%; overflow-y: auto;
  background: #f8fbfd; border: 1px solid var(--line); padding: clamp(20px, 4vw, 44px);
  box-shadow: 0 30px 80px rgba(16, 38, 61, 0.18);
}
.modal__title { font: 400 clamp(36px, 5vw, 56px)/1 var(--serif); margin: 10px 0 28px; }
.tiers { display: grid; grid-template-columns: repeat(2, 1fr); border-top: 1px solid var(--line); }
.modal__fine { margin-top: 20px; padding-top: 14px; border-top: 1px solid var(--line); }
.tier { padding: 22px 22px 22px 0; display: flex; flex-direction: column; gap: 12px; }
.tier + .tier { padding-left: 22px; border-left: 1px solid var(--line); }
.tier__num { color: var(--muted); }
.tier__name { font: 400 28px/1.05 var(--serif); margin: 0; }
.tier__price { font-weight: 500; }
.tier__body { color: var(--muted); margin: 0; flex: 1; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { border: 1px solid var(--line); background: none; padding: 6px 10px; cursor: pointer; font-variant-numeric: tabular-nums; }
.chip:hover { border-color: var(--ink); }
.chip[aria-pressed=true] { background: var(--ink); color: #fff; border-color: var(--ink); }
.tier .form { gap: 10px; }
.form .check { display: flex; align-items: center; gap: 8px; color: var(--muted); cursor: pointer; }
.form .check input { width: 14px; height: 14px; margin: 0; accent-color: var(--ink); }
.form input:disabled { opacity: 0.35; }
.form .amount { display: flex; align-items: baseline; gap: 6px; border-bottom: 1px solid var(--line); }
.form .amount span { color: var(--muted); font-size: 15px; }
.form .amount input[type=number] { border-bottom: 0; flex: 1; min-width: 0; -moz-appearance: textfield; }
.form .amount input::-webkit-outer-spin-button, .form .amount input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.form .amount:focus-within { border-bottom-color: var(--accent); }
.counter { color: var(--muted); font-size: 11px; text-align: right; font-variant-numeric: tabular-nums; }

/* ---------- narrower windows ---------- */
/* Between phone and wide desktop, the call to action stays on one line and
   centred, and the figure and the side notes give way around it. */
@media (min-width: 761px) and (max-width: 1199px) and (min-aspect-ratio: 801/1000) {
  .bar { grid-template-columns: 1fr auto 1fr; }
  .bar__progress { max-width: 340px; }
  .bar__cta { max-width: 340px; }
  .btn--cta { white-space: nowrap; padding: 16px 24px; }
  .bar__side .hide-sm { display: none; }
}

/* ---------- phones and upright tablets ---------- */
/* main.js mirrors this query (STACKED) for the camera and the slot panel */
@media (max-width: 760px), (max-width: 1100px) and (max-aspect-ratio: 4/5) {
  /* the headline stacks in a narrow column in the sky, left of the mast */
  .intro { top: 84px; max-width: 58vw; }
  .intro__title { font-size: clamp(24px, 4vw + 15px, 44px); line-height: 1; margin: 0; }
  .intro__title span { display: block; }
  .intro__lede { display: none; }
  /* a compact bar on a soft base, so it reads over the near rows of names */
  .bar {
    grid-template-columns: 1fr; gap: 14px; padding-top: 72px;
    background: linear-gradient(rgba(222, 234, 244, 0), rgba(222, 234, 244, 0.94) 64px);
  }
  .bar__raised { font-size: clamp(44px, 7vw, 64px); margin-top: 4px; }
  .bar__line { margin: 8px 0 6px; }
  .bar__side { display: none; }
  /* the call to action moves to the bottom, under the thumb */
  .top .btn { display: none; }
  .bar__progress { order: 1; }
  .bar__cta { order: 2; }
  .btn--cta { width: 100%; padding: 16px 12px; white-space: nowrap; letter-spacing: min(0.16em, 0.6vw); }
  .hide-sm { display: none; }
  .zoom { display: none; } /* pinch to zoom on touch screens */
  .bar__hint { display: none; }
  .bar__alt { display: block; }
  .drop__msg { white-space: normal; max-width: 240px; margin: 0 auto; }
  /* a lower sheet, so the sail and your logo on it stay in view above it */
  .top { transition: opacity .4s; }
  body.has-panel .top { opacity: 0; }
  body.has-panel .top > * { pointer-events: none; }
  .panel {
    top: auto; width: 100%; height: min(56vh, 560px);
    border-left: 0; border-top: 1px solid var(--line); transform: translateY(100%);
  }
}

/* ---------- phones ---------- */
@media (max-width: 760px) {
  .tiers { grid-template-columns: 1fr; }
  .tier { padding: 20px 0; }
  .tier + .tier { padding-left: 0; border-left: 0; border-top: 1px solid var(--line); }
  .toast { top: 12px; width: calc(100% - 32px); border-radius: 18px; }
}

@media (prefers-reduced-motion: reduce) {
  .live::before { animation: none; }
  .panel, .toast, .modal, .bar__line i { transition: none; }
}
