/* Kuyu — colours come straight from the game (src/config.js, src/strata.js). */

:root {
  --shaft: #15100c;
  --deep: #0b0806;
  --earth: #3b2b20;
  --earth-dark: #2e2118;
  --earth-light: #4a382b;
  --edge: #54402f;
  --edge-2: #6a5440;
  --panel: #1c1510;
  --panel-2: #241b14;
  --bone: #d8ceb4;
  --bone-dark: #9c917a;
  --hero: #eee8db;
  --muted: #a89880;
  --dim: #7d6f5f;
  --gem: #9be9df;
  --gem-light: #e2fcf6;
  --gem-deep: #3aa5a8;
  --stone: #85827e;
  --stone-light: #a3a09a;
  --stone-dark: #5c5955;
  --danger: #e8806a;
  --ok: #9fd68a;
  --serif: Georgia, "Times New Roman", serif;
  --ui: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  --radius: 14px;
  --wrap: 1120px;
  --soil: url("img/soil.png");
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 84px;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--shaft);
  color: var(--hero);
  font: 17px/1.65 var(--ui);
  -webkit-font-smoothing: antialiased;
}

main {
  flex: 1;
}

img {
  max-width: 100%;
  height: auto;
}

a {
  color: var(--gem);
  text-underline-offset: 3px;
}

a:hover {
  color: var(--gem-light);
}

:focus-visible {
  outline: 3px solid var(--gem);
  outline-offset: 3px;
  border-radius: 6px;
}

h1,
h2,
h3 {
  font-family: var(--serif);
  font-weight: 700;
  line-height: 1.15;
  margin: 0 0 0.5em;
}

p {
  margin: 0 0 1em;
}

code {
  font: 0.9em/1.4 ui-monospace, SFMono-Regular, Consolas, monospace;
  background: var(--panel-2);
  border: 1px solid var(--edge);
  border-radius: 6px;
  padding: 0.1em 0.4em;
}

.wrap {
  width: min(100% - 40px, var(--wrap));
  margin-inline: auto;
}

.skip {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 100;
  padding: 10px 16px;
  background: var(--bone);
  color: var(--shaft);
  border-radius: 8px;
  font-weight: 700;
}

.skip:focus {
  top: 12px;
}

.kicker {
  font: italic 15px var(--serif);
  color: var(--gem);
  letter-spacing: 0.08em;
  margin: 0 0 12px;
}

.lead {
  color: var(--muted);
  font-size: 19px;
  max-width: 640px;
}

.muted {
  color: var(--muted);
}

.small {
  font-size: 13px;
}

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

.top {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(11, 8, 6, 0.84);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(84, 64, 47, 0.7);
}

.top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 64px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--bone);
  text-decoration: none;
  font: 700 22px/1 var(--serif);
  letter-spacing: 0.22em;
  flex-shrink: 0;
}

.brand:hover {
  color: var(--hero);
}

.brand img {
  border-radius: 9px;
  box-shadow: 0 0 0 1px var(--edge), 0 4px 14px rgba(0, 0, 0, 0.5);
}

.brand-tag {
  font: 500 14px var(--ui);
  color: var(--muted);
  letter-spacing: 0;
}

.nav {
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
}

.nav::-webkit-scrollbar {
  display: none;
}

.nav a {
  color: var(--muted);
  text-decoration: none;
  font-weight: 600;
  font-size: 15px;
  padding: 8px 12px;
  border-radius: 999px;
  white-space: nowrap;
}

.nav a:hover {
  color: var(--hero);
  background: var(--panel-2);
}

.nav a[aria-current="page"] {
  color: var(--bone);
  background: rgba(216, 206, 180, 0.1);
}

