/* ── VARIABILI ── */
:root {
  --bg: #f5f3ee;
  --surface: #ffffff;
  --surface2: #edeae3;
  --accent1: #e8450a;
  --accent2: #1a6b4a;
  --accent3: #2d4fc4;
  --text: #1a1814;
  --muted: #888077;
  --radius: 16px;
}

/* ── RESET ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ── BASE ── */
body {
  background: var(--bg);
  color: var(--text);
  font-family: 'DM Sans', sans-serif;
  min-height: 100vh;
}

img, video {
  max-width: 100%;
  height: auto;
  max-height: 600px;
}

pre {
  white-space: pre;
}

/* ── HEADER ── */
header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.4rem 2.5rem;
  border-bottom: 1px solid #1a181420;
  position: sticky;
  top: 0;
  background: #f5f3eeee;
  backdrop-filter: blur(12px);
  z-index: 100;
}

.logo {
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: 1.5rem;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.03em;
}
.logo span { color: var(--accent1); }

nav { display: flex; gap: 2rem; list-style: none; }
nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.2s;
}
nav a:hover { color: var(--text); }
nav a.active { color: var(--text); font-weight: 600; }

/* ── FOOTER ── */
footer {
  text-align: center;
  padding: 2rem;
  color: var(--muted);
  font-size: 0.8rem;
  border-top: 1px solid #1a181415;
}
footer a { color: var(--accent1); text-decoration: none; }

/* ══════════════════════════════════════
   HOME
══════════════════════════════════════ */

/* Hero */
.hero {
  text-align: center;
  padding: 6rem 2rem 4rem;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  width: 700px; height: 400px;
  background: radial-gradient(ellipse, #e8450a15 0%, transparent 70%);
  top: 0; left: 50%;
  transform: translateX(-50%);
  pointer-events: none;
}

.hero-tag {
  display: inline-block;
  background: #e8450a10;
  border: 1px solid #e8450a28;
  color: var(--accent1);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.35rem 1rem;
  border-radius: 99px;
  margin-bottom: 1.5rem;
}

.hero h1 {
  font-family: 'Syne', sans-serif;
  font-size: clamp(2.2rem, 6vw, 4.5rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.04em;
  max-width: 760px;
  margin: 0 auto 1rem;
}
.hero h1 em { font-style: normal; color: var(--accent1); }

.hero-sub {
  color: var(--muted);
  font-size: 1.1rem;
}

/* Griglia giochi */
.games-section {
  max-width: 1100px;
  margin: 0 auto;
  padding: 3rem 2rem 5rem;
}

.games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.2rem;
}

.game-card {
  background: var(--surface);
  border: 1px solid #1a181412;
  border-radius: var(--radius);
  padding: 1.4rem;
  display: flex;
  align-items: flex-start;
  gap: 1.1rem;
  text-decoration: none;
  color: var(--text);
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
  position: relative;
  overflow: hidden;
}
.game-card::after {
  content: '→';
  position: absolute;
  right: 1.2rem;
  top: 50%;
  transform: translateY(-50%) translateX(6px);
  opacity: 0;
  transition: opacity 0.2s, transform 0.2s;
  color: var(--accent1);
  font-size: 1.1rem;
}
.game-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px #1a181410;
  border-color: #1a181820;
}
.game-card:hover::after {
  opacity: 1;
  transform: translateY(-50%) translateX(0);
}

.game-icon {
  width: 52px; height: 52px;
  border-radius: 12px;
  object-fit: cover;
  flex-shrink: 0;
  background: var(--surface2);
}

.game-info h2 {
  font-family: 'Syne', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.3rem;
  letter-spacing: -0.02em;
}
.game-info p {
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.45;
}

/* Accenti colorati (da applicare via classe o nth-child nel template) */
.game-card.accent-orange { border-top: 2px solid var(--accent1); }
.game-card.accent-green  { border-top: 2px solid var(--accent2); }
.game-card.accent-blue   { border-top: 2px solid var(--accent3); }

/* ══════════════════════════════════════
   PAGINA INTERNA (testo)
══════════════════════════════════════ */

.page-wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: 4rem 2rem 6rem;
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 4rem;
  align-items: start;
}

/* Etichetta pagina */
.page-label {
  display: inline-block;
  background: #e8450a10;
  border: 1px solid #e8450a28;
  color: var(--accent1);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.3rem 0.9rem;
  border-radius: 99px;
  margin-bottom: 1.2rem;
}

/* Contenuto articolo */
.content {
  min-width: 0;
}

.content h1 {
  font-family: 'Syne', sans-serif;
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.05;
  margin-bottom: 2.5rem;
}

.content h2 {
  font-family: 'Syne', sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-top: 2.8rem;
  margin-bottom: 0.9rem;
  color: var(--text);
}
.content h2::before {
  content: '';
  display: inline-block;
  width: 6px; height: 6px;
  background: var(--accent1);
  border-radius: 50%;
  margin-right: 0.6rem;
  vertical-align: middle;
  position: relative;
  top: -1px;
}
.content h2:not(:first-of-type) {
  padding-top: 0.5rem;
  border-top: 1px solid #1a181412;
}

