/* ============================================================
   Deep Haul — deep-sea salvage ops aesthetic
   Abyss navy-teal base · rust-orange (the engine) · aqua (water)
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Saira+Condensed:wght@500;600;700;800&family=IBM+Plex+Sans:wght@400;500;600&family=JetBrains+Mono:wght@500;700&display=swap');

:root {
  --abyss:        #081317;
  --abyss-2:      #0b1c22;
  --panel:        #0f262d;
  --panel-hi:     #143038;
  --line:         #1d3b44;
  --line-soft:    rgba(95, 201, 214, 0.12);

  --rust:         #df7a32;
  --rust-bright:  #f0903f;
  --aqua:         #5fc9d6;
  --aqua-deep:    #2f8d9b;
  --toxic:        #9bce4e;

  --ink:          #e8f1f2;
  --ink-dim:      #9fb6bc;
  --ink-faint:    #647d84;

  --r:            14px;
  --maxw:         860px;

  --display: 'Saira Condensed', 'Arial Narrow', sans-serif;
  --body: 'IBM Plex Sans', system-ui, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--body);
  color: var(--ink);
  background: var(--abyss);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  position: relative;
  overflow-x: hidden;
}

/* --- Atmosphere: caustic light from the surface + abyssal depth --- */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(120% 70% at 50% -10%, rgba(95, 201, 214, 0.16), transparent 55%),
    radial-gradient(90% 60% at 80% 110%, rgba(223, 122, 50, 0.08), transparent 60%),
    linear-gradient(180deg, var(--abyss-2) 0%, var(--abyss) 60%, #050d10 100%);
}

/* Faint drifting particulate / bubbles */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    radial-gradient(1.5px 1.5px at 20% 30%, rgba(95,201,214,0.5), transparent),
    radial-gradient(1px 1px at 70% 60%, rgba(255,255,255,0.25), transparent),
    radial-gradient(1.5px 1.5px at 40% 80%, rgba(95,201,214,0.35), transparent),
    radial-gradient(1px 1px at 88% 18%, rgba(255,255,255,0.2), transparent),
    radial-gradient(1.5px 1.5px at 12% 65%, rgba(95,201,214,0.3), transparent);
  opacity: 0.7;
  animation: drift 22s linear infinite;
}

@keyframes drift {
  from { transform: translateY(0); }
  to   { transform: translateY(-40px); }
}

/* ----------------------------- Nav ----------------------------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(10px);
  background: linear-gradient(180deg, rgba(8,19,23,0.92), rgba(8,19,23,0.6));
  border-bottom: 1px solid var(--line);
}
.nav__inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0.7rem 1.1rem;
  display: flex;
  align-items: center;
  gap: 0.7rem;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  color: var(--ink);
  margin-right: auto;
}
.brand img {
  width: 38px;
  height: 38px;
  border-radius: 9px;
  border: 1px solid var(--line);
  box-shadow: 0 0 0 1px rgba(0,0,0,0.4), 0 4px 14px rgba(0,0,0,0.5);
}
.brand__name {
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.25rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  line-height: 1;
}
.brand__name span { color: var(--rust); }

.nav__links { display: flex; gap: 0.35rem; }
.nav__link {
  font-family: var(--display);
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-size: 0.86rem;
  color: var(--ink-dim);
  text-decoration: none;
  padding: 0.45rem 0.7rem;
  border-radius: 9px;
  border: 1px solid transparent;
  transition: color .18s, background .18s, border-color .18s;
  white-space: nowrap;
}
.nav__link:hover { color: var(--ink); background: var(--panel); }
.nav__link.is-active {
  color: var(--aqua);
  border-color: var(--line-soft);
  background: var(--panel);
}

/* ----------------------------- Layout ----------------------------- */
.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 2.4rem 1.1rem 5rem;
}

.page-head { margin-bottom: 2rem; }
.eyebrow {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--aqua-deep);
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.eyebrow::before {
  content: '';
  width: 22px;
  height: 1px;
  background: var(--aqua-deep);
}
h1.title {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(2.3rem, 9vw, 3.6rem);
  letter-spacing: 0.01em;
  line-height: 0.98;
  text-transform: uppercase;
  margin: 0.5rem 0 0.4rem;
}
.lede { color: var(--ink-dim); max-width: 46ch; font-size: 1rem; }

