/*
 * Nekogumi: a identidade dos apps ("papel de dia, Tóquio à noite"). Tokens iguais aos de apps/mobile/src/theme.ts
 * do Nekogo: washi e nankim de dia, tinta noturna e neon à noite; shu só em selo, destaque e erro.
 */

:root {
  --fundo: #F3E9D2;
  --superficie: #FAF4E6;
  --elevada: #FFFCF4;
  --afundada: #EBDFC3;
  --borda: #D9CBA8;
  --borda-forte: #C2B28C;
  --texto: #1B1916;
  --texto-suave: #3A352E;
  --apagado: #5C554A;
  --shu: #B8392A;
  --sobre-shu: #FAF4E6;
  --primario: #1B1916;
  --sobre-primario: #FAF4E6;
  --anil: #2D5DA8;
  --ouro: #9A6A12;
  --musgo: #2F7D6A;
  --secundario: #F5E6BE;
  --secundario-toque: #EBD8A6;
  --grade: rgba(170, 140, 80, 0.14);
  --brilho: none;
  --carimbo: 6px 6px 0 rgba(27, 25, 22, 0.12);
  --sombra: 0 24px 60px -28px rgba(27, 25, 22, 0.35);
  --topo-fundo: rgba(243, 233, 210, 0.86);

  --f-titulo: "Shippori Mincho B1", "Hiragino Mincho ProN", "Yu Mincho", Georgia, serif;
  --f-texto: "Zen Kaku Gothic New", "Hiragino Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-kanji: "Klee One", "Hiragino Mincho ProN", serif;
  --largura: 1180px;
  --margem: 20px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --fundo: #0D1017;
    --superficie: #161B25;
    --elevada: #232B38;
    --afundada: #11151D;
    --borda: #2A3342;
    --borda-forte: #3A4558;
    --texto: #ECEFF4;
    --texto-suave: #C9CED8;
    --apagado: #A3ADBD;
    --shu: #FF6A4D;
    --sobre-shu: #1A0B07;
    --primario: #FF6A4D;
    --sobre-primario: #1A0B07;
    --anil: #6FA8FF;
    --ouro: #F5B748;
    --musgo: #5FD3B6;
    --secundario: #231F19;
    --secundario-toque: #2F2819;
    --grade: rgba(111, 168, 255, 0.08);
    --brilho: 0 0 24px rgba(255, 106, 77, 0.32);
    --carimbo: 0 0 0 1px rgba(111, 168, 255, 0.18), 0 0 28px rgba(111, 168, 255, 0.10);
    --sombra: 0 24px 70px -24px rgba(0, 0, 0, 0.8);
    --topo-fundo: rgba(13, 16, 23, 0.84);
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --fundo: #0D1017;
  --superficie: #161B25;
  --elevada: #232B38;
  --afundada: #11151D;
  --borda: #2A3342;
  --borda-forte: #3A4558;
  --texto: #ECEFF4;
  --texto-suave: #C9CED8;
  --apagado: #A3ADBD;
  --shu: #FF6A4D;
  --sobre-shu: #1A0B07;
  --primario: #FF6A4D;
  --sobre-primario: #1A0B07;
  --anil: #6FA8FF;
  --ouro: #F5B748;
  --musgo: #5FD3B6;
  --secundario: #231F19;
  --secundario-toque: #2F2819;
  --grade: rgba(111, 168, 255, 0.08);
  --brilho: 0 0 24px rgba(255, 106, 77, 0.32);
  --carimbo: 0 0 0 1px rgba(111, 168, 255, 0.18), 0 0 28px rgba(111, 168, 255, 0.10);
  --sombra: 0 24px 70px -24px rgba(0, 0, 0, 0.8);
  --topo-fundo: rgba(13, 16, 23, 0.84);
  color-scheme: dark;
}

/* Imagens de cada tema: a do dia some à noite e vice-versa. */
.so-noite { display: none !important; }
:root[data-theme="dark"] .so-dia { display: none !important; }
:root[data-theme="dark"] .so-noite { display: block !important; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .so-dia { display: none !important; }
  :root:not([data-theme="light"]) .so-noite { display: block !important; }
}

