/* Golden Harbour Games — "Harbour Chart".
   Navy water, brass instruments, coordinates and numbered sections, as on a nautical chart.
   Type: Unbounded (display), Golos Text (text), JetBrains Mono (labels); all three have Cyrillic. */
:root {
  --ink: #0b1626;        /* Night Water: the page */
  --ink-2: #13243b;      /* Deep Channel: cards */
  --line: #22385a;
  --line-2: #2b4166;     /* chart rings, tag borders */
  --grid: rgba(23, 41, 65, 0.5);
  --text: #f3eee2;       /* Sea Foam */
  --text-2: #c9d3df;
  --muted: #9fb0c4;
  --gold: #e8b04b;       /* Harbour Brass: the mark and every action */
  --gold-hi: #f6cd7a;
  --gold-ink: #8a5a0b;   /* brass for small text on foam */
  --red: #e0533d;        /* Buoy Red: "new" */
  --paper: #f3eee2;
  --paper-text: #3a4452;
  /* Side padding of every full-width band. Past 1440px it grows instead, so the content stops at
     --wrap and sits in the middle while the backgrounds (grid, strip, paper) still run edge to edge.
     Without the second term a 2560px screen spread the page across 2400px. */
  --wrap: 1280px;
  --pad: max(clamp(20px, 5.5vw, 80px), calc((100% - var(--wrap)) / 2));
  --display: Unbounded, 'Arial Black', sans-serif;
  --body: 'Golos Text', system-ui, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, Consolas, monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--ink);
  color: var(--text);
  font: 400 17px/1.6 var(--body);
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
a { color: var(--gold); }
a:hover { color: var(--gold-hi); }
h1, h2, h3 { font-family: var(--display); font-weight: 700; line-height: 1.08; margin: 0; letter-spacing: -0.01em; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

/* the chart grid behind the hero and contact */
.chart {
  background-color: var(--ink);
  background-image: linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 80px 80px;
}

/* mono labels: "01 / GAMES", coordinates, genres */
.kicker, .kind, .coord, .coords, .strip, .facts, .langs, figcaption em {
  font-family: var(--mono); text-transform: uppercase; letter-spacing: 0.14em;
}
.kicker { margin: 0 0 16px; font-size: 13px; color: var(--gold); letter-spacing: 0.2em; }

/* buttons */
.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 0 26px; border-radius: 999px;
  background: var(--gold); color: var(--ink);
  font: 600 16px/1.2 var(--body); text-decoration: none;
  border: 1.5px solid var(--gold);
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.button:hover { background: var(--gold-hi); border-color: var(--gold-hi); color: var(--ink); }
.button.ghost { background: transparent; color: var(--text); border-color: var(--text); }
.button.ghost:hover { border-color: var(--gold-hi); color: var(--gold-hi); }

/* header */
.top {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  min-height: 88px; padding: 12px var(--pad);
  border-bottom: 1px solid #1e3150;
}
.brand { display: flex; align-items: center; gap: 12px; color: var(--text); text-decoration: none; }
.brand:hover { color: var(--text); }
.wordmark { display: flex; flex-direction: column; line-height: 1.15; }
.wordmark b { font: 700 16px var(--display); letter-spacing: 0.03em; text-transform: uppercase; }
.wordmark small { font: 500 10.5px var(--mono); letter-spacing: 0.5em; color: var(--gold); text-transform: uppercase; }
.top-right { display: flex; align-items: center; gap: clamp(16px, 3vw, 40px); }
.top nav { display: flex; gap: clamp(16px, 2.6vw, 36px); }
.top nav a { color: var(--text); text-decoration: none; font-weight: 500; font-size: 16px; }
.top nav a:hover { color: var(--gold-hi); }

/* EN | RU: the current language is the filled one */
.langs { display: flex; border: 1px solid var(--line-2); border-radius: 999px; padding: 4px; }
.langs a {
  display: grid; place-items: center; min-width: 44px; height: 36px; padding: 0 8px;
  border-radius: 999px; color: var(--muted); text-decoration: none; font-size: 13px; letter-spacing: 0.06em;
}
.langs a:hover { color: var(--text); }
.langs a[aria-current] { background: var(--gold); color: var(--ink); font-weight: 500; }

/* "this page is in your language": offered, never forced */
.hint {
  position: fixed; left: 50%; bottom: 16px; z-index: 10; transform: translateX(-50%);
  display: flex; align-items: center; gap: 14px;
  width: max-content; max-width: calc(100% - 24px);
  padding: 10px 10px 10px 18px; border-radius: 999px;
  background: var(--ink-2); border: 1px solid var(--line-2);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4); font-size: 15px;
}
.hint[hidden] { display: none; }
.hint a { font-weight: 600; white-space: nowrap; }
.hint button {
  width: 36px; height: 36px; border: 0; border-radius: 50%;
  background: transparent; color: var(--muted); font-size: 22px; line-height: 1; cursor: pointer;
}
.hint button:hover { background: rgba(255, 255, 255, 0.08); color: var(--text); }

