/* Shared styles for newcomergames.com. Plain CSS, no build step.
   Look: red dithered fog (js/site.js), CRT scanlines, Pixelify Sans,
   dark cards with solid offset shadows, and Diglot's Hand buttons. */

:root {
  --bg: #0b0507;
  --panel: #140809;
  --text: #f2ecdf;
  --strong: #ffffff;
  --muted: #c4aca6;
  --red: #e23a2e;
  --red-dim: #6e1712;
  --blood: #2a0708;
  --link: #ff8a7a;
  --chips: #1466c2;
  --mult: #c2352b;
  --gold-btn: #a86c08;
  --ghost: #2c4a44;
  --maxw: 1120px;
  --readw: 760px;
  --font: "Pixelify Sans", ui-monospace, monospace;
  color-scheme: dark;
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: var(--font);
  font-size: 18px;
  line-height: 1.55;
  color: var(--text);
  background: var(--bg);
  overflow-x: hidden;
}

/* The fog canvas and scanlines are added by js/site.js. */
#fog { position: fixed; inset: 0; width: 100vw; height: 100vh; z-index: 0; }
.scan {
  position: fixed; inset: 0; pointer-events: none; z-index: 60;
  background: repeating-linear-gradient(to bottom, #0000 0 2px, #00000030 2px 3px), radial-gradient(ellipse at center, #0000 55%, #000b);
}
body > :not(#fog):not(.scan):not(dialog) { position: relative; z-index: 1; }

a { color: var(--link); text-underline-offset: 3px; }
a:hover { color: var(--strong); }
img { max-width: 100%; height: auto; }
h1, h2, h3 { color: var(--strong); line-height: 1.2; font-weight: 700; }

.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 16px; }
.wrap.read { max-width: var(--readw); }

/* Header */
.site-header .wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; padding-top: 16px; padding-bottom: 16px; }
.brand { display: flex; align-items: center; gap: 12px; color: var(--text); text-decoration: none; font-size: 20px; font-weight: 700; letter-spacing: 1px; white-space: nowrap; text-transform: uppercase; }
.brand img { width: 36px; height: 36px; image-rendering: pixelated; }
.brand:hover { color: var(--text); }
.site-nav { margin-left: auto; display: flex; flex-wrap: wrap; gap: 4px 18px; }
.site-nav a { color: var(--text); text-decoration: none; }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--red); }

main { flex: 1; padding: 24px 0 56px; }

/* Big extruded page title */
.title { text-align: center; padding: 6vh 0 5vh; }
.kicker { color: var(--red); letter-spacing: 4px; font-size: 14px; text-transform: uppercase; }
.title h1, .hero-title {
  margin: 8px 0 0; font-size: clamp(38px, 7vw, 80px); line-height: 1; letter-spacing: 2px; color: #fff;
  text-shadow: 3px 0 0 #000, -3px 0 0 #000, 0 3px 0 #000, 0 -3px 0 #000, 0 7px 0 var(--red-dim), 0 12px 0 var(--blood), 0 18px 24px #000;
}
.title p { color: var(--muted); max-width: 620px; margin: 18px auto 0; }

/* Panels and game cards: dark, black border, solid shadow offset down-right */
.panel, .game, .contact-box, .card {
  background: var(--panel);
  border: 3px solid #000;
  box-shadow: 0 0 0 3px var(--red-dim), 12px 14px 0 3px #000;
}
.panel, .card { padding: 22px 24px; }
.panel.media { padding: 0; aspect-ratio: 16 / 9; }

