/* Mediocre Life Story: the website. The game's design v2 on the web: plum ink at night, warm
   paper by day, outlined "sticker" cards with a hard shadow, dotted journal paper. */

:root {
  --bg: #16131d;
  --bg-2: #1e1927;
  --panel: #231d2e;
  --panel-2: #2d263a;
  --line: #3b3249;
  --outline: rgba(244, 238, 229, 0.14);
  --shadow: #08060c;
  --text: #f4eee5;
  --text-dim: #b5abbf;
  --text-faint: #7e748b;
  --gold: #f3b45c;
  --red: #f2667d;
  --green: #64d3a2;
  --purple: #b594ff;
  --cyan: #6ecbf2;
  --dot: rgba(244, 238, 229, 0.06);
  --radius: 18px;
  --max: 1080px;
  color-scheme: dark;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #f6f0e3;
    --bg-2: #ede4d1;
    --panel: #fffcf5;
    --panel-2: #f7f0e1;
    --line: #e1d6c1;
    --outline: rgba(36, 31, 49, 0.86);
    --shadow: #241f31;
    --text: #241f31;
    --text-dim: #5f5871;
    --text-faint: #958da3;
    --gold: #b8720f;
    --red: #c93a53;
    --green: #1c8a5f;
    --purple: #6c47d1;
    --cyan: #1a7bb0;
    --dot: rgba(36, 31, 49, 0.1);
    color-scheme: light;
  }
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background-color: var(--bg);
  background-image: radial-gradient(var(--dot) 1.2px, transparent 1.3px);
  background-size: 26px 26px;
  color: var(--text);
  font-family: "Noto Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--gold); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
img { max-width: 100%; display: block; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 0.5em; letter-spacing: -0.01em; }
h1 { font-size: clamp(2.2rem, 6vw, 3.6rem); }
h2 { font-size: clamp(1.5rem, 3.6vw, 2.1rem); margin-top: 0.2em; }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; }
.dim { color: var(--text-dim); }
.faint { color: var(--text-faint); }
.small { font-size: 0.9rem; }

.wrap { width: min(var(--max), 100% - 32px); margin-inline: auto; }

/* --- header / nav ------------------------------------------------------------------- */
.site-head {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.site-head .wrap { display: flex; align-items: center; gap: 16px; min-height: 64px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); font-weight: 700; }
.brand img { width: 38px; height: 38px; border-radius: 10px; }
.brand small { display: block; font-size: 0.62rem; letter-spacing: 0.16em; color: var(--gold); line-height: 1; }
.brand span { line-height: 1.05; }
.nav { margin-left: auto; display: flex; gap: 4px; flex-wrap: wrap; }
.nav a {
  color: var(--text-dim); text-decoration: none; padding: 6px 10px; border-radius: 10px; font-size: 0.95rem;
}
.nav a:hover, .nav a[aria-current="page"] { color: var(--text); background: var(--panel-2); }

/* --- sticker cards and buttons ---------------------------------------------------------- */
.card {
  background: var(--panel);
  border: 2px solid var(--outline);
  border-radius: var(--radius) var(--radius) var(--radius) 6px;
  box-shadow: 0 4px 0 var(--shadow);
  padding: 22px;
}
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 20px; border-radius: 16px 16px 16px 5px;
  font-weight: 700; text-decoration: none; color: var(--text);
  border: 2px solid var(--outline); background: var(--panel);
  box-shadow: 0 4px 0 var(--shadow); transition: transform 0.08s, box-shadow 0.08s;
}
.btn:active { transform: translateY(4px); box-shadow: 0 0 0 var(--shadow); }
.btn.gold { background: color-mix(in srgb, var(--gold) 30%, var(--panel)); border-color: var(--gold); }
.btn .soon { font-weight: 400; font-size: 0.8rem; color: var(--text-dim); }
.chip {
  display: inline-block; padding: 3px 12px; border-radius: 8px; font-size: 0.8rem; font-weight: 700;
  border: 1.5px solid color-mix(in srgb, var(--gold) 80%, transparent); color: var(--gold);
  background: color-mix(in srgb, var(--gold) 10%, transparent); letter-spacing: 0.02em;
}

/* --- hero ---------------------------------------------------------------------------- */
.hero { padding: 56px 0 24px; }
.hero .wrap { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 40px; align-items: center; }
.kicker { color: var(--gold); font-weight: 800; letter-spacing: 0.18em; font-size: 0.95rem; margin-bottom: 6px; }
.hero p.lead { font-size: 1.2rem; color: var(--text-dim); max-width: 34em; }
.hero .actions { display: flex; gap: 12px; flex-wrap: wrap; margin: 26px 0 14px; }
.phone {
  width: min(300px, 80vw); margin-inline: auto; border-radius: 34px; overflow: hidden;
  border: 3px solid var(--outline); box-shadow: 0 8px 0 var(--shadow), 0 30px 60px rgba(0, 0, 0, 0.35);
  background: var(--panel);
}
.phone img { width: 100%; height: auto; }