/* hero */
.hero {
  display: flex; align-items: center; justify-content: space-between; gap: clamp(32px, 5vw, 72px);
  padding: clamp(56px, 8vw, 110px) var(--pad) clamp(56px, 7vw, 96px);
}
.hero-text { max-width: 700px; }
.hero h1 { font-size: clamp(40px, 6vw, 84px); font-weight: 800; line-height: 1.02; letter-spacing: -0.02em; text-wrap: balance; }
.hero h1 span, .card-og h1 span { color: var(--gold); }
.lede { margin: 28px 0 36px; font-size: clamp(17px, 1.6vw, 21px); line-height: 1.5; color: var(--text-2); max-width: 36em; }
.actions { display: flex; flex-wrap: wrap; gap: 14px; }
.hero-mark { position: relative; flex: 0 0 auto; width: clamp(260px, 36vw, 520px); aspect-ratio: 1; display: grid; place-items: center; }
.hero-mark .rings { position: absolute; inset: 0; width: 100%; height: 100%; stroke: var(--line-2); }
.hero-mark img { position: relative; width: 73%; height: auto; }
.coord { position: absolute; font-size: 11.5px; line-height: 1.6; color: var(--muted); letter-spacing: 0.1em; }
.coord.north { left: 0; top: 6%; }
.coord.south { right: 0; bottom: 6%; text-align: right; }

/* strip under the hero */
.strip {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 20px;
  padding: 22px var(--pad); background: var(--gold); color: var(--ink);
  font-size: 13.5px; font-weight: 500;
}
.strip i { font-style: normal; font-size: 10px; }

/* sections */
.section { padding: clamp(72px, 9vw, 120px) var(--pad); }
.section h2 { font-size: clamp(32px, 4vw, 56px); }
.section-head {
  display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 24px 64px;
  margin-bottom: 48px;
}
.section-head > p { margin: 0; max-width: 26em; font-size: 18px; color: var(--muted); }

/* games */
.card {
  display: flex; flex-direction: column; overflow: hidden;
  background: var(--ink-2); border: 1px solid var(--line); border-radius: 24px;
  transition: border-color 0.15s, transform 0.15s;
}
.card:hover { border-color: var(--line-2); transform: translateY(-2px); }
.cover { display: block; aspect-ratio: 630 / 500; background: #0e1c30; }
.cover img { width: 100%; height: 100%; object-fit: cover; }
.card-body { display: flex; flex-direction: column; gap: 12px; flex: 1; padding: clamp(22px, 2.4vw, 32px); }
.kind { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 0; font-size: 12px; color: var(--gold); }
.badge {
  display: inline-flex; align-items: center; height: 26px; padding: 0 10px; border-radius: 6px;
  background: var(--red); color: var(--ink); font-weight: 500; letter-spacing: 0.1em;
}
.card h3 { font-size: clamp(22px, 2vw, 26px); }
.aka { margin: -6px 0 0; font: 400 14px var(--mono); color: var(--muted); }
.card .text { margin: 0; color: var(--text-2); font-size: 16px; line-height: 1.55; }
.facts { display: flex; flex-wrap: wrap; gap: 6px 22px; margin: 4px 0 0; font-size: 11.5px; }
.facts div { display: flex; gap: 8px; }
.facts dt { color: var(--muted); }
.facts dt::after { content: ':'; }
.facts dd { margin: 0; color: var(--text-2); }
.play {
  align-self: flex-start;
  display: inline-flex; align-items: center; gap: 8px; min-height: 46px; padding: 0 20px;
  border: 1.5px solid var(--gold); border-radius: 999px;
  color: var(--gold); font-weight: 600; font-size: 15px; text-decoration: none;
}
.play:hover { background: var(--gold); color: var(--ink); }
.play.button { color: var(--ink); }

.featured { flex-direction: row; margin-bottom: 32px; }
.featured .cover { flex: 0 0 55%; aspect-ratio: auto; min-height: 100%; }
.featured .card-body { padding: clamp(28px, 3.4vw, 48px); gap: 16px; }
.featured h3 { font-size: clamp(28px, 3vw, 40px); }
.featured .text { font-size: 18px; }

.grid { display: grid; gap: 32px; grid-template-columns: repeat(3, minmax(0, 1fr)); }

/* the buttons at the foot of a card: play here, or go to itch */
.card-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 22px; margin: auto 0 0; padding-top: 8px; }
.itch-link { color: var(--muted); font-weight: 500; font-size: 15px; text-decoration: none; white-space: nowrap; }
.itch-link:hover { color: var(--gold-hi); text-decoration: underline; text-underline-offset: 4px; }

