/* Indie Radar Italia — Light blog layout */

:root {
  --cream: #faf8f5;
  --cream-dark: #f0ebe4;
  --cream-border: #e8e0d6;
  --terracotta: #c45c3e;
  --terracotta-dark: #a84a30;
  --terracotta-light: #e8a090;
  --ink: #2c2419;
  --ink-muted: #6b5f52;
  --ink-light: #9a8f82;
  --white: #ffffff;
  --sidebar-w: 280px;
  --header-h: 64px;
  --radius: 10px;
  --radius-lg: 16px;
  --shadow: 0 2px 12px rgba(44, 36, 25, 0.06);
  --shadow-md: 0 8px 32px rgba(44, 36, 25, 0.08);
  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Source Sans 3", system-ui, sans-serif;
  --transition: 0.25s ease;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--terracotta); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--terracotta-dark); }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.25;
  color: var(--ink);
}

h1 { font-size: clamp(1.75rem, 4vw, 2.5rem); }
h2 { font-size: clamp(1.35rem, 3vw, 1.75rem); margin-bottom: 1rem; }
h3 { font-size: 1.15rem; }

/* ── Header ── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 200;
  height: var(--header-h);
  background: rgba(250, 248, 245, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--cream-border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  padding: 0 1.5rem;
  max-width: 1400px;
  margin: 0 auto;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--ink);
}

.logo:hover { color: var(--ink); }

.logo-mark {
  width: 36px;
  height: 36px;
  background: var(--terracotta);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-size: 1rem;
  font-weight: 700;
}

.logo span { color: var(--terracotta); }

.header-tagline {
  font-size: 0.8rem;
  color: var(--ink-muted);
  display: none;
}

.sidebar-toggle {
  display: none;
  background: none;
  border: 1px solid var(--cream-border);
  border-radius: var(--radius);
  padding: 0.5rem 0.75rem;
  cursor: pointer;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 0.85rem;
}

/* ── Layout ── */
.site-layout {
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
  max-width: 1400px;
  margin: 0 auto;
  min-height: calc(100vh - var(--header-h));
}

/* ── Sidebar ── */
.sidebar {
  position: sticky;
  top: var(--header-h);
  height: calc(100vh - var(--header-h));
  overflow-y: auto;
  padding: 1.75rem 1.25rem 2rem;
  border-right: 1px solid var(--cream-border);
  background: var(--white);
}

.sidebar-nav { list-style: none; margin-bottom: 2rem; }

.sidebar-nav li { margin-bottom: 0.15rem; }

.sidebar-nav a {
  display: block;
  padding: 0.55rem 0.85rem;
  border-radius: var(--radius);
  color: var(--ink-muted);
  font-weight: 500;
  font-size: 0.95rem;
  transition: background var(--transition), color var(--transition);
}

.sidebar-nav a:hover,
.sidebar-nav a.active {
  background: var(--cream);
  color: var(--terracotta);
}

.sidebar-widget {
  background: var(--cream);
  border: 1px solid var(--cream-border);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  margin-bottom: 1.5rem;
}

.widget-label {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--terracotta);
  margin-bottom: 0.75rem;
}

.mini-featured img {
  border-radius: var(--radius);
  margin-bottom: 0.75rem;
  aspect-ratio: 16/10;
  object-fit: cover;
  width: 100%;
}

.mini-featured h3 {
  font-size: 0.95rem;
  margin-bottom: 0.35rem;
  line-height: 1.35;
}

.mini-featured h3 a { color: var(--ink); }
.mini-featured h3 a:hover { color: var(--terracotta); }

.mini-featured p {
  font-size: 0.82rem;
  color: var(--ink-muted);
  line-height: 1.5;
}

.about-widget p {
  font-size: 0.88rem;
  color: var(--ink-muted);
  line-height: 1.55;
}

.about-widget .widget-stat {
  display: flex;
  justify-content: space-between;
  padding: 0.5rem 0;
  border-top: 1px solid var(--cream-border);
  margin-top: 0.75rem;
  font-size: 0.85rem;
}

.about-widget .widget-stat strong { color: var(--terracotta); }

/* ── Main content ── */
.main-content {
  padding: 2rem 2rem 3rem;
  min-width: 0;
}

.section-block {
  margin-bottom: 3rem;
}

.section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid var(--cream-border);
}

.section-header h2 { margin-bottom: 0; }

.section-header a {
  font-size: 0.88rem;
  font-weight: 600;
}

