/* ==========================================================================
   appgamescout — styles.css
   Palette "Slate scuro": scuro, sobrio, editoriale. Nomenclatura BEM.
   ========================================================================== */

:root {
  /* Colori */
  --bg:        #14161B;
  --bg-2:      #191C22;
  --bg-3:      #1F232B;
  --ink:       #ECEAE3;
  --muted:     #9CA0AA;
  --brass:     #C9A24B;
  --brass-2:   #DAB765;
  --line:      #2A2D35;
  --line-2:    #363A44;
  --star-off:  #3B3F49;
  --danger:    #E0785F;

  /* Tipografia */
  --font: "Inter", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;

  /* Raggi */
  --r-sm: 10px;
  --r:    14px;
  --r-lg: 22px;

  /* Spaziature */
  --space: 20px;
  --container: 1160px;

  /* Ombre */
  --shadow: 0 18px 50px -20px rgba(0, 0, 0, .7);
  --shadow-sm: 0 8px 24px -14px rgba(0, 0, 0, .8);
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

/* Accessibilità: skip link + focus visibile */
.skip-link {
  position: fixed; top: -100px; left: 12px; z-index: 200;
  background: var(--brass); color: #14161B; font-weight: 700;
  padding: 12px 18px; border-radius: var(--r-sm);
  transition: top .2s ease;
}
.skip-link:focus { top: 12px; }

:focus-visible {
  outline: 2px solid var(--brass-2);
  outline-offset: 3px;
  border-radius: 4px;
}

/* Contenitore condiviso (utility di layout, non blocco BEM) */
.header__inner,
.hero__inner,
.games,
.transparency__inner,
.trust,
.reviews,
.subscribe__inner,
.faq,
.footer__inner,
.footer__bottom {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: clamp(18px, 5vw, 40px);
}

/* ============================ Bottoni (btn) ============================== */
.btn {
  --btn-bg: transparent;
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  font: inherit; font-weight: 650; font-size: 15px; line-height: 1;
  padding: 14px 22px; border-radius: var(--r-sm);
  border: 1px solid transparent; cursor: pointer;
  background: var(--btn-bg); color: var(--ink);
  transition: transform .16s ease, background-color .16s ease, border-color .16s ease, color .16s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn__icon { width: 17px; height: 17px; fill: currentColor; flex: none; }

.btn--primary { --btn-bg: var(--brass); color: #14161B; font-weight: 700; }
.btn--primary:hover { --btn-bg: var(--brass-2); }

.btn--ghost { border-color: var(--line-2); color: var(--ink); background: transparent; }
.btn--ghost:hover { border-color: var(--brass); color: var(--brass-2); }

.btn--block { width: 100%; }

/* ============================ Header ==================================== */
.header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(20, 22, 27, .72);
  backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s ease, background-color .2s ease;
}
.header--scrolled { border-bottom-color: var(--line); background: rgba(20, 22, 27, .92); }

.header__inner {
  display: flex; align-items: center; justify-content: space-between;
  min-height: 68px;
}
.header__logo { display: inline-flex; align-items: baseline; font-size: 21px; }
.header__logo-text { font-family: Georgia, "Times New Roman", "Iowan Old Style", serif; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--ink); }
.header__logo-accent { color: var(--brass); }

.header__nav-list { display: flex; align-items: center; gap: 6px; }
.header__nav-link {
  display: inline-block; color: var(--muted); font-size: 15px; font-weight: 550;
  padding: 9px 14px; border-radius: 8px; transition: color .15s ease, background-color .15s ease;
}
.header__nav-link:hover { color: var(--ink); background: var(--bg-3); }

.header__burger {
  display: none; width: 44px; height: 44px; border: 1px solid var(--line-2);
  background: transparent; color: var(--ink); border-radius: 10px; cursor: pointer;
  align-items: center; justify-content: center;
}
.header__burger-icon { width: 24px; height: 24px; }
.header__burger-icon--close { display: none; }
.header--nav-open .header__burger-icon--open { display: none; }
.header--nav-open .header__burger-icon--close { display: block; }

/* ============================ Hero ===================================== */
.hero {
  position: relative; isolation: isolate;
  padding-block: clamp(56px, 9vw, 104px);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}
.hero__bg {
  position: absolute; inset: 0; z-index: -2;
  width: 100%; height: 100%; object-fit: cover;
  opacity: .28;
}
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(1200px 520px at 78% -10%, rgba(201, 162, 75, .16), transparent 60%),
    linear-gradient(180deg, rgba(20, 22, 27, .72) 0%, rgba(20, 22, 27, .92) 60%, var(--bg) 100%);
}
.hero__inner {
  display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(32px, 6vw, 72px);
  align-items: center;
}
.hero__eyebrow {
  display: inline-block; color: var(--brass-2); font-size: 13px; font-weight: 650;
  letter-spacing: .12em; text-transform: uppercase; margin-bottom: 20px;
}
.hero__title {
  font-size: clamp(34px, 5.4vw, 58px); line-height: 1.05; letter-spacing: -.025em;
  font-weight: 780; margin-bottom: 22px;
}
.hero__title-accent { color: var(--brass); font-style: italic; }
.hero__lead { color: var(--muted); font-size: clamp(16px, 1.6vw, 19px); max-width: 46ch; margin-bottom: 32px; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 14px; }