/* a game's own page */
.game-page { padding-top: clamp(28px, 4vw, 48px); padding-bottom: clamp(48px, 6vw, 80px); }
.crumbs { margin: 0 0 28px; font-size: 15px; }
.crumbs a { color: var(--text-2); text-decoration: none; }
.crumbs a:hover { color: var(--gold-hi); }
.game-head { display: flex; flex-direction: column; gap: 12px; margin-bottom: 28px; }
.game-head h1 { font-size: clamp(32px, 4.4vw, 60px); }
.game-head .aka { margin: 0; font-size: 15px; }

/* the frame the game plays in: the cover and a Play button until it is pressed. Wide games take
   the column; tall ones (AeroFire) are held to the screen's height and centred. */
.stage {
  position: relative; overflow: hidden; margin: 0 auto;
  width: min(100%, calc(78vh * var(--fw) / var(--fh)));
  aspect-ratio: var(--fw) / var(--fh);
  background: #050b14; border: 1px solid var(--line); border-radius: 20px;
  display: grid; place-items: center;
}
.stage-cover { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0.38; }
.stage-start {
  position: relative; display: inline-flex; align-items: center; gap: 12px;
  min-height: 64px; padding: 0 36px; border: 0; border-radius: 999px; cursor: pointer;
  background: var(--gold); color: var(--ink); font: 700 20px var(--display); letter-spacing: 0.02em;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
}
.stage-start:hover { background: var(--gold-hi); }
.stage-frame { position: absolute; inset: 0; display: none; }
.stage-frame iframe { width: 100%; height: 100%; border: 0; display: block; background: #000; }
.stage.is-playing .stage-frame { display: block; }
.stage.is-playing .stage-start, .stage.is-playing .stage-cover { display: none; }
.stage:fullscreen { width: 100%; height: 100%; max-width: none; aspect-ratio: auto; border: 0; border-radius: 0; }
/* a phone: the game becomes a layer over the whole screen, with a way back */
.stage.is-layer {
  position: fixed; inset: 0; z-index: 50; width: 100vw; height: 100vh; height: 100dvh;
  aspect-ratio: auto; border: 0; border-radius: 0;
}
.stage-close {
  position: absolute; top: max(10px, env(safe-area-inset-top)); left: 10px; z-index: 2;
  width: 44px; height: 44px; border: 1px solid var(--line-2); border-radius: 50%;
  background: rgba(11, 22, 38, 0.85); color: var(--text); font-size: 26px; line-height: 1; cursor: pointer;
}
.stage-close[hidden] { display: none; }
.no-scroll, .no-scroll body { overflow: hidden; }

.stage-bar {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px;
  margin: 16px auto 0; width: min(100%, calc(78vh * var(--fw, 16) / var(--fh, 9)));
}
.stage.portrait + .stage-bar { --fw: 540; --fh: 960; }
.stage-note { margin: 0; color: var(--muted); font-size: 15px; }
.stage-links { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 22px; margin: 0; }
.stage-full {
  display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 16px;
  border: 1.5px solid var(--line-2); border-radius: 999px; background: transparent; color: var(--text);
  font: 500 15px var(--body); cursor: pointer;
}
.stage-full:hover { border-color: var(--gold-hi); color: var(--gold-hi); }
.stage-full[hidden] { display: none; }
.game-info { max-width: 46em; margin-top: 36px; display: flex; flex-direction: column; gap: 16px; }
.game-info .text { margin: 0; font-size: 19px; line-height: 1.55; color: var(--text-2); }

.more-games { padding-top: clamp(48px, 6vw, 80px); border-top: 1px solid #1e3150; }
.more-grid { display: grid; gap: 24px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.more-card {
  display: flex; flex-direction: column; gap: 10px; padding-bottom: 18px; overflow: hidden;
  background: var(--ink-2); border: 1px solid var(--line); border-radius: 20px;
  color: var(--text); text-decoration: none;
}
.more-card:hover { border-color: var(--line-2); color: var(--text); }
.more-card img { aspect-ratio: 630 / 500; object-fit: cover; width: 100%; }
.more-title { padding: 6px 20px 0; font: 700 18px var(--display); }
.more-go { padding: 0 20px; color: var(--gold); font-weight: 600; font-size: 15px; }

/* about: a paper section */
.about { background: var(--paper); color: var(--ink); }
.about .kicker { color: var(--gold-ink); }
.about .section-head { align-items: flex-start; }
.about-text { max-width: 36em; }
.about-text p { margin: 0 0 14px; font-size: 18px; color: var(--paper-text); }
.bridges-figure { margin: 0; padding: clamp(20px, 3vw, 40px); border: 1.5px solid var(--ink); border-radius: 24px; }
.bridges { display: block; width: 100%; height: auto; color: var(--ink); }
.bridges .water { stroke: #b8822a; }
.bridges-figure figcaption {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 58px;
  margin-top: 20px; font: 500 13px var(--mono); letter-spacing: 0.08em; text-transform: uppercase;
}
.bridges-figure figcaption span { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 16px; }
figcaption em { font-style: normal; color: #56606e; letter-spacing: 0.06em; }

/* contact */
.contact h2 { max-width: 16em; }
.contact-text { margin: 20px 0 36px; font-size: 19px; color: var(--text-2); max-width: 34em; }
.email {
  font: 600 clamp(14px, 3.7vw, 36px) var(--display); color: var(--gold);
  text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 10px;
  overflow-wrap: anywhere;
}

/* footer */
footer {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 32px;
  padding: 28px var(--pad) 36px; border-top: 1px solid #1e3150;
  font-size: 14px; color: var(--muted);
}
footer p { margin: 0; }
.foot-brand { display: flex; align-items: center; gap: 12px; }
.coords { font-size: 11.5px; letter-spacing: 0.1em; }

/* 404 */
.lost-body { max-width: 720px; margin: 0 auto; padding: 48px 20px 80px; }
.lost-langs { display: grid; gap: 56px; margin-top: 72px; }
.lost h1 { font-size: clamp(32px, 6vw, 52px); font-weight: 800; }
.lost p { color: var(--text-2); font-size: 18px; margin: 12px 0 24px; }

/* tablets */
@media (max-width: 1080px) {
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .featured { flex-direction: column; }
  .featured .cover { flex: none; aspect-ratio: 630 / 500; }
}
@media (max-width: 860px) {
  .more-grid { grid-template-columns: 1fr; }
  .more-card { flex-direction: row; align-items: center; gap: 16px; padding: 0; }
  .more-card img { width: 120px; flex: none; }
  .more-title { padding: 0; font-size: 16px; }
  .more-go { display: none; }
  .hero { flex-direction: column-reverse; align-items: flex-start; }
  .hero-mark { align-self: center; width: min(78vw, 360px); }
  .top nav { display: none; }
  .bridges-figure figcaption { grid-template-columns: 1fr; }
}
/* phones */
@media (max-width: 640px) {
  body { font-size: 16px; }
  .grid { grid-template-columns: 1fr; gap: 24px; }
  .actions .button { width: 100%; }
  .strip { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 16px; font-size: 11.5px; letter-spacing: 0.1em; }
  .strip i { display: none; }
  .top { min-height: 72px; }
  .wordmark b { font-size: 13.5px; }
  .wordmark small { display: none; }
  .section-head { margin-bottom: 32px; }
  footer { flex-direction: column; align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .card, .button { transition: none; }
  .card:hover { transform: none; }
}
