/* Nyoar — shared site styles */

@font-face { font-family: "Nunito"; font-weight: 700; font-style: normal; font-display: swap; src: url("/assets/fonts/nunito-700.woff2") format("woff2"); }
@font-face { font-family: "Nunito"; font-weight: 800; font-style: normal; font-display: swap; src: url("/assets/fonts/nunito-800.woff2") format("woff2"); }
@font-face { font-family: "Nunito"; font-weight: 900; font-style: normal; font-display: swap; src: url("/assets/fonts/nunito-900.woff2") format("woff2"); }

:root {
  --bg: #f6f3ec;
  --bg-alt: #efeadf;
  --card: #ffffff;
  --ink: #1d1b18;
  --ink-soft: #5d574f;
  --line: #e4ded3;
  --brand: #ff6a3d;
  --btn: #1d1b18;
  --btn-ink: #f6f3ec;
  --night: #15141f;
  --night-card: #1f1e2c;
  --night-line: #2e2c40;
  --night-ink: #f3f1fb;
  --night-soft: #aeaac4;
  --radius: 28px;
  --site-wrap: 1120px;
  --head: "Nunito", ui-rounded, "SF Pro Rounded", system-ui, -apple-system, "Segoe UI", sans-serif;
  --body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #161513; --bg-alt: #1c1b18; --card: #211f1c; --ink: #f2eee6; --ink-soft: #b3aca1;
    --line: #34312c; --btn: #f2eee6; --btn-ink: #161513;
    --night: #0f0e17; --night-card: #1a1926; --night-line: #2a2839;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--body); font-size: 1.0625rem; line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--brand); outline-offset: 3px; border-radius: 10px; }
.site-wrap { width: min(100% - 40px, var(--site-wrap)); margin-inline: auto; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 10; padding: 10px 16px; border-radius: 12px; background: var(--btn); color: var(--btn-ink); font-weight: 700; text-decoration: none; }
.skip:focus { top: 12px; }

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 5; background: color-mix(in srgb, var(--bg) 86%, transparent); backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px); border-bottom: 1px solid transparent; }
.site-header.scrolled { border-bottom-color: var(--line); }
.site-header .site-wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; }
.logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font-family: var(--head); font-weight: 900; font-size: 1.55rem; letter-spacing: -0.02em; line-height: 1; }
.logo svg { width: 32px; height: 32px; flex: none; }
.site-nav { display: flex; align-items: center; gap: 4px; }
.site-nav a { text-decoration: none; font-weight: 600; font-size: 0.95rem; padding: 8px 12px; border-radius: 999px; color: var(--ink-soft); }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--ink); background: var(--bg-alt); }
@media (max-width: 420px) { .site-nav a { padding: 8px 9px; font-size: 0.9rem; } .logo { font-size: 1.35rem; } .logo svg { width: 28px; height: 28px; } }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px;
  padding: 10px 22px; border-radius: 999px; font-weight: 650; text-decoration: none; white-space: nowrap;
  border: 1.5px solid var(--line); background: var(--card); color: var(--ink);
  transition: transform .15s ease, background-color .15s ease;
}
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--btn); color: var(--btn-ink); border-color: var(--btn); }
.btn.small { min-height: 40px; padding: 8px 16px; font-size: 0.92rem; }
.btn svg { width: 18px; height: 18px; flex: none; }

/* ---------- Hero ---------- */
.hero { padding: 48px 0 40px; display: grid; gap: 40px; align-items: center; }
.eyebrow { margin: 0 0 14px; font-family: var(--head); font-weight: 800; font-size: 0.95rem; color: var(--ink-soft); display: inline-flex; align-items: center; gap: 8px; }
.eyebrow::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--brand); }
.hero h1 { margin: 0 0 18px; font-family: var(--head); font-weight: 900; font-size: clamp(2.6rem, 7.5vw, 4.6rem); line-height: 0.98; letter-spacing: -0.03em; max-width: 13ch; }
.hero h1 em { font-style: normal; color: var(--brand); }
.hero .lede { margin: 0 0 28px; color: var(--ink-soft); font-size: 1.15rem; max-width: 40ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; }

