/* ==========================================================================
   menumymenu.com - Mobile-First Design System & Styles
   ========================================================================== */

:root {
  --bg-primary: #0b0f19;
  --bg-card: rgba(22, 28, 45, 0.7);
  --bg-card-hover: rgba(30, 39, 62, 0.9);
  --border-color: rgba(255, 255, 255, 0.08);
  --border-glow: rgba(245, 158, 11, 0.35);
  
  --primary: #f59e0b;
  --primary-hover: #d97706;
  --primary-glow: rgba(245, 158, 11, 0.4);
  --accent: #ef4444;
  
  --text-main: #f9fafb;
  --text-muted: #9ca3af;
  --text-subtle: #6b7280;
  
  --font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  --radius-lg: 20px;
  --radius-md: 12px;
  --radius-sm: 8px;
}

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

/* Base Body Style - Mobile First */
body {
  font-family: var(--font-family);
  background-color: var(--bg-primary);
  color: var(--text-main);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow-x: hidden;
  position: relative;
  -webkit-font-smoothing: antialiased;
}

/* Background Ambient Lighting */
.bg-glow-1 {
  position: absolute;
  top: -120px;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(245, 158, 11, 0.18) 0%, rgba(239, 68, 68, 0.05) 50%, transparent 70%);
  filter: blur(70px);
  z-index: 0;
  pointer-events: none;
}

.bg-glow-2 {
  position: absolute;
  bottom: -100px;
  right: -50px;
  width: 350px;
  height: 350px;
  background: radial-gradient(circle, rgba(245, 158, 11, 0.12) 0%, transparent 70%);
  filter: blur(80px);
  z-index: 0;
  pointer-events: none;
}

/* Layout Container */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 16px;
  width: 100%;
  position: relative;
  z-index: 1;
}

/* Header - Mobile First Flex */
header {
  padding: 20px 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.logo {
  display: flex;
  align-items: center;
  /* niente gap: separerebbe anche "menumy" da "menu", che nel flex
     sono due item distinti. Lo stacco dall'icona lo dà .logo-icon */
  font-size: 1.3rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: var(--text-main);
  text-decoration: none;
}

.logo-icon {
  width: 34px;
  height: 34px;
  margin-right: 8px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1rem;
  box-shadow: 0 4px 15px var(--primary-glow);
}

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

.header-right {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  justify-content: center;
}

/* --- Expanding Language Switcher (dall'impostazione di andreacolpani.com/menu) --- */
.lang-switcher { 
    position: relative; 
    z-index: 1001; 
}
.lang-switcher .active-lang,
.lang-switcher .lang-option {
    width: 44px;
    height: 44px;
    cursor: pointer; 
    background-color: rgba(22, 28, 45, 0.85);
    border: 2px solid rgba(255, 255, 255, 0.12);
    border-radius: 50%; 
    padding: 0;
    margin: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.2s ease-in-out;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}
.lang-switcher img {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
}
.lang-switcher .active-lang:hover {
    transform: scale(1.08);
    border-color: var(--primary);
}
.lang-options {
    display: flex;
    flex-direction: column;
    gap: 8px;
    position: absolute;
    top: 52px;
    right: 0;
    opacity: 0;
    transform: translateY(-10px);
    pointer-events: none;
    /* visibility (e non solo opacity) toglie i bottoni anche dall'ordine di
       tabulazione: altrimenti si finisce col focus su pulsanti invisibili.
       Ritardata in chiusura, cosi' la transizione si vede lo stesso. */
    visibility: hidden;
    transition: opacity 0.2s ease-in-out, transform 0.2s ease-in-out, visibility 0s linear 0.2s;
}
.lang-switcher.expanded .lang-options {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
    visibility: visible;
    transition: opacity 0.2s ease-in-out, transform 0.2s ease-in-out, visibility 0s;
}
.lang-switcher .lang-option.selected {
    border-color: var(--primary);
    box-shadow: 0 0 10px var(--primary-glow);
}

.header-tag {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 600;
}

/* Hero Section - Mobile First */
.hero {
  text-align: center;
  padding: 24px 0 40px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid var(--border-glow);
  padding: 6px 14px;
  border-radius: 30px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 20px;
  animation: pulseGlow 3s infinite alternate;
}

.badge-dot {
  width: 7px;
  height: 7px;
  background-color: var(--primary);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--primary);
}

@keyframes pulseGlow {
  0% { box-shadow: 0 0 0px rgba(245, 158, 11, 0.2); }
  100% { box-shadow: 0 0 16px rgba(245, 158, 11, 0.5); }
}