/* Featured article */
.featured-article {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 2rem;
  background: var(--white);
  border: 1px solid var(--cream-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.featured-image {
  position: relative;
  min-height: 320px;
}

.featured-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  inset: 0;
}

.featured-badge {
  position: absolute;
  top: 1rem;
  left: 1rem;
  background: var(--terracotta);
  color: var(--white);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
}

.featured-body {
  padding: 2rem 2rem 2rem 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.featured-meta {
  display: flex;
  gap: 1rem;
  font-size: 0.82rem;
  color: var(--ink-light);
  margin-bottom: 0.75rem;
}

.featured-body h2 {
  font-size: clamp(1.4rem, 2.5vw, 1.85rem);
  margin-bottom: 0.85rem;
}

.featured-body h2 a { color: var(--ink); }
.featured-body h2 a:hover { color: var(--terracotta); }

.featured-body p {
  color: var(--ink-muted);
  margin-bottom: 1.25rem;
  font-size: 0.95rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.65rem 1.25rem;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: background var(--transition), transform 0.15s ease;
}

.btn-primary {
  background: var(--terracotta);
  color: var(--white);
}

.btn-primary:hover {
  background: var(--terracotta-dark);
  color: var(--white);
  transform: translateY(-1px);
}

.btn-outline {
  background: transparent;
  color: var(--terracotta);
  border: 1.5px solid var(--terracotta);
}

.btn-outline:hover {
  background: var(--terracotta);
  color: var(--white);
}

/* Game radar scores */
.radar-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.radar-card {
  background: var(--white);
  border: 1px solid var(--cream-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: box-shadow var(--transition), transform var(--transition);
}

.radar-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.radar-card img {
  width: 100%;
  aspect-ratio: 460/215;
  object-fit: cover;
}

.radar-info {
  padding: 1rem 1.1rem 1.15rem;
}

.radar-info h3 {
  font-size: 1rem;
  margin-bottom: 0.25rem;
}

.radar-genre {
  font-size: 0.78rem;
  color: var(--ink-light);
  margin-bottom: 0.65rem;
}

.radar-score-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.radar-score {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--terracotta);
}

.radar-score small {
  font-size: 0.75rem;
  color: var(--ink-light);
  font-family: var(--font-body);
  font-weight: 400;
}

.score-bar {
  flex: 1;
  height: 6px;
  background: var(--cream-dark);
  border-radius: 999px;
  margin: 0 0.75rem;
  overflow: hidden;
}

.score-bar-fill {
  height: 100%;
  background: var(--terracotta);
  border-radius: 999px;
  transition: width 0.6s ease;
}

.radar-tag {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--terracotta);
  background: rgba(196, 92, 62, 0.1);
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
}

/* News feed */
.news-feed { list-style: none; }

.news-item {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 1.25rem;
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--cream-border);
  align-items: start;
}

.news-item:first-child { padding-top: 0; }

.news-thumb {
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 16/10;
}

.news-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.news-item:hover .news-thumb img { transform: scale(1.04); }

.news-content .news-cat {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--terracotta);
  margin-bottom: 0.35rem;
}

.news-content h3 {
  font-size: 1.1rem;
  margin-bottom: 0.4rem;
  line-height: 1.35;
}

.news-content h3 a { color: var(--ink); }
.news-content h3 a:hover { color: var(--terracotta); }

.news-content p {
  font-size: 0.88rem;
  color: var(--ink-muted);
  margin-bottom: 0.5rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.news-meta {
  font-size: 0.78rem;
  color: var(--ink-light);
}

/* FAQ */
.faq-list { list-style: none; }

.faq-item {
  background: var(--white);
  border: 1px solid var(--cream-border);
  border-radius: var(--radius);
  margin-bottom: 0.6rem;
  overflow: hidden;
}

.faq-question {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  color: var(--ink);
  text-align: left;
  transition: color var(--transition);
}

.faq-question:hover { color: var(--terracotta); }

.faq-icon {
  font-size: 1.25rem;
  color: var(--terracotta);
  transition: transform var(--transition);
  flex-shrink: 0;
  margin-left: 1rem;
}

.faq-item.open .faq-icon { transform: rotate(45deg); }

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease, padding 0.35s ease;
}

.faq-item.open .faq-answer {
  max-height: 300px;
  padding: 0 1.25rem 1rem;
}

.faq-answer p {
  font-size: 0.92rem;
  color: var(--ink-muted);
  line-height: 1.6;
}

/* Contact */
.contact-section {
  background: var(--white);
  border: 1px solid var(--cream-border);
  border-radius: var(--radius-lg);
  padding: 2rem;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 2rem;
  margin-top: 1rem;
}