/* ----------------------------- Store badges ----------------------------- */
.stores {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-bottom: 2.2rem;
}
.store-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
  color: var(--ink);
  background: linear-gradient(180deg, var(--panel-hi), var(--panel));
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.6rem 1.05rem 0.6rem 0.9rem;
  transition: transform .12s, border-color .18s, box-shadow .18s;
}
.store-badge:hover {
  transform: translateY(-1px);
  border-color: var(--aqua-deep);
  box-shadow: 0 8px 20px rgba(0,0,0,0.35);
}
.store-badge:active { transform: translateY(1px); }
.store-badge__glyph { width: 52px; height: 52px; flex: none; }
.store-badge__text { display: flex; flex-direction: column; line-height: 1.1; }
.store-badge__sup {
  font-family: var(--mono);
  font-size: 0.6rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-faint);
}
.store-badge__name {
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* ----------------------------- Release card ----------------------------- */
.release {
  background:
    linear-gradient(180deg, var(--panel-hi), var(--panel));
  border: 1px solid var(--line);
  border-radius: var(--r);
  position: relative;
  overflow: hidden;
  margin-bottom: 1.4rem;
  animation: rise .6s cubic-bezier(.2,.8,.2,1) both;
}
.release:last-child { margin-bottom: 0; }
.release::before {
  /* rust hazard stripe down the left edge */
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 4px;
  background: linear-gradient(180deg, var(--rust), var(--aqua-deep));
}

/* collapsed banner / expandable header */
.release__head {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.7rem;
  padding: 1.1rem 1.4rem;
  cursor: pointer;
  list-style: none;
  user-select: none;
  transition: background .18s;
}
.release__head::-webkit-details-marker { display: none; }
.release__head:hover { background: var(--panel-hi); }
.release__head:focus-visible {
  outline: none;
  box-shadow: inset 0 0 0 2px var(--aqua-deep);
}
.release[open] .release__head {
  border-bottom: 1px dashed var(--line);
}
.release__chevron {
  width: 16px;
  height: 16px;
  flex: none;
  color: var(--ink-faint);
  transition: transform .22s ease;
}
.release[open] .release__chevron { transform: rotate(180deg); }

.release__body {
  padding: 1.4rem 1.4rem 1.7rem;
}
.ver-tag {
  font-family: var(--mono);
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.05em;
  color: var(--abyss);
  background: var(--rust);
  padding: 0.28rem 0.6rem;
  border-radius: 7px;
}
.release__title {
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.5rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.release__date {
  font-family: var(--mono);
  font-size: 0.74rem;
  color: var(--ink-faint);
  margin-left: auto;
  letter-spacing: 0.08em;
}

/* showcase image */
.showcase {
  margin: 0 0 1.4rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  background: var(--abyss);
  box-shadow: 0 10px 26px rgba(0,0,0,0.4);
}
.showcase img { display: block; width: 100%; height: auto; }

/* changelog list */
.changes { list-style: none; display: flex; flex-direction: column; gap: 0.95rem; }
.changes > li {
  position: relative;
  padding-left: 1.6rem;
  color: var(--ink);
}
.changes > li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 8px;
  height: 8px;
  border: 1.5px solid var(--aqua);
  border-radius: 2px;
  transform: rotate(45deg);
}

/* nested event groups */
.events {
  list-style: none;
  margin: 0.65rem 0 0.2rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.event {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--mono);
  font-size: 0.85rem;
  background: var(--abyss-2);
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 0.5rem 0.7rem;
}
.tag {
  font-family: var(--mono);
  font-weight: 700;
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.2rem 0.5rem;
  border-radius: 5px;
  white-space: nowrap;
}
.tag--bounty { color: var(--rust-bright); background: rgba(223,122,50,0.12); border: 1px solid rgba(223,122,50,0.4); }
.tag--hazard { color: var(--toxic); background: rgba(155,206,78,0.1); border: 1px solid rgba(155,206,78,0.38); }
.event__names { color: var(--ink-dim); }

/* "new" pills for WIP buttons line */
.pill {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  color: var(--aqua);
  border: 1px solid var(--line-soft);
  background: var(--abyss-2);
  border-radius: 6px;
  padding: 0.1rem 0.45rem;
  margin: 0 0.15rem;
}

/* ----------------------------- Form ----------------------------- */
.form-card {
  background: linear-gradient(180deg, var(--panel-hi), var(--panel));
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 1.6rem 1.4rem;
  animation: rise .6s cubic-bezier(.2,.8,.2,1) both;
}
.field { display: flex; flex-direction: column; gap: 0.45rem; margin-bottom: 1.3rem; }
.field label {
  font-family: var(--display);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-size: 0.92rem;
  color: var(--ink);
}
.field .hint {
  font-size: 0.8rem;
  color: var(--ink-faint);
  font-family: var(--mono);
  letter-spacing: 0.02em;
}
.field input[type="text"],
.field textarea {
  font-family: var(--body);
  font-size: 1rem;
  color: var(--ink);
  background: var(--abyss);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.8rem 0.85rem;
  resize: vertical;
  transition: border-color .18s, box-shadow .18s;
  width: 100%;
}
.field textarea { min-height: 130px; line-height: 1.5; }
.field input::placeholder,
.field textarea::placeholder { color: var(--ink-faint); }
.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--aqua-deep);
  box-shadow: 0 0 0 3px rgba(95,201,214,0.14);
}