.nav .lang {
  margin-left: 6px;
  border: 1px solid var(--edge);
  color: var(--hero);
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 26px;
  border: 0;
  border-radius: 12px;
  background: linear-gradient(180deg, #efe7d2, var(--bone) 55%, #c4b998);
  color: var(--shaft);
  font: 700 18px/1 var(--serif);
  letter-spacing: 0.04em;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 4px 0 var(--bone-dark), 0 10px 28px rgba(0, 0, 0, 0.45);
  transition: transform 0.12s ease, box-shadow 0.12s ease, filter 0.12s ease;
}

.btn:hover {
  color: var(--shaft);
  filter: brightness(1.05);
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(3px);
  box-shadow: 0 1px 0 var(--bone-dark), 0 4px 12px rgba(0, 0, 0, 0.4);
}

.btn[disabled] {
  opacity: 0.7;
  cursor: progress;
}

.btn-ghost {
  background: transparent;
  color: var(--bone);
  border: 2px solid var(--edge-2);
  box-shadow: none;
}

.btn-ghost:hover {
  color: var(--hero);
  background: rgba(216, 206, 180, 0.07);
}

.btn-danger {
  background: #3a1a14;
  color: #ffd6cc;
  border: 1px solid #6b2e22;
  box-shadow: none;
}

.btn-danger:hover {
  color: #fff;
  background: #552219;
}

.btn-sm {
  padding: 8px 14px;
  font-size: 15px;
  border-radius: 10px;
}

.btn-wide {
  width: 100%;
}

.icon-btn {
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 16px;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  cursor: pointer;
}

.icon-btn:hover {
  color: var(--danger);
  background: rgba(232, 128, 106, 0.1);
}

form.inline {
  display: inline;
  margin: 0;
}

/* ---------------------------------------------------------------- soil */

/* The ground the whole site is dug into: game soil texture, darkening with depth. */
.hero,
.page-head {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(11, 8, 6, 0.55), rgba(21, 16, 12, 0.35) 30%, rgba(21, 16, 12, 0.92)),
    var(--soil) 0 0 / 320px 320px,
    var(--earth);
  border-bottom: 3px solid var(--edge);
}

.motes {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.motes i {
  position: absolute;
  bottom: -10px;
  left: 50%;
  width: 3px;
  height: 3px;
  background: #9a8a76;
  opacity: 0;
  animation: mote 12s linear infinite;
}

.motes i:nth-child(1) { left: 4%; animation-duration: 14s; animation-delay: -1s; }
.motes i:nth-child(2) { left: 11%; animation-duration: 10s; animation-delay: -6s; width: 2px; height: 2px; }
.motes i:nth-child(3) { left: 18%; animation-duration: 16s; animation-delay: -3s; }
.motes i:nth-child(4) { left: 25%; animation-duration: 12s; animation-delay: -8s; width: 4px; height: 4px; }
.motes i:nth-child(5) { left: 33%; animation-duration: 15s; animation-delay: -2s; width: 2px; height: 2px; }
.motes i:nth-child(6) { left: 40%; animation-duration: 13s; animation-delay: -5s; }
.motes i:nth-child(7) { left: 47%; animation-duration: 17s; animation-delay: -9s; width: 2px; height: 2px; }
.motes i:nth-child(8) { left: 55%; animation-duration: 11s; animation-delay: -4s; }
.motes i:nth-child(9) { left: 62%; animation-duration: 14s; animation-delay: -7s; width: 4px; height: 4px; }
.motes i:nth-child(10) { left: 68%; animation-duration: 10s; animation-delay: -1.5s; }
.motes i:nth-child(11) { left: 74%; animation-duration: 15s; animation-delay: -10s; width: 2px; height: 2px; }
.motes i:nth-child(12) { left: 80%; animation-duration: 12s; animation-delay: -3.5s; }
.motes i:nth-child(13) { left: 85%; animation-duration: 16s; animation-delay: -6.5s; width: 4px; height: 4px; }
.motes i:nth-child(14) { left: 90%; animation-duration: 11s; animation-delay: -2.5s; }
.motes i:nth-child(15) { left: 94%; animation-duration: 13s; animation-delay: -8.5s; width: 2px; height: 2px; }
.motes i:nth-child(16) { left: 98%; animation-duration: 17s; animation-delay: -4.5s; }

@keyframes mote {
  0% { transform: translate(0, 0); opacity: 0; }
  12% { opacity: 0.35; }
  50% { transform: translate(14px, -50vh); }
  85% { opacity: 0.25; }
  100% { transform: translate(-8px, -100vh); opacity: 0; }
}

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

.hero {
  padding: 72px 0 88px;
}

.hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  align-items: center;
  gap: 48px;
}