.games { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); gap: 40px 28px; padding-bottom: 40px; }
.game { display: flex; flex-direction: column; }
.game .art, .media { position: relative; aspect-ratio: 16 / 10; background: #000; overflow: hidden; }
.game .art { border-bottom: 3px solid #000; }
.game .art::after, .media::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: repeating-linear-gradient(to bottom, #0000 0 2px, #0000003a 2px 3px); }
.game .art img, .game .art canvas, .game .art video,
.media img, .media canvas, .media video { width: 100%; height: 100%; object-fit: cover; display: block; image-rendering: pixelated; }
.game .in { padding: 14px 18px 20px; display: flex; flex-direction: column; flex: 1; }
.game .sub, .sub { color: var(--red); font-size: 13px; letter-spacing: 2px; text-transform: uppercase; }
.game h2 { margin: 4px 0 6px; font-size: 30px; text-shadow: 3px 3px 0 #000; }
.game p { margin: 0 0 18px; color: var(--muted); flex: 1; }

/* Homepage "Hire us" banner */
.hire { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 28px; margin: 20px 0 40px; }
.hire > div:first-child { flex: 1 1 420px; }
.hire h2 { margin: 4px 0 6px; font-size: clamp(24px, 3.5vw, 32px); text-shadow: 3px 3px 0 #000; }
.hire p { margin: 0; color: var(--muted); }

.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr)); gap: 32px 24px; }
.grid-3 h3 { margin: 0 0 6px; font-size: 22px; }
.grid-3 p { margin: 0; color: var(--muted); }

.section-title { margin: 56px 0 24px; font-size: clamp(28px, 4vw, 40px); text-shadow: 0 5px 0 var(--red-dim), 0 9px 0 #000; }

/* Buttons copied from Diglot's Hand (src/ui/styles/controls.css). */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  border: 0; border-radius: 10px; padding: 0 20px; min-height: 50px;
  font: inherit; font-size: 20px; color: #fff; text-decoration: none; cursor: pointer;
  background: var(--ghost);
  --edge: color-mix(in srgb, #2c4a44, #000 35%);
  box-shadow: 0 5px var(--edge);
  transition: transform .08s ease-out, box-shadow .08s ease-out, filter .12s;
  -webkit-tap-highlight-color: transparent;
}
.btn:hover { color: #fff; }
/* Pressing: the face moves down 4px and the edge shrinks by 4px, so the bottom stays put. */
.btn:active { transform: translateY(4px); box-shadow: 0 1px var(--edge); }
.btn.play  { background: var(--chips);    --edge: color-mix(in srgb, var(--chips), #000 35%); }
.btn.disc  { background: var(--mult);     --edge: color-mix(in srgb, var(--mult), #000 35%); }
.btn.ghost { background: var(--ghost);    --edge: color-mix(in srgb, var(--ghost), #000 35%); }
.btn.gold  { background: var(--gold-btn); --edge: color-mix(in srgb, var(--gold-btn), #000 35%); }
@media (hover: hover) { .btn:hover { filter: brightness(1.2); } }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 5px; }

/* Long-form document pages (support, privacy) */
.doc h1 { font-size: clamp(30px, 5vw, 44px); margin: 0 0 10px; text-shadow: 3px 3px 0 #000, 0 7px 0 var(--red-dim); }
.doc h2 { font-size: 24px; margin: 40px 0 10px; text-shadow: 2px 2px 0 #000; }
.doc h3 { font-size: 20px; margin: 26px 0 6px; }
.doc p, .doc ul { margin: 0 0 14px; }
.doc ul { padding-left: 22px; }
.doc li { margin-bottom: 4px; }
.doc li::marker { color: var(--red); }
.doc .lede { font-size: 20px; color: var(--muted); margin-bottom: 28px; }
.doc .meta, .doc .note { color: var(--muted); font-size: 15px; }

.contact-box { margin: 28px 0 12px; padding: 20px 24px; }
.contact-box h2 { margin-top: 0; }
.contact-box .email { font-size: 20px; font-weight: 700; word-break: break-all; }

.faq dt { font-weight: 700; color: var(--strong); margin-top: 22px; }
.faq dd { margin: 4px 0 0; color: var(--text); }
.faq dd p { margin: 0 0 8px; }

/* Language switch: two small DH buttons */
.lang-switch { display: inline-flex; gap: 8px; margin-bottom: 28px; }
.lang-switch a {
  display: inline-flex; align-items: center; min-height: 38px; padding: 0 14px; border-radius: 8px;
  background: var(--ghost); color: #fff; text-decoration: none; font-size: 16px;
  box-shadow: 0 4px color-mix(in srgb, var(--ghost), #000 35%);
}
.lang-switch a[aria-current="true"] { background: var(--mult); box-shadow: 0 4px color-mix(in srgb, var(--mult), #000 35%); }

/* With JS on, show only the chosen language. Without JS, both stay visible. */
html.js [data-lang]:not(.is-active) { display: none; }

/* Trailer pop-up (js/trailer.js) */
dialog.trailer { padding: 0; border: 0; background: transparent; overflow: visible; max-width: none; max-height: none; }
dialog.trailer::backdrop { background: #000d; }
.trailer-box { border: 3px solid #000; box-shadow: 0 0 0 3px var(--red-dim), 12px 14px 0 3px #000; background: #000; }
.trailer-box video, .trailer-box iframe { display: block; border: 0; width: 100%; height: 100%; }
.trailer-box.tall { height: min(84vh, 1280px); aspect-ratio: 9 / 16; max-width: 92vw; }
.trailer-box.wide { width: min(960px, 92vw); aspect-ratio: 16 / 9; }
.trailer-close {
  position: absolute; top: -18px; right: -18px; z-index: 2; width: 44px; height: 44px; border: 0; border-radius: 10px;
  background: var(--mult); color: #fff; font: inherit; font-size: 30px; line-height: 1; cursor: pointer;
  box-shadow: 0 4px color-mix(in srgb, var(--mult), #000 35%);
}
@media (max-width: 520px) { .trailer-close { top: -54px; right: 0; } }

/* Floor for the little sprite guys (js/guys.js) */
.ground { height: 0; }

/* Footer */
.site-footer { border-top: 2px dashed var(--red-dim); margin-top: 30px; color: var(--muted); font-size: 15px; }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 8px 18px; align-items: center; justify-content: space-between; padding-top: 20px; padding-bottom: 30px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 16px; }
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--strong); }

@media (max-width: 520px) {
  body { font-size: 17px; }
  .brand span { display: none; }
  .contact-box { padding: 16px; }
  .contact-box .email { font-size: 17px; }
}