.hero__showcase {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px;
}
.hero__showcase-icon {
  width: 100%; height: auto; aspect-ratio: 1; border-radius: 18px;
  border: 1px solid var(--line-2); background: var(--bg-2);
  box-shadow: var(--shadow-sm);
}
.hero__showcase-icon:nth-child(2) { transform: translateY(-16px); }
.hero__showcase-icon:nth-child(5) { transform: translateY(-16px); }

/* ==================== Intestazione di sezione ========================== */
.section-head { max-width: 640px; margin-bottom: clamp(30px, 5vw, 48px); }
.section-head__eyebrow {
  color: var(--brass-2); font-size: 13px; font-weight: 650;
  letter-spacing: .12em; text-transform: uppercase; margin-bottom: 14px;
}
.section-head__title { font-size: clamp(26px, 3.4vw, 38px); line-height: 1.14; letter-spacing: -.02em; font-weight: 730; }
.section-head__text { color: var(--muted); margin-top: 14px; font-size: 17px; }

/* ============================ Giochi =================================== */
.games { padding-block: clamp(56px, 8vw, 96px); }
.games__grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px;
}

.card {
  display: flex; flex-direction: column;
  background: var(--bg-2); border: 1px solid var(--line);
  border-radius: var(--r-lg); padding: 22px;
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.card:hover { transform: translateY(-5px); border-color: var(--line-2); box-shadow: var(--shadow); }

.card__media { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 16px; }
.card__icon { width: 72px; height: 72px; border-radius: 16px; border: 1px solid var(--line-2); background: var(--bg-3); }
.card__badge {
  font-size: 12px; font-weight: 650; letter-spacing: .03em;
  color: var(--brass-2); border: 1px solid rgba(201, 162, 75, .35);
  padding: 5px 10px; border-radius: 999px; background: rgba(201, 162, 75, .08);
}

.card__body { flex: 1 1 auto; }
.card__title { font-size: 19px; font-weight: 700; line-height: 1.25; letter-spacing: -.01em; }
.card__dev { color: var(--muted); font-size: 14px; margin-top: 3px; }
.card__rating { display: flex; align-items: center; gap: 9px; margin: 12px 0 14px; }
.card__rating-value { font-size: 14px; font-weight: 650; color: var(--ink); }
.card__desc { color: var(--muted); font-size: 15px; line-height: 1.62; }
.card__footer { margin-top: 20px; }
.card__btn { width: 100%; }

/* Stelle di valutazione (fractional fill) */
.stars { position: relative; display: inline-flex; line-height: 0; }
.stars__row { display: inline-flex; gap: 2px; }
.stars__row--fill { position: absolute; top: 0; left: 0; overflow: hidden; white-space: nowrap; color: var(--brass); }
.stars__row--base { color: var(--star-off); }
.stars__ico { width: 16px; height: 16px; fill: currentColor; flex: none; display: block; }

/* ======================= Trasparenza / guadagni ======================== */
.transparency { padding-block: clamp(56px, 8vw, 96px); background: var(--bg-2); border-block: 1px solid var(--line); }
.transparency__inner { display: grid; grid-template-columns: 1.15fr .85fr; gap: clamp(32px, 6vw, 64px); align-items: center; }
.transparency__lead { color: var(--muted); font-size: 18px; margin: 6px 0 26px; }
.transparency__lead strong { color: var(--ink); }
.transparency__list { display: grid; gap: 18px; margin-bottom: 28px; }
.transparency__item { display: grid; grid-template-columns: 24px 1fr; gap: 14px; color: var(--muted); font-size: 15.5px; }
.transparency__item strong { color: var(--ink); }
.transparency__item-icon { width: 22px; height: 22px; color: var(--brass); margin-top: 3px; }
.transparency__link { display: inline-flex; align-items: center; gap: 8px; color: var(--brass-2); font-weight: 650; border-bottom: 1px solid transparent; padding-bottom: 2px; }
.transparency__link:hover { border-bottom-color: var(--brass-2); }
.transparency__link-icon { width: 14px; height: 14px; fill: currentColor; }

.transparency__media img {
  width: 100%; height: 100%; max-height: 420px; object-fit: cover;
  border-radius: var(--r-lg); border: 1px solid var(--line-2); box-shadow: var(--shadow);
}

/* ============================ Fiducia ================================== */
.trust { padding-block: clamp(56px, 8vw, 96px); }
.trust__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.trust__item { background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 28px 24px; }
.trust__icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 50px; height: 50px; border-radius: 13px; margin-bottom: 18px;
  background: rgba(201, 162, 75, .1); border: 1px solid rgba(201, 162, 75, .28); color: var(--brass);
}
.trust__icon svg { width: 24px; height: 24px; }
.trust__title { font-size: 18px; font-weight: 700; margin-bottom: 8px; }
.trust__text { color: var(--muted); font-size: 15px; }