.contact-info p {
  color: var(--ink-muted);
  font-size: 0.92rem;
  margin-bottom: 1rem;
}

.contact-detail {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
  color: var(--ink);
}

.contact-form { display: flex; flex-direction: column; gap: 0.85rem; }

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem;
}

.form-group { display: flex; flex-direction: column; gap: 0.35rem; }

.form-group label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--ink-muted);
}

.form-group input,
.form-group textarea,
.form-group select {
  padding: 0.65rem 0.85rem;
  border: 1px solid var(--cream-border);
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 0.92rem;
  color: var(--ink);
  background: var(--cream);
  transition: border-color var(--transition);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--terracotta);
}

.form-group textarea { resize: vertical; min-height: 110px; }

/* Footer */
.site-footer {
  background: var(--white);
  border-top: 1px solid var(--cream-border);
  padding: 2rem 2rem 1.5rem;
  margin-top: 1rem;
}

.footer-inner {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.footer-brand {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--ink);
}

.footer-brand span { color: var(--terracotta); }

.footer-legal {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  list-style: none;
}

.footer-legal a {
  font-size: 0.85rem;
  color: var(--ink-muted);
}

.footer-legal a:hover { color: var(--terracotta); }

.footer-copy {
  width: 100%;
  text-align: center;
  font-size: 0.78rem;
  color: var(--ink-light);
  padding-top: 1rem;
  margin-top: 0.5rem;
  border-top: 1px solid var(--cream-border);
}

/* Toast */
#toast-container {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.toast {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  background: var(--white);
  border: 1px solid var(--cream-border);
  border-left: 4px solid var(--terracotta);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  box-shadow: var(--shadow-md);
  min-width: 300px;
  max-width: 420px;
  opacity: 0;
  transform: translateX(120%);
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.toast.show { opacity: 1; transform: translateX(0); }
.toast.hide { opacity: 0; transform: translateX(120%); }

.toast-icon {
  width: 28px;
  height: 28px;
  background: rgba(196, 92, 62, 0.12);
  color: var(--terracotta);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  flex-shrink: 0;
}

.toast-title { font-weight: 700; font-size: 0.92rem; margin-bottom: 0.15rem; }
.toast-message { font-size: 0.85rem; color: var(--ink-muted); }

.toast-close {
  background: none;
  border: none;
  font-size: 1.25rem;
  color: var(--ink-light);
  cursor: pointer;
  margin-left: auto;
  line-height: 1;
}

/* Legal pages */
.legal-page {
  max-width: 780px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem 4rem;
}

.legal-back {
  display: inline-block;
  font-size: 0.88rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  color: var(--terracotta);
}

.legal-page h1 { margin-bottom: 0.5rem; }

.legal-updated {
  font-size: 0.85rem;
  color: var(--ink-light);
  margin-bottom: 2rem;
}

.legal-content h2 {
  font-size: 1.2rem;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
}

.legal-content p,
.legal-content li {
  font-size: 0.92rem;
  color: var(--ink-muted);
  margin-bottom: 0.75rem;
}

.legal-content ul { padding-left: 1.25rem; margin-bottom: 1rem; }

/* Responsive */
@media (max-width: 1100px) {
  .radar-grid { grid-template-columns: repeat(2, 1fr); }
  .featured-article { grid-template-columns: 1fr; }
  .featured-body { padding: 1.5rem; }
  .featured-image { min-height: 240px; position: relative; }
}

@media (max-width: 900px) {
  .site-layout { grid-template-columns: 1fr; }

  .sidebar {
    position: fixed;
    top: var(--header-h);
    left: 0;
    width: var(--sidebar-w);
    z-index: 150;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    box-shadow: var(--shadow-md);
  }

  .sidebar.open { transform: translateX(0); }

  .sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    top: var(--header-h);
    background: rgba(44, 36, 25, 0.3);
    z-index: 140;
  }

  .sidebar-overlay.visible { display: block; }

  .sidebar-toggle { display: block; }
  .header-tagline { display: none; }

  .main-content { padding: 1.5rem 1rem 2rem; }
  .contact-grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .radar-grid { grid-template-columns: 1fr; }

  .news-item {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }

  .news-thumb { max-height: 180px; }
  .form-row { grid-template-columns: 1fr; }

  #toast-container {
    left: 1rem;
    right: 1rem;
    bottom: 1rem;
  }

  .toast { min-width: auto; max-width: none; }
}

@media (min-width: 901px) {
  .header-tagline { display: block; }
}
