/*
  Unia Games accessible bilingual landing page
  Version 0.2 — production-ready starter for Cloudflare Pages.

  Goals:
  - Fast static page
  - Mobile-first responsive layout
  - Accessible navigation and language selector
  - Good rendering on iPhone and Android
  - SEO and social sharing ready
  - Easy future replacement with final graphic design
*/


@font-face {
  font-family: "Leggibilmente";
  font-weight: 200 800;
  src: url("assets/Leggibilmente.woff2") format("woff2-variations");
  font-display: swap;
}

:root {
  color-scheme: dark light;

  --bg: #000000;
  --surface: #7A1C1C;           /*121225*/ 
  --surface-strong: #7A1C1C;    /*1d1d36*/ 
  --text: #FEFDF1;
  --muted: #FEFDF1;
  --accent: #7A1C1C;
  --accent-strong: #FEFDF1;
  --border: #7A1C1C;
  --focus: #ffffff;

  --max-width: 80rem;
  --radius: 1rem;
  --shadow: 0 0.75rem 2rem rgba(0, 0, 0, 0.28);
  /* --font: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; */
  --font: "Leggibilmente", system-ui, sans-serif;

  --page-padding: clamp(1.5rem, 4vw, 2rem);
  --section-space: clamp(3rem, 8vw, 5.5rem);
}

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

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
}


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

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  margin: 0;
  min-height: 100svh;
  font-family: var(--font);
  font-size: clamp(1rem, 0.96rem + 0.2vw, 1.125rem);
  line-height: 1.65;
  color: var(--text);
  background-color: var(--bg);
  background-image:
    radial-gradient(circle at top left, rgba(255, 0, 0, 0.18), transparent 22rem),
    linear-gradient(135deg, #000000 0%, #0a0a0a 50%, #000000 100%);
}

body.light-theme {
  --bg: #FEFDF1;
  --surface: #386818;
  --surface-strong: #386818;
  --text: #000000;
  --muted: #FEFDF1;
  --accent: #386818;
  --accent-strong: #000000;
  --border: #55556f;
  --focus: #ffffff;

  background-color: #FEFDF1;
  background-image: none;
}

a {
  color: var(--muted);
  text-decoration-thickness: 0.12em;
  text-underline-offset: 0.18em;
}

a:hover {
  text-decoration-thickness: 0.18em;
}

a:focus-visible,
button:focus-visible,
summary:focus-visible {
  outline: 0.25rem solid var(--focus);
  outline-offset: 0.25rem;
}

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

.skip-link {
  position: absolute;
  left: max(1rem, env(safe-area-inset-left));
  top: max(1rem, env(safe-area-inset-top));
  z-index: 1000;
  transform: translateY(-200%);
  padding: 0.8rem 1rem;
  border-radius: 0.75rem;
  color: #080812;
  background: #FEFDF1;
  font-weight: 700;
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  border-bottom: 2px solid rgba(0, 0, 0, 0.18);
  background: #FEFDF1;
}

@supports (backdrop-filter: blur(0.75rem)) {

  .site-header {
    background: rgba(0, 0, 0, 0.22);
    backdrop-filter: blur(0.75rem);
  }

  body.light-theme .site-header {
    background: rgba(254, 253, 241, 0.72);
    backdrop-filter: blur(0.75rem);
  }
}

  .mobile-menu {
    display: none;
  }

.header-inner,
.section,
.footer-inner {
  width: min(90% - (var(--page-padding) * 2), var(--max-width));
  margin-inline: auto;
}

.header-inner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 5rem;
  padding-block: 1rem;
  padding-top: max(1rem, env(safe-area-inset-top));
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  min-height: 2.75rem;
  color: var(--text);
  font-weight: 800;
  letter-spacing: 0.03em;
  text-decoration: none;
}

.hamburger-menu {
  display: none;
  flex-direction: column;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  gap: 0.4rem;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 0.25rem;
  color: var(--text);
  transition: background-color 0.3s ease;
}

.hamburger-menu:hover {
  background: var(--surface-strong);
}

.hamburger-line {
  display: block;
  width: 100%;
  height: 2px;
  background: currentColor;
  border-radius: 1px;
  transition: all 0.3s ease;
  transform-origin: center;
}

.hamburger-menu[aria-expanded="true"] .hamburger-line:nth-child(1) {
  transform: rotate(45deg) translate(6px, 6px);
}

.hamburger-menu[aria-expanded="true"] .hamburger-line:nth-child(2) {
  opacity: 0;
}

.hamburger-menu[aria-expanded="true"] .hamburger-line:nth-child(3) {
  transform: rotate(-45deg) translate(6px, -6px);
}

.header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-inline: auto;
}

.header-accessibility {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-left: auto;
  
}

.header-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-left: auto;
}