.logo {
  margin: 0 0 14px;
}

.logo-word {
  display: block;
  font: 700 clamp(84px, 13vw, 150px)/0.9 var(--serif);
  letter-spacing: 0.16em;
  margin-right: -0.16em;
  color: var(--bone);
  text-shadow:
    0 3px 0 var(--bone-dark),
    0 6px 0 var(--edge),
    0 10px 0 var(--deep),
    0 20px 40px rgba(0, 0, 0, 0.6);
}

.tagline {
  font: italic clamp(22px, 2.6vw, 28px)/1.3 var(--serif);
  color: var(--bone);
  margin-bottom: 12px;
}

.hero-text {
  color: var(--muted);
  font-size: 18px;
  max-width: 520px;
  margin-bottom: 28px;
}

.stores {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 32px;
}

.store {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 190px;
  padding: 10px 20px 10px 16px;
  border-radius: 14px;
  background: var(--deep);
  border: 1px solid var(--edge);
  color: var(--hero);
  text-decoration: none;
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.store:hover {
  color: var(--hero);
  border-color: var(--bone);
  transform: translateY(-2px);
}

.store svg {
  width: 30px;
  height: 30px;
  flex-shrink: 0;
}

.store span {
  display: flex;
  flex-direction: column;
  font: 600 20px/1.15 var(--ui);
}

.store small {
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
}

.store.is-soon {
  opacity: 0.8;
  border-style: dashed;
}

.store.is-soon small {
  color: var(--gem);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.stats {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 28px;
  color: var(--muted);
  font-size: 15px;
}

.stats strong {
  font: 700 28px/1 var(--serif);
  color: var(--bone);
  margin-right: 4px;
}

/* hero scene: a slice of the well scrolling past the falling hero */

.hero-art {
  position: relative;
}

.well {
  --h: 560px;
  --travel: 7.2s;
  --walls: 6.4s;
  position: relative;
  width: min(100%, 420px);
  height: var(--h);
  margin-left: auto;
  border-radius: 22px;
  overflow: hidden;
  background: var(--soil) 0 0 / 320px 320px, var(--earth);
  border: 1px solid var(--edge);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6), inset 0 0 0 6px rgba(11, 8, 6, 0.5);
  animation: walls var(--walls) linear infinite;
}

.well::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(11, 8, 6, 0.55), transparent 22%, transparent 70%, rgba(11, 8, 6, 0.75));
}

.shaft {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 19%;
  right: 19%;
  background:
    radial-gradient(70% 40% at 50% 34%, rgba(238, 232, 219, 0.06), transparent 70%),
    var(--shaft);
  border-inline: 3px solid var(--edge);
  box-shadow: inset 14px 0 24px rgba(0, 0, 0, 0.55), inset -14px 0 24px rgba(0, 0, 0, 0.55);
}

.drift {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 0;
  animation: drift var(--travel) linear infinite;
}

.d1 { animation-delay: 0s; }
.d2 { animation-delay: -1.8s; }
.d3 { animation-delay: -3.6s; }
.d4 { animation-delay: -5.4s; }
.d5 { animation-delay: -0.9s; }
.d6 { animation-delay: -4.5s; }
.d7 { animation-delay: -2.7s; }

.ledge {
  position: absolute;
  top: -10px;
  width: 40%;
  height: 20px;
  background: var(--soil) 0 0 / 160px 160px, var(--earth-light);
  border-top: 3px solid var(--edge-2);
  border-bottom: 3px solid var(--edge);
  box-shadow: 0 10px 16px rgba(0, 0, 0, 0.45);
}

.ledge-l {
  left: -3px;
  border-right: 3px solid var(--edge);
  border-radius: 0 8px 8px 0;
}

.ledge-r {
  right: -3px;
  border-left: 3px solid var(--edge);
  border-radius: 8px 0 0 8px;
}

.spikes {
  position: absolute;
  top: -40px;
  display: flex;
  flex-direction: column;
  width: 15px;
  height: 80px;
}

.spikes i {
  flex: 1;
  background: linear-gradient(180deg, var(--stone-light), var(--stone) 50%, var(--stone-dark));
}

.spikes-l {
  left: 0;
}

