/* Home: nome + índice sobre a malha de pontos (campo.js + fundo-malha.js). Direção: design-autoral-webgl + design-vanguarda-russa. */
html, body { height: 100%; }
body { overflow: hidden; }
.jp { font-family: var(--jp); text-transform: none; letter-spacing: .1em; }
.ru { font-family: var(--mono); text-transform: uppercase; letter-spacing: .08em; }

#campo { position: fixed; inset: 0; width: 100%; height: 100%; z-index: -1; pointer-events: none; }

.sala { position: fixed; inset: 0; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; padding: 84px var(--gutter) 64px; }

/* ---------- identidade + índice ---------- */
.ident { display: grid; gap: clamp(16px, 2.4vh, 28px); align-content: center; max-width: 720px; }
.kicker { display: flex; flex-wrap: wrap; gap: 6px 14px; }
.kicker .ru, .papel .ru { color: var(--muted); }
.nome, .nome-lente { font-size: clamp(56px, 8.6vw, 168px); line-height: .94; font-weight: 400; letter-spacing: -.045em; text-transform: uppercase; }
.nome > span { padding-top: .14em; margin-top: -.14em; }
.nome > span:nth-child(2) { padding-left: .9em; }
.papel { display: flex; flex-wrap: wrap; gap: 6px 18px; font: 500 12px/1.4 var(--mono); text-transform: uppercase; letter-spacing: .08em; color: var(--ink-2); }
.papel .jp { color: var(--muted); }

.indice { display: grid; margin-top: clamp(8px, 2vh, 24px); border-bottom: 1px solid var(--rule); }
.indice a {
  --a: var(--ink);
  display: grid; grid-template-columns: 64px 1fr auto auto 24px; align-items: baseline; gap: 16px;
  padding: clamp(12px, 1.8vh, 20px) 0; border-top: 1px solid var(--rule); text-decoration: none; position: relative;
}
.indice a[data-area="dev"] { --a: var(--dev); } .indice a[data-area="design"] { --a: var(--design); } .indice a[data-area="dados"] { --a: var(--dados); }
.indice a::before { content: ""; position: absolute; left: 0; right: 0; top: -1px; height: 1px; background: var(--a); transform: scaleX(0); transform-origin: left; transition: transform var(--d-slow) var(--ease-out); }
.indice .n { font: 500 12px/1 var(--mono); color: var(--muted); }
.indice b { font-weight: 400; font-size: clamp(26px, 2.6vw, 44px); letter-spacing: -.03em; line-height: 1; transition: transform var(--d-base) var(--ease-out), color var(--d-fast); }
.indice .lg { display: flex; gap: 10px; font-size: 11px; color: var(--muted); }
.indice .q { font: 500 12px/1 var(--mono); text-transform: uppercase; letter-spacing: .06em; color: var(--ink-2); }
.indice i { font-style: normal; color: var(--muted); transition: transform var(--d-base) var(--ease-out), color var(--d-fast); }
.indice a:is(:hover, :focus-visible)::before { transform: none; }
.indice a:is(:hover, :focus-visible) b { transform: translateX(10px); color: var(--a); }
.indice a:is(:hover, :focus-visible) i { transform: translateX(4px); color: var(--a); }

/* ---------- leitura do modo do campo ---------- */
.leitura { position: fixed; right: var(--gutter); bottom: 72px; display: flex; gap: 12px; align-items: baseline; color: var(--muted); }
.leitura b { font-weight: 500; color: var(--ink); }
.leitura .jp, .leitura .ru { font-size: 11px; }

/* ---------- moldura inferior ---------- */
.moldura {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 3; display: flex; justify-content: space-between; align-items: center; gap: 24px;
  padding: 14px var(--gutter); border-top: 1px solid var(--rule); background: color-mix(in srgb, var(--paper) 70%, transparent); backdrop-filter: blur(6px);
}
.moldura a { color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--rule); }
.moldura a:hover { border-color: var(--ink); }
/* nome: lente que segue o cursor e mostra o nome em russo ou japonês (home.js).
   --x, --y, --r em px no .nome-wrap; o original some dentro do círculo, a tradução só aparece dentro dele. */
.nome-wrap { position: relative; --x: -999px; --y: -999px; --r: 0px; }
.nome-wrap.lente-on .nome {
  -webkit-mask-image: radial-gradient(circle at var(--x) var(--y), transparent var(--r), #000 calc(var(--r) + 1px));
  mask-image: radial-gradient(circle at var(--x) var(--y), transparent var(--r), #000 calc(var(--r) + 1px));
}
.nome-lente { position: absolute; inset: 0; pointer-events: none; clip-path: circle(var(--r) at var(--x) var(--y)); }
.nome-lente .l { position: absolute; white-space: nowrap; }
.nome-lente.jp .l { font-family: "Zen Kaku Gothic New", var(--jp), sans-serif; font-size: .8em; letter-spacing: 0; }
.nome-lente.ru .l { letter-spacing: -.03em; }
.nome-lente i { display: inline-block; width: 0; height: 0; }
.lente-anel {
  position: absolute; left: var(--x); top: var(--y); width: calc(var(--r) * 2); height: calc(var(--r) * 2); translate: -50% -50%;
  border: 1px solid var(--rule); border-radius: 50%; pointer-events: none; opacity: 0; transition: opacity .3s;
}
.lente-on .lente-anel { opacity: 1; }
.lente-anel span { position: absolute; left: 50%; top: -22px; translate: -50% 0; white-space: nowrap; font: 500 10px/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.lente-anel span b { font-weight: 500; color: var(--ink-2); margin-left: 6px; text-transform: none; }

#relogio { font-variant-numeric: tabular-nums; }
.ponto { display: inline-block; width: 6px; height: 6px; background: var(--dados); margin-right: 8px; vertical-align: 1px; animation: pisca 2.4s steps(2) infinite; }
@keyframes pisca { 50% { opacity: .2; } }

/* ---------- telas menores ---------- */
@media (max-width: 820px) {
  body { overflow: auto; }
  .sala { position: static; grid-template-columns: 1fr; padding: 112px var(--gutter) 40px; min-height: 100svh; align-content: center; }
  .indice a { grid-template-columns: 48px 1fr auto 20px; }
  .indice .lg { display: none; }
  .indice b { font-size: 24px; }
  .indice .q { white-space: nowrap; font-size: 11px; }
  .leitura { position: static; margin-top: 32px; flex-wrap: wrap; }
  .moldura { position: static; flex-direction: column; align-items: flex-start; gap: 10px; }
  .desk-only { display: none; }
}
