/*
 * Author: Fabiel Santos
 * Date: 2026-03-22
 * Time: Session (America/Sao_Paulo)
 * Project: aprendendo-HTML- (GitHub Pages) — Tuto Games professional theme
 * Purpose: Design system, responsive layout, scoped image sizing (no global width:100% on all imgs).
 */

:root {
  --bg-deep: #0a0f1a;
  --bg-panel: #111827;
  --bg-panel-hover: #162032;
  --surface: #1e293b;
  --text: #f1f5f9;
  --text-muted: #94a3b8;
  --accent: #38bdf8;
  --accent-dim: rgba(56, 189, 248, 0.15);
  --gold: #fbbf24;
  --gold-dim: rgba(251, 191, 36, 0.12);
  --border: rgba(148, 163, 184, 0.2);
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
  --font: "Plus Jakarta Sans", system-ui, sans-serif;
  --font-display: "Outfit", system-ui, sans-serif;
  --header-h: 64px;
  --max: 1120px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg-deep);
  background-image:
    radial-gradient(ellipse 120% 80% at 50% -20%, rgba(56, 189, 248, 0.12), transparent 50%),
    radial-gradient(ellipse 60% 40% at 100% 50%, rgba(251, 191, 36, 0.06), transparent 45%);
  min-height: 100vh;
}

img {
  max-width: 100%;
  height: auto;
}

a {
  color: var(--accent);
}

a:hover {
  text-decoration: underline;
}

:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  z-index: 999;
  padding: 0.75rem 1rem;
  background: var(--gold);
  color: #0a0f1a;
  font-weight: 600;
}

.skip-link:focus {
  left: 1rem;
  top: 1rem;
}

/* --- Header --- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 15, 26, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.site-header__bar {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 1.25rem;
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  color: var(--text);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
}

.brand__mark {
  color: var(--gold);
  font-size: 1rem;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.site-nav a {
  text-decoration: none;
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.9rem;
  padding: 0.45rem 0.75rem;
  border-radius: 999px;
  transition: color 0.15s, background 0.15s;
}

.site-nav a:hover {
  color: var(--text);
  background: var(--accent-dim);
  text-decoration: none;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  cursor: pointer;
  padding: 0;
}

.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--text);
  margin: 0 auto;
}

@media (max-width: 768px) {
  .nav-toggle {
    display: flex;
  }

  .site-nav {
    position: fixed;
    inset: var(--header-h) 0 auto 0;
    flex-direction: column;
    align-items: stretch;
    padding: 1rem;
    background: var(--bg-panel);
    border-bottom: 1px solid var(--border);
    transform: translateY(-120%);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.25s ease, opacity 0.25s ease;
  }

  .site-nav.is-open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .site-nav a {
    border-radius: var(--radius-sm);
  }
}

/* --- Hero --- */
.hero {
  position: relative;
}

.hero__media {
  position: relative;
  max-height: min(56vh, 520px);
  overflow: hidden;
}

.hero__img {
  display: block;
  width: 100%;
  height: min(56vh, 520px);
  object-fit: cover;
  object-position: center;
}

.hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    var(--bg-deep) 0%,
    rgba(10, 15, 26, 0.75) 35%,
    transparent 70%
  );
  pointer-events: none;
}

.hero__content {
  position: relative;
  max-width: var(--max);
  margin: -4rem auto 0;
  padding: 0 1.25rem 2.5rem;
  z-index: 2;
}

.hero__eyebrow {
  margin: 0 0 0.5rem;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(1.85rem, 4.5vw, 2.75rem);
  font-weight: 700;
  line-height: 1.15;
  margin: 0 0 1rem;
  color: var(--text);
}

.hero__lead {
  margin: 0 0 1.5rem;
  color: var(--text-muted);
  max-width: 40rem;
  font-size: 1.05rem;
}

.inline-link {
  color: var(--accent);
  font-weight: 600;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.35rem;
  border-radius: 999px;
  font-family: inherit;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.12s ease, background 0.15s, border-color 0.15s;
}