.icon-cloud { position: relative; width: min(100%, 460px); aspect-ratio: 1 / 0.82; margin-inline: auto; }
.icon-cloud a { position: absolute; width: var(--s); left: var(--x); top: var(--y); transform: rotate(var(--r)); transition: transform .25s ease; }
.icon-cloud a:hover { transform: rotate(0deg) scale(1.06); }
.icon-cloud img { width: 100%; aspect-ratio: 1; border-radius: 23%; box-shadow: 0 2px 4px rgba(0,0,0,.08), 0 14px 30px rgba(0,0,0,.14); }
@media (prefers-reduced-motion: no-preference) {
  .icon-cloud a { animation: bob 6s ease-in-out infinite; animation-delay: var(--d); }
  .icon-cloud a:hover { animation-play-state: paused; }
  @keyframes bob { 0%, 100% { translate: 0 0; } 50% { translate: 0 -8px; } }
}
@media (min-width: 880px) {
  .hero { grid-template-columns: 1.05fr 1fr; padding: 72px 0 64px; }
}

/* ---------- Sections ---------- */
.section { padding: 56px 0; }
.section-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 8px 24px; margin-bottom: 26px; }
.section-head h2 { margin: 0; font-family: var(--head); font-weight: 900; font-size: clamp(2rem, 5vw, 2.8rem); letter-spacing: -0.02em; line-height: 1; }
.section-head p { margin: 0; color: var(--ink-soft); max-width: 46ch; }

.grid { display: grid; gap: 18px; }
@media (min-width: 720px) { .grid.three { grid-template-columns: repeat(3, 1fr); } .grid.two { grid-template-columns: repeat(2, 1fr); } }

.card {
  position: relative; display: flex; flex-direction: column; gap: 14px;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 24px; overflow: hidden;
}
.card::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 120px; pointer-events: none;
  background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 18%, transparent), transparent);
}
.card > * { position: relative; }
.card-top { display: flex; align-items: center; gap: 16px; }
.card-top img { width: 72px; height: 72px; border-radius: 17px; flex: none; box-shadow: 0 2px 8px rgba(0,0,0,.1); }
.card h3 { margin: 0; font-family: var(--head); font-weight: 800; font-size: 1.35rem; line-height: 1.15; letter-spacing: -0.01em; }
.card .tagline { margin: 3px 0 0; color: var(--ink-soft); font-size: 0.95rem; }
.card .desc { margin: 0; }
.chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.chips li { font-size: 0.8rem; font-weight: 650; padding: 4px 10px; border-radius: 999px; background: color-mix(in srgb, var(--accent) 14%, var(--card)); color: var(--ink); }
.card-actions { margin-top: auto; padding-top: 6px; display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; }
.card-actions .stores { display: flex; flex-wrap: wrap; gap: 8px; }
.card-actions .links { display: flex; gap: 16px; }
@media (max-width: 520px) { .card-actions .stores { width: 100%; } .card-actions .stores .btn { flex: 1 1 0; } }
.card-actions .text-link { font-size: 0.92rem; color: var(--ink-soft); text-underline-offset: 3px; }
.card-actions .text-link:hover { color: var(--ink); }

