/* Adventures of Kikkelihiiri — MVP styles. Dick Johnson brand: dark UI, red accent, Oswald/Poppins. */

/* Brand fonts self-hosted, same woff2 files dickjohnson.fi serves */
@font-face {
  font-family: Oswald;
  font-weight: 700;
  font-display: swap;
  src: url("../assets/fonts/oswald-700.woff2") format("woff2");
}
@font-face {
  font-family: Poppins;
  font-weight: 500;
  font-display: swap;
  src: url("../assets/fonts/poppins-500.woff2") format("woff2");
}
@font-face {
  font-family: Poppins;
  font-weight: 700;
  font-display: swap;
  src: url("../assets/fonts/poppins-700.woff2") format("woff2");
}

* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  /* Dick Johnson theme tokens (from dickjohnson.fi settings.css) */
  --bg: #101010;
  --card: #1c1c1c;
  --text: #ffffff;
  --muted: #a1a1a1;
  --accent: #ff1818;        /* --color-button-primary-background */
  --accent-dark: #d42110;   /* brand secondary red */
  --line: #333333;
}

html, body { height: 100%; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: Poppins, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-weight: 500;
  display: flex;
  justify-content: center;
}

#app { width: 100%; max-width: 480px; min-height: 100dvh; display: flex; }

.screen {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 12px 16px 24px;
  animation: fade-in 0.35s ease both;
}

@keyframes fade-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* Placeholder milieu backgrounds — swapped for art later. Keyed by data-bg. */
.screen[data-bg="title"]       { background: linear-gradient(180deg, #1c1c1c 0%, #101010 70%); }
.screen[data-bg="beach_day"]   { background: url("../assets/bg/beach_day.svg") center / cover no-repeat, linear-gradient(180deg, #2a6f97 0%, #4d9dc4 55%, #c2975a 56%, #a67c44 100%); }
.screen[data-bg="beach_sunset"]{ background: url("../assets/bg/beach_sunset.svg") center / cover no-repeat, linear-gradient(180deg, #3d1f47 0%, #a1385a 45%, #e8763b 70%, #8c5a30 71%, #6e4423 100%); }
.screen[data-bg="tiki_bar"]    { background: url("../assets/bg/tiki_bar.svg") center / cover no-repeat, linear-gradient(180deg, #2b1a3d 0%, #7a3b2e 55%, #4a2c1a 56%, #33200f 100%); }
.screen[data-bg="storm"]       { background: url("../assets/bg/storm.svg") center / cover no-repeat, linear-gradient(180deg, #2f3640 0%, #57606f 50%, #6e6151 51%, #4d4437 100%); }
.screen[data-bg="sauna"]       { background: url("../assets/bg/sauna.svg") center / cover no-repeat, linear-gradient(180deg, #1a0d08 0%, #4a1f10 55%, #7a3416 85%, #99421a 100%); }
.screen[data-bg="boardwalk"]   { background: url("../assets/bg/boardwalk.svg") center / cover no-repeat, linear-gradient(180deg, #3a7ca5 0%, #7fb2cc 45%, #8a6a3f 46%, #5f4726 100%); }

/* language switcher */
.lang-switch { align-self: flex-end; display: flex; gap: 6px; }
.lang-btn {
  background: rgba(0,0,0,0.35); color: var(--muted); border: 1px solid var(--line);
  border-radius: 8px; padding: 6px 10px; font-size: 12px; font-weight: 700; cursor: pointer;
}
.lang-btn.active { color: #fff; border-color: var(--accent); background: var(--accent-dark); }

/* sprite stage */
.stage { flex: 1; display: flex; align-items: flex-end; justify-content: center; min-height: 180px; padding: 8px 0; }
.sprite {
  max-height: 34dvh; max-width: 60%;
  filter: drop-shadow(0 10px 14px rgba(0,0,0,0.45));
  animation: bob 3s ease-in-out infinite;
}
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }

/* title screen — Buyers Club style: red-on-black silkscreen punk */
.screen[data-bg="title"] { background: url("../assets/bg/title.webp") center / cover no-repeat, #000; }

.kicker {
  font-family: Poppins, sans-serif; font-weight: 700; font-size: 11px;
  letter-spacing: 5px; text-transform: uppercase; color: #fff;
  text-align: center; margin-top: 4px;
  text-shadow: 0 0 12px rgba(0,0,0,0.9);
}

.title {
  font-family: Oswald, sans-serif; font-weight: 700; text-transform: uppercase;
  font-size: 40px; line-height: 1.05; letter-spacing: 0.5px; text-align: center;
  margin-top: 10px; color: var(--accent);
  text-shadow: 3px 3px 0 #000, 0 0 30px rgba(255, 24, 24, 0.5);
  transform: rotate(-2deg);
}

.screen[data-bg="title"] .tagline { color: #fff; text-shadow: 0 1px 6px rgba(0,0,0,0.9); }

.screen[data-bg="title"] .sprite {
  filter: drop-shadow(0 0 24px rgba(255, 24, 24, 0.55)) drop-shadow(0 10px 14px rgba(0,0,0,0.6));
}

.screen[data-bg="title"] .btn.primary {
  animation: pulse-red 1.8s ease-in-out infinite;
  border: 2px solid #000;
  box-shadow: 4px 4px 0 #000;
}
@keyframes pulse-red {
  0%, 100% { box-shadow: 4px 4px 0 #000, 0 0 0 rgba(255,24,24,0.0); }
  50% { box-shadow: 4px 4px 0 #000, 0 0 26px rgba(255,24,24,0.65); }
}
.tagline { color: var(--muted); text-align: center; margin: 10px 0 24px; }

/* card + narration */
.card {
  width: 100%;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 18px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: 0 -8px 30px rgba(0,0,0,0.35);
}
.narration { line-height: 1.5; margin-bottom: 6px; }

/* buttons — full width, >=48px tap target; store button style:
   Poppins 700, uppercase, 2px letter-spacing (14px instead of the store's 13px for narration-length labels) */
.btn {
  display: block; width: 100%; min-height: 48px;
  background: #262626; color: var(--text);
  border: 1px solid var(--line); border-radius: 12px;
  font-family: Poppins, sans-serif; font-size: 14px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 2px;
  padding: 12px 16px;
  cursor: pointer; text-align: center; text-decoration: none;
  transition: transform 0.06s ease, background 0.15s ease, border-color 0.15s ease;
}
.btn:active { transform: scale(0.98); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #ffffff; }
.btn.primary:active { background: var(--accent-dark); }

/* PREP toggles */
.btn.toggle[aria-pressed="true"] {
  border-color: var(--accent); background: #2e1111; color: #ffc9c9;
  box-shadow: inset 0 0 0 1px var(--accent);
}
.btn.toggle[aria-pressed="true"]::after { content: " ✓"; color: var(--accent); }

/* ending screen */
.the-end { font-family: Oswald, sans-serif; font-size: 15px; font-weight: 700; letter-spacing: 4px; color: var(--accent); text-align: center; }
.code-label { color: var(--muted); font-size: 13px; text-align: center; margin-top: 4px; }
.code {
  align-self: center; background: transparent; color: #fff;
  border: 2px dashed var(--accent); border-radius: 10px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 20px; font-weight: 700; letter-spacing: 2px;
  padding: 10px 22px; cursor: pointer;
}

@media (min-width: 600px) {
  #app { padding: 24px 0; }
  .screen { border-radius: 20px; }
}
