/* ExcellentGameDev — site styles */

/* ---------- Fonts (self-hosted, no requests to Google) ---------- */
@font-face { font-family: "Inter"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/inter-400.woff") format("woff"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 500; font-display: swap; src: url("../fonts/inter-500.woff") format("woff"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 600; font-display: swap; src: url("../fonts/inter-600.woff") format("woff"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 700; font-display: swap; src: url("../fonts/inter-700.woff") format("woff"); }
/* Rubik: put Rubik-VariableFont_wght.ttf into /fonts (see fonts/README.txt). Until then headings fall back to Inter. */
@font-face { font-family: "Rubik"; font-style: normal; font-weight: 300 900; font-display: swap; src: url("../fonts/Rubik-VariableFont_wght.ttf") format("truetype"); }

/* ---------- Tokens ---------- */
:root {
  --bg: #0B1A20;
  --bg-alt: #0E2129;
  --line: #1E3A45;
  --line-strong: #3A5A66;
  --dash: #2C4D59;
  --text: #F1E7D6;
  --text-2: #C9D6DA;
  --text-3: #A9BEC5;
  --text-4: #7F98A1;
  --accent: #5BB8D6;
  --accent-hover: #8FD2E8;
  --brand: #013447;
  --brand-dark: #00202C;
  --brand-rim: #0A5470;
  --font-head: "Rubik", "Inter", system-ui, sans-serif;
  --font-body: "Inter", system-ui, sans-serif;
  --container: 1200px;
  --gap: 24px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--font-body); font-size: 17px; line-height: 1.6; -webkit-font-smoothing: antialiased; }
img, svg { display: block; max-width: 100%; }
a { color: var(--accent); }
a:hover { color: var(--accent-hover); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
h1, h2, h3 { font-family: var(--font-head); letter-spacing: -0.02em; }

.egd-skip { position: absolute; left: -9999px; top: 8px; background: var(--accent); color: var(--bg); padding: 10px 16px; border-radius: 6px; font-weight: 700; z-index: 10; }
.egd-skip:focus { left: 8px; }

.egd-container { max-width: var(--container); margin: 0 auto; padding-inline: 32px; }
@media (max-width: 480px) { .egd-container { padding-inline: 20px; } }

/* ---------- Header ---------- */
.egd-header { border-bottom: 1px solid var(--line); }
.egd-header__inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 16px; padding-block: 16px; }
.egd-brand { display: flex; align-items: center; gap: 14px; min-height: 44px; color: var(--text); text-decoration: none; }
.egd-brand:hover { color: var(--text); }
.egd-brand__name { font-family: var(--font-head); font-weight: 700; font-size: 21px; letter-spacing: -0.01em; }
.egd-brand__name span { color: var(--accent); }
.egd-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 28px; font-size: 15px; font-weight: 500; }
.egd-nav a { color: var(--text-2); text-decoration: none; padding: 10px 0; }
.egd-nav a:hover { color: var(--text); }
.egd-nav .egd-btn { padding: 0 18px; color: var(--text); }

/* ---------- Buttons ---------- */
.egd-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 24px; border-radius: 6px; font-weight: 700; font-size: 16px; text-decoration: none; border: 1px solid transparent; }
.egd-btn--primary { background: var(--accent); color: var(--bg); }
.egd-btn--primary:hover { background: var(--accent-hover); color: var(--bg); }
.egd-btn--ghost { border-color: var(--line-strong); color: var(--text); font-weight: 600; }
.egd-btn--ghost:hover { border-color: var(--accent); color: var(--text); }
.egd-btn--sm { min-height: 44px; }