.nav-list {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  flex-wrap: wrap;
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav-list a, summary {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  padding: 0.55rem 0.85rem;
  border-radius: 5px;
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
  transition: all 0.3s ease;
}


.theme-toggle,
.language-switcher summary {
  display: inline-flex;
  align-items: center;
  min-height: 2rem;
  padding: 0.1rem 0.4rem;
  border-radius: 5px;
  color: var(--accent-strong);
  text-decoration: none;
  font-weight: 700;
  transition: all 0.3s ease;
}

.nav-list a:hover, summary:hover {
  background: var(--surface-strong);

}


.theme-toggle:hover,
.language-switcher summary:hover {
  background: var(--text);
  color: #080812;
}

body.light-theme .theme-toggle:hover,
body.light-theme .language-switcher summary:hover {
  background: var(--text);
  color: #FEFDF1;
}

.theme-toggle,
.language-switcher summary {
  border: 1px solid var(--accent-strong);
  background: transparent;
  cursor: pointer;
  font: inherit;
}

/* shifter per la lingua */

.language-switcher {
  position: relative;
}

.language-switcher summary {
  list-style: none;
}

.language-switcher summary::-webkit-details-marker {
  display: none;
}

.language-switcher summary::after {
  content: "▾";
  margin-left: 0.5rem;
  font-size: 0.85rem;
}

.language-switcher[open] summary::after {
  content: "▴";
}

.language-menu {
  position: absolute;
  right: 0;
  z-index: 100;
  min-width: 12rem;
  margin: 0.5rem 0 0;
  padding: 0.5rem;
  border: 1px solid var(--border);
  border-radius: 1rem;
  list-style: none;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.language-menu a {
  display: block;
  padding: 0.75rem;
  border-radius: 0.75rem;
  color: var(--accent-strong);
  font-weight: 800;
  text-decoration: none;
}

body.light-theme .language-menu a {
  color: var(--muted);
}

.language-menu a:hover
 {
  background: var(--bg);
}

body.light-theme .language-menu a:hover
 {
  background: var(--text);
}

.language-current {
  display: block;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 600;
}

.hero {
  padding-block: clamp(3.5rem, 10vw, 7rem);
}

.eyebrow {
  margin: 0 0 1rem;
  color: var(--accent-strong);
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.12;
  letter-spacing: -0.03em;

  font-family: "Leggibilmente", sans-serif;
  font-weight: 800;
}

h1 {
  max-width: 12ch;
  font-size: clamp(3rem, 16vw, 6.5rem);
}

h2 {
  max-width: 18ch;
  font-size: clamp(2rem, 9vw, 3.75rem);
}

h3 {
  font-size: clamp(1.25rem, 4vw, 1.6rem);
}

.claim {
  max-width: 58ch;
  margin-block: 1.5rem 0;
  color: var(--text);
  font-size: clamp(1.2rem, 4vw, 1.7rem);
  line-height: 1.45;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 2rem;
}

.button,
.button-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  padding: 0.75rem 1rem;
  border-radius: 999px;
  font-weight: 800;
  text-align: center;
  text-decoration: none;
}

.button {
  color: #080812;
  background: var(--accent-strong);
}

.button-secondary {
  color: var(--text);
  border: 1px solid var(--border);
  background: transparent;
}

.section {
  padding-block: var(--section-space);
}

.section + .section {
  border-top: 1px solid rgba(255, 255, 255, 0.16);
}

body.light-theme .section + .section {
  border-top: 1px solid #d6d6e7;
}

.placeholder,
.content-note {
  margin-top: 1.25rem;
  padding: 1rem;
  border: 1px var(--border);
  border-radius: var(--radius);
  color: var(--muted);
  background: var(--surface);
}

.content-note {
  border-style: solid;
}

.grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 2rem;
}