/* ============================ Opinioni ================================= */
.reviews { padding-block: clamp(56px, 8vw, 96px); border-top: 1px solid var(--line); }
.reviews__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.reviews__card {
  display: flex; flex-direction: column; gap: 16px;
  background: var(--bg-2); border: 1px solid var(--line);
  border-radius: var(--r-lg); padding: 26px 24px;
}
.reviews__quote { color: var(--ink); font-size: 16px; line-height: 1.62; font-style: italic; }
.reviews__author { display: flex; align-items: center; gap: 12px; margin-top: auto; }
.reviews__avatar {
  width: 44px; height: 44px; border-radius: 50%; flex: none;
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(201, 162, 75, .14); border: 1px solid rgba(201, 162, 75, .3);
  color: var(--brass-2); font-weight: 700; font-size: 14px;
}
.reviews__meta { display: flex; flex-direction: column; }
.reviews__name { font-weight: 650; font-size: 15px; font-style: normal; }
.reviews__role { color: var(--muted); font-size: 13px; }

/* ============================ Iscrizione =============================== */
.subscribe { padding-block: clamp(56px, 8vw, 96px); background: var(--bg-2); border-block: 1px solid var(--line); }
.subscribe__inner { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 60px); align-items: center; }
.subscribe__text { color: var(--muted); font-size: 18px; margin-top: 6px; }

