/* ============================================================
   Reddomo — visual system
   Warm red-biased dark theme, committed (arcade product look).
   ============================================================ */
:root {
  --ground:   #17110f;
  --ground-2: #211812;
  --ground-3: #2c211a;
  --line:     #3a2a22;
  --line-2:   #4a362c;
  --text:     #f6ede8;
  --muted:    #b39c92;
  --faint:    #8a7268;

  --red:      #ff4d42;
  --red-2:    #e5352c;
  --red-deep: #b0231d;
  --gold:     #f2b53f;
  --green:    #47c072;

  --radius:   16px;
  --radius-sm: 11px;
  --maxw:     1120px;
  --shadow:   0 2px 4px rgba(0,0,0,.25), 0 22px 48px -26px rgba(0,0,0,.75);
  --shadow-red: 0 18px 44px -20px rgba(255,77,66,.5);

  --mono: ui-monospace, "SF Mono", "Cascadia Mono", "Roboto Mono", Menlo, Consolas, monospace;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;

  font-family: var(--sans);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background:
    radial-gradient(1200px 500px at 50% -200px, rgba(255,77,66,.16), transparent 70%),
    var(--ground);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  line-height: 1.55;
}
a { color: inherit; text-decoration: none; }
img, svg { max-width: 100%; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 22px;
  background: color-mix(in srgb, var(--ground) 82%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 11px; font-weight: 800; }
.brand-logo { width: 34px; height: 37px; display: block; filter: drop-shadow(0 3px 6px rgba(0,0,0,.4)); }
.brand-name { font-size: 1.18rem; letter-spacing: -.01em; }
.brand-name .red { color: var(--red); }
.nav { display: flex; gap: 6px; align-items: center; }
.nav a {
  color: var(--muted); font-weight: 600; font-size: .93rem;
  padding: 7px 13px; border-radius: 999px; transition: color .15s, background .15s;
}
.nav a:hover { color: var(--text); background: var(--ground-2); }
.nav a.active { color: var(--text); background: var(--ground-3); }

/* ---------- Layout ---------- */
main { flex: 1; width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 22px; }

/* ---------- Hero ---------- */
.hero {
  display: grid; grid-template-columns: 1.4fr 1fr; align-items: center; gap: 30px;
  padding: 40px 0 30px;
}
.hero-copy h1 {
  font-size: clamp(2.2rem, 5.5vw, 3.4rem); line-height: 1.02; margin: 0 0 12px;
  letter-spacing: -.03em; font-weight: 800; text-wrap: balance;
}
.hero-copy h1 .red { color: var(--red); }
.hero-copy .tagline { color: var(--muted); font-size: 1.1rem; margin: 0 0 22px; max-width: 46ch; }
.hero-art { display: flex; justify-content: center; }
.hero-art .domo {
  width: min(230px, 60vw); height: auto;
  filter: drop-shadow(0 24px 40px rgba(0,0,0,.5));
  animation: bob 4s ease-in-out infinite;
}
@keyframes bob { 0%,100% { transform: translateY(0) rotate(-1deg); } 50% { transform: translateY(-12px) rotate(1deg); } }
@media (prefers-reduced-motion: reduce) { .hero-art .domo { animation: none; } }

/* ---------- Search + chips ---------- */
.controls { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; padding: 6px 0 22px; }
.search-wrap { position: relative; flex: 1; min-width: 220px; }
.search {
  width: 100%; padding: 13px 16px 13px 44px; font-size: 1rem; color: var(--text);
  background: var(--ground-2); border: 1px solid var(--line); border-radius: 999px; outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.search::placeholder { color: var(--faint); }
.search:focus { border-color: var(--red); box-shadow: 0 0 0 4px rgba(255,77,66,.14); }
.search-wrap::before {
  content: ""; position: absolute; left: 16px; top: 50%; width: 17px; height: 17px; transform: translateY(-50%);
  background: var(--faint);
  -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path fill='black' d='M10 2a8 8 0 015.3 14l5.4 5.3-1.4 1.4-5.3-5.4A8 8 0 1110 2zm0 2a6 6 0 100 12 6 6 0 000-12z'/></svg>") center/contain no-repeat;
          mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path fill='black' d='M10 2a8 8 0 015.3 14l5.4 5.3-1.4 1.4-5.3-5.4A8 8 0 1110 2zm0 2a6 6 0 100 12 6 6 0 000-12z'/></svg>") center/contain no-repeat;
}
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  font-size: .86rem; font-weight: 600; color: var(--muted); cursor: pointer;
  padding: 8px 14px; border-radius: 999px; background: var(--ground-2);
  border: 1px solid var(--line); transition: all .14s; white-space: nowrap;
}
.chip:hover { color: var(--text); border-color: var(--line-2); }
.chip.active { color: #1a0f0d; background: var(--red); border-color: var(--red); }

/* ---------- Section label ---------- */
.section-label {
  display: flex; align-items: center; gap: 12px; margin: 26px 0 14px;
  font-family: var(--mono); font-size: .72rem; letter-spacing: .18em; text-transform: uppercase; color: var(--faint);
}
.section-label::after { content: ""; flex: 1; height: 1px; background: var(--line); }

/* ---------- Grid ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 16px; padding-bottom: 12px; }
.grid.featured { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }

.tile {
  position: relative; display: flex; flex-direction: column;
  background: var(--ground-2); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; transition: transform .14s ease, border-color .14s ease, box-shadow .14s ease;
}
.tile:hover { transform: translateY(-5px); border-color: var(--line-2); box-shadow: var(--shadow); }
.tile:focus-visible { outline: 3px solid var(--red); outline-offset: 2px; }
.tile.big:hover { box-shadow: var(--shadow-red); border-color: color-mix(in srgb, var(--red) 55%, var(--line)); }

.tile-art {
  aspect-ratio: 1 / 1; position: relative; display: flex; align-items: center; justify-content: center;
  background-size: cover; background-position: center; overflow: hidden;
}
.tile.big .tile-art { aspect-ratio: 16 / 10; }
.tile-art .letter {
  font-size: 3.2rem; font-weight: 800; color: rgba(255,255,255,.92);
  text-shadow: 0 3px 10px rgba(0,0,0,.25);
}
.tile-art .emoji {
  font-size: 3rem; line-height: 1;
  filter: drop-shadow(0 4px 8px rgba(0,0,0,.35));
  transition: transform .16s ease;
}
.tile.big .tile-art .emoji { font-size: 4.2rem; }
.tile:hover .tile-art .emoji { transform: scale(1.12) rotate(-4deg); }
.tile-art::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 55%, rgba(0,0,0,.22));
  pointer-events: none;
}
.tile-art .thumb-domo { width: 46%; height: auto; opacity: .95; }
.tile-badge {
  position: absolute; top: 9px; right: 9px; font-family: var(--mono); font-size: .58rem; font-weight: 700;
  letter-spacing: .08em; text-transform: uppercase; padding: 3px 7px; border-radius: 999px;
  background: rgba(0,0,0,.42); color: #fff; backdrop-filter: blur(3px);
}
.tile-badge.ext { background: rgba(0,0,0,.5); }
.tile-info { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 3px; }
.tile-title { font-weight: 700; font-size: 1rem; display: flex; align-items: center; gap: 6px; }
.tile-title .ico { width: 13px; height: 13px; opacity: .7; }
.tile-blurb { font-size: .82rem; color: var(--muted); line-height: 1.4; }
.tile.big .tile-blurb { font-size: .88rem; }
.tile-cat { font-family: var(--mono); font-size: .62rem; letter-spacing: .1em; text-transform: uppercase; color: var(--faint); }

.empty { color: var(--muted); padding: 26px 0 60px; text-align: center; }

/* ---------- Player ---------- */
.player-main { display: flex; flex-direction: column; padding: 18px 0 34px; }
.player-bar { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
.player-heading { display: flex; flex-direction: column; gap: 2px; }
.player-cat { font-family: var(--mono); font-size: .66rem; letter-spacing: .14em; text-transform: uppercase; color: var(--red); }
.player-title { font-size: 1.6rem; margin: 0; letter-spacing: -.02em; }
.player-blurb { color: var(--muted); font-size: .92rem; margin: 2px 0 0; }
.btn {
  background: var(--red); color: #1a0f0d; border: none; padding: 10px 18px; border-radius: 999px;
  font-weight: 700; font-size: .9rem; cursor: pointer; transition: filter .14s, transform .05s;
  display: inline-flex; align-items: center; gap: 7px; white-space: nowrap;
}
.btn:hover { filter: brightness(1.08); }
.btn:active { transform: translateY(1px); }
.btn.ghost { background: var(--ground-3); color: var(--text); border: 1px solid var(--line-2); }
.player-frame {
  width: 100%; aspect-ratio: 16 / 10; background: #000;
  border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow);
}
.player-frame:fullscreen { border-radius: 0; aspect-ratio: auto; height: 100%; border: none; }
.player-frame iframe { width: 100%; height: 100%; border: 0; display: block; }
.player-tip { color: var(--faint); font-size: .82rem; margin-top: 12px; text-align: center; }

/* ---------- Prose / About ---------- */
.prose { max-width: 660px; padding: 40px 0 60px; }
.prose h1 { font-size: 2.1rem; letter-spacing: -.02em; margin: 0 0 6px; }
.prose .lead { color: var(--muted); font-size: 1.1rem; margin: 0 0 26px; }
.prose h2 { font-size: 1.15rem; margin: 30px 0 8px; }
.prose p { color: var(--muted); line-height: 1.75; }
.prose .domo-inline { width: 120px; float: right; margin: 0 0 10px 20px; }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--line); margin-top: 20px; padding: 22px;
  color: var(--faint); font-size: .84rem; text-align: center;
  display: flex; flex-direction: column; gap: 4px; align-items: center;
}
.site-footer .foot-brand { display: flex; align-items: center; gap: 8px; color: var(--muted); font-weight: 600; }
.site-footer .foot-brand img { width: 20px; }

/* ---------- Responsive ---------- */
@media (max-width: 780px) {
  .hero { grid-template-columns: 1fr; text-align: center; padding: 26px 0 18px; }
  .hero-copy .tagline { margin-left: auto; margin-right: auto; }
  .hero-art { order: -1; }
  .hero-art .domo { width: min(150px, 42vw); }
}
@media (max-width: 520px) {
  .grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; }
  .player-bar { flex-direction: column; align-items: stretch; }
  .player-title { font-size: 1.35rem; }
}
