/* ============================================================
   Teramo Trasporti — Landing Page QR
   Tema: bianco — coerente con l'app Flutter (light theme)
   ============================================================ */

:root {
  --bordeaux:       #A22929;
  --borgogna:       #702632;
  --borgogna-dark:  #5a1e28;
  --rosso:          #CC1C08;
  --grigio:         #393939;
  --bianco:         #FFFFFF;
  --bg:             #FFFFFF;
  --card-bg:        #FFFFFF;
  --card-hover:     #FDF0F0;
  --border:         rgba(162,41,41,0.15);
  --text-main:      #393939;
  --text-mid:       #666666;
  --text-secondary: #999999;
  --shadow-sm:      0 2px 8px rgba(0,0,0,0.08);
  --shadow-md:      0 4px 20px rgba(0,0,0,0.12);
  --radius:         14px;
  --font:           'Roboto', sans-serif;
}

/* ---- RESET ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text-main);
  min-height: 100vh;
  max-width: 480px;
  margin: 0 auto;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; }
button { cursor: pointer; border: none; background: none; font-family: var(--font); }

/* ============================================================
   HEADER
   ============================================================ */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bordeaux);
  padding: 12px 20px;
  box-shadow: var(--shadow-md);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: center;
}

.header-logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo-img {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  object-fit: contain;
}

.logo-text {
  font-size: 16px;
  font-weight: 700;
  color: var(--bianco);
  letter-spacing: 0.3px;
}

/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative;
  overflow: hidden;
}

.hero-image-wrap {
  position: relative;
  width: 100%;
  height: 200px;
}

.hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
  clip-path: ellipse(100% 88% at 50% 0%);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(112, 38, 50, 0.35) 0%,
    rgba(112, 38, 50, 0.5) 100%
  );
  clip-path: ellipse(100% 88% at 50% 0%);
}

.hero-mascotte {
  position: absolute;
  bottom: 55px;
  left: 20px;
  width: 72px;
  height: 72px;
  object-fit: contain;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,0.2));
}

.hero-text {
  padding: 14px 24px 6px;
  text-align: center;
}

.hero-title {
  font-size: 26px;
  font-weight: 700;
  line-height: 1.25;
  color: var(--text-main);
}

.hero-title span {
  color: var(--text-mid);
  font-weight: 400;
}

/* ============================================================
   MAIN CONTENT
   ============================================================ */
.main-content {
  padding: 0 16px 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* ============================================================
   CTA GRID
   ============================================================ */
.cta-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 8px;
}

.cta-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 22px 12px;
  background: var(--card-bg);
  border-radius: var(--radius);
  border: 2px solid rgba(162,41,41,0.35);
  box-shadow: var(--shadow-sm);
  color: var(--text-main);
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
  min-height: 140px;
  -webkit-tap-highlight-color: transparent;
}

.cta-card:active {
  transform: scale(0.97);
  background: var(--card-hover);
  border-color: var(--bordeaux);
}

/* Card download — 4ª card della griglia, stessa dimensione, gerarchia per colore */
.cta-card--accent {
  background: var(--bordeaux);
  border-color: var(--bordeaux);
}

.cta-card--accent:active {
  background: var(--borgogna);
  border-color: var(--borgogna);
  transform: scale(0.97);
}

.cta-icon {
  width: 48px;
  height: 48px;
  color: var(--bordeaux);
  flex-shrink: 0;
}

.cta-card--accent .cta-icon {
  color: var(--bianco);
}

.cta-icon svg {
  width: 100%;
  height: 100%;
}

.cta-label {
  font-size: 15px;
  font-weight: 700;
  text-align: center;
  line-height: 1.3;
  color: var(--text-main);
}

.cta-card--accent .cta-label {
  color: var(--bianco);
}

.cta-icon--platforms {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: auto;
  height: auto;
}

.cta-icon--platforms svg {
  width: 28px;
  height: 28px;
}

.cta-stores {
  display: block;
  font-size: 11px;
  font-weight: 400;
  opacity: 0.8;
  margin-top: 2px;
}

/* ============================================================
   DOWNLOAD SECTION
   ============================================================ */
.download-section {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow-sm);
}

.download-label {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--text-mid);
  margin-bottom: 14px;
  text-align: center;
}

.download-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  padding: 18px 24px;
  background: var(--bordeaux);
  border: none;
  border-radius: var(--radius);
  color: var(--bianco);
  font-family: var(--font);
  font-size: 17px;
  font-weight: 700;
  text-decoration: none;
  box-shadow: var(--shadow-sm);
  transition: background 0.15s ease, transform 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}

.download-btn:active {
  background: var(--borgogna);
  transform: scale(0.98);
}

.download-btn-icon {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  stroke: #ffffff;
}

.download-note {
  font-size: 13px;
  color: var(--text-secondary);
  text-align: center;
  margin-top: 10px;
}

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  background: var(--bg);
  border-top: 1px solid var(--border);
  padding: 24px 20px;
  text-align: center;
}

.footer-label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--text-secondary);
  margin-bottom: 16px;
}

.footer-logos {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 20px;
}

.partner-logo {
  height: 32px;
  width: auto;
  object-fit: contain;
}

.partner-logo--full {
  opacity: 1;
}

.footer-copy {
  font-size: 12px;
  color: var(--text-secondary);
}

/* ============================================================
   INSTALL MODAL
   ============================================================ */
#install-modal {
  display: flex;
  position: fixed;
  inset: 0;
  z-index: 1000;
  align-items: flex-end;
  justify-content: center;
}
.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.5);
}
.modal-content {
  position: relative;
  background: var(--bianco);
  border-radius: 20px 20px 0 0;
  padding: 24px 20px 28px;
  width: 100%;
  max-width: 480px;
  animation: modalSlide 0.25s ease-out;
}
@keyframes modalSlide {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}
.modal-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}
.modal-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  flex-shrink: 0;
}
.modal-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--text-main);
}
.modal-subtitle {
  font-size: 13px;
  color: var(--text-mid);
  margin-top: 2px;
}
.modal-close {
  margin-left: auto;
  font-size: 28px;
  color: var(--text-secondary);
  padding: 0 4px;
  line-height: 1;
}
.modal-body {
  font-size: 15px;
  color: var(--text-main);
  line-height: 1.6;
}
.modal-body ol {
  padding-left: 20px;
  margin: 0;
}
.modal-body li {
  margin-bottom: 8px;
}
.modal-open-btn {
  display: block;
  width: 100%;
  margin-top: 20px;
  padding: 14px;
  background: var(--bordeaux);
  color: var(--bianco);
  text-align: center;
  text-decoration: none;
  border-radius: var(--radius);
  font-size: 16px;
  font-weight: 700;
}
.modal-open-btn:active {
  background: var(--borgogna);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 360px) {
  .hero-title { font-size: 22px; }
  .cta-card { min-height: 110px; padding: 16px 10px; }
  .cta-icon { width: 38px; height: 38px; }
  .cta-label { font-size: 12px; }
}