.subscribe__form { background: var(--bg); border: 1px solid var(--line); border-radius: var(--r-lg); padding: clamp(22px, 4vw, 32px); box-shadow: var(--shadow-sm); }
.subscribe__field { margin-bottom: 16px; }
.subscribe__label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 7px; }
.subscribe__optional { color: var(--muted); font-weight: 400; }
.subscribe__input {
  width: 100%; font: inherit; font-size: 15px; color: var(--ink);
  background: var(--bg-3); border: 1px solid var(--line-2); border-radius: var(--r-sm);
  padding: 12px 14px; transition: border-color .15s ease, box-shadow .15s ease;
}
.subscribe__input::placeholder { color: #6C7079; }
.subscribe__input:focus { outline: none; border-color: var(--brass); box-shadow: 0 0 0 3px rgba(201, 162, 75, .18); }

.subscribe__consent { display: grid; grid-template-columns: 20px 1fr; gap: 11px; align-items: start; font-size: 14px; color: var(--muted); margin: 6px 0 20px; }
.subscribe__consent input { width: 18px; height: 18px; margin-top: 3px; accent-color: var(--brass); }
.subscribe__consent a { color: var(--brass-2); text-decoration: underline; }

.subscribe__success {
  display: none; align-items: center; gap: 9px;
  margin-top: 16px; padding: 12px 14px; border-radius: var(--r-sm);
  background: rgba(201, 162, 75, .1); border: 1px solid rgba(201, 162, 75, .3);
  color: var(--brass-2); font-size: 14.5px; font-weight: 550;
}
.subscribe__success--visible { display: flex; }
.subscribe__success-icon { width: 20px; height: 20px; flex: none; }

/* ============================== FAQ ==================================== */
.faq { padding-block: clamp(56px, 8vw, 96px); }
.faq__list { display: grid; gap: 12px; }
.faq__item { background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.faq__item--open { border-color: var(--line-2); }
.faq__heading { margin: 0; font-size: inherit; font-weight: inherit; }
.faq__question {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 16px;
  font: inherit; font-size: 17px; font-weight: 600; color: var(--ink); text-align: left;
  background: transparent; border: none; cursor: pointer; padding: 20px 22px;
}
.faq__icon { width: 22px; height: 22px; color: var(--brass); flex: none; transition: transform .2s ease; }
.faq__item--open .faq__icon { transform: rotate(180deg); }
.faq__answer { padding: 0 22px 20px; color: var(--muted); font-size: 15.5px; }
.faq__answer[hidden] { display: none; }

/* ============================= Footer ================================= */
.footer { background: var(--bg-2); border-top: 1px solid var(--line); margin-top: 0; }
.footer__inner {
  display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.2fr; gap: 40px;
  padding-block: clamp(44px, 6vw, 68px);
}
.footer__logo { display: inline-flex; align-items: baseline; font-size: 21px; margin-bottom: 14px; }
.footer__logo-text { font-family: Georgia, "Times New Roman", "Iowan Old Style", serif; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--ink); }
.footer__logo-accent { color: var(--brass); }
.footer__tagline { color: var(--muted); font-size: 14.5px; max-width: 34ch; }
.footer__title { font-size: 13px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--ink); margin-bottom: 16px; }
.footer__links { display: grid; gap: 11px; }
.footer__link { color: var(--muted); font-size: 15px; transition: color .15s ease; }
.footer__link:hover { color: var(--brass-2); }
.footer__contact { display: inline-flex; align-items: center; gap: 9px; color: var(--muted); font-size: 15px; transition: color .15s ease; }
.footer__contact:hover { color: var(--brass-2); }
.footer__contact-icon { width: 18px; height: 18px; color: var(--brass); flex: none; }
.footer__bottom { border-top: 1px solid var(--line); padding-block: 22px; }
.footer__copy { color: var(--muted); font-size: 13.5px; }

/* ============================= Torna su =============================== */
.to-top {
  position: fixed; right: 22px; bottom: 22px; z-index: 90;
  width: 48px; height: 48px; border-radius: 50%;
  background: var(--brass); color: #14161B; border: none; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow); opacity: 0; visibility: hidden; transform: translateY(12px);
  transition: opacity .2s ease, transform .2s ease, visibility .2s ease, background-color .15s ease;
}
.to-top svg { width: 22px; height: 22px; fill: currentColor; }
.to-top:hover { background: var(--brass-2); }
.to-top--visible { opacity: 1; visibility: visible; transform: translateY(0); }