.card,
.contact-card,
.social-list li {
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

body.light-theme .card,
body.light-theme .contact-card,
body.light-theme .social-list li {
  border-color: #d6d6e7;
  box-shadow: 0 0.75rem 1.5rem rgba(17, 17, 34, 0.08);
}

.card,
.contact-card a {
  margin: 0;
  line-height: 1.12;
  letter-spacing: -0.03em;
  font-size: clamp(1.25rem, 4vw, 1.6rem);
  font-family: "Leggibilmente", sans-serif;
  font-weight: 800;
  color: var(--muted);
}

.card {
  padding: 1.25rem;
}

.card p {
  margin-bottom: 0;
  color: var(--muted);
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 2rem;
}

.contact-card {
  padding: 1.25rem;
}

.contact-card p {
  margin: 0.5rem 0 0;
  color: var(--muted);
}

.contact-card a {
  display: inline-flex;
  margin-top: 0.75rem;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.social-list {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0rem;
  margin: 2rem 0 0;
  padding: 0;
  list-style: none;
}

.social-list li {
  padding: 1rem;
}

.social-list a {
  display: inline-flex;
  flex-direction: column;
  gap: 0.25rem;
  color: var(--text);
  font-weight: 800;
  text-decoration: none;
}

.status {
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 600;
}

.site-footer {
  padding-block: 1rem;
  padding-bottom: max(1rem, env(safe-area-inset-bottom));
  border-top: 1px solid rgba(255, 255, 255, 0.18);
  color: var(--text);
}

body.light-theme .site-footer {
  border-top-color: #d6d6e7;
}

.footer-inner {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.footer-links {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.footer-links a {
  color: var(--accent-strong);
  font-weight: 700;
}

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

/* Mobile layout: show hamburger menu    quello bello */
@media (max-width: 90rem) {

  .hamburger-menu {
    display: flex;
  }

  .header-actions,
  .header-right {
    display: none;
  }

 .mobile-menu {
  display: none;
  flex-direction: column;
  width: 100%;
  z-index: 3000;

  background: rgba(0, 0, 0, 0.72);

  backdrop-filter: blur(0.75rem);
  -webkit-backdrop-filter: blur(0.75rem);

  border-top: 1px solid var(--border);

  padding: 1rem;
  gap: 1rem;
}

body.light-theme .mobile-menu {
  background: rgba(254, 253, 241, 0.82);
}

  .mobile-menu.open {
    display: flex;
  }

  .mobile-menu .nav-list {
    flex-direction: column;
    align-items: stretch;
    gap: 0.5rem;
    margin: 0;
    padding: 0;
    list-style: none;
  }

  .mobile-menu .nav-list a {
    display: block;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    color: var(--text);
    text-decoration: none;
    font-weight: 700;
    transition: all 0.3s ease;
  }

  .mobile-menu .nav-list a:hover {
    background: var(--surface-strong);
  }

  .mobile-menu-bottom {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.18);
    padding-top: 1rem;
  }

  .mobile-menu-bottom .header-accessibility {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    align-items: stretch;
  }

  .mobile-menu-bottom .social-links {
    display: flex;
    justify-content: center;
    gap: 1rem;
  }

  .mobile-menu-bottom .language-switcher summary,
  .mobile-menu-bottom .theme-toggle {
    width: 100%;
    justify-content: center;
  }
}

/* Phone layout: iPhone and Android */
@media (max-width: 48rem) {
  :root {
    --page-padding: 1rem;
    --radius: 0.875rem;
    --shadow: none;
  }

  body {
    background-image:
      linear-gradient(135deg, #080812 0%, #111125 48%, #080812 100%);
  }

  .site-header {
    backdrop-filter: none;
  }

  .header-inner {
    gap: 0.85rem;
  }

  .brand {
    font-size: 1rem;
  }

  .brand-logo {
    width: 2.25rem;
    height: 2.25rem;
  }

  .header-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }

  .nav-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
    gap: 0.5rem;
  }

  .nav-list a,
  .theme-toggle,
  .language-switcher summary {
    width: 100%;
    justify-content: center;
    border: 1px solid var(--border);
    border-radius: 0.875rem;
  }

  .language-switcher {
    width: 100%;
  }

  .language-menu {
    position: static;
    width: 100%;
    margin-top: 0.5rem;
    box-shadow: none;
  }

  .hero {
    padding-block: 3rem;
  }

  h1 {
    font-size: clamp(3rem, 18vw, 4.8rem);
  }

  h2 {
    font-size: clamp(2rem, 11vw, 3rem);
  }

  .claim {
    font-size: 1.2rem;
  }

  .hero-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .button,
  .button-secondary {
    width: 100%;
    border-radius: 0.875rem;
  }

  .placeholder,
  .content-note,
  .card,
  .contact-card,
  .social-list li {
    padding: 1rem;
  }

  .social-list {
    grid-template-columns: 1fr;
  }

  .footer-inner {
    display: grid;
    grid-template-columns: 1fr;
  }
}

/* Tablet layout */
@media (max-width: 64rem) {
  .header-inner {
    align-items: flex-start;
    flex-direction: column;
  }

  .header-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .grid,
  .contact-grid {
    grid-template-columns: 1fr;
  }

  .social-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Very small phones */
@media (max-width: 22rem) {
  .nav-list {
    grid-template-columns: 1fr;
  }

  h1 {
    font-size: clamp(2.6rem, 17vw, 3.6rem);
  }
}

/* Social links styling */
.social-links {
  display: flex;
  gap: 0.15rem;
  flex-wrap: wrap;
  margin-top: 0rem;
}

.social-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.5rem;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 100%;
  border: 2px solid var(--accent-strong);
  background: transparent;
  color: var(--accent-strong);
  font-size: 1.5rem;
  text-decoration: none;
  transition: all 0.3s ease;
}

.social-button:hover {
  background: var(--text);  
  color: #080812;        /* Assuming the text color is the same as the background for the dark theme */
  transform: scale(1.1);
}

body.light-theme .social-button:hover {
  background: var(--text);  
  color: #ffffff;        /* Assuming the text color is the same as the background for the light theme */
}

.social-button:focus-visible {
  outline: 0.25rem solid var(--focus);
  outline-offset: 0.35rem;
}

/* Phone layout for social links */
@media (max-width: 48rem) {
  .social-links {
    gap: 0.5rem;
  }

  .social-button {
    min-width: 2.75rem;
    width: 2.75rem;
    height: 2.75rem;
    font-size: 1.25rem;
  }
}