.spikes-l i {
  clip-path: polygon(0 0, 100% 50%, 0 100%);
}

.spikes-r {
  right: 0;
}

.spikes-r i {
  clip-path: polygon(100% 0, 0 50%, 100% 100%);
}

.gem {
  display: block;
  width: 22px;
  height: 20px;
  filter: drop-shadow(0 0 8px rgba(159, 240, 230, 0.55));
}

.drift > .gem,
.drift > .bubble {
  position: absolute;
  animation: collect var(--travel) linear infinite;
  animation-delay: inherit;
}

.drift > .gem {
  top: -10px;
  left: calc(50% - 11px);
}

.drift > .bubble {
  top: -18px;
  left: calc(28% - 18px);
}

.bubble {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, rgba(255, 255, 255, 0.35), rgba(159, 240, 230, 0.08) 45%, rgba(159, 240, 230, 0.2) 70%);
  border: 1.5px solid rgba(226, 252, 246, 0.55);
}

.bubble .gem {
  width: 16px;
  height: 14px;
}

.faller {
  position: absolute;
  top: calc(var(--h) * 0.32 - 28px);
  left: 50%;
  width: 42px;
  margin-left: -21px;
  animation: steer var(--travel) ease-in-out infinite;
}

.faller img {
  display: block;
  width: 100%;
  filter: drop-shadow(0 0 10px rgba(238, 232, 219, 0.3));
  animation: flutter 0.9s ease-in-out infinite alternate;
}

/* The shield from the bubble, held until the next gem. */
.faller::after {
  content: "";
  position: absolute;
  inset: -12px -14px;
  border-radius: 50%;
  border: 2px solid rgba(159, 240, 230, 0.7);
  box-shadow: 0 0 16px rgba(159, 240, 230, 0.35), inset 0 0 12px rgba(159, 240, 230, 0.2);
  opacity: 0;
  animation: shield var(--travel) linear infinite;
}

.shaft .motes i {
  background: #b7a58e;
  animation-name: mote-shaft;
}

.depth {
  position: absolute;
  z-index: 2;
  left: 50%;
  top: 16px;
  translate: -50% 0;
  padding: 4px 12px;
  border-radius: 999px;
  background: rgba(11, 8, 6, 0.7);
  border: 1px solid var(--edge);
  font: 700 15px/1.4 var(--serif);
  color: var(--bone);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

@keyframes walls {
  to { background-position: 0 -640px; }
}

@keyframes drift {
  from { transform: translateY(calc(var(--h) + 40px)); }
  to { transform: translateY(-120px); }
}

/* A drift passes the hero 58% of the way up. */
@keyframes collect {
  0%, 56% { opacity: 1; scale: 1; }
  60% { opacity: 0; scale: 1.9; }
  100% { opacity: 0; scale: 1; }
}

/* Dodges ledges and spikes, sweeps through gems and the bubble. */
@keyframes steer {
  0% { left: 41%; }
  8.3% { left: 22%; }
  20.8% { left: 28%; }
  33.3% { left: 22%; }
  45.8% { left: 50%; }
  58.3% { left: 78%; }
  83.3% { left: 78%; }
  95.8% { left: 50%; }
  100% { left: 41%; }
}

@keyframes shield {
  0%, 20% { opacity: 0; scale: 0.6; }
  22% { opacity: 1; scale: 1.1; }
  24%, 43% { opacity: 1; scale: 1; }
  46%, 100% { opacity: 0; scale: 1.25; }
}

@keyframes flutter {
  from { rotate: -4deg; translate: 0 -2px; }
  to { rotate: 4deg; translate: 0 2px; }
}

@keyframes mote-shaft {
  0% { transform: translate(0, 0); opacity: 0; }
  10% { opacity: 0.4; }
  90% { opacity: 0.3; }
  100% { transform: translate(-6px, -620px); opacity: 0; }
}

/* ---------------------------------------------------------------- sections */

.band {
  position: relative;
  padding: 88px 0;
}

.band-deep {
  background: linear-gradient(180deg, var(--deep), #100c09);
  border-block: 1px solid var(--edge);
}

.title {
  font-size: clamp(32px, 4.4vw, 46px);
  color: var(--bone);
}

.title-sm {
  font-size: 28px;
  color: var(--bone);
}

.card {
  background: linear-gradient(180deg, var(--panel-2), var(--panel));
  border: 1px solid var(--edge);
  border-radius: var(--radius);
  padding: 26px;
}

.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px;
  margin-top: 40px;
}

.feature {
  transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.feature:hover {
  border-color: var(--edge-2);
  transform: translateY(-3px);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4);
}

.feature .icon {
  width: 46px;
  height: 46px;
  padding: 10px;
  margin-bottom: 18px;
  color: var(--gem);
  background: rgba(155, 233, 223, 0.08);
  border: 1px solid rgba(155, 233, 223, 0.25);
  border-radius: 50%;
}

.feature h3 {
  font-size: 23px;
  color: var(--bone);
}

.feature p {
  color: var(--muted);
  margin: 0;
  font-size: 16px;
}

/* layers: a core sample of the well, one band per stratum */

.strata {
  list-style: none;
  padding: 0;
  margin: 40px 0 0;
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid var(--edge);
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.5);
}