/* ========================= Banner cookie ============================== */
.cookie {
  position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 150;
  background: var(--bg-3); border: 1px solid var(--line-2); border-radius: var(--r);
  box-shadow: var(--shadow); opacity: 0; transform: translateY(16px);
  transition: opacity .25s ease, transform .25s ease;
}
.cookie[hidden] { display: none; }
.cookie--visible { opacity: 1; transform: translateY(0); }
.cookie__inner {
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  max-width: var(--container); margin-inline: auto; padding: 16px 20px; flex-wrap: wrap;
}
.cookie__text { color: var(--muted); font-size: 14.5px; flex: 1 1 340px; }
.cookie__link { color: var(--brass-2); text-decoration: underline; }
.cookie__actions { display: flex; gap: 10px; flex: none; }
.cookie__btn { padding: 11px 20px; }

/* ======================= Pagine legali (legal) ======================== */
.legal { padding-block: clamp(40px, 6vw, 72px); }
.legal__inner { width: 100%; max-width: 820px; margin-inline: auto; padding-inline: clamp(18px, 5vw, 40px); }
.legal__back { display: inline-flex; align-items: center; gap: 8px; color: var(--brass-2); font-weight: 600; font-size: 14px; margin-bottom: 26px; }
.legal__back:hover { text-decoration: underline; }
.legal__back-icon { width: 16px; height: 16px; fill: currentColor; transform: rotate(180deg); }
.legal__title { font-size: clamp(28px, 4vw, 42px); line-height: 1.12; letter-spacing: -.02em; font-weight: 760; }
.legal__updated { color: var(--muted); font-size: 14px; margin-top: 12px; }
.legal__note { background: var(--bg-2); border: 1px solid var(--line); border-left: 3px solid var(--brass); border-radius: var(--r-sm); padding: 14px 18px; color: var(--muted); font-size: 14px; margin-top: 24px; }
.legal__content { margin-top: 30px; }
.legal__content h2 { font-size: 21px; font-weight: 700; letter-spacing: -.01em; margin: 34px 0 12px; }
.legal__content h3 { font-size: 17px; font-weight: 650; margin: 22px 0 8px; }
.legal__content p { color: var(--muted); margin-bottom: 14px; }
.legal__content ul { display: grid; gap: 9px; margin: 0 0 16px; padding-left: 4px; }
.legal__content li { color: var(--muted); position: relative; padding-left: 22px; }
.legal__content li::before { content: ""; position: absolute; left: 4px; top: 11px; width: 6px; height: 6px; border-radius: 50%; background: var(--brass); }
.legal__content a { color: var(--brass-2); text-decoration: underline; }
.legal__content strong { color: var(--ink); }

/* ============================ Responsive ============================== */
@media (max-width: 1024px) {
  .hero__inner { grid-template-columns: 1fr; }
  .hero__showcase { max-width: 440px; }
  .games__grid { grid-template-columns: repeat(2, 1fr); }
  .trust__grid { grid-template-columns: repeat(3, 1fr); }
  .transparency__inner { grid-template-columns: 1fr; }
  .transparency__media { order: -1; }
  .subscribe__inner { grid-template-columns: 1fr; }
  .footer__inner { grid-template-columns: 1fr 1fr; gap: 32px; }
}

@media (max-width: 760px) {
  .header__burger { display: inline-flex; }
  .header__nav {
    position: absolute; top: 100%; left: 0; right: 0;
    background: var(--bg-2); border-bottom: 1px solid var(--line);
    padding: 10px clamp(18px, 5vw, 40px) 18px;
    display: none;
  }
  .header--nav-open .header__nav { display: block; }
  .header__nav-list { flex-direction: column; align-items: stretch; gap: 2px; }
  .header__nav-link { padding: 13px 12px; font-size: 16px; }

  .games__grid { grid-template-columns: 1fr; }
  .trust__grid { grid-template-columns: 1fr; }
  .reviews__grid { grid-template-columns: 1fr; }
  .cookie__inner { flex-direction: column; align-items: stretch; }
  .cookie__actions { justify-content: stretch; }
  .cookie__btn { flex: 1; }
}

@media (max-width: 480px) {
  body { font-size: 16px; }
  .hero__showcase { grid-template-columns: repeat(3, 1fr); gap: 12px; }
  .footer__inner { grid-template-columns: 1fr; }
  .btn { width: 100%; }
  .hero__actions .btn { width: 100%; }
}

/* ====================== Movimento ridotto ============================= */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
}