.hp { position: absolute; left: -9999px; }

.btn {
  font-family: var(--display);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-size: 1rem;
  color: var(--abyss);
  background: linear-gradient(180deg, var(--rust-bright), var(--rust));
  border: none;
  border-radius: 11px;
  padding: 0.85rem 1.6rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  transition: transform .12s, box-shadow .18s, filter .18s;
  box-shadow: 0 6px 18px rgba(223,122,50,0.25);
}
.btn:hover { transform: translateY(-1px); filter: brightness(1.06); }
.btn:active { transform: translateY(1px); }
.btn svg { width: 18px; height: 18px; }

/* form states */
.form-status {
  margin-top: 1.1rem;
  font-family: var(--mono);
  font-size: 0.85rem;
  padding: 0.7rem 0.85rem;
  border-radius: 10px;
  display: none;
}
.form-status.is-error {
  display: block;
  color: #ffb4a0;
  background: rgba(223,80,50,0.1);
  border: 1px solid rgba(223,80,50,0.4);
}

.success-panel {
  display: none;
  text-align: center;
  padding: 2.4rem 1.4rem;
  background: linear-gradient(180deg, var(--panel-hi), var(--panel));
  border: 1px solid var(--line);
  border-radius: var(--r);
  animation: rise .5s cubic-bezier(.2,.8,.2,1) both;
}
.success-panel.is-visible { display: block; }
.success-panel .check {
  width: 56px; height: 56px;
  margin: 0 auto 1rem;
  border-radius: 50%;
  border: 2px solid var(--aqua);
  display: grid;
  place-items: center;
  color: var(--aqua);
}
.success-panel h2 {
  font-family: var(--display);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-size: 1.5rem;
  margin-bottom: 0.4rem;
}
.success-panel p { color: var(--ink-dim); max-width: 40ch; margin: 0 auto; }

/* ----------------------------- Footer ----------------------------- */
.foot {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 1.5rem 1.1rem 2.5rem;
  border-top: 1px solid var(--line);
  color: var(--ink-faint);
  font-family: var(--mono);
  font-size: 0.74rem;
  letter-spacing: 0.06em;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  body::after { animation: none; }
  .release, .form-card, .success-panel { animation: none; }
  html { scroll-behavior: auto; }
}

@media (max-width: 540px) {
  .brand__name { font-size: 1.05rem; }
  .nav__link { padding: 0.4rem 0.5rem; font-size: 0.78rem; }
  .release__head { gap: 0.5rem; padding: 1rem 1.1rem; }
  .release__body { padding: 1.2rem 1.1rem 1.4rem; }
  .release__title { font-size: 1.25rem; }
  .release__date { font-size: 0.68rem; }
}