.btn--primary {
  background: linear-gradient(135deg, #0ea5e9, #0284c7);
  color: #fff;
  box-shadow: 0 8px 24px rgba(14, 165, 233, 0.35);
}

.btn--primary:hover {
  filter: brightness(1.06);
  text-decoration: none;
}

.btn--ghost {
  background: transparent;
  border-color: var(--border);
  color: var(--text);
}

.btn--ghost:hover {
  background: var(--surface);
  text-decoration: none;
}

/* --- Sections --- */
.container {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 1.25rem;
}

.container--narrow {
  max-width: 640px;
}

.section {
  padding: 3.5rem 0;
}

.section--tint {
  background: rgba(17, 24, 39, 0.5);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.section h2 {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 1.85rem);
  margin: 0 0 0.75rem;
  color: var(--text);
}

.section__lead {
  margin: 0 0 1.5rem;
  color: var(--text-muted);
  max-width: 48rem;
}

.pill-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.pill-list li {
  padding: 0.4rem 0.9rem;
  background: var(--gold-dim);
  border: 1px solid rgba(251, 191, 36, 0.25);
  border-radius: 999px;
  font-size: 0.9rem;
  color: var(--gold);
}

/* Cards */
.cards {
  display: grid;
  gap: 1.25rem;
}

@media (min-width: 700px) {
  .cards--3 {
    grid-template-columns: repeat(3, 1fr);
  }
}

.card {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.35rem 1.5rem;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.2);
  transition: border-color 0.2s, background 0.2s;
}

.card:hover {
  border-color: rgba(56, 189, 248, 0.35);
  background: var(--bg-panel-hover);
}

.card__title {
  font-family: var(--font-display);
  font-size: 1.1rem;
  margin: 0 0 0.5rem;
  color: var(--accent);
}

.card__body {
  margin: 0;
  font-size: 0.95rem;
  color: var(--text-muted);
}

/* Sword grid — fixed image frames */
.sword-grid {
  display: grid;
  gap: 1.25rem;
}

@media (min-width: 640px) {
  .sword-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.sword-card {
  display: flex;
  flex-direction: column;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color 0.2s;
}

@media (min-width: 520px) {
  .sword-card {
    flex-direction: row;
  }
}

.sword-card:hover {
  border-color: rgba(251, 191, 36, 0.35);
}

.sword-card--wide {
  grid-column: 1 / -1;
}

.sword-card__visual {
  flex-shrink: 0;
  width: 100%;
  min-height: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at 50% 50%, var(--gold-dim), transparent 70%);
  padding: 1rem;
}

@media (min-width: 520px) {
  .sword-card__visual {
    width: 160px;
    min-height: auto;
  }
}

.sword-card__visual img {
  width: 120px;
  height: 120px;
  max-width: none;
  object-fit: contain;
  display: block;
}

.sword-card__body {
  padding: 1.25rem 1.35rem;
  flex: 1;
}

.sword-card__name {
  font-family: var(--font-display);
  font-size: 1.1rem;
  margin: 0 0 0.5rem;
  color: var(--gold);
}

.sword-card__how {
  margin: 0;
  font-size: 0.92rem;
  color: var(--text-muted);
}

.sword-card__how a {
  font-weight: 600;
}

/* Link stack */
.link-stack {
  list-style: none;
  margin: 0;
  padding: 0;
}

.link-stack li {
  border-bottom: 1px solid var(--border);
}

.link-stack a {
  display: block;
  padding: 0.85rem 0;
  text-decoration: none;
  font-weight: 500;
  color: var(--accent);
}

.link-stack a:hover {
  color: var(--text);
  text-decoration: underline;
}

/* Footer */
.site-footer {
  margin-top: 2rem;
  padding: 2.5rem 0 3rem;
  border-top: 1px solid var(--border);
  background: #070b12;
}

.site-footer__grid {
  display: grid;
  gap: 2rem;
}

@media (min-width: 600px) {
  .site-footer__grid {
    grid-template-columns: 1fr 1fr;
    align-items: start;
  }
}

.site-footer__brand {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.1rem;
  margin: 0 0 0.5rem;
}

.site-footer__note {
  margin: 0;
  font-size: 0.85rem;
  color: var(--text-muted);
  max-width: 28rem;
}

.site-footer__label {
  margin: 0 0 0.35rem;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

.site-footer__fine {
  margin: 0.35rem 0 0;
  font-size: 0.85rem;
  color: var(--text-muted);
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .site-nav {
    transition: none;
  }
}
