/*
  =====================================================================
  DAYBUILT GAMES · STUDIO SITE STYLESHEET
  =====================================================================
  Shared by every studio page: home, About Us, Dev Diary, blog posts,
  and later Press Kit, Contact, etc.

  Game pages get their own theme and do NOT need to use this file.

  Look: a centered late-90s personal homepage. One narrow column with a
  ridged green border sits on the tiled background, with a big italic
  logo, a scrolling news ticker, a [ bracketed ] text menu and diamond
  dividers. Only fonts that came with 90s computers are used.

  To change a color everywhere, edit BRAND COLORS just below.
  =====================================================================
*/

:root {
  color-scheme: dark;
  /* ===== BRAND COLORS ===== */
  --brand: #00bc62;           /* Daybuilt green: logo, headings, dividers, borders */
  --page: #0a2e0e;            /* the dark green column everything sits in */
  --text: #e9f6ee;            /* main text */
  --text-soft: #b8e6c9;       /* dates, captions */
  --link: #ffff66;            /* links (classic yellow) */
  --link-visited: #d0a8ff;    /* links you've already clicked */
  --new: #ff5577;             /* NEW! tags */
  --tile: #0a3d2a;            /* fallback if the background tile fails to load */

  /* ===== FONTS (all came with 90s computers) ===== */
  --f-body: "Times New Roman", Times, serif;
  --f-sans: Arial, Helvetica, sans-serif;
  --f-mono: "Courier New", Courier, monospace;
  --f-impact: Impact, "Arial Black", sans-serif;
}

