/* Kyu Sudoku - site. Cores do jogo: washi, sumi, shu (selo), matcha, hinoki. */
@font-face {
  font-family: "Zen Maru Gothic";
  src: url("../fonts/zen-maru-gothic-medium.woff2") format("woff2");
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: "Zen Maru Gothic";
  src: url("../fonts/zen-maru-gothic-bold.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}

:root {
  --washi: #f7f1e6;
  --paper: #fffcf6;
  --sumi: #3a3542;
  --sumi-soft: #6a6373;
  --shu: #cf4636;
  --shu-deep: #a93526;
  --matcha: #a9c79a;
  --matcha-deep: #4f6f42;
  --hinoki: #c68a55;
  --wood: #7d5236;
  --line: #e6dccb;
  --shadow: 0 18px 40px -22px rgba(74, 47, 30, 0.45);
  --radius: 22px;
  --wrap: 1120px;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--washi);
  color: var(--sumi);
  font-family: "Zen Maru Gothic", "Hiragino Maru Gothic ProN", "Segoe UI", system-ui, sans-serif;
  font-weight: 500;
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--shu-deep); }
h1, h2, h3 { font-weight: 700; line-height: 1.2; margin: 0 0 0.5em; }
h2 { font-size: clamp(1.7rem, 3.6vw, 2.4rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }
.wrap { width: min(var(--wrap), 100% - 32px); margin-inline: auto; }
.kicker {
  display: inline-block;
  font-size: 0.82rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--shu-deep);
  margin-bottom: 0.6em;
}
.skip {
  position: absolute; left: -999px; top: 8px;
  background: var(--paper); padding: 8px 14px; border-radius: 10px; z-index: 20;
}
.skip:focus { left: 8px; }
:focus-visible { outline: 3px solid var(--matcha-deep); outline-offset: 3px; border-radius: 8px; }

/* Topo */
.top {
  position: sticky; top: 0; z-index: 10;
  background: rgba(247, 241, 230, 0.88);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.top .wrap { display: flex; align-items: center; gap: 18px; min-height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--sumi); font-weight: 700; font-size: 1.1rem; }
.brand img { width: 36px; height: 36px; border-radius: 9px; }
.nav { display: flex; gap: 18px; margin-left: auto; }
.nav a { color: var(--sumi); text-decoration: none; font-size: 0.95rem; }
.nav a:hover { color: var(--shu-deep); }
.langs { display: flex; gap: 4px; background: var(--paper); border: 1px solid var(--line); border-radius: 999px; padding: 3px; }
.langs button {
  font: inherit; font-size: 0.8rem; font-weight: 700; letter-spacing: 0.04em;
  border: 0; background: transparent; color: var(--sumi-soft);
  padding: 4px 10px; border-radius: 999px; cursor: pointer;
}
.langs button[aria-pressed="true"] { background: var(--sumi); color: var(--paper); }

/* Abertura */
.hero {
  position: relative;
  overflow: hidden;
  background: #e9c9b3 url("../img/loft-1920.webp") center / cover no-repeat;
}
.hero::before {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(247, 241, 230, 0.95) 0%, rgba(247, 241, 230, 0.82) 38%, rgba(247, 241, 230, 0.12) 70%, rgba(247, 241, 230, 0) 100%);
}
.hero .wrap {
  position: relative;
  display: grid; grid-template-columns: 1.05fr 0.95fr; align-items: center; gap: 24px;
  min-height: min(760px, 88vh); padding-block: 56px;
}
.hero-logo { width: min(380px, 100%); margin: 0 0 22px -6px; }
.hero h1 { font-size: clamp(2rem, 4.6vw, 3.3rem); margin-bottom: 0.35em; }
.hero p.lead { font-size: 1.15rem; max-width: 30em; color: #4a4452; }
.cta {
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--shu); color: #fff; text-decoration: none;
  padding: 14px 26px; border-radius: 999px; font-weight: 700; font-size: 1.05rem;
  box-shadow: 0 10px 22px -10px rgba(169, 53, 38, 0.8);
  transition: transform 0.15s ease, background 0.15s ease;
}
.cta:hover { background: var(--shu-deep); transform: translateY(-1px); }
.cta svg { width: 20px; height: 20px; }
.devices { margin-top: 14px; font-size: 0.9rem; color: var(--sumi-soft); }
.hero-board { justify-self: center; width: min(470px, 100%); filter: drop-shadow(0 30px 30px rgba(60, 30, 15, 0.35)); animation: float 6s ease-in-out infinite; }
@keyframes float { 0%, 100% { transform: translateY(0) rotate(-1deg); } 50% { transform: translateY(-12px) rotate(0.5deg); } }