/* ---------- Hero ---------- */
.egd-hero { display: flex; flex-wrap: wrap; align-items: center; gap: 56px; padding-block: 96px 104px; }
.egd-hero__text { flex: 1 1 520px; min-width: 0; }
.egd-eyebrow { margin: 0 0 20px; font-size: 14px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent); }
.egd-hero h1 { margin: 0; font-weight: 800; font-size: clamp(40px, 6vw, 76px); line-height: 1.04; }
.egd-hero__lead { margin: 28px 0 0; max-width: 560px; font-size: 19px; color: var(--text-2); }
.egd-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 36px; }
.egd-hero__visual { flex: 0 1 420px; min-width: 0; display: flex; justify-content: center; margin-inline: auto; }
.egd-hero__panel { width: 100%; max-width: 420px; aspect-ratio: 1 / 1; display: flex; align-items: center; justify-content: center; border: 1px solid var(--line); border-radius: 10px; background-color: var(--bg-alt); background-image: linear-gradient(#132B35 1px, transparent 1px), linear-gradient(90deg, #132B35 1px, transparent 1px); background-size: 42px 42px; background-position: -1px -1px; }
.egd-hero__panel svg { width: 84%; height: auto; }

/* ---------- Sections ---------- */
.egd-section { border-top: 1px solid var(--line); padding-block: 88px 96px; }
.egd-section--alt { background: var(--bg-alt); }
.egd-section__head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px 48px; }
.egd-section__head h2 { margin: 0; font-weight: 800; font-size: clamp(36px, 4.5vw, 48px); line-height: 1.1; }
.egd-section__head p { margin: 8px 0 0; max-width: 440px; color: var(--text-3); }

/* ---------- Carousel ----------
   Desktop: 3 games / 2 software in view. More items -> arrows appear (js/carousel.js).
   Tablet/phone: fewer in view, swipe + arrows. */
.egd-carousel__nav { display: flex; gap: 10px; }
.egd-carousel__nav[hidden] { display: none; }
.egd-carousel__btn { width: 48px; height: 48px; display: flex; align-items: center; justify-content: center; border: 1px solid var(--line-strong); border-radius: 50%; background: transparent; color: var(--text); cursor: pointer; }
.egd-carousel__btn:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); }
.egd-carousel__btn:disabled { opacity: 0.35; cursor: default; }
.egd-track { display: flex; gap: var(--gap); margin-top: 44px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-x: contain; padding-bottom: 2px; }
.egd-track::-webkit-scrollbar { display: none; }
.egd-slot { display: flex; min-width: 0; scroll-snap-align: start; }
.egd-slot > * { flex: 1; min-width: 0; }
.egd-track--games .egd-slot { flex: 0 0 calc((100% - 2 * var(--gap)) / 3); min-height: 440px; }
.egd-track--software .egd-slot { flex: 0 0 calc((100% - var(--gap)) / 2); min-height: 280px; }
@media (max-width: 1071px) { .egd-track--games .egd-slot { flex-basis: calc((100% - var(--gap)) / 2); } }
@media (max-width: 967px) { .egd-track--software .egd-slot { flex-basis: 86%; } }
@media (max-width: 727px) { .egd-track--games .egd-slot { flex-basis: 86%; } }

/* Empty slot placeholder — replace with a widget before going live */
.egd-slot__empty { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 24px; border: 2px dashed var(--dash); border-radius: 10px; color: var(--text-4); text-align: center; font-size: 14px; }
.egd-slot__empty strong { font-family: var(--font-head); font-size: 18px; color: var(--text-3); }

/* Hidden project card */
.egd-hidden { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; padding: 32px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); text-align: center; }
.egd-section:not(.egd-section--alt) .egd-hidden { background: var(--bg-alt); }
.egd-hidden__key { width: 80px; height: 80px; display: flex; align-items: center; justify-content: center; border-radius: 12px; background: var(--brand); box-shadow: 0 8px 0 var(--brand-dark), inset 0 0 0 2px var(--brand-rim); font-family: var(--font-head); font-weight: 800; font-size: 44px; color: var(--text); }
.egd-hidden h3 { margin: 8px 0 0; font-weight: 800; font-size: 25px; line-height: 1.2; }
.egd-hidden p { margin: 0; max-width: 270px; font-size: 15px; color: var(--text-3); }