.content p {
  font-size: 1rem;
  line-height: 1.75;
  color: #3a3630;
  margin-bottom: 1.1rem;
}
.content strong { color: var(--text); font-weight: 600; }
.content em { font-style: italic; color: var(--muted); }
.content a {
  color: var(--accent1);
  text-decoration: none;
  border-bottom: 1px solid #e8450a40;
  transition: border-color 0.2s;
}
.content a:hover { border-color: var(--accent1); }

/* Sidebar */
.sidebar {
  position: sticky;
  top: 5rem;
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.sidebar-card {
  background: var(--surface);
  border: 1px solid #1a181412;
  border-radius: var(--radius);
  padding: 1.4rem;
}
.sidebar-card h3 {
  font-family: 'Syne', sans-serif;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 1rem;
}
.sidebar-card ul { list-style: none; display: flex; flex-direction: column; gap: 0.5rem; }
.sidebar-card ul li a {
  font-size: 0.88rem;
  color: var(--text);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: color 0.2s;
}
.sidebar-card ul li a:hover { color: var(--accent1); }
.sidebar-card ul li a::before {
  content: '→';
  font-size: 0.75rem;
  color: var(--accent1);
  opacity: 0.6;
}

.author-card {
  background: var(--surface);
  border: 1px solid #1a181412;
  border-left: 3px solid var(--accent2);
  border-radius: var(--radius);
  padding: 1.4rem;
}
.author-card .name {
  font-family: 'Syne', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.3rem;
}
.author-card .role {
  font-size: 0.82rem;
  color: var(--muted);
  margin-bottom: 0.8rem;
  line-height: 1.4;
}
.author-card a { font-size: 0.82rem; color: var(--accent1); text-decoration: none; }

/* ── RESPONSIVE ── */
@media (max-width: 720px) {
  header { padding: 1rem 1.2rem; }
  .page-wrap { grid-template-columns: 1fr; gap: 2rem; }
  .sidebar { position: static; }
}





  /* ── PAGINA APP ── */

  .app-hero {
    text-align: center;
    padding: 4rem 2rem 3rem;
    position: relative;
    overflow: hidden;
  }
  .app-hero::before {
    content: '';
    position: absolute;
    width: 700px; height: 300px;
    background: radial-gradient(ellipse, #e8450a15 0%, transparent 70%);
    top: 0; left: 50%;
    transform: translateX(-50%);
    pointer-events: none;
  }
  .app-hero h1 {
    font-family: 'Syne', sans-serif;
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 800;
    letter-spacing: -0.04em;
    line-height: 1.05;
    margin-bottom: 0.6rem;
  }
  .app-hero p {
    color: var(--muted);
    font-size: 1rem;
  }

  /* ── LISTA APP ── */
  .app-section {
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem 2rem 5rem;
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
  }

  .app-card {
    background: var(--surface);
    border: 1px solid #1a181412;
    border-radius: var(--radius);
    padding: 1.6rem 1.8rem;
    text-decoration: none;
    color: var(--text);
    display: grid;
    grid-template-columns: 56px 1fr auto;
    gap: 1.2rem;
    align-items: start;
    transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
    position: relative;
  }

  .app-icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    object-fit: cover;
    flex-shrink: 0;
    background: var(--surface2);
  }
  .app-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 28px #1a181410;
    border-color: #1a181820;
  }

  .app-card-main h2 {
    font-family: 'Syne', sans-serif;
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-top: 0;  
    margin-bottom: 0.3rem;
    color: var(--text);
    text-decoration: none;
  }
  .app-card-main h2::before {
    content: none;
  }
  .app-card-main h2 a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s;
  }
  .app-card-main h2 a:hover { color: var(--accent1); }

  .app-desc {
    font-size: 0.9rem;
    color: var(--muted);
    margin-bottom: 1rem;
    line-height: 1.5;
  }

  .app-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1.2rem;
  }

  .meta-item {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.78rem;
    color: var(--muted);
  }
  .meta-item .meta-label {
    font-weight: 500;
    color: #6a6460;
  }

  /* tag caratteristiche */
  .app-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-top: 0.8rem;
  }
  .tag {
    font-size: 0.7rem;
    font-weight: 500;
    background: #e8450a0d;
    border: 1px solid #e8450a20;
    color: var(--accent1);
    padding: 0.2rem 0.6rem;
    border-radius: 99px;
    letter-spacing: 0.02em;
  }

  /* lato destro: url + data */
  .app-card-side {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.6rem;
    min-width: 140px;
  }

  .app-url {
    font-size: 0.78rem;
    color: var(--accent1);
    text-decoration: none;
    border-bottom: 1px solid #e8450a30;
    transition: border-color 0.2s;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 160px;
  }
  .app-url:hover { border-color: var(--accent1); }

  .app-date {
    font-size: 0.75rem;
    color: var(--muted);
    white-space: nowrap;
  }

  .app-github {
    font-size: 0.75rem;
    color: var(--muted);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.3rem;
    transition: color 0.2s;
  }
  .app-github:hover { color: var(--text); }

  /* accenti */
  /* .app-card:nth-child(1)  { border-left: 3px solid var(--accent1); }
  .app-card:nth-child(6)  { border-left: 3px solid var(--accent2); }
  .app-card:nth-child(11) { border-left: 3px solid var(--accent3); } */

  @media (max-width: 600px) {
    .app-card { grid-template-columns: 56px 1fr; }
    .app-card-side { grid-column: 1 / -1; align-items: flex-start; flex-direction: row; flex-wrap: wrap; }
  }

  