/* Magestican Studios — hand-drawn, warm-paper aesthetic.
   Design principles: warm off-white background, deep ink body text,
   one accent colour per game card, serif headings that read a little
   handwritten, sans body for readability. See docs/BRAND.md.
*/

:root {
  --paper:      #f6f1e6;
  --ink:        #1c1a17;
  --ink-soft:   #4a463f;
  --line:       #d9d2c1;
  --accent-a:   #2d5a2e;  /* Aracstory green */
  --accent-z:   #b73a2a;  /* Zelakas red-orange */
  --dot-yellow: #d99a29;
  --dot-green:  #4a8f2e;
  --max-width:  920px;

  color-scheme: light;
}

* { box-sizing: border-box; }

html, body {
  margin: 0; padding: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Roboto, sans-serif;
  line-height: 1.5;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: Georgia, "Iowan Old Style", "Palatino Linotype", Palatino, serif;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.15;
  margin: 0 0 0.5em 0;
}

a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }

/* --- Header --- */

.site-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 22px 32px;
  max-width: var(--max-width); margin: 0 auto;
  border-bottom: 1px dashed var(--line);
}

.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); }
.brand-mark {
  display: inline-flex; align-items: center; justify-content: center;
  width: 42px; height: 42px;
  background: var(--ink); color: var(--paper);
  font-family: Georgia, serif; font-weight: 700; font-size: 22px;
  border-radius: 6px;
  transform: rotate(-3deg);
}
.brand-name { font-family: Georgia, serif; font-weight: 700; font-size: 20px; letter-spacing: 0.01em; }

.site-header nav { display: flex; gap: 20px; font-size: 15px; }
.site-header nav a { text-decoration: none; color: var(--ink-soft); }
.site-header nav a:hover { color: var(--ink); text-decoration: underline; }

/* --- Main --- */

main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 40px 32px 80px;
}

/* --- Hero --- */

.hero { margin: 40px 0 60px; }
.hero h1 { font-size: clamp(36px, 6vw, 60px); margin: 0 0 20px; }
.hand-underline {
  position: relative;
  display: inline-block;
}
.hand-underline::after {
  /* Hand-drawn wavy underline drawn in SVG */
  content: "";
  position: absolute;
  left: -4px; right: -4px; bottom: -8px;
  height: 14px;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 14' preserveAspectRatio='none'><path d='M2 8 Q 25 2 50 8 T 100 8 T 150 8 T 198 8' fill='none' stroke='%23b73a2a' stroke-width='3' stroke-linecap='round'/></svg>");
  background-size: 100% 100%;
  background-repeat: no-repeat;
}
.tagline {
  font-size: 20px; color: var(--ink-soft); max-width: 560px; margin: 0;
}

.hero-figure {
  margin: 30px 0 0; padding: 0;
}
.hero-figure img {
  display: block; width: 100%; height: auto;
  border-radius: 10px; border: 1px solid var(--line);
  box-shadow: 4px 6px 0 rgba(0,0,0,0.06);
}
.hero-figure figcaption {
  margin-top: 10px; font-size: 14px; color: var(--ink-soft);
}
.hero-figure figcaption code {
  background: #fffbf1; padding: 1px 6px; border-radius: 3px; border: 1px solid var(--line);
}

.play-link { color: var(--accent-z); text-decoration: none; font-weight: 500; }
.play-link:hover { text-decoration: underline; }

/* --- Games --- */

.games h2 { font-size: 30px; margin-bottom: 24px; }

.game-card {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 28px;
  padding: 24px;
  margin-bottom: 24px;
  background: #fffbf1;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 3px 4px 0 rgba(0,0,0,0.05);
}

@media (max-width: 640px) {
  .game-card { grid-template-columns: 1fr; }
}

.game-art {
  position: relative;
  aspect-ratio: 1 / 1;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--paper);
}
.game-art img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}
.game-art-fallback {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-family: Georgia, serif; font-weight: 700;
  font-size: 88px; color: var(--paper);
}
.game-aracstory   .game-art { background: var(--accent-a); }
.game-zelakas     .game-art { background: var(--accent-z); }
.game-teambondage .game-art { background: #1a2330; }

.game-copy h3 { font-size: 26px; margin: 4px 0 4px; }
.game-meta {
  color: var(--ink-soft); font-size: 14px; margin: 0 0 12px;
  letter-spacing: 0.02em;
}
.game-copy p { margin: 0 0 12px; }
.game-status { font-size: 14px; color: var(--ink-soft); }
.dot {
  display: inline-block; width: 10px; height: 10px; border-radius: 50%;
  margin-right: 6px; vertical-align: -1px;
}
.dot-yellow { background: var(--dot-yellow); }
.dot-green  { background: var(--dot-green); }

/* --- About-short --- */

.about-short { margin-top: 60px; padding-top: 40px; border-top: 1px dashed var(--line); }
.about-short h2 { font-size: 26px; }
.about-short p { max-width: 680px; }
.more-link { color: var(--accent-z); text-decoration: none; font-weight: 500; }
.more-link:hover { text-decoration: underline; }

/* --- Footer --- */

.site-footer {
  max-width: var(--max-width); margin: 0 auto;
  padding: 30px 32px 60px;
  border-top: 1px dashed var(--line);
  font-size: 13px; color: var(--ink-soft);
}
.site-footer p { margin: 0 0 8px; }
.colophon { color: var(--ink-soft); }
.colophon a { color: var(--ink-soft); }

/* --- Content pages (about/privacy/terms) --- */

.content-page main { max-width: 720px; }
.content-page h1 { font-size: 40px; margin-bottom: 12px; }
.content-page h2 { font-size: 24px; margin-top: 40px; }
.content-page p, .content-page ul { color: var(--ink); }
.content-page ul { padding-left: 22px; }
.content-page li { margin-bottom: 6px; }
.updated { color: var(--ink-soft); font-size: 14px; margin: 0 0 24px; }
