/* Abilly Games: página do estúdio.
   Layout: coluna única de 72rem; abertura com o brasão e a "tela" do jogo em destaque, depois faixas
   alternadas (sobre, propósito, portfólio). Brasão medieval em ouro + ciano de circuito (IA) sobre índigo. */
:root {
  --bg: #eef0f7;
  --surface: #ffffff;
  --ink: #1d1b3c;
  --muted: #59577a;
  --line: #d6d6e7;
  --accent: #b88700;      /* ipê-amarelo, mais escuro para ler no claro */
  --accent-fill: #f2c230;
  --on-accent: #1d1b3c;
  --leaf: #2d7a4c;
  --ai: #0f766e;
  --band: #e3e5f1;
  --shadow: 0 1px 0 rgba(29, 27, 60, .06), 0 12px 32px -18px rgba(29, 27, 60, .35);

  --f-display: "Cinzel", "Trajan Pro", Georgia, serif;
  --f-tech: "Chakra Petch", "Segoe UI", system-ui, sans-serif;
  --f-pixel: "Pixelify Sans", "Courier New", monospace;
  --f-body: "Nunito Sans", "Segoe UI", system-ui, sans-serif;

  --s-1: .875rem; --s0: 1rem; --s1: 1.25rem; --s2: 1.6rem; --s3: 2.2rem; --s4: clamp(2.6rem, 6vw, 4.4rem);
  --wrap: 72rem;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #14132a; --surface: #1d1c3a; --ink: #ecebf8; --muted: #a6a4c6; --line: #2f2d55;
    --accent: #f5c542; --accent-fill: #f5c542; --on-accent: #1a1830; --leaf: #6cc48a; --ai: #5eead4; --band: #1a1934;
    --shadow: 0 1px 0 rgba(0, 0, 0, .3), 0 16px 40px -20px rgba(0, 0, 0, .8);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #14132a; --surface: #1d1c3a; --ink: #ecebf8; --muted: #a6a4c6; --line: #2f2d55;
  --accent: #f5c542; --accent-fill: #f5c542; --on-accent: #1a1830; --leaf: #6cc48a; --ai: #5eead4; --band: #1a1934;
  --shadow: 0 1px 0 rgba(0, 0, 0, .3), 0 16px 40px -20px rgba(0, 0, 0, .8);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { animation: none !important; transition: none !important; } }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 400 var(--s0)/1.65 var(--f-body);
  -webkit-font-smoothing: antialiased;
}
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 10; background: var(--bg); }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--accent-fill); outline-offset: 3px; border-radius: 4px; }
h1, h2, h3 { font-family: var(--f-display); font-weight: 700; line-height: 1.15; margin: 0; text-wrap: balance; letter-spacing: .01em; }
[hidden] { display: none !important; }
p { margin: 0; }

.wrap {
  max-width: var(--wrap); margin: 0 auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}
.eyebrow { font: 600 var(--s-1)/1 var(--f-tech); letter-spacing: .2em; text-transform: uppercase; color: var(--ai); }

/* Navegação */
.nav { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 5; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.nav .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-block: .75rem; }
.brand { display: flex; align-items: center; gap: .6rem; text-decoration: none; }
.brand img { width: 32px; height: 32px; }
.brand-name { display: grid; line-height: 1; }
.brand-name b { font: 900 1.05rem/1 var(--f-display); letter-spacing: .06em; }
.brand-name small { font: 600 .6rem/1 var(--f-tech); letter-spacing: .5em; color: var(--ai); margin-top: 3px; }
.lang { font: 600 var(--s-1)/1 var(--f-tech); letter-spacing: .08em; border: 1px solid var(--line); border-radius: 4px; padding: .35rem .5rem; text-decoration: none; color: var(--muted); }
.lang:hover { color: var(--ink); border-color: var(--muted); }
.nav-links { display: flex; align-items: center; gap: 1.25rem; font-weight: 700; font-size: var(--s-1); }
.nav-links a { text-decoration: none; color: var(--muted); }
.nav-links a:hover { color: var(--ink); }
@media (max-width: 640px) { .nav-links .hide-sm { display: none; } }

