/* Layout: a dive. Full-bleed ocean canvas behind everything; content sits in depth "zones" that alternate sides, a fixed depth gauge on the right. Single deliberate deep-sea look. */
:root {
  --ink: #eafcff;          /* text */
  --mist: #a9d3dc;         /* secondary text */
  --glass: rgba(6, 40, 58, .55);
  --glass-2: rgba(10, 62, 84, .55);
  --edge: rgba(160, 235, 245, .22);
  --sun: #ffd46b;          /* buoy yellow, main action */
  --sun-ink: #2b1c00;
  --coral: #ff7f8e;        /* highlights */
  --glow: #74f5e2;         /* bioluminescence */
  --abyss: #03111c;
  --font-display: "Bricolage Grotesque", "Trebuchet MS", system-ui, sans-serif;
  --font-body: "Figtree", "Segoe UI", system-ui, sans-serif;
  --font-mono: "DM Mono", ui-monospace, Menlo, monospace;
  --r: 18px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; overflow-x: clip; }
body {
  margin: 0; color: var(--ink); background: var(--abyss);
  font: 400 1.02rem/1.65 var(--font-body);
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
a { color: inherit; }
h1, h2, h3 { font-family: var(--font-display); line-height: 1.05; margin: 0; text-wrap: balance; letter-spacing: -.02em; }
p { margin: 0; }
:focus-visible { outline: 3px solid var(--sun); outline-offset: 3px; border-radius: 6px; }

#ocean { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; display: block; }
#swimmer { position: fixed; z-index: 1; width: clamp(80px, 11vw, 132px); image-rendering: pixelated; pointer-events: none; left: 0; top: 0; filter: drop-shadow(0 8px 10px rgba(0,0,0,.25)); }
.page { position: relative; z-index: 2; }

.skip { position: absolute; left: -999px; top: 8px; background: var(--sun); color: var(--sun-ink); padding: .5rem 1rem; z-index: 60; border-radius: 8px; }
.skip:focus { left: 12px; }

.gutter {
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}
.inner { max-width: 1120px; margin: 0 auto; }

/* ---------- header ---------- */
.site-head {
  position: fixed; top: 0; left: 0; right: 0; z-index: 30;
  padding-top: calc(env(safe-area-inset-top, 0px) + 12px);
  pointer-events: none;
}
.site-head .inner { display: flex; justify-content: space-between; align-items: center; gap: .6rem; flex-wrap: wrap; }
.pill {
  pointer-events: auto; display: flex; align-items: center; gap: .2rem; padding: .3rem;
  background: rgba(4, 30, 44, .6); border: 1px solid var(--edge); border-radius: 999px;
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
}
.brand { display: flex; align-items: center; gap: .5rem; padding: .25rem .9rem .25rem .4rem; text-decoration: none; font: 800 1.05rem var(--font-display); }
.brand canvas { width: 34px; image-rendering: pixelated; animation: paddle 1.6s ease-in-out infinite; }
@keyframes paddle { 50% { transform: translateY(-3px) rotate(-4deg); } }
.pill a.nav, .lang button {
  text-decoration: none; color: var(--mist); font: 600 .92rem var(--font-body);
  padding: .45rem .85rem; border-radius: 999px; border: 0; background: none; cursor: pointer; transition: color .2s, background .2s;
}
.pill a.nav:hover { color: var(--ink); background: var(--glass-2); }
.pill a.nav[aria-current="page"] { color: var(--sun-ink); background: var(--sun); }
.lang { display: flex; margin-left: .2rem; border-left: 1px solid var(--edge); padding-left: .2rem; }
.lang button { font: 500 .78rem var(--font-mono); padding: .45rem .6rem; }
.lang button[aria-pressed="true"] { color: var(--glow); }

/* ---------- depth gauge ---------- */
.gauge {
  position: fixed; z-index: 25; right: max(14px, env(safe-area-inset-right, 0px)); top: 50%; transform: translateY(-50%);
  display: flex; flex-direction: column; align-items: flex-end; gap: .5rem; pointer-events: none;
  font: 500 .72rem var(--font-mono); color: var(--mist);
}
.gauge .track { position: relative; width: 4px; height: 38vh; border-radius: 4px; background: linear-gradient(var(--glow), rgba(116,245,226,.08)); }
.gauge .bob { position: absolute; right: -6px; width: 16px; height: 16px; border-radius: 50%; background: var(--sun); box-shadow: 0 0 0 4px rgba(255,212,107,.25), 0 0 18px var(--sun); transition: top .15s linear; }
.gauge .read { font: 500 1.4rem var(--font-mono); color: var(--ink); font-variant-numeric: tabular-nums; }
.gauge .zone-name { text-transform: uppercase; letter-spacing: .14em; transition: opacity .3s; }
@media (max-width: 760px) {
  .gauge { top: auto; bottom: calc(env(safe-area-inset-bottom, 0px) + 14px); transform: none; flex-direction: row; align-items: center;
    background: rgba(4,30,44,.7); border: 1px solid var(--edge); padding: .35rem .8rem; border-radius: 999px; backdrop-filter: blur(10px); }
  .gauge .track { display: none; }
  .gauge .read { font-size: .95rem; }
}

/* ---------- hero ---------- */
.hero { min-height: min(92vh, 860px); display: grid; align-content: center; padding-block: 120px 80px; position: relative; }
.hero .inner { width: 100%; display: grid; gap: 1.4rem; justify-items: start; }
.kicker { font: 500 .8rem var(--font-mono); text-transform: uppercase; letter-spacing: .2em; color: var(--glow); display: flex; align-items: center; gap: .6rem; }
.kicker::before { content: ""; width: 28px; height: 2px; background: var(--glow); }
.wordmark { font-size: clamp(3.6rem, 15vw, 10.5rem); font-weight: 800; line-height: .9; letter-spacing: -.04em; display: flex; flex-wrap: wrap; gap: 0 .25em; }
.wordmark .w { display: inline-flex; }
.wordmark .ch { display: inline-block; animation: float 3.6s ease-in-out infinite; animation-delay: calc(var(--i) * -.22s); }
.wordmark .w:last-child .ch { color: var(--sun); }
@keyframes float { 0%,100% { transform: translateY(0) rotate(0); } 50% { transform: translateY(-.08em) rotate(-2deg); } }
.hero .lead { text-shadow: 0 1px 12px rgba(0,30,45,.6); font-size: clamp(1.05rem, 2.2vw, 1.3rem); max-width: 34ch; color: var(--ink); }
.row { display: flex; flex-wrap: wrap; gap: .7rem; align-items: center; }
.hint { margin-top: 1.5rem; font: 500 .78rem var(--font-mono); color: var(--mist); letter-spacing: .12em; text-transform: uppercase; display: flex; align-items: center; gap: .6rem; }
.hint i { width: 22px; height: 34px; border: 2px solid var(--mist); border-radius: 12px; position: relative; }
.hint i::after { content: ""; position: absolute; left: 50%; top: 6px; width: 4px; height: 7px; margin-left: -2px; border-radius: 2px; background: var(--sun); animation: scrolly 1.8s ease-in-out infinite; }
@keyframes scrolly { 60% { transform: translateY(12px); opacity: 0; } 100% { opacity: 0; } }
.surface { position: absolute; left: 0; right: 0; bottom: 0; height: 60px; pointer-events: none; overflow: hidden; }
.surface svg { width: 200%; height: 100%; animation: drift 9s linear infinite; }
@keyframes drift { to { transform: translateX(-50%); } }

/* ---------- buttons ---------- */
.btn {
  position: relative; display: inline-flex; align-items: center; gap: .55rem; text-decoration: none; cursor: pointer;
  font: 700 .98rem var(--font-body); padding: .8rem 1.3rem; border-radius: 999px;
  color: var(--ink); background: var(--glass-2); border: 1px solid var(--edge);
  transition: transform .25s cubic-bezier(.3,1.6,.5,1), background .2s, box-shadow .2s;
}
.btn:hover { transform: translateY(-3px) scale(1.03); background: rgba(16, 86, 110, .7); }
.btn:active { transform: scale(.97); }
.btn.buoy { background: var(--sun); color: var(--sun-ink); border-color: transparent; box-shadow: 0 8px 24px -8px rgba(255,212,107,.7); }
.btn.buoy:hover { background: #ffe08e; }
.btn .arr { transition: transform .25s; }
.btn:hover .arr { transform: translateX(4px); }
.pop { position: absolute; width: 8px; height: 8px; border-radius: 50%; border: 1.5px solid currentColor; pointer-events: none; animation: pop .7s ease-out forwards; }
@keyframes pop { to { transform: translate(var(--dx), var(--dy)) scale(.4); opacity: 0; } }

/* ---------- zones ---------- */
.zone { padding-block: clamp(4rem, 10vw, 8rem); position: relative; }
.zone-head { display: grid; gap: .6rem; margin-bottom: 2.2rem; max-width: 40rem; }
.zone-head .depth { font: 500 .8rem var(--font-mono); color: var(--glow); letter-spacing: .16em; text-transform: uppercase; }
.zone-head h2 { font-size: clamp(2.2rem, 6vw, 4rem); font-weight: 800; }
.zone-head p { color: var(--mist); max-width: 52ch; }
.zone.right .zone-head { margin-left: auto; text-align: right; justify-items: end; }

.glass {
  background: var(--glass); border: 1px solid var(--edge); border-radius: var(--r);
  backdrop-filter: blur(14px) saturate(1.2); -webkit-backdrop-filter: blur(14px) saturate(1.2);
}

/* reveal: transform only, content always visible */
.rise { transition: transform .9s cubic-bezier(.2,.8,.2,1), filter .9s; }
.rise.below { transform: translateY(48px) scale(.97); filter: blur(2px); }

/* release */
.release { display: grid; grid-template-columns: 1.4fr 1fr; overflow: hidden; }
.release > div { padding: clamp(1.4rem, 3vw, 2.4rem); min-width: 0; display: grid; gap: 1rem; align-content: start; }
.release .side { background: rgba(116,245,226,.06); border-left: 1px solid var(--edge); }
.release h3 { font-size: clamp(1.6rem, 3.6vw, 2.4rem); font-weight: 800; }
.release h3 a { text-decoration: none; background: linear-gradient(var(--coral), var(--coral)) 0 100% / 0 3px no-repeat; transition: background-size .4s; }
.release h3 a:hover { background-size: 100% 3px; }
.tags { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; }
.tag { font: 500 .78rem var(--font-mono); padding: .25rem .65rem; border-radius: 999px; border: 1px solid var(--edge); color: var(--mist); }
.tag.hot { background: var(--coral); border-color: var(--coral); color: #2a0509; font-weight: 600; animation: pulse 2.4s ease-in-out infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 6px rgba(255,127,142,.18); } }
.side .label { font: 500 .78rem var(--font-mono); text-transform: uppercase; letter-spacing: .14em; color: var(--glow); }
.side .btn { width: 100%; justify-content: space-between; }
.caution { font-size: .9rem; color: var(--mist); display: grid; grid-template-columns: auto 1fr; gap: .6rem; align-items: start; }
.caution svg { width: 20px; height: 20px; margin-top: .15rem; }
.textlink { color: var(--glow); font-weight: 700; text-decoration: none; display: inline-flex; gap: .4rem; }
.textlink:hover { text-decoration: underline; }
@media (max-width: 780px) { .release { grid-template-columns: 1fr; } .release .side { border-left: 0; border-top: 1px solid var(--edge); } }

/* guides */
.guides { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: 1.2rem; list-style: none; padding: 0; margin: 2.5rem 0 0; }
.guide { display: grid; grid-template-columns: 56px 1fr; gap: 1rem; padding: 1.4rem; text-decoration: none; transition: transform .35s cubic-bezier(.3,1.5,.5,1), border-color .3s; }
.guide:hover { transform: translateY(-6px) rotate(-.6deg); border-color: var(--glow); }
.guide .ico { width: 56px; height: 56px; border-radius: 14px; display: grid; place-items: center; background: rgba(116,245,226,.12); }
.guide .ico svg { width: 30px; height: 30px; }
.guide strong { display: block; font: 700 1.15rem var(--font-display); margin-bottom: .25rem; }
.guide span { color: var(--mist); font-size: .94rem; }
.guide > div { min-width: 0; }

/* bottles */
.support-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: clamp(1.5rem, 4vw, 3rem); align-items: start; }
@media (max-width: 860px) { .support-grid { grid-template-columns: 1fr; } }
.pitch { padding: clamp(1.4rem, 3vw, 2.2rem); display: grid; gap: 1.1rem; }
.pitch .big { font: 800 clamp(2.6rem, 6vw, 3.6rem)/1 var(--font-display); color: var(--sun); font-variant-numeric: tabular-nums; }
.pitch .small { font-size: .88rem; color: var(--mist); }
.bottles { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr)); gap: 1.4rem 1rem; list-style: none; padding: 0; margin: 0; }
.bottle {
  position: relative; padding: 1.6rem 1.1rem 1.1rem; border-radius: 26px 26px 18px 18px;
  background: linear-gradient(160deg, rgba(160,255,230,.14), rgba(30,110,120,.18)); border: 1px solid var(--edge);
  animation: bob 5s ease-in-out infinite; animation-delay: calc(var(--i) * -1.1s);
}
.bottle::before { content: ""; position: absolute; top: -14px; left: 50%; width: 26px; height: 16px; margin-left: -13px; border-radius: 6px 6px 2px 2px; background: rgba(160,255,230,.18); border: 1px solid var(--edge); border-bottom: 0; }
.bottle::after { content: ""; position: absolute; top: -20px; left: 50%; width: 16px; height: 8px; margin-left: -8px; border-radius: 3px; background: #b9895a; }
@keyframes bob { 0%,100% { transform: translateY(0) rotate(-1.5deg); } 50% { transform: translateY(-10px) rotate(1.5deg); } }
.bottle b { display: block; font: 700 1rem var(--font-display); }
.bottle p { font-size: .9rem; color: var(--mist); margin-top: .3rem; overflow-wrap: anywhere; }
.bottle em { font-style: italic; opacity: .8; }

/* sonar timeline */
.sonar { list-style: none; margin: 0; padding: 0; position: relative; display: grid; gap: 1.1rem; }
.sonar::before { content: ""; position: absolute; left: 11px; top: 8px; bottom: 8px; width: 2px; background: linear-gradient(var(--glow), transparent); opacity: .5; }
.sonar li { display: grid; grid-template-columns: 24px 1fr; gap: 1.2rem; }
.ping { position: relative; width: 24px; height: 24px; margin-top: 1.3rem; }
.ping::before, .ping::after { content: ""; position: absolute; inset: 6px; border-radius: 50%; background: var(--glow); }
.ping::after { background: none; border: 2px solid var(--glow); animation: ping 2.6s ease-out infinite; animation-delay: calc(var(--i) * .5s); }
@keyframes ping { from { transform: scale(1); opacity: .9; } to { transform: scale(3.2); opacity: 0; } }
.log { display: grid; grid-template-columns: 1fr auto; gap: .3rem 1.2rem; padding: 1.2rem 1.4rem; text-decoration: none; transition: transform .35s cubic-bezier(.3,1.5,.5,1), border-color .3s; }
.log:hover { transform: translateX(8px); border-color: var(--glow); }
.log .meta { font: 500 .76rem var(--font-mono); color: var(--glow); text-transform: uppercase; letter-spacing: .1em; }
.log strong { grid-column: 1; font: 700 1.2rem var(--font-display); }
.log p { grid-column: 1; color: var(--mist); font-size: .94rem; }
.log time { grid-column: 2; grid-row: 1 / span 3; font: 500 .8rem var(--font-mono); color: var(--mist); text-align: right; font-variant-numeric: tabular-nums; }
.log > * { min-width: 0; }
@media (max-width: 560px) { .log { grid-template-columns: 1fr; } .log time { grid-column: 1; grid-row: auto; text-align: left; } }

.filters { display: flex; gap: .5rem; flex-wrap: wrap; margin-bottom: 1.8rem; }
.filters button { font: 600 .9rem var(--font-body); padding: .5rem 1rem; border-radius: 999px; border: 1px solid var(--edge); background: var(--glass); color: var(--mist); cursor: pointer; transition: all .2s; }
.filters button[aria-pressed="true"] { background: var(--glow); color: #022; border-color: var(--glow); }

/* article */
.article { max-width: 46rem; padding: clamp(1.4rem, 4vw, 2.8rem); display: grid; gap: 1rem; }
.article h1 { font-size: clamp(2rem, 5.5vw, 3.2rem); font-weight: 800; }
.prose { display: grid; gap: .9rem; }
.prose h2 { font-size: 1.5rem; margin-top: 1rem; color: var(--sun); }
.prose ul, .prose ol { margin: 0; padding-left: 1.3rem; display: grid; gap: .4rem; }
.prose .note { border-radius: 12px; padding: .9rem 1.1rem; background: rgba(255,127,142,.12); border: 1px solid rgba(255,127,142,.35); font-size: .95rem; }

/* projects */
.reefs { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 1.2rem; }
.reef { padding: 1.6rem; display: grid; gap: .7rem; align-content: start; transition: transform .35s cubic-bezier(.3,1.5,.5,1); }
.reef:hover { transform: translateY(-6px); }
.reef.lead-card { grid-column: 1 / -1; background: linear-gradient(120deg, rgba(255,212,107,.16), var(--glass)); }
.reef h3 { font-size: 1.5rem; font-weight: 800; }
.reef p { color: var(--mist); }
.state { justify-self: start; font: 600 .74rem var(--font-mono); text-transform: uppercase; letter-spacing: .1em; padding: .25rem .7rem; border-radius: 999px; }
.state.aktif { background: var(--glow); color: #022; }
.state.ide { border: 1px dashed var(--mist); color: var(--mist); }
.reef .stack { font: 500 .8rem var(--font-mono); color: var(--mist); }

/* page head (inner pages) */
.page-head { padding-block: 140px 2.5rem; }
.page-head .inner { display: grid; gap: .8rem; }
.page-head h1 { font-size: clamp(3rem, 10vw, 6.5rem); font-weight: 800; letter-spacing: -.04em; }
.page-head p { color: var(--mist); max-width: 46ch; font-size: 1.1rem; }

/* seabed footer */
.seabed { position: relative; margin-top: 4rem; padding-block: 140px 2.5rem; }
.seabed .sand { position: absolute; inset: 0 0 auto; height: 120px; }
.seabed .sand svg { width: 100%; height: 100%; display: block; }
.seabed .inner { position: relative; display: grid; gap: 1rem; color: var(--mist); font-size: .88rem; }
.seabed nav { display: flex; gap: 1.2rem; flex-wrap: wrap; }
.seabed nav a { color: var(--ink); }
.seabed .sleeper { position: absolute; top: 38px; right: 12%; width: 70px; image-rendering: pixelated; }
.zz { position: absolute; top: 10px; right: calc(12% - 6px); font: 700 1rem var(--font-mono); color: var(--glow); animation: zz 3s ease-in-out infinite; }
@keyframes zz { from { transform: translate(0,10px); opacity: 0; } 50% { opacity: 1; } to { transform: translate(10px,-14px); opacity: 0; } }

/* dive transition */
.veil { position: fixed; inset: 0; z-index: 80; pointer-events: none; background: var(--abyss); opacity: 0; transition: opacity .45s; }
.veil.on { opacity: 1; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .rise.below { transform: none; filter: none; }
}

@media (max-width: 520px) {
  .brand .bname { display: none; }
  .brand { padding: .25rem .5rem; }
  .pill a.nav { padding: .45rem .6rem; font-size: .88rem; }
  .lang button { padding: .45rem .45rem; }
  .zone.right .zone-head { margin-left: 0; text-align: left; justify-items: start; }
}
