@font-face { font-family: 'Caprasimo'; src: url('../fonts/caprasimo.woff2') format('woff2'); font-display: swap; }
@font-face { font-family: 'Hanken Grotesk'; src: url('../fonts/hanken.woff2') format('woff2'); font-weight: 100 900; font-display: swap; }

:root {
  --ink: #04283f;
  --ink-2: #2a5a6e;
  --foam: #f2fffb;
  --foam-2: #d7f6ee;
  --line: #bfe9e0;
  --coral: #ff6a5b;
  --coral-hi: #ff8474;
  --sun: #ffd23f;
  --lagoon: #0f93a8;
  --tag: rgba(3, 34, 54, .66);
  --on-water: var(--ink);
  --gut: clamp(16px, 3vw, 36px);
  --ease: cubic-bezier(.16, 1, .3, 1);
  --display: 'Caprasimo', 'Cooper Black', Georgia, serif;
  --text: 'Hanken Grotesk', system-ui, sans-serif;
}
body.deep { --on-water: var(--foam); }

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { background: #31c8c4; scrollbar-width: none; -webkit-text-size-adjust: 100%; }
html::-webkit-scrollbar { display: none; }
body { margin: 0; font: 500 16px/1.5 var(--text); color: var(--ink); overscroll-behavior: none; -webkit-font-smoothing: antialiased; }
::selection { background: var(--sun); color: var(--ink); }
button, input, textarea { font: inherit; color: inherit; }
button { background: none; border: 0; padding: 0; cursor: pointer; }
h1, h2, h3, p, ol, ul { margin: 0; padding: 0; }
ol, ul { list-style: none; }
:focus-visible { outline: 3px solid var(--sun); outline-offset: 2px; border-radius: 10px; }
.ico { width: 1.25em; height: 1.25em; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }

#sea { position: fixed; inset: 0; width: 100%; height: 100lvh; display: block; z-index: 0; }
#veil { position: fixed; inset: 0; z-index: 40; pointer-events: none; background: radial-gradient(120% 90% at 40% 0, #fff, #dffaf3 40%, #9df5e6); opacity: 1; transition: opacity 1.9s cubic-bezier(.3, 0, .1, 1); }
#veil.gone { opacity: 0; }

/* the bar */
.bar { position: fixed; z-index: 20; top: 0; left: 0; right: 0; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; padding: 16px var(--gut); pointer-events: none; }
.bar > * { pointer-events: auto; }
.brand { display: inline-flex; align-items: center; gap: 8px; justify-self: start; font: 400 1.75rem/1 var(--display); color: var(--on-water); text-decoration: none; transition: color .6s; }
.brand .ico { width: 1.15em; height: 1.15em; }
.bar-right { grid-column: 3; justify-self: end; display: flex; gap: 10px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 20px; border-radius: 999px; font-weight: 700; white-space: nowrap; transition: transform .25s var(--ease), background-color .25s, color .25s, box-shadow .25s; }
.btn:active { transform: scale(.96); }
.btn.coral { background: var(--coral); color: #2b0c0c; box-shadow: 0 10px 24px -10px rgba(120, 20, 10, .7); }
.btn.coral:hover { background: var(--coral-hi); transform: translateY(-1px); }
.btn.coral[disabled] { background: var(--foam-2); color: var(--ink-2); box-shadow: none; cursor: not-allowed; transform: none; }
.btn.ghost { background: var(--foam); color: var(--ink); box-shadow: 0 10px 24px -14px rgba(2, 30, 60, .6); }
.btn.ghost:hover { background: #fff; }
.btn.big { min-height: 54px; padding: 0 30px; font-size: 1.0625rem; }
.btn.wide { width: 100%; }

.seas { grid-column: 2; display: inline-flex; padding: 4px; border-radius: 999px; background: var(--foam); box-shadow: 0 10px 24px -14px rgba(2, 30, 60, .6); }
.seas[hidden] { display: none; }
.seas button { min-height: 36px; padding: 0 16px; border-radius: 999px; font-size: .9375rem; font-weight: 650; color: var(--ink-2); transition: background-color .3s, color .3s; }
.seas button[aria-selected="true"] { background: var(--ink); color: var(--foam); }

/* the dive: the page is as tall as the water, the text rides with the camera */
#dive { position: relative; z-index: 2; }
#track { position: fixed; left: 0; right: 0; top: 0; z-index: 2; pointer-events: none; will-change: transform; }
#track a, #track button { pointer-events: auto; }
#track > * { transition: opacity .45s; }
body.focus #track > * { opacity: 0; pointer-events: none; }
body.focus #track a, body.focus #track button { pointer-events: none; }
.hero { position: absolute; left: 0; top: 0; width: 100%; height: 100lvh; display: flex; flex-direction: column; justify-content: flex-end; gap: 18px; padding: 0 clamp(88px, 8vw, 128px) clamp(56px, 11vh, 120px) clamp(20px, 7vw, 112px); color: var(--ink); }
.hero h1 { font: 400 clamp(3.1rem, 7.4vw, 6rem)/.98 var(--display); letter-spacing: -.012em; max-width: 9.4em; text-wrap: balance; }
.hero p { font-size: clamp(1.0625rem, 1.5vw, 1.25rem); line-height: 1.45; font-weight: 550; max-width: 33em; text-wrap: pretty; }
.hero-go { display: flex; align-items: center; gap: 20px; margin-top: 8px; }
.dive-cue { display: inline-flex; align-items: center; gap: 4px; min-height: 44px; padding: 0 8px; font-weight: 700; color: var(--ink); }
.dive-cue .ico { animation: nudge 2.4s var(--ease) infinite; }
@keyframes nudge { 0%, 55%, 100% { transform: translateY(0); } 25% { transform: translateY(5px); } }

.zone { position: absolute; left: clamp(20px, 7vw, 112px); max-width: min(30em, calc(100vw - 96px)); color: var(--foam); transform: translateY(-50%); text-shadow: 0 1px 22px rgba(2, 22, 60, .5); }
.zone.lit { color: var(--ink); text-shadow: 0 1px 20px rgba(210, 255, 245, .55); }
.zone.edge { transform: translateY(-100%); padding-bottom: 14px; }
.zone h2 { font: 400 clamp(2.5rem, 5.4vw, 4.5rem)/1 var(--display); letter-spacing: -.01em; }
.zone .range { font: 400 clamp(1.25rem, 2vw, 1.625rem)/1.2 var(--display); margin-top: 8px; }
.zone p { font-size: 1.0625rem; font-weight: 550; margin-top: 8px; }
.zone .count { font-variant-numeric: tabular-nums; }

/* the ruler in the water: milestones at their true depth */
#ruler { position: absolute; right: 40px; top: 0; width: 0; }
.tick { position: absolute; right: 0; display: flex; align-items: center; gap: 6px; transform: translateY(-50%); color: var(--foam); font-size: .75rem; line-height: 1; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; opacity: .82; text-shadow: 0 1px 8px rgba(2, 14, 44, .75); }
.tick::after { content: ''; width: 12px; height: 1.5px; border-radius: 2px; background: currentColor; }
.tick.lit { color: var(--ink); text-shadow: 0 1px 8px rgba(214, 255, 246, .75); }
.tick.major { font: 400 1.0625rem/1 var(--display); opacity: 1; }
.tick.major::after { width: 30px; height: 2px; }

/* a small map of the dive */
#rail { position: fixed; z-index: 15; right: 12px; top: 76px; bottom: 28px; width: 14px; color: var(--on-water); transition: color .6s; }
#rail svg { position: absolute; right: 0; top: 0; height: 100%; width: 14px; overflow: visible; opacity: .55; }
#rail .stop { position: absolute; right: -5px; width: 24px; height: 24px; transform: translateY(-50%); display: grid; place-items: center; color: inherit; }
#rail .stop::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: currentColor; transition: transform .2s; }
#rail .stop:hover::before, #rail .stop:focus-visible::before { transform: scale(1.5); }
#rail .stop span { position: absolute; right: 26px; padding: 2px 9px 3px; border-radius: 999px; background: var(--tag); color: var(--foam); font-size: .8125rem; font-weight: 700; white-space: nowrap; opacity: 0; pointer-events: none; transition: opacity .2s; }
#rail .stop:hover span, #rail .stop:focus-visible span { opacity: 1; }
#rail .mark { position: absolute; right: -3px; width: 20px; height: 3px; margin-top: -1.5px; background: var(--coral); border-radius: 2px; will-change: transform; top: 0; box-shadow: 0 0 0 1px rgba(255, 255, 255, .3); pointer-events: none; }

/* labels that ride with the fish */
#labels, #pops { position: fixed; inset: 0; z-index: 5; pointer-events: none; overflow: hidden; contain: strict; }
.tag { position: absolute; left: 0; top: 0; display: flex; gap: 6px; align-items: baseline; padding: 2px 9px 3px; border-radius: 999px; background: var(--tag); color: var(--foam); font-size: .8125rem; line-height: 1.35; font-weight: 700; white-space: nowrap; opacity: 0; transition: opacity .28s; will-change: transform; font-variant-numeric: tabular-nums; }
.tag.on { opacity: 1; }
.tag span { font-weight: 550; opacity: .9; }
.tag.float { background: rgba(240, 255, 250, .78); color: var(--ink); }
.tag.sick { background: rgba(84, 28, 36, .78); }
.pop { position: absolute; left: 0; top: 0; font: 400 1.5rem/1 var(--display); color: var(--sun); text-shadow: 0 2px 10px rgba(2, 30, 60, .6); animation: pop 1.9s var(--ease) forwards; white-space: nowrap; }
@keyframes pop { 0% { opacity: 0; translate: -50% 10px; scale: .7; } 16% { opacity: 1; translate: -50% -8px; scale: 1; } 72% { opacity: 1; } 100% { opacity: 0; translate: -50% -44px; } }

/* what just happened */
#log { position: fixed; z-index: 12; right: 124px; bottom: 20px; display: flex; flex-direction: column; gap: 6px; align-items: flex-end; pointer-events: none; max-width: min(24em, calc(100vw - 120px)); }
#log li { display: block; padding: 5px 13px 6px; border-radius: 16px; background: var(--tag); color: var(--foam); font-size: .875rem; line-height: 1.3; font-weight: 600; animation: rise .5s var(--ease); transition: opacity .8s; font-variant-numeric: tabular-nums; }
#log li.fade { opacity: 0; }
#log b { font-weight: 800; }
#log .good { color: var(--sun); }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } }

#note { position: fixed; z-index: 12; left: 50%; bottom: 20px; transform: translateX(-50%); padding: 6px 15px 7px; border-radius: 999px; background: var(--foam); color: var(--ink); font-size: .875rem; font-weight: 650; line-height: 1.3; white-space: nowrap; box-shadow: 0 10px 24px -14px rgba(2, 30, 60, .6); }

/* sheets: sea-foam slabs that slide in over the water */
.sheet { position: fixed; z-index: 30; top: 12px; bottom: 12px; right: 12px; width: min(404px, calc(100vw - 24px)); padding: 22px; border-radius: 32px; background: var(--foam); color: var(--ink); box-shadow: 0 30px 70px -20px rgba(2, 26, 60, .62); display: flex; flex-direction: column; gap: 14px; overflow-y: auto; overscroll-behavior: contain; transform: translateX(calc(100% + 24px)); opacity: 0; visibility: hidden; transition: transform .6s var(--ease), opacity .3s, visibility 0s .6s; scrollbar-width: thin; scrollbar-color: var(--line) transparent; }
.sheet.left { right: auto; left: 12px; transform: translateX(calc(-100% - 24px)); }
.sheet.open { transform: none; opacity: 1; visibility: visible; transition: transform .6s var(--ease), opacity .2s; }
.sheet:focus { outline: none; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.sheet h2 { font: 400 1.75rem/1.1 var(--display); }
.x { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; margin: -6px -6px -6px 0; color: var(--ink-2); transition: background-color .2s, color .2s; flex: none; }
.x:hover { background: var(--foam-2); color: var(--ink); }

/* fish card */
#card { top: auto; max-height: calc(100vh - 24px); }
.who { display: flex; align-items: center; gap: 14px; padding-right: 36px; position: relative; }
.who .x { position: absolute; right: 0; top: 0; margin: -6px -6px 0 0; }
.pic { width: 60px; height: 60px; border-radius: 50%; object-fit: cover; flex: none; background: var(--foam-2); box-shadow: 0 0 0 3px #fff, 0 6px 14px -6px rgba(2, 30, 60, .5); }
.who h2 { font-size: 1.5rem; overflow-wrap: anywhere; }
.who .tick { color: var(--ink-2); font-weight: 650; }
.cap { font: 400 clamp(2.6rem, 8vw, 3.25rem)/1 var(--display); font-variant-numeric: tabular-nums; }
.grade { font-weight: 650; color: var(--ink-2); margin-top: 4px; }
.next { display: grid; gap: 6px; }
.next-row { display: flex; justify-content: space-between; font-size: .9375rem; font-weight: 650; font-variant-numeric: tabular-nums; }
.bar-track { height: 10px; border-radius: 999px; background: var(--foam-2); overflow: hidden; }
.bar-fill { height: 100%; border-radius: 999px; background: linear-gradient(90deg, #17b2be, #0f7fd0); transition: width .7s var(--ease); }
.status { padding: 10px 14px; border-radius: 18px; background: var(--foam-2); font-weight: 600; font-size: .9375rem; line-height: 1.35; font-variant-numeric: tabular-nums; }
.status.sick { background: #ffe4dd; color: #6e1f12; }
.status.float { background: #e5ecf0; color: #2c4656; }
.facts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 16px; font-size: .9375rem; }
.facts dt { color: var(--ink-2); font-weight: 600; }
.facts dd { margin: 0; font-weight: 700; font-variant-numeric: tabular-nums; }
.say { font-size: .9375rem; color: var(--ink-2); font-weight: 550; overflow-wrap: anywhere; }
.acts { display: flex; gap: 8px; padding-top: 4px; }
.acts .btn.coral { flex: 1; text-decoration: none; }
.acts .btn.plain { background: var(--foam-2); color: var(--ink); padding: 0 16px; }
.acts .btn.plain:hover { background: var(--line); }

/* find a fish */
.search { display: flex; align-items: center; gap: 8px; min-height: 46px; padding: 0 14px; border-radius: 16px; background: #fff; box-shadow: inset 0 0 0 1.5px var(--line); color: var(--ink-2); }
.search:focus-within { box-shadow: inset 0 0 0 2px var(--lagoon); }
.search input { flex: 1; width: 100%; border: 0; outline: 0; background: none; color: var(--ink); }
.search input::placeholder { color: #5b8391; }
.chips { display: flex; gap: 6px; }
.chip { min-height: 36px; padding: 0 14px; border-radius: 999px; background: var(--foam-2); font-weight: 650; font-size: .9375rem; color: var(--ink-2); transition: background-color .2s, color .2s; }
.chip[aria-pressed="true"] { background: var(--ink); color: var(--foam); }
#shoal-list { display: flex; flex-direction: column; gap: 2px; margin: 0 -8px; }
#shoal-list button { display: grid; grid-template-columns: 40px 1fr auto; align-items: center; gap: 12px; width: 100%; min-height: 56px; padding: 6px 8px; border-radius: 16px; text-align: left; transition: background-color .15s; }
#shoal-list button:hover { background: var(--foam-2); }
#shoal-list img { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; background: var(--foam-2); }
#shoal-list .nm { min-width: 0; line-height: 1.25; }
#shoal-list b { display: block; font-weight: 750; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#shoal-list small { display: block; color: var(--ink-2); font-size: .8125rem; font-weight: 550; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#shoal-list .v { font: 400 1.0625rem/1 var(--display); font-variant-numeric: tabular-nums; }
.none { padding: 18px 8px; color: var(--ink-2); font-weight: 550; }

/* release a fish */
#launch-form { display: flex; flex-direction: column; gap: 12px; }
#launch-go { position: sticky; bottom: 0; flex: none; }
#launch { padding-bottom: 14px; }
.drop { position: relative; display: grid; place-items: center; min-height: 118px; border-radius: 22px; background: #fff; box-shadow: inset 0 0 0 1.5px var(--line); overflow: hidden; transition: box-shadow .2s; }
.drop.over, .drop:hover { box-shadow: inset 0 0 0 2px var(--lagoon); }
.drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.drop:focus-within { outline: 3px solid var(--sun); outline-offset: 2px; }
.drop img { margin: 10px; width: 96px; height: 96px; border-radius: 50%; object-fit: cover; pointer-events: none; }
.drop-empty { display: grid; justify-items: center; gap: 2px; padding: 12px; text-align: center; font-weight: 700; pointer-events: none; }
.drop-empty .ico { width: 1.6em; height: 1.6em; color: var(--lagoon); }
.drop-empty small { font-weight: 550; color: var(--ink-2); font-size: .8125rem; }
.row2 { display: grid; grid-template-columns: 1fr 112px; gap: 10px; }
.field { display: grid; gap: 4px; font-size: .9375rem; font-weight: 650; }
.field input, .field textarea { width: 100%; min-height: 46px; padding: 10px 14px; border: 0; border-radius: 16px; background: #fff; box-shadow: inset 0 0 0 1.5px var(--line); font-weight: 550; resize: none; outline: 0; transition: box-shadow .2s; }
.field input:focus, .field textarea:focus { box-shadow: inset 0 0 0 2px var(--lagoon); }
.field.bad input { box-shadow: inset 0 0 0 2px var(--coral); }
.field input::placeholder { color: #5b8391; }
.more summary { cursor: pointer; font-weight: 650; font-size: .9375rem; color: var(--ink-2); min-height: 28px; }
.more[open] { display: grid; gap: 10px; }
.cost { font-size: .875rem; font-weight: 550; color: var(--ink-2); }
.err { padding: 10px 14px; border-radius: 16px; background: #ffe4dd; color: #6e1f12; font-weight: 600; font-size: .9375rem; }
.steps { display: grid; gap: 6px; font-weight: 600; font-size: .9375rem; color: var(--ink-2); }
.steps li { display: flex; align-items: center; gap: 8px; }
.steps li::before { content: ''; width: 16px; height: 16px; border-radius: 50%; box-shadow: inset 0 0 0 2px var(--line); flex: none; }
.steps li.active { color: var(--ink); }
.steps li.active::before { box-shadow: inset 0 0 0 2px var(--lagoon); animation: breathe 1.1s ease-in-out infinite; }
.steps li.done { color: var(--ink); }
.steps li.done::before { background: var(--lagoon); box-shadow: none; }
.steps li.failed { color: #a02a18; }
.steps li.failed::before { background: var(--coral); box-shadow: none; }
@keyframes breathe { 50% { transform: scale(.72); } }
#launch-done { display: grid; gap: 12px; font-weight: 550; }
#launch-done[hidden] { display: none; }

.picker { position: fixed; inset: 0; z-index: 35; display: grid; place-items: center; padding: 16px; background: rgba(3, 34, 54, .5); opacity: 0; visibility: hidden; transition: opacity .25s, visibility 0s .25s; }
.picker.open { opacity: 1; visibility: visible; transition: opacity .25s; }
.picker-box { width: min(380px, 100%); padding: 22px; border-radius: 28px; background: var(--foam); display: grid; gap: 12px; }
#wallet-list { display: grid; gap: 6px; }
.wallet-row { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 52px; padding: 8px 12px; border-radius: 16px; background: #fff; font-weight: 700; text-decoration: none; color: var(--ink); }
.wallet-row:hover { background: var(--foam-2); }
.wallet-row img { width: 30px; height: 30px; border-radius: 8px; }
#wallet-note { font-size: .875rem; color: var(--ink-2); font-weight: 550; }

.nogl { position: fixed; z-index: 50; left: 50%; bottom: 80px; transform: translateX(-50%); padding: 10px 16px; border-radius: 16px; background: var(--foam); color: var(--ink); font-weight: 600; }
body.no-gl { background: linear-gradient(#7feadc, #0f97bd 30%, #0f4a9b 60%, #050824); }

@media (max-width: 760px) {
  .bar { grid-template-columns: 1fr auto; padding: 12px var(--gut); }
  .bar-right { grid-column: 2; }
  .seas { grid-column: 1 / -1; grid-row: 2; justify-self: center; }
  .brand { font-size: 1.5rem; }
  #open-shoal { padding: 0; width: 44px; }
  #open-shoal span { display: none; }
  #open-launch { padding: 0 16px; }
  .hero { padding: 0 52px 92px 20px; justify-content: flex-end; }
  .hero::before { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 66%; z-index: -1; background: linear-gradient(transparent, rgba(190, 250, 238, .78) 34%, rgba(190, 250, 238, .78) 72%, transparent); }
  .hero-go { gap: 12px; }
  #rail { right: 6px; top: 72px; bottom: 16px; }
  #rail .stop span { display: none; }
  #ruler { right: 26px; }
  .tick:not(.major) { font-size: 0; gap: 0; }
  #log { top: 66px; bottom: auto; right: auto; left: 12px; align-items: flex-start; }
  #log li:nth-last-child(n+3) { display: none; }
  #note { left: 12px; right: 12px; transform: none; bottom: 12px; white-space: normal; text-align: center; font-size: .8125rem; }
  .sheet, .sheet.left { top: auto; left: 8px; right: 8px; bottom: 8px; width: auto; max-height: 76svh; border-radius: 28px; transform: translateY(calc(100% + 16px)); }
  #launch.sheet, #shoal.sheet { max-height: 88svh; }
}

@media (max-height: 520px) {
  .hero { padding-bottom: 28px; gap: 8px; }
  .hero h1 { font-size: 2.5rem; }
  .hero p { display: none; }
  .hero::before { height: 100%; }
  #log, #note { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