/* ---------- Games band (NyoarGames) ---------- */
.games {
  background: var(--night); color: var(--night-ink);
  border-radius: 40px; margin: 24px auto; width: min(100% - 20px, calc(var(--site-wrap) + 80px));
  padding: 56px 0 64px; position: relative; overflow: hidden;
}
.games::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .55;
  background-image: radial-gradient(1.5px 1.5px at 12% 18%, #fff8, transparent), radial-gradient(1px 1px at 32% 72%, #fff7, transparent),
    radial-gradient(1.5px 1.5px at 58% 26%, #fff6, transparent), radial-gradient(1px 1px at 76% 64%, #fff8, transparent),
    radial-gradient(2px 2px at 90% 14%, #fff5, transparent), radial-gradient(1px 1px at 46% 90%, #fff6, transparent),
    radial-gradient(1.5px 1.5px at 6% 86%, #fff5, transparent);
}
.games .site-wrap { position: relative; }
.games .section-head p { color: var(--night-soft); }
.games-mark { display: inline-flex; align-items: baseline; gap: 2px; }
.games-mark span { color: #ffcf4a; }
.games .card { background: var(--night-card); border-color: var(--night-line); color: var(--night-ink); }
.games .card::before { height: 100%; background: radial-gradient(120% 70% at 0% 0%, color-mix(in srgb, var(--accent) 30%, transparent), transparent 65%); }
.games .card .tagline, .games .card-actions .text-link { color: var(--night-soft); }
.games .card-actions .text-link:hover { color: var(--night-ink); }
.games .chips li { background: color-mix(in srgb, var(--accent) 26%, var(--night-card)); color: var(--night-ink); }
.games .btn.primary { background: var(--night-ink); color: var(--night); border-color: var(--night-ink); }
.more-title { margin: 40px 0 14px; font-family: var(--head); font-weight: 800; font-size: 1.15rem; color: var(--night-soft); }
.minis { display: grid; gap: 12px; }
.mini {
  display: flex; align-items: center; gap: 14px; padding: 12px 16px 12px 12px; border-radius: 22px; text-decoration: none;
  background: var(--night-card); border: 1px solid var(--night-line); transition: transform .15s ease, border-color .15s ease;
}
.mini:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--accent) 60%, var(--night-line)); }
.mini img { width: 56px; height: 56px; border-radius: 14px; flex: none; }
.mini strong { display: block; font-family: var(--head); font-weight: 800; font-size: 1.05rem; line-height: 1.2; }
.mini small { display: block; color: var(--night-soft); font-size: 0.85rem; }
@media (min-width: 720px) { .games { padding: 72px 0 80px; } .minis { grid-template-columns: repeat(3, 1fr); } }

/* ---------- Help strip ---------- */
.help { display: grid; gap: 20px; align-items: center; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; }
.help h2 { margin: 0 0 6px; font-family: var(--head); font-weight: 900; font-size: 1.8rem; letter-spacing: -0.02em; }
.help p { margin: 0; color: var(--ink-soft); }
.help .hero-actions { justify-content: start; }
@media (min-width: 720px) { .help { grid-template-columns: 1fr auto; padding: 32px 36px; } }

/* ---------- Footer ---------- */
.site-footer { padding: 56px 0 40px; color: var(--ink-soft); font-size: 0.93rem; }
.footer-grid { display: grid; gap: 28px; grid-template-columns: repeat(2, 1fr); }
.footer-grid .about { grid-column: 1 / -1; }
.footer-grid .about p { margin: 12px 0 0; max-width: 34ch; }
.footer-grid h2 { margin: 0 0 10px; font-family: var(--head); font-size: 0.95rem; font-weight: 800; color: var(--ink); }
.footer-grid ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.footer-grid a { text-decoration: none; }
.footer-grid a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.legal { margin-top: 36px; padding-top: 20px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 6px 20px; justify-content: space-between; font-size: 0.85rem; }
.legal p { margin: 0; }
@media (min-width: 720px) { .footer-grid { grid-template-columns: 1.6fr 1fr 1fr 1fr; } .footer-grid .about { grid-column: auto; } }

/* ---------- Simple content pages (credits, 404) ---------- */
.page { padding: 48px 0 24px; max-width: 760px; }
.page h1 { margin: 0 0 12px; font-family: var(--head); font-weight: 900; font-size: clamp(2.4rem, 7vw, 3.4rem); letter-spacing: -0.03em; line-height: 1; }
.page .lede { color: var(--ink-soft); margin: 0 0 28px; }
.credit-group { background: var(--card); border: 1px solid var(--line); border-radius: 22px; padding: 20px 24px; margin-bottom: 14px; }
.credit-group h2 { margin: 0 0 10px; font-family: var(--head); font-weight: 800; font-size: 1.2rem; }
.credit-group ul { margin: 0; padding-left: 1.1em; color: var(--ink-soft); }
.credit-group li { margin: 4px 0; }
.credit-group strong { color: var(--ink); font-weight: 650; }