/* Faixas */
section { padding-block: clamp(64px, 9vw, 112px); }
.facts { padding-block: 26px; background: var(--paper); border-block: 1px solid var(--line); }
.facts ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.facts li { display: flex; align-items: center; gap: 10px; font-size: 0.95rem; }
.facts li::before { content: ""; flex: none; width: 10px; height: 10px; border-radius: 3px; background: var(--matcha); box-shadow: 0 0 0 3px #e3eedb; }

/* O nome */
.name .wrap { display: grid; grid-template-columns: auto 1fr; gap: clamp(32px, 6vw, 80px); align-items: center; }
.tiles { display: flex; gap: 18px; }
.tile {
  width: clamp(120px, 15vw, 168px); aspect-ratio: 1; border-radius: 26px;
  background: var(--paper); border: 8px solid var(--hinoki);
  box-shadow: inset 0 -6px 0 #efe4d1, var(--shadow);
  display: grid; place-items: center; text-align: center;
}
.tile .kanji { font-size: clamp(3.6rem, 7vw, 5rem); font-weight: 700; line-height: 1; color: var(--sumi); }
.tile.rest .kanji { color: var(--matcha-deep); }
.tile small { display: block; font-size: 0.85rem; color: var(--sumi-soft); margin-top: 6px; }
.name p { font-size: 1.12rem; max-width: 34em; }

/* Recursos */
.features { background: var(--paper); border-block: 1px solid var(--line); }
.section-head { max-width: 40em; margin-bottom: 40px; }
.grid4 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }
.card {
  background: var(--washi); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 28px 28px 22px;
}
.card .icon {
  width: 52px; height: 52px; border-radius: 15px; display: grid; place-items: center; margin-bottom: 16px;
  background: #e3eedb; color: var(--matcha-deep);
}
.card .icon svg { width: 28px; height: 28px; }
.card p { color: #4a4452; margin: 0; }

/* Modos */
.modes .grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.mode { border-radius: var(--radius); padding: 26px; background: var(--paper); border: 1px solid var(--line); box-shadow: var(--shadow); }
.mode h3 { display: flex; align-items: center; gap: 10px; }
.mode h3::before { content: ""; width: 14px; height: 14px; border-radius: 4px; background: var(--c, var(--matcha)); }
.mode p { margin: 0; color: #4a4452; }

/* Imagens */
.gallery .grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 14px; }
.gallery button {
  padding: 0; border: 0; background: none; cursor: zoom-in; border-radius: 16px; overflow: hidden;
  box-shadow: var(--shadow); grid-column: span 2;
}
.gallery button:nth-child(1), .gallery button:nth-child(2) { grid-column: span 3; }
.gallery button img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; transition: transform 0.3s ease; }
.gallery button:hover img { transform: scale(1.03); }
dialog.lightbox { border: 0; padding: 0; background: transparent; max-width: min(1400px, 94vw); }
dialog.lightbox::backdrop { background: rgba(30, 24, 32, 0.82); }
dialog.lightbox img { border-radius: 14px; max-height: 86vh; width: auto; }
dialog.lightbox button {
  position: absolute; top: 10px; right: 10px; width: 42px; height: 42px; border-radius: 50%;
  border: 0; background: rgba(255, 252, 246, 0.92); color: var(--sumi); font-size: 1.4rem; cursor: pointer;
}

/* Trailer */
.trailer video { width: 100%; border-radius: var(--radius); background: #2b2430; box-shadow: var(--shadow); aspect-ratio: 16 / 9; }

/* Chamada final */
.final { text-align: center; background: linear-gradient(180deg, var(--washi), #f1e4d2); }
.final img { width: 88px; height: 88px; border-radius: 22px; margin: 0 auto 22px; box-shadow: var(--shadow); }
.final p { color: #4a4452; max-width: 34em; margin-inline: auto; margin-bottom: 1.6em; }

/* Rodape */
footer { background: var(--sumi); color: #e9e2ea; padding-block: 36px; font-size: 0.92rem; }
footer .wrap { display: flex; flex-wrap: wrap; gap: 14px 28px; align-items: center; justify-content: space-between; }
footer a { color: #fff; }
footer .tm { width: 100%; color: #b5adb9; font-size: 0.8rem; margin: 0; }
.fill { background: #ffe3a1; color: var(--sumi); padding: 0 4px; border-radius: 4px; }

/* Politica */
.policy { padding-block: 56px 88px; }
.policy article { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(24px, 5vw, 56px); max-width: 860px; margin-inline: auto; }
.policy h1 { font-size: clamp(1.8rem, 4vw, 2.4rem); }
.policy h2 { font-size: 1.3rem; margin-top: 1.8em; }
.policy .updated { color: var(--sumi-soft); font-size: 0.92rem; }
.policy table { width: 100%; border-collapse: collapse; font-size: 0.95rem; margin-bottom: 1em; }
.policy th, .policy td { border: 1px solid var(--line); padding: 10px 12px; text-align: left; vertical-align: top; }
.policy th { background: var(--washi); }
.policy ul { padding-left: 1.2em; }
.policy li { margin-bottom: 0.4em; }
.table-scroll { overflow-x: auto; }

[hidden] { display: none !important; }

@media (max-width: 920px) {
  /* Tela estreita: no topo fica so o link da privacidade (o ultimo do menu). */
  .nav a:not(:last-child) { display: none; }
  .hero { background-image: url("../img/loft-1000.webp"); background-position: 30% center; }
  .hero::before { background: linear-gradient(180deg, rgba(247, 241, 230, 0.2) 0%, rgba(247, 241, 230, 0.86) 46%, rgba(247, 241, 230, 0.97) 100%); }
  .hero .wrap { grid-template-columns: 1fr; text-align: center; padding-block: 40px 56px; min-height: 0; }
  .hero-board { order: -1; width: min(250px, 62%); }
  .hero-logo { margin-inline: auto; width: min(300px, 82%); }
  .hero p.lead { margin-inline: auto; }
  .facts ul { grid-template-columns: repeat(2, 1fr); }
  .name .wrap { grid-template-columns: 1fr; justify-items: center; text-align: center; }
  .grid4, .modes .grid3 { grid-template-columns: 1fr; }
  .gallery .grid { grid-template-columns: 1fr; }
  .gallery button, .gallery button:nth-child(1), .gallery button:nth-child(2) { grid-column: auto; }
}
@media (max-width: 520px) {
  body { font-size: 16px; }
  .facts ul { grid-template-columns: 1fr; }
  .brand span { display: none; }
  .tiles { gap: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-board { animation: none; }
  .cta, .gallery button img { transition: none; }
}