h1 {
  font-size: 2.1rem;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -1px;
  margin-bottom: 16px;
  background: linear-gradient(180deg, #ffffff 0%, #cbd5e1 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

h1 .gradient-text {
  background: linear-gradient(135deg, #f59e0b 0%, #ef4444 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.subtitle {
  font-size: 0.98rem;
  color: var(--text-muted);
  max-width: 650px;
  margin: 0 auto 30px;
  font-weight: 400;
  line-height: 1.6;
}

/* Subscription Form Card */
.subscribe-card {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-color);
  padding: 24px 16px;
  border-radius: var(--radius-lg);
  max-width: 520px;
  margin: 0 auto 48px;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4);
}

.subscribe-card h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 6px;
}

.subscribe-card p {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-bottom: 18px;
}

.subscribe-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* La riga email + pulsante: e' questa che diventa orizzontale da 640px in su,
   mentre il consenso resta sempre sotto. */
.subscribe-row {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Campo trappola per i bot: fuori schermo invece che display:none, cosi' i
   bot che leggono il CSS lo compilano lo stesso. */
.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.consent {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  text-align: left;
  font-size: 0.78rem;
  line-height: 1.45;
  color: var(--text-subtle);
  cursor: pointer;
}

.consent input[type="checkbox"] {
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  margin-top: 1px;
  accent-color: var(--primary);
  cursor: pointer;
}

.consent a {
  color: var(--text-muted);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.consent a:hover {
  color: var(--primary);
}

.subscribe-input {
  width: 100%;
  background: rgba(11, 15, 25, 0.85);
  border: 1px solid var(--border-color);
  padding: 14px 16px;
  border-radius: var(--radius-md);
  color: #fff;
  font-family: inherit;
  font-size: 0.95rem;
  outline: none;
  min-height: 48px; /* Touch friendly */
  transition: all 0.2s ease;
}

.subscribe-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.18);
}

.subscribe-btn {
  width: 100%;
  min-height: 48px; /* Touch friendly */
  background: linear-gradient(135deg, var(--primary), var(--primary-hover));
  color: #000;
  font-weight: 700;
  border: none;
  padding: 14px 20px;
  border-radius: var(--radius-md);
  cursor: pointer;
  font-family: inherit;
  font-size: 0.95rem;
  transition: all 0.2s ease;
  box-shadow: 0 4px 15px var(--primary-glow);
}

.subscribe-btn:hover {
  transform: translateY(-1px);
  filter: brightness(1.08);
}

.form-message {
  margin-top: 14px;
  font-size: 0.88rem;
  display: none;
  padding: 10px;
  border-radius: var(--radius-sm);
}

.form-message.success {
  display: block;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.2);
  color: #10b981;
}

/* Se l'invio fallisce lo si dice, invece di mostrare comunque il ringraziamento. */
.form-message.error {
  display: block;
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.25);
  color: #f87171;
}

/* Features Grid */
.features-title {
  text-align: center;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--text-subtle);
  margin-bottom: 20px;
  font-weight: 700;
}

.features-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin-bottom: 40px;
}

.feature-card {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-color);
  padding: 20px;
  border-radius: var(--radius-md);
  transition: all 0.3s ease;
  text-align: left;
}

.feature-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-glow);
  transform: translateY(-3px);
}

.feature-icon {
  width: 42px;
  height: 42px;
  background: rgba(245, 158, 11, 0.12);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  margin-bottom: 14px;
}

.feature-card h4 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 6px;
}

.feature-card p {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* Footer */
footer {
  padding: 24px 0;
  border-top: 1px solid var(--border-color);
  text-align: center;
  font-size: 0.82rem;
  color: var(--text-subtle);
}

footer a {
  color: var(--text-muted);
  text-decoration: none;
}

footer a:hover {
  color: var(--primary);
  text-decoration: underline;
}

/* ==========================================================================
   Desktop / Tablet Media Queries (Progressive Enhancement)
   ========================================================================== */
@media (min-width: 640px) {
  .container {
    padding: 0 24px;
  }
  
  header {
    flex-direction: row;
    justify-content: space-between;
    padding: 28px 0;
  }
  
  .hero {
    padding: 48px 0 50px;
  }
  
  h1 {
    font-size: 3rem;
  }
  
  .subtitle {
    font-size: 1.1rem;
  }
  
  .subscribe-card {
    padding: 32px;
  }
  
  .subscribe-row {
    flex-direction: row;
  }
  
  .subscribe-btn {
    width: auto;
    white-space: nowrap;
  }
  
  .features-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
  }
}