/* --- sections ------------------------------------------------------------------------ */
section { padding: 44px 0; }
.section-head { max-width: 46em; margin-bottom: 26px; }
.grid { display: grid; gap: 18px; }
.grid.two { grid-template-columns: repeat(2, 1fr); }
.grid.three { grid-template-columns: repeat(3, 1fr); }
.grid.four { grid-template-columns: repeat(4, 1fr); }
.feature h3 { display: flex; align-items: center; gap: 10px; }
.feature .icon { font-size: 1.5rem; }
.feature p { color: var(--text-dim); margin: 0; }

.stats { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; }
.stat { text-align: center; padding: 18px 10px; }
.stat b { display: block; font-size: clamp(1.4rem, 3.2vw, 2.1rem); color: var(--gold); line-height: 1.1; }
.stat span { font-size: 0.85rem; color: var(--text-dim); }

.shots { display: flex; gap: 18px; overflow-x: auto; padding: 8px 4px 18px; scroll-snap-type: x mandatory; }
.shots figure { margin: 0; flex: 0 0 auto; scroll-snap-align: center; }
.shots img { width: 220px; height: auto; border-radius: 22px; border: 2px solid var(--outline); box-shadow: 0 5px 0 var(--shadow); }
.shots figcaption { text-align: center; font-size: 0.85rem; color: var(--text-dim); margin-top: 10px; max-width: 220px; }

.steps { counter-reset: step; display: grid; gap: 16px; }
.steps .card { position: relative; padding-left: 64px; }
.steps .card::before {
  counter-increment: step; content: counter(step);
  position: absolute; left: 18px; top: 20px; width: 32px; height: 32px; border-radius: 10px 10px 10px 3px;
  display: grid; place-items: center; font-weight: 800; color: var(--bg); background: var(--gold);
}

table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
th, td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--text-dim); font-weight: 700; font-size: 0.85rem; letter-spacing: 0.02em; }
.table-wrap { overflow-x: auto; }

.quote { border-left: 4px solid var(--gold); padding: 4px 0 4px 18px; color: var(--text-dim); font-size: 1.1rem; }
.callout { border-color: color-mix(in srgb, var(--cyan) 70%, transparent); }
.callout.warn { border-color: color-mix(in srgb, var(--red) 70%, transparent); }

/* --- legal / long text pages ------------------------------------------------------------- */
.doc { padding: 40px 0 60px; }
.doc .wrap { max-width: 780px; }
.doc h2 { margin-top: 1.8em; font-size: 1.4rem; }
.doc h3 { margin-top: 1.4em; }
.doc ul { padding-left: 1.3em; }
.doc li { margin-bottom: 0.4em; }
.doc .summary { margin: 18px 0 28px; }
.doc .summary ul { margin: 0; }
.updated { color: var(--text-faint); font-size: 0.9rem; }
pre.license {
  white-space: pre-wrap; font-size: 0.8rem; line-height: 1.5; background: var(--panel-2);
  border: 1px solid var(--line); border-radius: 12px; padding: 16px; color: var(--text-dim); overflow-x: auto;
}
details { margin: 10px 0; }
summary { cursor: pointer; font-weight: 700; }

/* --- footer ------------------------------------------------------------------------ */
.site-foot { border-top: 1px solid var(--line); padding: 30px 0 40px; margin-top: 30px; }
.site-foot .wrap { display: flex; gap: 20px; flex-wrap: wrap; justify-content: space-between; }
.site-foot nav { display: flex; gap: 16px; flex-wrap: wrap; }
.site-foot a { color: var(--text-dim); text-decoration: none; font-size: 0.95rem; }
.site-foot a:hover { color: var(--text); }

/* --- small screens ------------------------------------------------------------------ */
@media (max-width: 860px) {
  .hero .wrap, .grid.two, .grid.three { grid-template-columns: 1fr; }
  .grid.four { grid-template-columns: repeat(2, 1fr); }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stats .stat:last-child { grid-column: span 2; }
  .hero { padding-top: 32px; }
}
@media (max-width: 520px) {
  body { font-size: 16px; }
  .nav { width: 100%; margin-left: 0; }
  .grid.four { grid-template-columns: 1fr; }
  .card { padding: 18px; }
  .steps .card { padding-left: 58px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn { transition: none; }
}