/* Botões */
.btn { display: inline-flex; align-items: center; gap: .5rem; padding: .8rem 1.3rem; border-radius: 6px; font: 800 var(--s0)/1 var(--f-body); text-decoration: none; border: 2px solid transparent; cursor: pointer; transition: transform .15s ease, box-shadow .15s ease; }
.btn-primary { background: var(--accent-fill); color: var(--on-accent); box-shadow: 0 4px 0 color-mix(in srgb, var(--accent-fill) 55%, #000); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 6px 0 color-mix(in srgb, var(--accent-fill) 55%, #000); }
.btn-primary:active { transform: translateY(2px); box-shadow: 0 2px 0 color-mix(in srgb, var(--accent-fill) 55%, #000); }
.btn-ghost { border-color: var(--line); color: var(--ink); background: var(--surface); }
.btn-ghost:hover { border-color: var(--muted); }

/* Abertura */
.hero .wrap { display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; padding-block: clamp(3rem, 8vw, 6rem); }
.hero-crest { display: flex; align-items: center; gap: clamp(1rem, 2.5vw, 1.5rem); }
.hero-crest img { width: clamp(76px, 10vw, 116px); height: auto; }
.hero h1 { display: grid; gap: .4rem; }
.hero h1 .w1 { font: 900 var(--s4)/.95 var(--f-display); letter-spacing: .05em; }
.hero h1 .w2 { font: 600 clamp(.95rem, 1.8vw, 1.25rem)/1 var(--f-tech); letter-spacing: .62em; color: var(--ai); }
.hero-text { display: grid; gap: 1.25rem; min-width: 0; }
.hero-text .lead { font-size: var(--s1); color: var(--muted); max-width: 34ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: .5rem; }
.screen { position: relative; transform: rotate(1.5deg); }
.screen-frame { background: #262338; padding: 10px 10px 34px; border-radius: 14px; box-shadow: var(--shadow); }
.screen-frame img, .screen-frame video { display: block; border-radius: 6px; image-rendering: pixelated; aspect-ratio: 1244 / 684; object-fit: cover; width: 100%; height: auto; background: #2a4a1f; }
.screen-label { position: absolute; left: 18px; bottom: 9px; font: 500 .8rem/1 var(--f-pixel); color: #c9c6e6; letter-spacing: .04em; }
.screen-label b { color: #f5c542; font-weight: 600; }
.screen-dot { position: absolute; right: 18px; bottom: 12px; width: 10px; height: 10px; border-radius: 50%; background: #6cc48a; box-shadow: 0 0 8px #6cc48a; }
@media (max-width: 820px) { .hero .wrap { grid-template-columns: 1fr; } .screen { transform: none; } }

/* Seções */
section { scroll-margin-top: 4.5rem; }
.section { padding-block: clamp(3rem, 7vw, 5rem); }
.section-band { background: var(--band); border-block: 1px solid var(--line); }
.section-head { display: grid; gap: .6rem; margin-bottom: 2rem; max-width: 46rem; }
.section-head h2 { font-size: var(--s3); }
.section-head p { color: var(--muted); font-size: var(--s1); }

/* Sobre */
.about { display: grid; grid-template-columns: 1.3fr 1fr; gap: clamp(2rem, 5vw, 4rem); align-items: start; }
.about-text { display: grid; gap: 1rem; max-width: 62ch; min-width: 0; }
.about-text p { font-size: 1.075rem; }
.team { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; border-top: 1px solid var(--line); }
.team li { display: grid; grid-template-columns: 2.75rem 1fr; gap: .9rem; align-items: center; padding-block: .9rem; border-bottom: 1px solid var(--line); }
.team .av { width: 2.75rem; height: 2.75rem; border-radius: 6px; display: grid; place-items: center; font: 600 1.1rem/1 var(--f-display); background: var(--surface); border: 1px solid var(--line); color: var(--accent); }
.team b { display: block; font-weight: 800; }
.team span { color: var(--muted); font-size: var(--s-1); }
@media (max-width: 820px) { .about { grid-template-columns: 1fr; } }

/* Propósito */
.goals { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(1.5rem, 3vw, 2.5rem); }
.goal { display: grid; gap: .6rem; align-content: start; }
.goal svg { width: 40px; height: 40px; image-rendering: pixelated; }
.goal h3 { font-size: var(--s1); }
.goal p { color: var(--muted); }
@media (max-width: 820px) { .goals { grid-template-columns: 1fr; } }

/* Portfólio */
.games { display: grid; grid-template-columns: 2fr 1fr; gap: 1.5rem; }
.game-card { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; box-shadow: var(--shadow); text-decoration: none; display: grid; grid-template-rows: auto 1fr; transition: transform .2s ease; }
.game-card:hover { transform: translateY(-4px); }
.game-card img { aspect-ratio: 16 / 9; object-fit: cover; width: 100%; image-rendering: pixelated; }
.game-body { padding: 1.25rem 1.4rem 1.4rem; display: grid; gap: .6rem; align-content: start; }
.game-body h3 { font-size: var(--s2); }
.game-body p { color: var(--muted); }
.chips { display: flex; flex-wrap: wrap; gap: .4rem; }
.chip { font: 600 .74rem/1.2 var(--f-tech); letter-spacing: .04em; padding: .25rem .55rem; border-radius: 4px; background: var(--band); color: var(--muted); border: 1px solid var(--line); }
.chip-live { color: var(--leaf); border-color: color-mix(in srgb, var(--leaf) 40%, transparent); }
.game-more { font-weight: 800; color: var(--accent); margin-top: .25rem; }
.game-soon { border-style: dashed; box-shadow: none; display: grid; place-content: center; text-align: center; padding: 2rem; gap: .75rem; background: transparent; }
.game-soon:hover { transform: none; }
.game-soon .q { font: 700 3rem/1 var(--f-display); color: var(--line); }
.game-soon h3 { font-size: var(--s1); }
.game-soon p { color: var(--muted); max-width: 24ch; margin: 0 auto; }
@media (max-width: 820px) { .games { grid-template-columns: 1fr; } }

/* Apoie */
.support { display: grid; grid-template-columns: 1.4fr 1fr; gap: 2rem; align-items: center; }
.support h2 { font-size: var(--s3); }
.support p { color: var(--muted); font-size: var(--s1); max-width: 48ch; }
.support-text { display: grid; gap: .9rem; min-width: 0; }
.support-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .75rem; }
.support-list li { display: grid; grid-template-columns: 1.5rem 1fr; gap: .6rem; }
.support-list li::before { content: ""; width: .7rem; height: .7rem; margin-top: .45rem; background: var(--accent-fill); }
@media (max-width: 820px) { .support { grid-template-columns: 1fr; } }

/* Rodapé */
.footer { border-top: 1px solid var(--line); }
.footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; padding-block: 2rem; color: var(--muted); font-size: var(--s-1); }
.footer nav { display: flex; flex-wrap: wrap; gap: 1rem; }
.footer a { text-decoration: none; font-weight: 700; }
.footer a:hover { color: var(--ink); }

/* Aviso */
.toast { position: fixed; left: 50%; bottom: calc(1.25rem + env(safe-area-inset-bottom, 0px)); transform: translate(-50%, 1rem); opacity: 0; pointer-events: none; background: var(--ink); color: var(--bg); padding: .8rem 1.1rem; border-radius: 6px; font-weight: 700; max-width: calc(100% - 32px); text-align: center; transition: opacity .2s ease, transform .2s ease; z-index: 20; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* Card do Risk It (arte em CSS até sair a página do jogo) */
.game-risk:hover { transform: none; }
.risk-art { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background:
  radial-gradient(circle at 50% 55%, rgba(59, 130, 246, .25), transparent 45%),
  linear-gradient(rgba(148, 163, 184, .09) 1px, transparent 1px) 0 0 / 22px 22px,
  linear-gradient(90deg, rgba(148, 163, 184, .09) 1px, transparent 1px) 0 0 / 22px 22px,
  #0f1522; display: grid; place-content: center; justify-items: center; gap: .3rem; border-bottom: 2px solid #ef4444; }
.risk-word { position: relative; z-index: 1; font: 400 clamp(2rem, 4vw, 2.6rem)/1 "Archivo Black", "Arial Black", sans-serif; color: #e5e7eb; letter-spacing: -.02em; text-shadow: 0 2px 0 #000; }
.risk-tag { position: relative; z-index: 1; font: 800 .7rem/1 var(--f-body); letter-spacing: .14em; text-transform: uppercase; color: #fbbf24; }
.risk-drone { position: absolute; left: 72%; top: 34%; width: 14px; height: 14px; margin: -7px; border-radius: 50%; background: #3b82f6; box-shadow: 0 0 0 26px rgba(59, 130, 246, .08), 0 0 14px #3b82f6; }
.risk-shot { position: absolute; height: 3px; width: 34px; border-radius: 2px; background: linear-gradient(90deg, transparent, #fbbf24); }
.risk-shot.s1 { left: 18%; top: 28%; transform: rotate(18deg); }
.risk-shot.s2 { left: 66%; top: 74%; transform: rotate(-12deg); }
.risk-shot.s3 { left: 30%; top: 80%; transform: rotate(-4deg); }
.chip-dev { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 45%, transparent); }
.game-next { font-weight: 800; color: var(--muted); margin-top: .25rem; }