/* Base */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
  margin: 0;
  background: var(--fundo);
  color: var(--texto);
  font-family: var(--f-texto);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--f-titulo); font-weight: 800; line-height: 1.15; margin: 0; letter-spacing: -0.01em; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
ul, ol { margin: 0; padding: 0; list-style: none; }
[lang="ja"] { font-family: var(--f-kanji); letter-spacing: 0; }
:focus-visible { outline: 3px solid var(--anil); outline-offset: 3px; border-radius: 6px; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

.largura { width: 100%; max-width: calc(var(--largura) + 2 * var(--margem)); margin: 0 auto; padding: 0 var(--margem); }
.estreita { max-width: calc(820px + 2 * var(--margem)); }
.apagado { color: var(--apagado); }
.grade {
  background-color: var(--fundo);
  background-image: linear-gradient(var(--grade) 1px, transparent 1px), linear-gradient(90deg, var(--grade) 1px, transparent 1px);
  background-size: 28px 28px;
}

.pular {
  position: absolute; left: 12px; top: -60px; z-index: 50;
  background: var(--primario); color: var(--sobre-primario); padding: 10px 16px; border-radius: 10px; text-decoration: none;
}
.pular:focus { top: 12px; }

/* Botões */
.botao {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 50px; padding: 0 24px; border-radius: 14px;
  font: 700 16px/1 var(--f-texto); text-decoration: none; cursor: pointer;
  border: 1.5px solid transparent;
  transition: transform 0.15s ease, background-color 0.15s ease, box-shadow 0.2s ease;
}
.botao:active { transform: translateY(1px); }
.botao-primario { background: var(--primario); color: var(--sobre-primario); box-shadow: var(--brilho); }
.botao-primario:hover { box-shadow: var(--brilho), 0 6px 18px -8px rgba(27, 25, 22, 0.55); }
.botao-secundario { background: var(--secundario); color: var(--texto); border-color: var(--borda-forte); }
.botao-secundario:hover { background: var(--secundario-toque); }
.botao-pequeno { min-height: 40px; padding: 0 16px; font-size: 15px; border-radius: 11px; }
.botao-icone {
  width: 40px; height: 40px; display: grid; place-items: center; border-radius: 11px; cursor: pointer;
  background: var(--secundario); border: 1.5px solid var(--borda-forte); color: var(--texto);
}
.botao-icone svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.botao-icone .icone-lua { fill: currentColor; stroke: none; }
.icone-sol { display: none; }
:root[data-theme="dark"] .icone-sol { display: block; }
:root[data-theme="dark"] .icone-lua { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .icone-sol { display: block; }
  :root:not([data-theme="light"]) .icone-lua { display: none; }
}
.botao-texto { background: none; border: 0; padding: 4px 0; color: var(--apagado); font: inherit; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.acoes { display: flex; flex-wrap: wrap; gap: 12px; }

/* Topo */
.topo {
  position: sticky; top: 0; z-index: 20;
  background: var(--topo-fundo);
  -webkit-backdrop-filter: saturate(1.2) blur(12px); backdrop-filter: saturate(1.2) blur(12px);
  border-bottom: 1px solid var(--borda);
}
.topo-linha { display: flex; align-items: center; gap: 24px; height: 68px; }
.marca { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.marca-selo { width: 40px; height: 40px; }
.marca-nome { font-family: var(--f-titulo); font-weight: 800; font-size: 22px; letter-spacing: -0.01em; }
.marca-kanji { color: var(--shu); font-family: var(--f-titulo); font-weight: 800; font-size: 20px; }
.topo-nav { display: flex; gap: 26px; margin-left: auto; }
.topo-nav a { text-decoration: none; color: var(--texto-suave); font-weight: 500; font-size: 15px; }
.topo-nav a:hover { color: var(--texto); text-decoration: underline; text-decoration-color: var(--shu); text-underline-offset: 6px; text-decoration-thickness: 2px; }
.topo-acoes { display: flex; align-items: center; gap: 10px; }

/* Sobrelinha (o Eyebrow dos apps) e o selo da área */
.sobrelinha { font-size: 14px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--shu); }
.sobrelinha [lang="ja"] { text-transform: none; letter-spacing: 0.05em; font-size: 15px; }
.selo-area {
  display: inline-grid; place-items: center; width: 52px; height: 52px; margin-bottom: 18px;
  background: var(--shu); color: var(--sobre-shu); border-radius: 8px 6px 9px 7px;
  font-family: var(--f-kanji); font-size: 30px; font-weight: 600; line-height: 1;
  transform: rotate(-4deg); box-shadow: var(--brilho);
}

/* Hero */
.hero { padding: 72px 0 96px; border-bottom: 1px solid var(--borda); overflow: hidden; }
.hero-grade { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 56px; align-items: center; }
.hero h1 { font-size: clamp(42px, 6vw, 76px); margin: 18px 0 22px; }
.hero h1 em { font-style: normal; color: var(--shu); }
.hero-linha { font-size: 19px; color: var(--texto-suave); max-width: 34em; margin-bottom: 32px; }
.hero-fatos { display: flex; flex-wrap: wrap; gap: 10px 28px; margin-top: 36px; color: var(--apagado); font-size: 15px; }
.hero-fatos strong { display: block; font-family: var(--f-titulo); font-weight: 800; font-size: 30px; color: var(--texto); line-height: 1.1; }

.hero-arte { position: relative; height: 600px; }
.aparelho {
  margin: 0; position: absolute; width: 270px; aspect-ratio: 390 / 844;
  border-radius: 40px; padding: 9px; background: #1B1916;
  box-shadow: var(--sombra), var(--carimbo);
}
.aparelho img { width: 100%; height: 100%; object-fit: cover; object-position: top; border-radius: 31px; }
.aparelho-frente { left: 6%; top: 10px; transform: rotate(-3deg); z-index: 2; }
.aparelho-fundo { right: 2%; top: 60px; transform: rotate(4deg); }
.hero-selo { position: absolute; width: 124px; height: 124px; left: -34px; bottom: -18px; z-index: 3; transform: rotate(-8deg); filter: drop-shadow(0 8px 16px rgba(27, 25, 22, 0.25)); }
:root[data-theme="dark"] .aparelho { background: #05070B; box-shadow: var(--sombra), 0 0 0 1px #2A3342; }

.hero-selo { animation: carimbar 0.7s cubic-bezier(0.2, 0.9, 0.3, 1.2) 0.4s both; }
@keyframes carimbar {
  from { opacity: 0; transform: rotate(-20deg) scale(1.6); }
  to { opacity: 1; transform: rotate(-8deg) scale(1); }
}

/* Seções */
.secao { padding: 104px 0; }
.secao-faixa { border-top: 1px solid var(--borda); border-bottom: 1px solid var(--borda); }
.secao-topo { max-width: 720px; margin-bottom: 52px; }
.secao-topo h2, .detalhe-texto h2 { font-size: clamp(32px, 4vw, 48px); margin-top: 12px; }

/* Cartões dos apps */
.apps-grade { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.app-cartao {
  display: flex; flex-direction: column; gap: 20px; padding: 30px;
  background: var(--superficie); border: 1.5px solid var(--borda-forte); border-radius: 22px;
  box-shadow: var(--carimbo);
}
.app-cartao .botao { margin-top: auto; align-self: flex-start; }
.app-cabeca { display: flex; align-items: center; gap: 18px; }
.app-icone { width: 76px; height: 76px; border-radius: 22%; box-shadow: 0 6px 14px -6px rgba(27, 25, 22, 0.45); }
.app-nome { display: flex; align-items: center; gap: 10px; font-size: 28px; }
.app-kanji { color: var(--shu); font-family: var(--f-titulo); font-weight: 800; font-size: 25px; }
.barra { width: 1.5px; height: 26px; background: var(--borda-forte); }
.app-sentido { color: var(--apagado); font-size: 15px; margin-top: 2px; }
.app-linha { color: var(--texto-suave); }
.app-em-breve { background: transparent; border-style: dashed; box-shadow: none; }
.app-em-breve .app-icone { opacity: 0.85; }
.selo-breve {
  margin-top: auto; align-self: flex-start;
  border: 1.5px dashed var(--borda-forte); color: var(--apagado); border-radius: 999px; padding: 8px 16px; font-weight: 700; font-size: 14px;
}

.lista-marcada { display: grid; gap: 10px; }
.lista-marcada li { position: relative; padding-left: 28px; color: var(--texto-suave); }
.lista-marcada li::before {
  content: ""; position: absolute; left: 2px; top: 0.5em; width: 12px; height: 12px;
  border-radius: 3px; background: var(--shu); transform: rotate(-6deg);
}

/* Detalhes de cada app */
.detalhe { display: grid; grid-template-columns: 0.85fr 1.15fr; gap: 64px; align-items: center; }
.detalhe-invertido .detalhe-texto { order: 2; }
.detalhe-texto p:not(.sobrelinha) { color: var(--texto-suave); margin: 18px 0 24px; font-size: 18px; }
.janela {
  margin: 0; border-radius: 18px; overflow: hidden; border: 1.5px solid var(--borda-forte);
  background: var(--superficie); box-shadow: var(--sombra), var(--carimbo);
}
.janela img { width: 100%; height: auto; }
.dupla { position: relative; }
.dupla-gato { position: absolute; left: 7%; bottom: 24px; width: 180px; height: 180px; }
.aparelho-sobre { position: relative; width: 230px; margin: -36px 4% 0 auto; border-radius: 34px; padding: 8px; transform: rotate(3deg); }
.aparelho-sobre img { border-radius: 25px; }

/* Conta */
.vantagens { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.vantagem { background: var(--superficie); border: 1.5px solid var(--borda); border-radius: 20px; padding: 26px 26px 30px; }
.vantagem-gato { width: 96px; height: 96px; margin: -6px 0 10px -6px; }
.vantagem h3 { font-size: 22px; margin-bottom: 8px; }
.vantagem p { color: var(--texto-suave); }

.passos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 64px; counter-reset: passo; }
.passo { display: grid; grid-template-columns: auto 1fr; column-gap: 18px; row-gap: 4px; align-items: start; }
.passo-numero {
  grid-row: span 2; width: 56px; height: 56px; display: grid; place-items: center;
  border: 1.5px dashed var(--borda-forte); border-radius: 12px; font-size: 28px; font-weight: 600; color: var(--texto);
  background: var(--fundo);
}
.passo h3 { font-size: 20px; margin-top: 4px; }
.passo p { color: var(--apagado); font-size: 15.5px; }

/* Perguntas */
.perguntas { display: grid; gap: 12px; }
.perguntas details { background: var(--superficie); border: 1.5px solid var(--borda); border-radius: 16px; }
.perguntas details[open] { border-color: var(--borda-forte); }
.perguntas summary {
  list-style: none; cursor: pointer; padding: 20px 56px 20px 24px; position: relative;
  font-weight: 700; font-size: 18px;
}
.perguntas summary::-webkit-details-marker { display: none; }
.perguntas summary::after {
  content: ""; position: absolute; right: 24px; top: 50%; width: 10px; height: 10px; margin-top: -7px;
  border-right: 2px solid var(--apagado); border-bottom: 2px solid var(--apagado); transform: rotate(45deg); transition: transform 0.2s ease;
}
.perguntas details[open] summary::after { transform: rotate(-135deg); margin-top: -2px; }
.perguntas details p { padding: 0 24px 22px; color: var(--texto-suave); }

/* Chamada final */
.chamada { padding: 96px 0 112px; }
.chamada-caixa {
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 32px;
  background: var(--superficie); border: 1.5px solid var(--borda-forte); border-radius: 26px;
  padding: 36px 44px; box-shadow: var(--carimbo);
  max-width: calc(var(--largura) - 0px);
}
.chamada-gato { width: 128px; height: 128px; }
.chamada h2 { font-size: clamp(28px, 3.2vw, 38px); margin-bottom: 8px; }
.chamada p { color: var(--texto-suave); }

/* Rodapé */
.rodape { border-top: 1px solid var(--borda); background: var(--afundada); padding: 64px 0 32px; font-size: 15px; }
.rodape-grade { display: grid; grid-template-columns: 1.3fr 0.7fr 0.8fr 1.5fr; gap: 40px; }
.rodape-marca { display: flex; gap: 14px; align-items: center; }
.rodape-marca img { width: 60px; height: 60px; }
.rodape-marca .marca-nome { font-size: 22px; }
.rodape-titulo { font-family: var(--f-texto); font-size: 13px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--apagado); margin-bottom: 14px; }
.rodape ul { display: grid; gap: 8px; }
.rodape a { text-decoration: none; }
.rodape a:hover { text-decoration: underline; text-underline-offset: 3px; }
.rodape-fontes { color: var(--apagado); line-height: 1.65; }
.rodape-fontes a { color: var(--texto-suave); text-decoration: underline; text-decoration-color: var(--borda-forte); text-underline-offset: 3px; }
.rodape-base { display: flex; justify-content: space-between; align-items: center; margin-top: 48px; padding-top: 22px; border-top: 1px solid var(--borda); color: var(--apagado); }

/* Entrada ao rolar */
.espera { opacity: 0; transform: translateY(18px); transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1); }
.espera.entrou { opacity: 1; transform: none; }

/* Tablet */
@media (max-width: 1023px) {
  .hero-grade, .detalhe { grid-template-columns: 1fr; gap: 48px; }
  .detalhe-invertido .detalhe-texto { order: 0; }
  .hero-arte { height: 560px; max-width: 560px; margin: 0 auto; width: 100%; }
  .apps-grade, .vantagens { grid-template-columns: 1fr; max-width: 640px; }
  .passos { grid-template-columns: 1fr; max-width: 640px; }
  .chamada-caixa { grid-template-columns: auto 1fr; }
  .chamada-caixa .acoes { grid-column: 1 / -1; }
  .rodape-grade { grid-template-columns: 1fr 1fr; }
}

/* Celular */
@media (max-width: 699px) {
  body { font-size: 16px; }
  :root { --margem: 16px; }
  .topo-nav { display: none; }
  .topo-acoes { margin-left: auto; }
  .topo-linha { height: 60px; }
  .marca-nome { font-size: 20px; }
  .marca-kanji { font-size: 18px; }
  .hero { padding: 44px 0 64px; }
  .hero-linha { font-size: 17px; }
  .hero-fatos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; font-size: 13.5px; line-height: 1.35; }
  .hero-fatos strong { font-size: 26px; }
  .hero .acoes .botao { flex: 1 1 100%; }
  .hero-arte { height: 470px; }
  .aparelho { width: 200px; border-radius: 30px; padding: 7px; }
  .aparelho img { border-radius: 24px; }
  .aparelho-frente { left: 0; }
  .aparelho-fundo { right: 0; top: 50px; }
  .hero-selo { width: 96px; height: 96px; left: auto; right: 38%; bottom: 0; }
  .secao { padding: 72px 0; }
  .secao-topo { margin-bottom: 36px; }
  .app-cartao { padding: 24px; }
  .app-nome { font-size: 25px; }
  .app-kanji { font-size: 22px; }
  .aparelho-sobre { width: 170px; margin: -40px 4% 0 auto; border-radius: 26px; padding: 6px; }
  .dupla-gato { width: 120px; height: 120px; left: 2%; bottom: 12px; }
  .aparelho-sobre img { border-radius: 18px; }
  .chamada-caixa { grid-template-columns: 1fr; padding: 28px 22px; text-align: left; gap: 18px; }
  .chamada-gato { width: 96px; height: 96px; }
  .chamada .acoes .botao { flex: 1 1 100%; }
  .rodape-grade { grid-template-columns: 1fr; gap: 32px; }
  .rodape-base { flex-direction: column; gap: 10px; align-items: flex-start; }
}

/* 404 */
.perdido { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 18px; padding-top: 40px; padding-bottom: 40px; }
.perdido img { width: 180px; height: 180px; }
.perdido h1 { font-size: clamp(32px, 5vw, 48px); }
.perdido p { color: var(--texto-suave); max-width: 32em; }
.perdido .acoes { justify-content: center; margin-top: 8px; }