/* ---------- page ---------- */
html { background: var(--tile); }
img { max-width: 100%; }
[hidden] { display: none !important; }
body {
  margin: 0;
  min-height: 100vh;
  box-sizing: border-box;
  background: var(--tile) url("../assets/main_page/mainpage_bgtile_darkgreen.webp") repeat;
  color: var(--text);
  font-family: var(--f-body);
  font-size: 17px;
  line-height: 1.45;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
  padding-block: 16px 24px;
}
a { color: var(--link); }
a:visited { color: var(--link-visited); }
a:hover { color: #ffffff; }
:focus-visible { outline: 1px dotted var(--link); outline-offset: 1px; }

.page {
  max-width: 660px;
  margin: 0 auto;
  text-align: center;
  background: var(--page);
  border: 4px ridge var(--brand);
  padding: 18px 20px 22px;
}

/* ---------- logo ---------- */
.logo {
  margin: 0 0 10px;
  font-family: var(--f-body);
  font-weight: bold;
  font-style: italic;
  font-size: clamp(34px, 8vw, 52px);
  line-height: 1;
  color: var(--brand);
  text-shadow: 2px 2px 0 #000;
}
.logo a, .logo a:visited { color: inherit; text-decoration: none; }
.sun { width: 64px; height: 64px; image-rendering: pixelated; }

/* ---------- news ticker ---------- */
.ticker {
  overflow: hidden;
  white-space: nowrap;
  background: #000;
  border: 2px inset #6a6a6a;
  color: var(--link);
  font-family: var(--f-mono);
  font-size: 14px;
  padding: 3px 0;
  margin-bottom: 10px;
}
.ticker span { display: inline-block; padding-left: 100%; animation: ticker 18s linear infinite; }
@keyframes ticker { to { transform: translateX(-100%); } }

/* ---------- menu ---------- */
.menu { font-family: var(--f-sans); font-weight: bold; font-size: 14px; line-height: 1.7; }
.menu .item { white-space: nowrap; }
.menu a, .menu a:visited { color: #ffffff; text-decoration: none; }
.menu a:hover { color: var(--link); text-decoration: underline; }
.menu a[aria-current="page"] { color: var(--brand); }
.menu .new { color: var(--new); font-size: 11px; vertical-align: super; line-height: 0; }

/* ---------- dividers ---------- */
.divider {
  margin: 18px 0;
  color: var(--brand);
  font-size: 12px;
  letter-spacing: 10px;
  user-select: none;
  overflow: hidden;
  white-space: nowrap;
}

/* ---------- headings and text ---------- */
h2 {
  margin: 0 0 8px;
  font-family: var(--f-sans);
  font-size: 22px;
  color: var(--brand);
  text-decoration: underline;
  text-wrap: balance;
}
h3 { margin: 0 0 4px; font-size: 22px; }
p { margin: 0 auto 10px; max-width: 52ch; }
.sig { font-style: italic; }
.small { font-family: var(--f-sans); font-size: 13px; }
.yellow { color: var(--link); font-family: var(--f-sans); font-weight: bold; font-size: 14px; }

/* ---------- home: featured game ---------- */
.boxart {
  width: 150px;
  height: 150px;
  max-width: 100%;
  margin: 4px auto 10px;
  border: 3px outset #9a9a9a;
  background: #222 url("../assets/dungeon_game/dungeon_game_bgtile.png");
  background-size: 48px 48px;
  image-rendering: pixelated;
  display: flex;
  align-items: flex-end;
}
.boxart span {
  width: 100%;
  padding: 6px;
  background: rgba(0, 0, 0, .72);
  font-family: var(--f-impact);
  font-size: 20px;
  line-height: 1;
  color: #ffffff;
}
.boxart small { display: block; margin-top: 3px; font-family: var(--f-sans); font-size: 11px; color: var(--link); }
.features { font-family: var(--f-sans); font-size: 14px; }
.features b { color: var(--brand); }

/* ---------- Dev Diary lists (home + blog page) ---------- */
.diary { list-style: none; margin: 0 auto 10px; padding: 0; max-width: 52ch; }
.diary li { margin: 0 0 14px; }
.diary .date { font-family: var(--f-mono); color: var(--text-soft); }
.diary p { margin: 2px auto 0; }
.new-tag { color: var(--new); font-family: var(--f-sans); font-weight: bold; font-size: 12px; }
.rss, .rss:visited { color: #ff9933; font-weight: bold; }

/* ---------- single blog post ---------- */
.post-meta { font-family: var(--f-sans); font-size: 13px; color: var(--text-soft); margin-bottom: 4px; }
.post-meta .date { font-family: var(--f-mono); font-size: 15px; }
.post-title {
  margin: 0 0 4px;
  font-family: var(--f-body);
  font-size: 30px;
  line-height: 1.15;
  color: #ffffff;
  text-decoration: none;
  text-wrap: balance;
}

/* Post text is left-aligned so long posts are easy to read */
.post-body { text-align: left; max-width: 58ch; margin: 0 auto; }
.post-body p, .post-body ul, .post-body ol,
.post-body blockquote, .post-body pre, .post-body table { margin: 0 0 14px; max-width: none; }
.post-body h2, .post-body h3, .post-body h4 { text-align: left; margin: 22px 0 8px; }
.post-body h2 { font-size: 20px; }
.post-body h3 { font-family: var(--f-sans); font-size: 17px; color: var(--link); }
.post-body h4 { font-family: var(--f-sans); font-size: 15px; color: var(--text-soft); }
.post-body ul, .post-body ol { padding-left: 24px; }
.post-body li { margin-bottom: 3px; }
.post-body li::marker { color: var(--brand); }
.post-body li > ul, .post-body li > ol { margin: 3px 0 0; }
.post-body img {
  display: block;
  height: auto;
  margin: 4px auto;
  border: 3px outset #9a9a9a;
}
.post-body blockquote {
  padding: 6px 12px;
  border: 2px inset #3f6b4a;
  background: #06200a;
  font-style: italic;
}
.post-body blockquote > :last-child { margin-bottom: 0; }
.post-body code {
  font-family: var(--f-mono);
  font-size: .95em;
  color: var(--link);
}
.post-body pre {
  overflow-x: auto;
  padding: 8px 10px;
  background: #000;
  border: 2px inset #6a6a6a;
}
.post-body pre code { color: #7dff6a; font-size: 14px; line-height: 1.45; }
.post-body table { display: block; overflow-x: auto; width: max-content; max-width: 100%; }
.post-body hr { border: 0; margin: 18px 0; text-align: center; }
.post-body hr::after { content: "◆ ◆ ◆"; color: var(--brand); font-size: 12px; letter-spacing: 6px; }
.post-nav { font-family: var(--f-sans); font-size: 14px; }
.post-nav span { display: block; margin-bottom: 4px; }

/* ---------- tables (About facts, Markdown tables) ---------- */
.old-table-wrap { overflow-x: auto; }
table.old, .post-body table {
  border: 2px outset #7a9a84;
  border-spacing: 2px;
  font-family: var(--f-sans);
  font-size: 14px;
}
table.old { margin: 0 auto 10px; }
table.old th, table.old td,
.post-body th, .post-body td { border: 1px inset #7a9a84; padding: 4px 10px; text-align: left; vertical-align: top; }
table.old th, .post-body th { color: var(--brand); }

/* ---------- About Us ---------- */
.photo {
  display: inline-block;
  max-width: 100%;
  margin: 4px auto 10px;
}
.photo .frame-img {
  border: 3px outset #9a9a9a;
  background:
    repeating-conic-gradient(rgba(255,255,255,.06) 0 25%, transparent 0 50%) 0 0 / 4px 4px,
    linear-gradient(180deg, #2a7a52 0%, #06200a 100%);
  color: var(--text-soft);
  font-family: var(--f-mono);
  font-size: 14px;
  display: grid;
  place-items: center;
  max-width: 100%;
}
.photo img { display: block; max-width: 100%; height: auto; border: 3px outset #9a9a9a; }
.photo figcaption { margin-top: 4px; font-style: italic; font-size: 15px; color: var(--text-soft); }
.team-photo .frame-img { width: 520px; aspect-ratio: 16 / 7; }
.portrait .frame-img { width: 130px; aspect-ratio: 3 / 4; place-items: end center; }
.portrait .frame-img svg { width: 80%; height: auto; display: block; }
.role { color: var(--link); font-family: var(--f-sans); font-weight: bold; font-size: 14px; margin-bottom: 8px; }
.stats { font-family: var(--f-sans); font-size: 14px; }
.stats b { color: var(--brand); }

/* ---------- hidden home extras (Visitors, Mailing List, Guestbook) ---------- */
.counter {
  display: inline-block;
  padding: 2px 6px;
  background: #000;
  border: 2px inset #6a6a6a;
  font-family: var(--f-mono);
  font-size: 20px;
  letter-spacing: 3px;
  color: #7dff6a;
}
.mail-form { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; font-family: var(--f-sans); font-size: 14px; }
.mail-form input { font: inherit; padding: 2px 4px; min-width: 0; }
.mail-form button { font: inherit; }

/* ---------- footer ---------- */
footer { margin-top: 6px; font-family: var(--f-sans); font-size: 12px; }
.badges { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px; margin: 0 0 10px; }
.badges img { display: block; }
footer p { margin: 4px auto 0; }

/* ---------- phone ---------- */
@media (max-width: 520px) {
  body { font-size: 16px; padding-block: 10px 16px; }
  .page { padding: 14px 12px 18px; }
}
@media (prefers-reduced-motion: reduce) {
  .ticker span { animation: none; padding-left: 0; }
}