.stratum {
  position: relative;
  display: grid;
  grid-template-columns: 170px 1fr;
  gap: 24px;
  align-items: center;
  padding: 26px 32px;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.15), rgba(0, 0, 0, 0.55) 70%), var(--tex) 0 0 / 200px 200px, var(--earth);
  isolation: isolate;
}

.stratum + .stratum {
  border-top: 3px solid var(--line, var(--edge));
}

.stratum-depth {
  font: 700 26px/1 var(--serif);
  color: var(--bone);
  font-variant-numeric: tabular-nums;
  text-shadow: 0 2px 0 rgba(0, 0, 0, 0.5);
}

.stratum h3 {
  font-size: 24px;
  margin-bottom: 4px;
  text-shadow: 0 2px 0 rgba(0, 0, 0, 0.45);
}

.stratum p {
  margin: 0;
  font-size: 16px;
  color: rgba(238, 232, 219, 0.82);
  max-width: 620px;
}

.stratum-soil { --tex: url("img/earth-soil.png"); --earth: #3b2b20; --line: #54402f; }
.stratum-clay { --tex: url("img/earth-clay.png"); --earth: #5a3222; --line: #7a4a33; }
.stratum-limestone { --tex: url("img/earth-limestone.png"); --earth: #5d5649; --line: #7c7564; }
.stratum-darkrock { --tex: url("img/earth-darkrock.png"); --earth: #2e3540; --line: #4a5564; }
.stratum-crystal { --tex: url("img/earth-crystal.png"); --earth: #2a2240; --line: #4b3d6e; }
.stratum-magma { --tex: url("img/earth-magma.png"); --earth: #2a1714; --line: #6a2a18; }

.stratum-crystal .stratum-depth {
  color: #d9c8ff;
  text-shadow: 0 0 18px rgba(167, 123, 232, 0.7);
}

.stratum-crystal::after,
.stratum-magma::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}

.stratum-crystal::after {
  background: radial-gradient(40% 120% at 85% 50%, rgba(95, 211, 207, 0.16), transparent 70%);
}

.stratum-magma::after {
  background: radial-gradient(70% 140% at 50% 120%, rgba(255, 90, 31, 0.45), transparent 70%);
}

.stratum-magma .stratum-depth {
  color: #ffc27a;
  text-shadow: 0 0 18px rgba(255, 90, 31, 0.8);
}

.cta {
  display: flex;
  align-items: center;
  gap: 28px;
  padding: 34px 40px;
  border-radius: 22px;
  background:
    radial-gradient(420px 200px at 0% 50%, rgba(238, 232, 219, 0.08), transparent 70%),
    linear-gradient(180deg, var(--panel-2), var(--panel));
  border: 1px solid var(--edge);
}

.cta img {
  width: 64px;
  flex-shrink: 0;
  filter: drop-shadow(0 0 14px rgba(238, 232, 219, 0.25));
}

.cta div {
  flex: 1;
}

.cta h2 {
  font-size: 30px;
  color: var(--bone);
  margin-bottom: 4px;
}

.cta p {
  margin: 0;
  color: var(--muted);
}

/* ---------------------------------------------------------------- inner pages */

.page-head {
  padding: 64px 0 56px;
}

.page-head .wrap {
  position: relative;
}

.page-head h1 {
  font-size: clamp(40px, 6vw, 60px);
  color: var(--bone);
  text-shadow: 0 3px 0 var(--edge), 0 6px 0 var(--deep);
}

.page-head .lead {
  margin: 0;
}

.support-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 40px;
  align-items: start;
  padding: 56px 0 88px;
}

.faq details {
  border: 1px solid var(--edge);
  border-radius: 12px;
  background: var(--panel);
  margin-bottom: 10px;
  transition: border-color 0.15s ease;
}

.faq details[open] {
  border-color: var(--edge-2);
}

.faq summary {
  cursor: pointer;
  list-style: none;
  padding: 16px 48px 16px 18px;
  font-weight: 650;
  position: relative;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: "+";
  position: absolute;
  right: 18px;
  top: 50%;
  translate: 0 -50%;
  font: 700 24px/1 var(--serif);
  color: var(--gem);
  transition: rotate 0.2s ease;
}

.faq details[open] summary::after {
  rotate: 45deg;
}

.faq details p {
  margin: 0;
  padding: 0 18px 18px;
  color: var(--muted);
  overflow-wrap: anywhere;
}

.contact {
  position: sticky;
  top: 88px;
  padding: 32px;
}

.form {
  display: grid;
  gap: 18px;
  margin-top: 8px;
}

.row.two {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.field {
  display: grid;
  align-content: start;
  gap: 7px;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.field label,
.field legend {
  font-weight: 650;
  font-size: 15px;
  padding: 0;
}

.field legend {
  margin-bottom: 7px;
}

.opt {
  color: var(--muted);
  font-weight: 400;
  font-size: 13px;
}

input[type="text"],
input[type="email"],
input[type="password"],
select,
textarea {
  width: 100%;
  font: 16px/1.5 var(--ui);
  color: var(--hero);
  background: #100c09;
  border: 1.5px solid var(--edge);
  border-radius: 10px;
  padding: 11px 14px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

select {
  appearance: none;
  padding-right: 40px;
  background:
    linear-gradient(45deg, transparent 50%, var(--bone) 50%) calc(100% - 20px) 50% / 6px 6px no-repeat,
    linear-gradient(-45deg, transparent 50%, var(--bone) 50%) calc(100% - 14px) 50% / 6px 6px no-repeat,
    #100c09;
}

textarea {
  resize: vertical;
  min-height: 150px;
}

::placeholder {
  color: var(--dim);
}

input:hover,
select:hover,
textarea:hover {
  border-color: var(--edge-2);
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--gem);
  box-shadow: 0 0 0 4px rgba(155, 233, 223, 0.14);
}

[aria-invalid="true"] {
  border-color: var(--danger) !important;
}

.hint,
.counter,
.field-error {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
}

.counter {
  text-align: right;
  margin-top: -2px;
}

.counter.is-near {
  color: var(--bone);
}

.field-error {
  color: var(--danger);
  font-weight: 600;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  position: relative;
  cursor: pointer;
}

.chip input {
  position: absolute;
  opacity: 0;
  inset: 0;
  margin: 0;
  cursor: pointer;
}

.chip span {
  display: inline-block;
  padding: 9px 14px;
  border: 1.5px solid var(--edge);
  border-radius: 999px;
  background: #100c09;
  font-size: 14px;
  font-weight: 600;
  transition: all 0.15s ease;
}

.chip:hover span {
  border-color: var(--edge-2);
}

.chip input:checked + span {
  border-color: var(--gem);
  background: rgba(155, 233, 223, 0.1);
  color: var(--gem-light);
}

.chip input:focus-visible + span {
  outline: 3px solid var(--gem);
  outline-offset: 2px;
}

.check {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  font-weight: 400 !important;
  color: var(--muted);
  cursor: pointer;
}

.check input {
  width: 20px;
  height: 20px;
  margin: 2px 0 0;
  flex-shrink: 0;
  accent-color: var(--gem-deep);
}

.hp {
  position: absolute !important;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.alert,
.notice {
  padding: 13px 16px;
  border-radius: 10px;
  margin-bottom: 8px;
  font-weight: 600;
  font-size: 15px;
}

.alert {
  background: rgba(232, 128, 106, 0.1);
  border: 1px solid rgba(232, 128, 106, 0.45);
  color: #ffd0c4;
}

.notice {
  background: rgba(159, 214, 138, 0.1);
  border: 1px solid rgba(159, 214, 138, 0.45);
  color: #d6f2c8;
  margin: 24px 0 0;
}

.alt-contact {
  margin: 18px 0 0;
  text-align: center;
  font-size: 14px;
  color: var(--muted);
}

.sent {
  text-align: center;
  padding: 24px 0;
}

.sent img {
  width: 64px;
  animation: hop 1.6s ease-in-out infinite;
}

.sent h2 {
  font-size: 30px;
  color: var(--ok);
}

.sent p {
  color: var(--muted);
}

@keyframes hop {
  0%, 100% { translate: 0 0; }
  50% { translate: 0 -10px; }
}

/* legal docs */

.doc {
  max-width: 780px;
  padding: 56px 0 96px;
}

.doc-head {
  border-bottom: 1px solid var(--edge);
  padding-bottom: 24px;
  margin-bottom: 20px;
}

.doc-head h1 {
  font-size: clamp(36px, 5vw, 52px);
  color: var(--bone);
}

.doc-date {
  color: var(--muted);
  font-size: 15px;
  margin-bottom: 8px;
}

.doc-lang {
  font-size: 15px;
  font-weight: 600;
}

.doc h3 {
  font-size: 23px;
  color: var(--bone);
  margin: 34px 0 10px;
}

.doc p,
.doc li {
  color: #e2d8c2;
  overflow-wrap: anywhere;
}

.doc ul {
  padding-left: 22px;
  margin: 0 0 1em;
}

.doc li {
  margin-bottom: 6px;
}

.doc li::marker {
  color: var(--gem);
}

.doc strong {
  color: var(--hero);
}

/* 404 */

.notfound {
  text-align: center;
  padding: 96px 0;
}

.notfound img {
  width: 72px;
  opacity: 0.85;
  animation: lost 3s ease-in-out infinite;
}

.notfound h1 {
  font-size: 42px;
  color: var(--bone);
  margin-top: 24px;
}

.notfound .lead {
  margin: 0 auto 28px;
}

@keyframes lost {
  0%, 100% { translate: 0 0; rotate: -6deg; }
  50% { translate: 0 14px; rotate: 6deg; }
}

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

.foot {
  border-top: 3px solid var(--edge);
  background: var(--deep);
  padding: 40px 0 28px;
  font-size: 15px;
}

.foot-row {
  display: flex;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
}

.foot-brand {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  max-width: 420px;
}

.foot-brand img {
  border-radius: 10px;
}

.foot-brand strong {
  font: 700 19px var(--serif);
  letter-spacing: 0.12em;
  color: var(--bone);
}

.foot-brand p {
  margin: 2px 0 6px;
  color: var(--muted);
}

.foot-studio {
  font-size: 14px;
}

.foot-links {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.foot-links a {
  color: var(--muted);
  text-decoration: none;
}

.foot-links a:hover {
  color: var(--bone);
}

.foot-copy {
  color: var(--dim);
  font-size: 13px;
  margin-top: 28px;
  margin-bottom: 0;
}

/* ---------------------------------------------------------------- admin */

.admin {
  padding: 32px 0 80px;
}

.narrow {
  max-width: 460px;
  margin: 64px auto;
}

.steps {
  padding-left: 20px;
  color: var(--muted);
}

.steps li {
  margin-bottom: 8px;
}

.admin-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin: 24px 0 18px;
}

.admin-head h1 {
  margin: 0;
}

.badge {
  display: inline-block;
  vertical-align: middle;
  font: 700 13px/1 var(--ui);
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--gem);
  color: var(--shaft);
  margin-left: 8px;
}

.tabs {
  display: flex;
  gap: 6px;
}

.tabs a {
  padding: 8px 14px;
  border-radius: 999px;
  text-decoration: none;
  color: var(--muted);
  border: 1px solid var(--edge);
  font-size: 14px;
  font-weight: 600;
}

.tabs a[aria-current="page"] {
  color: var(--bone);
  border-color: var(--edge-2);
  background: rgba(216, 206, 180, 0.08);
}

.inbox {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.inbox li {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--panel);
  border: 1px solid var(--edge);
  border-left: 4px solid transparent;
  border-radius: 12px;
  padding-right: 8px;
}

.inbox li.is-unread {
  border-left-color: var(--gem);
  background: var(--panel-2);
}

.inbox li > a {
  flex: 1;
  min-width: 0;
  display: grid;
  gap: 6px;
  padding: 14px 16px;
  color: var(--hero);
  text-decoration: none;
}

.inbox li > a:hover strong {
  color: var(--gem);
}

.inbox-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.inbox-top strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.is-unread .inbox-top strong::before {
  content: "● ";
  color: var(--gem);
}

.inbox-top time {
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
}

.inbox-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.tag {
  font-size: 12px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 6px;
  background: #100c09;
  border: 1px solid var(--edge);
  color: var(--muted);
}

.inbox-preview {
  color: var(--muted);
  font-size: 14px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.empty {
  text-align: center;
  color: var(--muted);
}

.pager {
  display: flex;
  gap: 6px;
  justify-content: center;
  margin-top: 24px;
}

.pager a {
  min-width: 36px;
  padding: 6px 10px;
  text-align: center;
  border-radius: 8px;
  border: 1px solid var(--edge);
  text-decoration: none;
  color: var(--muted);
}

.pager a[aria-current="page"] {
  color: var(--shaft);
  background: var(--bone);
  border-color: var(--bone);
}

.message-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--edge);
  padding-bottom: 16px;
  margin-bottom: 16px;
}

.message-head p {
  margin: 0;
}

.message-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: flex-start;
}

.meta {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 8px 16px;
  margin: 0 0 20px;
  font-size: 15px;
}

.meta dt {
  color: var(--muted);
}

.meta dd {
  margin: 0;
  overflow-wrap: anywhere;
}

.message-body {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  background: #100c09;
  border: 1px solid var(--edge);
  border-radius: 12px;
  padding: 20px;
  font-size: 16px;
  line-height: 1.7;
}

/* ---------------------------------------------------------------- responsive */

@media (max-width: 900px) {
  .hero {
    padding: 48px 0 72px;
  }

  .hero-grid {
    grid-template-columns: 1fr;
    gap: 36px;
  }

  .hero-copy {
    text-align: center;
  }

  .hero-text {
    margin-inline: auto;
  }

  .stores,
  .stats {
    justify-content: center;
  }

  .well {
    --h: 460px;
    --travel: 6.2s;
    margin: 0 auto;
  }

  .d2 { animation-delay: -1.55s; }
  .d3 { animation-delay: -3.1s; }
  .d4 { animation-delay: -4.65s; }
  .d5 { animation-delay: -0.775s; }
  .d6 { animation-delay: -3.875s; }
  .d7 { animation-delay: -2.325s; }

  .support-grid {
    grid-template-columns: 1fr;
  }

  .contact {
    position: static;
  }

  .cta {
    flex-direction: column;
    text-align: center;
    padding: 32px 24px;
  }
}

@media (max-width: 640px) {
  body {
    font-size: 16px;
  }

  .top-row {
    min-height: 58px;
  }

  .brand span {
    display: none;
  }

  .brand .brand-tag {
    display: inline;
  }

  .nav a {
    padding: 7px 9px;
    font-size: 14px;
  }

  .band {
    padding: 64px 0;
  }

  .row.two {
    grid-template-columns: 1fr;
  }

  .contact {
    padding: 22px;
  }

  .stratum {
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 22px 20px;
  }

  .stratum-depth {
    font-size: 20px;
  }

  .meta {
    grid-template-columns: 1fr;
    gap: 2px;
  }

  .meta dd {
    margin-bottom: 10px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }

  .drift {
    transform: translateY(calc(var(--h) * 0.7));
  }

  .d3 { transform: translateY(calc(var(--h) * 0.12)); }
  .d5 { transform: translateY(calc(var(--h) * 0.5)); }
  .d2,
  .d4,
  .d6,
  .d7,
  .motes {
    display: none;
  }
}
