/* Abyss Driller — foundation: fonts, tokens sampled from the game's art, base type, HUD components. */

@font-face {
  font-family: "Archivo";
  src: url("../fonts/archivo-latin-var.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Archivo";
  src: url("../fonts/archivo-latin-ext-var.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  color-scheme: dark;

  /* Water, by depth (sampled: key-art cavern, in-game light pool, abyss) */
  --surface: #001d3b;
  --cavern: #001935;
  --pool: #01282d;
  --frost: #0a2631;
  --abyss: #010407;
  --abyss-1: #04101a;
  --abyss-2: #071a26;

  /* Light sources */
  --crystal: #5fe3dc;      /* crystal highlight / HUD cyan */
  --crystal-dim: #0c99a1;  /* crystal body */
  --ore: #fbbc3a;          /* amber ore */
  --cream: #fcf6dc;        /* logo top colour — primary text */
  --text: #e9e4d2;
  --muted: #9fb0b2;
  --faint: #93a5a8;        /* raised from #5f7377: small print must still pass 4.5:1 */

  /* Machines */
  --sub: #ff6a1f;          /* CTA: brightened key-art submarine orange (#db4e01) */
  --sub-hover: #ff8a4a;
  --sub-ink: #170802;
  --beam: #c4141f;         /* spotlight */
  --brick: #6f2f2b;        /* in-game TO BASE / CONTINUE button */
  --schematic: #05193c;
  --schematic-line: #2f7fb8;
  --panel: #0d4456;        /* in-game Expedition Results panel */

  /* Studio (BaseMen brand) */
  --studio-red: #e52224;
  --studio-cream: #fffbef;

  --line: rgb(95 227 220 / 0.16);
  --line-strong: rgb(95 227 220 / 0.34);

  /* In-game HUD and panels (sampled from the 4K PC captures) */
  --hud-rule: #1d6670;     /* thin cyan rule around the depth readout */
  --info: #28c9f1;         /* HUD info cyan (results labels, "EARNED") */
  --info-hot: #00f0ff;     /* bright top rule on item cards */
  --value: #ffcf26;        /* amber value text ("+100 CR") */
  --hull: #9e4c42;         /* HULL bar segments */
  --energy: #387685;       /* ENERGY bar segments */
  --panel-0: #02242e;      /* panel fills, darkest to lightest */
  --panel-1: #032f3c;
  --panel-2: #053340;
  --panel-3: #104152;
  --blueprint: #01153a;    /* UPGRADE SCHEMATIC background */
  --blueprint-line: #72cfd3;
  --cone: #571e24;         /* spotlight cone over water */

  /* One family. The game's UI is a plain bold grotesque; the pixel look lives in the logo and art. */
  --font-body: "Archivo", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-hud: var(--font-body);

  --gutter: clamp(16px, 4vw, 56px);
  --max: 1360px;
  --header-h: 64px;
  --ease-water: cubic-bezier(0.22, 0.61, 0.24, 1);
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  background: var(--abyss);
  scroll-padding-top: calc(var(--header-h) + 16px);
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--surface);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}

img, video, svg, picture { display: block; max-width: 100%; }
img, video { height: auto; }
a { color: inherit; text-underline-offset: 0.22em; text-decoration-thickness: 1px; }
button { font: inherit; color: inherit; }
p { margin: 0; text-wrap: pretty; }
h1, h2, h3, h4 { margin: 0; font-weight: 800; line-height: 1.02; text-wrap: balance; }
::selection { background: var(--sub); color: var(--sub-ink); }

:focus-visible { outline: 2px solid var(--crystal); outline-offset: 4px; }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip {
  position: fixed; left: 12px; top: 12px; z-index: 100;
  transform: translateY(-160%);
  background: var(--sub); color: var(--sub-ink);
  padding: 12px 16px; font-weight: 700; text-decoration: none;
}
.skip:focus { transform: none; }

.wrap { width: min(var(--max), 100% - 2 * var(--gutter)); margin-inline: auto; }

/* ---------- Type ---------- */

.display {
  font-family: var(--font-body);
  font-stretch: 125%;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: -0.012em;
  line-height: 0.94;
  color: var(--cream);
}
.display--xl { font-size: clamp(44px, 7.4vw, 112px); }
.display--l  { font-size: clamp(38px, 5.6vw, 84px); }
.display--m  { font-size: clamp(30px, 3.8vw, 56px); }

.lede { font-size: clamp(18px, 1.5vw, 21px); line-height: 1.55; color: var(--text); max-width: 34em; }
.body-copy { color: var(--muted); max-width: 36em; }
.body-copy strong { color: var(--text); font-weight: 600; }

/* HUD label: the game's own readout language (bold grotesque caps, tabular figures) */
.hud {
  font-family: var(--font-hud);
  font-stretch: 100%;
  font-weight: 700;
  font-size: 13px;
  line-height: 1.3;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  font-variant-numeric: tabular-nums;
  color: var(--info);
}
.hud--muted { color: var(--faint); }
.hud--value { color: var(--value); }
.hud b { font-weight: 700; color: var(--cream); }

/* ---------- Buttons ---------- */

.btn {
  --btn-bg: var(--sub);
  --btn-ink: var(--sub-ink);
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 14px;
  min-height: 54px;
  padding: 0 22px 0 18px;
  background: var(--btn-bg);
  color: var(--btn-ink);
  font-family: var(--font-body);
  font-stretch: 112%;
  font-weight: 800;
  font-size: 15px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-decoration: none;
  border: 0;
  cursor: pointer;
  /* cut corner — echoes the game's HUD panels, not a pill */
  clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 12px, 100% 100%, 12px 100%, 0 calc(100% - 12px));
  transition: background-color 0.2s var(--ease-water), transform 0.2s var(--ease-water);
}
.btn:hover { --btn-bg: var(--sub-hover); }
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline-offset: 5px; }
.btn__icon { width: 22px; height: 22px; flex: none; }
.btn__meta {
  font-family: var(--font-hud);
  font-stretch: 100%;
  font-weight: 400;
  font-size: 12px;
  letter-spacing: 0.04em;
  opacity: 0.72;
  padding-left: 12px;
  border-left: 1px solid rgb(23 8 2 / 0.28);
}

.btn--ghost {
  --btn-bg: transparent;
  --btn-ink: var(--cream);
  box-shadow: inset 0 0 0 1px var(--line-strong);
  clip-path: none;
}
.btn--ghost:hover { --btn-bg: rgb(95 227 220 / 0.08); }

.btn--small { min-height: 40px; padding: 0 14px 0 12px; font-size: 13px; gap: 10px; }
.btn--small .btn__icon { width: 18px; height: 18px; }

/* In-game brick button (TO BASE / CONTINUE) */
.btn--brick {
  --btn-bg: var(--brick);
  --btn-ink: var(--cream);
  font-family: var(--font-hud);
  font-stretch: 100%;
  font-weight: 400;
  letter-spacing: 0.08em;
  clip-path: none;
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.12);
}
.btn--brick:hover { --btn-bg: #85392f; }

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