/* Gearforge Studios: one stylesheet for the studio and both game pages.
   The fonts are served from this site (assets/fonts, SIL Open Font License),
   so no visitor's browser asks a third party for anything. */

@font-face { font-family: "Cinzel"; font-weight: 700; font-style: normal; font-display: swap; src: url("fonts/cinzel-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-weight: 400; font-style: normal; font-display: swap; src: url("fonts/ibm-plex-sans-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-weight: 400; font-style: italic; font-display: swap; src: url("fonts/ibm-plex-sans-latin-400-italic.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-weight: 500; font-style: normal; font-display: swap; src: url("fonts/ibm-plex-sans-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-weight: 600; font-style: normal; font-display: swap; src: url("fonts/ibm-plex-sans-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-weight: 400; font-style: normal; font-display: swap; src: url("fonts/ibm-plex-mono-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-weight: 500; font-style: normal; font-display: swap; src: url("fonts/ibm-plex-mono-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "JetBrains Mono"; font-weight: 400; font-style: normal; font-display: swap; src: url("fonts/jetbrains-mono-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "JetBrains Mono"; font-weight: 700; font-style: normal; font-display: swap; src: url("fonts/jetbrains-mono-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "JetBrains Mono"; font-weight: 800; font-style: normal; font-display: swap; src: url("fonts/jetbrains-mono-latin-800-normal.woff2") format("woff2"); }

:root {
  --ground: #0e0d0b;
  --ground-deep: #0a0908;
  --raised: #17150f;
  --well: #120f0a;
  --line: #2c271d;
  --line-strong: #6b5a35;
  --text: #ebe3cf;
  --text-soft: #cfc5ad;
  --muted: #b3a88f;
  --subtle: #a39a84;
  --accent: #d4a84a;
  --accent-light: #e6bf66;
  --accent-hover: #f3d58f;
  --on-accent: #1a1306;
  --display: "Cinzel", Georgia, serif;
  --body: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Consolas, monospace;
  --heading: var(--display);
  --label: var(--mono);
  color-scheme: dark;
}

/* Gearforge Rogue Online wears the game's own colours and type. */
.theme-rogue {
  --ground: #0c1012;
  --raised: #12181b;
  --well: #0c1012;
  --line: #26332f;
  --line-strong: #6f8a7c;
  --text: #e8efe8;
  --text-soft: #c3d0c4;
  --muted: #b7c6ba;
  --subtle: #9aab9f;
  --accent: #e0a050;
  --accent-light: #e8b46e;
  --accent-hover: #f4cc94;
  --on-accent: #1a1206;
  --heading: "JetBrains Mono", ui-monospace, Consolas, monospace;
  --label: "JetBrains Mono", ui-monospace, Consolas, monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; background: var(--ground); color: var(--text); font: 400 16px/1.6 var(--body); }
/* height: auto, so the width and height in the markup (which stop the page jumping as pictures load) never stretch a picture. */
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent-light); }
a:hover { color: var(--accent-hover); }
:focus-visible { outline: 2px solid var(--accent-light); outline-offset: 3px; }
h1, h2, h3 { margin: 0; }
p { margin: 0; }
[hidden] { display: none !important; }

.skip { position: absolute; left: 12px; top: -60px; z-index: 10; padding: 10px 16px; background: var(--accent); color: var(--on-accent); font-weight: 600; border-radius: 4px; text-decoration: none; }
.skip:focus { top: 12px; color: var(--on-accent); }

.wrap { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
/* Top and bottom only, so a .section can also be a .wrap and keep its side padding. */
.section { padding-top: 88px; padding-bottom: 88px; }
.section-ruled { border-top: 1px solid var(--line); }
.band { background: var(--raised); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.row { display: flex; flex-wrap: wrap; gap: 48px; align-items: flex-start; }
.row-center { align-items: center; }
.row > * { min-width: 0; }
.grow-1 { flex: 1 1 380px; }
.grow-2 { flex: 2 1 440px; }

.eyebrow { margin: 0 0 16px; font: 500 13px/1.4 var(--label); letter-spacing: 0.2em; text-transform: uppercase; color: var(--accent); }
.theme-rogue .eyebrow { letter-spacing: 0.08em; }
.title-xl { font: 700 clamp(38px, 5.4vw, 68px)/1.08 var(--display); letter-spacing: 0.01em; max-width: 900px; }
.title-l { font: 700 34px/1.2 var(--heading); }
.lede { margin-top: 24px; max-width: 700px; font-size: 19px; color: var(--text-soft); }
.lede + .lede { margin-top: 14px; }
.copy { font-size: 18px; color: var(--text-soft); }
.copy + .copy { margin-top: 16px; }
.note { font-size: 15px; color: var(--subtle); }
.mono-note { font: 400 13px/1.5 var(--label); color: var(--subtle); }

/* Header */
.site-header { border-bottom: 1px solid #2c271d; background: #0e0d0b; }
.nav { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; padding-top: 14px; padding-bottom: 14px; }
.brand { display: flex; align-items: center; gap: 12px; min-height: 44px; color: #ebe3cf; text-decoration: none; }
.brand:hover { color: #ebe3cf; }
.brand-name { display: flex; flex-direction: column; line-height: 1; }
.brand-name b { font: 700 20px/1 "Cinzel", Georgia, serif; letter-spacing: 0.08em; }
.brand-name span { margin-top: 5px; font: 400 11px/1 "IBM Plex Mono", monospace; letter-spacing: 0.34em; color: #b3a88f; }
.nav-links { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 28px; margin: 0; padding: 0; list-style: none; }
.nav-links a { display: inline-block; padding: 10px 0; color: #ebe3cf; text-decoration: none; font-family: "IBM Plex Sans", system-ui, sans-serif; }
.nav-links a:hover, .nav-links a[aria-current="page"] { color: #e6bf66; }
.nav-links .btn { display: inline-flex; padding: 0 18px; min-height: 44px; }

.crumbs { padding-top: 20px; font: 400 13px/1.5 var(--label); color: var(--subtle); }
.crumbs a { color: var(--muted); }

/* Buttons */
.actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 34px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 50px; padding: 0 24px; border: 1px solid var(--line-strong); border-radius: 4px; background: none; color: var(--text); font: 500 16px/1.2 var(--body); text-decoration: none; cursor: pointer; }
.btn:hover { color: var(--text); border-color: var(--accent); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); font-weight: 600; }
.btn-primary:hover { background: var(--accent-light); border-color: var(--accent-light); color: var(--on-accent); }
.btn-primary svg { fill: currentColor; }
.btn[aria-disabled="true"] { border-style: dashed; color: var(--muted); cursor: default; }
.btn[aria-disabled="true"]:hover { border-color: var(--line-strong); }

/* Cards */
.card { background: var(--raised); border: 1px solid var(--line); border-radius: 6px; }
.card-pad { padding: 26px; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 20px; }
.card h3 { font-size: 20px; font-weight: 600; font-family: var(--body); }
.card p { margin-top: 8px; color: var(--muted); }
.card svg.icon { width: 30px; height: 30px; margin-bottom: 14px; stroke: var(--accent); }

.tag { display: inline-block; padding: 3px 9px; border-radius: 3px; font: 500 12px/1.4 var(--mono); letter-spacing: 0.16em; }
.tag-live { background: #d4a84a; color: #1a1306; }
.tag-soon { border: 1px solid #8a6430; color: #e0a050; padding: 2px 8px; }

.game-cards { display: flex; flex-wrap: wrap; gap: 28px; }
.game-card { flex: 1 1 380px; min-width: 0; display: flex; flex-direction: column; overflow: hidden; }
.game-card img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.game-card-body { flex-grow: 1; display: flex; flex-direction: column; gap: 14px; padding: 28px 28px 32px; }
.game-card-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; font: 400 13px/1.4 var(--mono); color: var(--muted); }
.game-card h3 { font: 700 30px/1.2 var(--display); }
.game-card p { color: var(--text-soft); }
.game-card .actions { margin-top: auto; padding-top: 12px; }
.game-card .btn { min-height: 48px; padding: 0 22px; }

.ticks { display: flex; flex-wrap: wrap; gap: 10px 24px; margin: 20px 0 0; padding: 0; list-style: none; }
.ticks li { display: flex; align-items: center; gap: 8px; }
.ticks svg { width: 18px; height: 18px; flex: none; stroke: var(--accent); }

.section-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 24px; margin-bottom: 32px; }
.section-head p { color: var(--muted); }

/* News */
.news-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 20px; }
.news-card { display: flex; flex-direction: column; gap: 10px; padding: 22px 22px 26px; }
.news-meta { display: flex; flex-wrap: wrap; gap: 6px 12px; font: 400 12px/1.5 var(--mono); letter-spacing: 0.08em; }
.news-meta .game { color: var(--accent-light); }
.news-meta time { color: var(--subtle); }
.news-card h3 { font: 600 19px/1.35 var(--body); }
.news-card p { color: var(--muted); font-size: 15px; margin: 0; }
.news-list { list-style: none; margin: 0; padding: 0; }
.news-list li { display: flex; flex-wrap: wrap; gap: 6px 32px; padding: 22px 0; border-bottom: 1px solid var(--line); }
.news-list time { flex: 0 0 140px; font: 400 13px/1.6 var(--label); color: var(--accent-light); }
.news-list div { flex: 1 1 480px; min-width: 0; }
.news-list h3 { font: 600 19px/1.4 var(--body); }
.news-list p { margin-top: 6px; color: var(--muted); }

/* Stats */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 24px; margin: 0 auto; padding-top: 36px; padding-bottom: 36px; }
.stats div { display: flex; flex-direction: column-reverse; gap: 4px; }
.stats dt { color: var(--muted); }
.stats dd { margin: 0; font: 700 40px/1.1 var(--display); color: var(--accent-light); }

/* Figures */
figure { margin: 0; }
figcaption { margin-top: 10px; font: 400 13px/1.5 var(--label); color: var(--subtle); }
.shot { width: 100%; border: 1px solid var(--line); border-radius: 6px; }
.portraits { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 14px; }
.portraits img { width: 100%; aspect-ratio: 2 / 3; object-fit: cover; border-radius: 6px; }
.figure-pair { display: flex; justify-content: center; align-items: flex-end; gap: 12px; }
.figure-pair img { height: 420px; max-width: 48%; object-fit: contain; }
.figure-tall { height: 440px; max-width: 100%; object-fit: contain; margin: 0 auto; }

/* The slideshow (assets/slideshow.js). Without script it shows its first picture. */
.slideshow-frame { position: relative; overflow: hidden; border: 1px solid var(--line); border-radius: 6px; background: #070707; }
.slideshow-frame.wide { aspect-ratio: 1600 / 995; }
.slideshow-frame.square { aspect-ratio: 4 / 3; }
.slide { position: absolute; inset: 0; margin: 0; opacity: 0; visibility: hidden; transition: opacity 700ms ease, visibility 0s linear 700ms; }
.slide.is-current { opacity: 1; visibility: visible; transition: opacity 700ms ease; }
.slide img { width: 100%; height: 100%; object-fit: contain; }
.slide.cover img { object-fit: cover; }
@media (prefers-reduced-motion: reduce) { .slide, .slide.is-current { transition: none; } }
.slideshow-arrow { position: absolute; top: 50%; transform: translateY(-50%); display: none; width: 52px; height: 52px; padding: 0; border-radius: 26px; border: 1px solid var(--line-strong); background: rgba(10, 10, 10, 0.82); color: var(--text); cursor: pointer; align-items: center; justify-content: center; }
.slideshow-arrow:hover { border-color: var(--accent); }
.slideshow-arrow.prev { left: 14px; }
.slideshow-arrow.next { right: 14px; }
.slideshow-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; margin-top: 8px; }
.slideshow-caption { flex: 1 1 260px; min-width: 0; margin: 0; font: 400 14px/1.5 var(--label); color: var(--muted); }
.slideshow-controls { display: none; align-items: center; }
.slideshow-dot { width: 36px; height: 44px; padding: 0; border: none; background: none; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.slideshow-dot span { width: 11px; height: 11px; border-radius: 6px; border: 1px solid var(--accent); transition: background 300ms; }
.slideshow-dot[aria-current="true"] span { background: var(--accent); }
.slideshow-pause { width: 44px; height: 44px; margin-left: 6px; padding: 0; border-radius: 22px; border: 1px solid var(--line); background: none; color: var(--text-soft); cursor: pointer; display: flex; align-items: center; justify-content: center; }
.slideshow-pause .when-paused { display: none; }
.slideshow-pause[data-paused="true"] .when-paused { display: block; }
.slideshow-pause[data-paused="true"] .when-playing { display: none; }
.js .slideshow-arrow { display: flex; }
.js .slideshow-controls { display: flex; }

/* MUD: talking in your own words */
.example { margin-top: 26px; padding: 18px 20px; background: var(--well); border: 1px solid #3a3224; border-radius: 6px; line-height: 1.7; }
.example .typed { font: 400 14px/1.6 var(--mono); color: var(--accent-light); }
.example .said { margin-top: 12px; font-family: Georgia, serif; }
.example .who { font-variant: small-caps; color: var(--muted); }
.points { display: flex; flex-direction: column; gap: 14px; margin: 0; padding: 0; list-style: none; }
.points li { padding: 20px 22px; }
.points h3 { font: 600 18px/1.4 var(--body); }
.points p { margin-top: 6px; color: var(--muted); }

/* Rogue */
.rogue-hero-img { width: 100%; aspect-ratio: 16 / 7; object-fit: cover; border: 1px solid var(--line); border-radius: 6px; }
.rogue-hero-panel { position: relative; max-width: 760px; margin: -120px 0 0 32px; padding: 34px 36px 36px; background: var(--ground); border: 1px solid var(--line); border-radius: 6px; }
.prompt { margin: 0 0 14px; font: 400 13px/1.5 var(--label); letter-spacing: 0.08em; color: var(--accent); }
.rogue-title { font: 800 clamp(30px, 3.8vw, 46px)/1.1 "JetBrains Mono", monospace; letter-spacing: 0.02em; color: var(--text); }
.chatlog { margin-top: 26px; padding: 16px 18px; background: var(--ground); border: 1px solid var(--line); border-radius: 6px; font: 400 14px/1.8 "JetBrains Mono", monospace; }
.chatlog .ch { color: var(--subtle); }
.chatlog .zone { color: #8fc070; }
.chatlog .tell { color: #c9a0e0; }
.chatlog .name { color: var(--text); }
.chatlog .line { color: var(--text-soft); }
.folk { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }
.folk article { display: flex; flex-direction: column; gap: 8px; padding: 22px; background: var(--ground); border: 1px solid var(--line); border-radius: 6px; }
.folk .glyph { font: 800 44px/1 "JetBrains Mono", monospace; color: var(--accent); }
.folk h3 { margin-top: 6px; font: 600 20px/1.3 var(--body); }
.folk .mods { font: 400 13px/1.5 "JetBrains Mono", monospace; color: var(--accent-light); }
.folk .about { font-size: 15px; color: var(--muted); }
.folk .start { margin-top: auto; padding-top: 8px; font: 400 12px/1.5 "JetBrains Mono", monospace; color: var(--subtle); }
.dyes { display: flex; flex-wrap: wrap; gap: 10px; margin: 0; padding: 0; list-style: none; }
.dyes li { display: flex; align-items: center; gap: 8px; padding: 6px 12px 6px 6px; background: var(--ground); border: 1px solid var(--line); border-radius: 18px; font-size: 14px; color: var(--text-soft); }
.dyes i { width: 22px; height: 22px; border-radius: 11px; border: 1px solid var(--line-strong); }
.modes { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 26px; }
.modes div { flex: 1 1 220px; min-width: 0; padding: 18px; border: 1px solid var(--line); border-radius: 6px; }
.modes .hard { border-color: #8a6430; }
.modes h3 { font: 700 16px/1.4 "JetBrains Mono", monospace; }
.modes .hard h3 { color: var(--accent-light); }
.modes p { margin-top: 6px; font-size: 15px; color: var(--muted); }

/* Account */
.account { display: flex; flex-wrap: wrap; gap: 48px; align-items: flex-start; padding-top: 64px; padding-bottom: 96px; }
.account > * { min-width: 0; }
.account-main { flex: 1 1 440px; max-width: 560px; }
.account-side { flex: 1 1 360px; padding-top: 8px; }
.game-rows { display: flex; flex-direction: column; gap: 12px; margin: 0; padding: 0; list-style: none; }
.game-rows li { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; padding: 14px; background: var(--ground); border: 1px solid var(--line); border-radius: 6px; }
.game-rows img { width: 96px; aspect-ratio: 16 / 10; object-fit: cover; border-radius: 4px; border: 1px solid #3a3224; }
.game-rows .what { flex: 1 1 180px; line-height: 1.4; }
.game-rows .what b { display: block; font-weight: 600; }
.game-rows .what span { font-size: 14px; color: var(--subtle); }
.game-rows .btn { min-height: 44px; padding: 0 18px; }

/* Account pages: sign in, create an account, passwords (assets/account.js). */
.account-title { font: 700 38px/1.15 var(--display); }
.account-lede { margin: 10px 0 28px; color: var(--muted); }
.account-main > * + *, [data-view] > .card + .card { margin-top: 16px; }
.panel-title { margin-bottom: 18px; font: 600 22px/1.3 var(--body); }
.panel-title:focus { outline: none; }
.panel-copy { font-size: 17px; color: var(--text-soft); }
.panel-copy + .panel-copy { margin-top: 12px; }
.panel-copy b { color: var(--text); font-weight: 600; word-break: break-word; }
.panel-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 22px; }
.form { display: flex; flex-direction: column; gap: 16px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field-label { font: 500 13px/1.4 var(--label); letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.field-hint { font-size: 14px; color: var(--subtle); }
.field input { width: 100%; min-height: 48px; padding: 10px 14px; background: var(--well); border: 1px solid var(--line-strong); border-radius: 4px; color: var(--text); font: 400 17px/1.3 var(--body); }
.field input:hover { border-color: var(--accent); }
.field input:focus { outline: 2px solid var(--accent-light); outline-offset: 1px; border-color: var(--accent); }
.form .btn { align-self: flex-start; min-width: 160px; }
.btn[disabled] { opacity: 0.65; cursor: progress; }
.form-status { padding: 12px 14px; border: 1px solid; border-radius: 4px; font-size: 15px; }
.form-status.is-error { border-color: #8a4b3a; background: #24140f; color: #f2cbbb; }
.form-status.is-ok { border-color: #66733f; background: #191d0f; color: #e3ebc6; }
.form-status .btn { margin-top: 12px; min-height: 44px; min-width: 0; padding: 0 18px; }
.form-links { font-size: 15px; }
.form-switch { margin-top: 24px; padding-top: 18px; border-top: 1px solid var(--line); color: var(--muted); }
.account-name { margin-top: -6px; font: 700 30px/1.2 var(--display); overflow-wrap: anywhere; }
.account-email { margin-top: 6px; color: var(--muted); overflow-wrap: anywhere; }
.account-main .game-rows { margin-top: 22px; }
details.card > summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 28px; font: 600 18px/1.3 var(--body); cursor: pointer; list-style: none; }
details.card > summary::-webkit-details-marker { display: none; }
details.card > summary::after { content: ""; width: 9px; height: 9px; border-right: 2px solid var(--accent); border-bottom: 2px solid var(--accent); transform: rotate(45deg); transition: transform 0.15s; }
details.card[open] > summary::after { transform: rotate(-135deg); }
details.card[open] > summary { margin-bottom: 18px; }
@media (prefers-reduced-motion: reduce) { details.card > summary::after { transition: none; } }
@media (max-width: 640px) {
  .account { padding-top: 40px; padding-bottom: 64px; gap: 36px; }
  .account-title { font-size: 32px; }
  .form .btn, .panel-actions .btn { align-self: stretch; width: 100%; }
}

/* Footer */
.site-footer { background: #0a0908; border-top: 1px solid #2c271d; color: #a39a84; font: 400 14px/1.6 "IBM Plex Sans", system-ui, sans-serif; }
.footer-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 32px; padding-top: 56px; }
.footer-cols h2 { margin: 0 0 12px; font: 500 12px/1.4 "IBM Plex Mono", monospace; letter-spacing: 0.2em; color: #a39a84; }
.footer-cols ul { display: flex; flex-direction: column; gap: 4px; margin: 0; padding: 0; list-style: none; }
.footer-cols a { display: inline-block; padding: 6px 0; color: #ebe3cf; text-decoration: none; font-size: 16px; }
.footer-cols a:hover { color: #e6bf66; }
.footer-cols li.plain { padding: 6px 0; font-size: 16px; color: #b3a88f; }
.footer-base { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; margin-top: 48px; padding: 20px 0 28px; border-top: 1px solid #2c271d; }

@media (max-width: 640px) {
  .section { padding-top: 64px; padding-bottom: 64px; }
  .rogue-hero-panel { margin: -48px 12px 0; padding: 24px 22px 26px; }
  .figure-pair img { height: 300px; }
  .figure-tall { height: 340px; }
  .slideshow-arrow { width: 44px; height: 44px; }
  .slideshow-arrow.prev { left: 8px; }
  .slideshow-arrow.next { right: 8px; }
}
