/* csodera.com — shared styles. No build step; edit and deploy. */

@font-face { font-family: "Fredoka"; font-weight: 500; font-display: swap; src: url("/assets/fonts/fredoka-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Fredoka"; font-weight: 600; font-display: swap; src: url("/assets/fonts/fredoka-latin-600-normal.woff2") format("woff2"); }

:root {
  color-scheme: light dark;
  --bg: #f8f7f3;
  --surface: #ffffff;
  --surface-2: #f0eee7;
  --ink: #141a2e;
  --muted: #5d6579;
  --line: #e4e1d8;
  --accent: #e2364d;
  --accent-ink: #ffffff;
  --navy: #132c85;
  --shadow: 0 1px 2px rgb(20 26 46 / 6%), 0 12px 32px -12px rgb(20 26 46 / 18%);
  --radius: 22px;
  --display: "Fredoka", ui-rounded, system-ui, sans-serif;
  --body: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --wrap: 1080px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0d1120;
    --surface: #151a2c;
    --surface-2: #1b2136;
    --ink: #edf0f7;
    --muted: #9ba3b7;
    --line: #262d45;
    --accent: #ff5468;
    --shadow: 0 1px 2px rgb(0 0 0 / 30%), 0 16px 40px -16px rgb(0 0 0 / 60%);
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 1.0625rem/1.65 var(--body);
  -webkit-font-smoothing: antialiased;
}
img, video { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-underline-offset: 3px; }
a:focus-visible, button:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3 { font-family: var(--display); font-weight: 600; line-height: 1.12; letter-spacing: -0.01em; margin: 0; text-wrap: balance; }
p { margin: 0; }

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

/* Header */
.site-header { padding: 22px 0; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { font-family: var(--display); font-weight: 600; font-size: 1.45rem; text-decoration: none; letter-spacing: -0.02em; display: inline-flex; align-items: center; gap: 10px; }
.brand-dot { width: 14px; height: 18px; border-radius: 50% 50% 50% 50% / 58% 58% 42% 42%; background: var(--accent); position: relative; }
.brand-dot::after { content: ""; position: absolute; left: 50%; top: 100%; width: 1.5px; height: 7px; background: var(--muted); transform: translateX(-50%); }
.nav { display: flex; gap: 22px; font-size: 0.95rem; }
.nav a { text-decoration: none; color: var(--muted); }
.nav a:hover { color: var(--ink); }

/* Home hero */
.hero { padding: 56px 0 40px; }
.eyebrow { font-size: 0.8rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); margin-bottom: 14px; }
.hero h1 { font-size: clamp(2.4rem, 7vw, 4.2rem); max-width: 14ch; }
.hero p.lead { margin-top: 18px; font-size: 1.15rem; color: var(--muted); max-width: 46ch; }

/* Section heading */
.section { padding: 40px 0; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 20px; border-bottom: 1px solid var(--line); padding-bottom: 14px; }
.section-head h1, .section-head h2 { font-size: 1.35rem; }
.section-head span { color: var(--muted); font-size: 0.9rem; }

/* App list */
.apps { list-style: none; margin: 0; padding: 0; display: grid; gap: 20px; }
.app-card {
  display: grid; grid-template-columns: 1fr 1.05fr; align-items: center; gap: 28px;
  padding: 32px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line);
  box-shadow: var(--shadow); text-decoration: none; overflow: hidden; position: relative;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.app-card:hover { transform: translateY(-3px); }
.app-card:hover .app-cta { gap: 12px; }
.app-index { font-family: var(--display); color: var(--muted); font-size: 0.95rem; }
.app-head { display: flex; align-items: center; gap: 16px; margin: 14px 0 14px; }
.app-icon { width: 72px; height: 72px; border-radius: 18px; box-shadow: 0 6px 18px -6px rgb(19 44 133 / 45%); flex: none; }
.app-card h3 { font-size: clamp(1.4rem, 3vw, 1.85rem); }
.app-card p { color: var(--muted); max-width: 44ch; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; padding: 0; list-style: none; }
.tag { font-size: 0.8rem; padding: 4px 11px; border-radius: 999px; background: var(--surface-2); color: var(--muted); }
.app-cta { margin-top: 22px; display: inline-flex; align-items: center; gap: 8px; font-weight: 600; color: var(--accent); transition: gap 0.2s ease; }
.app-shots { display: flex; justify-content: center; align-items: flex-end; gap: 12px; min-width: 0; }
.app-shots img { width: 31%; border-radius: 16px; box-shadow: 0 10px 28px -10px rgb(0 0 0 / 40%); aspect-ratio: 540 / 1169; object-fit: cover; }
.app-shots img:nth-child(2) { transform: translateY(-18px); }

/* Contact */
.contact { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; padding: 28px 32px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }
.contact h2 { font-size: 1.3rem; }
.contact p { color: var(--muted); margin-top: 4px; }

.button {
  display: inline-flex; align-items: center; gap: 10px; padding: 12px 20px; border-radius: 999px;
  background: var(--accent); color: var(--accent-ink); font-weight: 600; text-decoration: none; border: 0;
  box-shadow: 0 4px 0 color-mix(in srgb, var(--accent) 60%, #000);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.button:hover { transform: translateY(-1px); }
.button:active { transform: translateY(3px); box-shadow: 0 1px 0 color-mix(in srgb, var(--accent) 60%, #000); }
.button.ghost { background: var(--surface-2); color: var(--ink); box-shadow: none; }

/* Footer */
.site-footer { padding: 40px 0 48px; color: var(--muted); font-size: 0.9rem; }
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; border-top: 1px solid var(--line); padding-top: 22px; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 18px; }
.site-footer a { text-decoration: none; }
.site-footer a:hover { color: var(--ink); text-decoration: underline; }

/* ---------- App page (balloon game) ---------- */
.game-page { --g-sky-1: #4aa3ea; --g-sky-2: #bfe2fb; }
.crumb { font-size: 0.9rem; color: var(--muted); text-decoration: none; display: inline-flex; gap: 6px; align-items: center; }
.crumb:hover { color: var(--ink); }

.game-hero { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 48px; align-items: center; padding: 32px 0 56px; }
.game-hero .app-icon { width: 88px; height: 88px; border-radius: 22px; }
.game-hero h1 { font-size: clamp(2.3rem, 6vw, 3.8rem); margin-top: 22px; }
.game-hero h1 em { font-style: normal; color: var(--accent); }
.game-hero .lead { margin-top: 18px; font-size: 1.15rem; color: var(--muted); max-width: 42ch; }
.store-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.store-pill { text-decoration: none;
  display: inline-flex; align-items: center; gap: 10px; padding: 10px 18px 10px 14px; border-radius: 14px;
  background: var(--ink); color: var(--bg); line-height: 1.15; font-size: 0.78rem;
}
.store-pill b { display: block; font-size: 1rem; font-weight: 600; }
.store-pill svg { width: 22px; height: 22px; flex: none; }

.phone {
  justify-self: center; width: min(300px, 78vw); aspect-ratio: 520 / 1126; border-radius: 42px; padding: 10px;
  background: #0b0f1c; box-shadow: 0 30px 60px -24px rgb(19 44 133 / 55%), inset 0 0 0 2px #2a3150; position: relative;
}
.phone video, .phone img { width: 100%; height: 100%; border-radius: 33px; object-fit: cover; background: #132c85; }

.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.feature { padding: 24px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }
.feature .ico { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: color-mix(in srgb, var(--accent) 12%, transparent); color: var(--accent); margin-bottom: 14px; }
.feature .ico svg { width: 22px; height: 22px; }
.feature h3 { font-size: 1.15rem; margin-bottom: 6px; }
.feature p { color: var(--muted); font-size: 0.98rem; }

.gallery {
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(190px, 220px); gap: 16px;
  overflow-x: auto; scroll-snap-type: x mandatory; padding: 4px 4px 18px; margin: 0 -4px;
  scrollbar-width: thin; list-style: none;
}
.gallery li { scroll-snap-align: start; margin: 0; }
.gallery img { width: 100%; aspect-ratio: 540 / 1169; object-fit: cover; border-radius: 20px; box-shadow: 0 10px 26px -14px rgb(0 0 0 / 45%); background: var(--surface-2); }
.gallery figcaption { margin-top: 10px; font-size: 0.9rem; color: var(--muted); }
.gallery figcaption b { color: var(--ink); font-weight: 600; display: block; }
.gallery figure { margin: 0; }

.facts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); overflow: hidden; margin: 0; }
.facts div { padding: 20px 22px; border-right: 1px solid var(--line); }
.facts div:last-child { border-right: 0; }
.facts dt { font-size: 0.8rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; }
.facts dd { margin: 4px 0 0; font-family: var(--display); font-size: 1.2rem; font-weight: 600; }

.support { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.support .contact { align-items: flex-start; flex-direction: column; justify-content: flex-start; }
.support .contact .button { margin-top: 10px; }

/* ---------- Legal page ---------- */
.legal { max-width: 760px; padding: 24px 0 24px; }
.legal h1 { font-size: clamp(2rem, 5vw, 2.8rem); margin: 18px 0 8px; }
.legal .sub { color: var(--muted); }
.legal h2 { font-size: 1.3rem; margin: 40px 0 10px; }
.legal p, .legal ul { margin: 0 0 14px; }
.legal li { margin-bottom: 8px; }
.legal a { color: var(--accent); overflow-wrap: anywhere; }
.legal .callout { padding: 18px 20px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); margin: 24px 0; }

/* 404 */
.notfound { text-align: center; padding: 96px 0; }
.notfound h1 { font-size: clamp(2.2rem, 6vw, 3.4rem); }
.notfound p { color: var(--muted); margin: 14px 0 26px; }

/* Responsive */
@media (max-width: 860px) {
  .app-card { grid-template-columns: 1fr; padding: 24px; }
  .app-shots { order: -1; }
  .game-hero { grid-template-columns: 1fr; gap: 36px; padding-top: 20px; }
  .features { grid-template-columns: 1fr; }
  .facts { grid-template-columns: repeat(2, 1fr); }
  .facts div:nth-child(2) { border-right: 0; }
  .facts div:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .support { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  .hero { padding: 32px 0 24px; }
  .nav { gap: 16px; }
  .contact { padding: 22px; }
  .app-shots img:nth-child(2) { transform: translateY(-10px); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; }
}