/* ---------- Status badges (used inside widgets) ---------- */
.egd-badges { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.egd-badge { display: inline-flex; align-items: center; gap: 8px; padding: 5px 12px 5px 10px; border: 1px solid; border-radius: 999px; font: 700 12px/1.4 var(--font-body); letter-spacing: 0.06em; text-transform: uppercase; white-space: nowrap; }
.egd-badge::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.egd-badge--released { color: #6FD69A; background: #0F2E24; border-color: #2E6B4E; }
.egd-badge--beta { color: #B39BFF; background: #221C3A; border-color: #4E3F86; }
.egd-badge--coming-soon { color: #5BB8D6; background: #0F2A35; border-color: #23596B; }
.egd-badge--in-development { color: #F2B84B; background: #2E2412; border-color: #6B5222; }

/* ---------- About ---------- */
.egd-about { display: flex; flex-wrap: wrap; gap: 48px 72px; align-items: flex-start; }
.egd-about__text { flex: 1 1 480px; min-width: 0; }
.egd-about__text h2 { margin: 0; font-weight: 800; font-size: clamp(36px, 4.5vw, 48px); line-height: 1.1; }
.egd-about__text p { margin: 16px 0 0; max-width: 560px; color: var(--text-2); }
.egd-about__text h2 + p { margin-top: 24px; }
.egd-facts { flex: 1 1 360px; min-width: 0; margin: 0; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); }
.egd-facts div { display: flex; justify-content: space-between; gap: 16px; padding: 18px 24px; border-bottom: 1px solid var(--line); }
.egd-facts div:last-child { border-bottom: 0; }
.egd-facts dt { color: var(--text-4); }
.egd-facts dd { margin: 0; font-weight: 600; text-align: right; }

/* ---------- Contact ---------- */
.egd-contact { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px 48px; }
.egd-contact h2 { margin: 0; font-weight: 800; font-size: clamp(30px, 4vw, 44px); line-height: 1.15; }
.egd-contact p { margin: 10px 0 0; color: var(--text-3); }

/* ---------- Footer ---------- */
.egd-footer { border-top: 1px solid var(--line); }
.egd-footer__inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px; padding-block: 36px 44px; }
.egd-footer__brand { display: flex; align-items: center; gap: 14px; font-size: 14px; color: var(--text-4); }
.egd-footer nav { display: flex; flex-wrap: wrap; gap: 4px 24px; font-size: 14px; }
.egd-footer nav a { color: var(--text-2); text-decoration: none; padding: 10px 0; }
.egd-footer nav a[aria-current="page"] { color: var(--text); font-weight: 600; }

/* ---------- Legal pages ---------- */
.egd-legal { max-width: 760px; margin: 0 auto; padding: 80px 32px 96px; }
.egd-legal h1 { margin: 0; font-weight: 800; font-size: clamp(36px, 5vw, 56px); line-height: 1.1; hyphens: auto; }
.egd-legal h2 { margin: 48px 0 12px; font-weight: 700; font-size: 24px; letter-spacing: -0.01em; }
.egd-legal p { margin: 0 0 12px; }
.egd-legal .egd-muted { color: var(--text-3); }
.egd-legal .egd-note { font-size: 15px; color: var(--text-4); }
.egd-legal .egd-box { margin: 12px 0; padding: 20px 24px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg-alt); }

/* ---------- 404 ---------- */
.egd-404 { min-height: 70vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 20px; padding: 80px 32px; text-align: center; }
.egd-404__keys { display: flex; gap: 14px; }
.egd-404__keys span { width: 84px; height: 84px; display: flex; align-items: center; justify-content: center; border-radius: 12px; background: var(--text); box-shadow: 0 8px 0 #B9A98F; color: #15120F; font-family: var(--font-head); font-weight: 800; font-size: 44px; }
.egd-404__keys span:nth-child(2) { background: var(--brand); box-shadow: 0 8px 0 var(--brand-dark), inset 0 0 0 2px var(--brand-rim); color: var(--text); }
.egd-404 h1 { margin: 28px 0 0; font-weight: 800; font-size: clamp(32px, 4vw, 48px); line-height: 1.1; }
.egd-404 p { margin: 0; max-width: 420px; color: var(--text-3); }
