/* Minimal fast CSS */
:root{
  --bg:#FFFFFF; /* bianco */
  --fg:#333333; /* grigio scuro per il testo */
  --accent:#FFD700; /* giallo */
  --yellow:#FACC15;
  --secondary:#F0F0F0; /* grigio chiaro */
}

*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family: system-ui,-apple-system,Segoe UI,Roboto,Ubuntu,Cantarell,"Helvetica Neue",Arial;
  background: linear-gradient(135deg, #FFFFFF 0%, #F8F8F8 100%);
  color:var(--fg);
  display:grid;
  place-items:center;
}

.wrap{width:100%; max-width:720px; padding:24px}
.card{
  background: rgba(255,255,255,0.95);
  border:2px solid var(--accent);
  border-radius:24px;
  padding:32px 28px;
  text-align:center;
  backdrop-filter: blur(6px);
  box-shadow: 0 10px 30px rgba(255,215,0,0.25);
  width: 100%;
  max-width: 100%;
}
h1{
  margin:12px 0 8px;
  font-size: clamp(20px, 5vw, 36px);
  line-height:1.2;
  font-weight:800;
}
.accent{color:var(--accent)}
p{opacity:.8; margin:0 0 14px; color: var(--fg)}

#countdown{
  font-weight: 700;
  color: var(--accent);
  font-size: 1.1em;
}

.cta{
  display:inline-flex;
  padding:14px 24px;
  border-radius:999px;
  border:2px solid var(--accent);
  text-decoration:none;
  color:#333;
  background: linear-gradient(135deg, var(--accent), #FFA500);
  font-weight:700;
  font-size: 16px;
  transform: translateZ(0);
  transition: transform .15s ease, box-shadow .15s ease;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
}
.cta:active{transform:scale(.98)}
.cta:hover{box-shadow:0 8px 20px rgba(255,215,0,.5)}

.logo-wrap{
  width:120px; height:120px; margin:0 auto 20px;
  display:flex; align-items:center; justify-content:center;
  position:relative;
  overflow: visible;
}

.logo{
  width:100px; height:100px;
  border-radius:50%;
  object-fit:cover;
  border: 3px solid var(--accent);
  box-shadow: 0 4px 15px rgba(255,215,0,.3);
  position: relative;
  z-index: 1;
}
.plane{
  width:40px; height:40px;
  fill:var(--accent);
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  filter: drop-shadow(0 4px 8px rgba(255,215,0,.4));
  animation: flyAcross 3s ease-in-out infinite;
  z-index: 10;
}

@keyframes flyAcross{
  0%{ 
    left: -60px; 
    transform: translateY(-50%) rotate(-15deg) scale(0.8);
    opacity: 0;
  }
  15%{ 
    opacity: 1;
    transform: translateY(-50%) rotate(-5deg) scale(1);
  }
  50%{ 
    left: 50%;
    transform: translateY(-50%) translateX(-50%) rotate(5deg) scale(1.1);
  }
  85%{ 
    opacity: 1;
    transform: translateY(-50%) rotate(15deg) scale(1);
  }
  100%{ 
    left: calc(100% + 60px);
    transform: translateY(-50%) rotate(25deg) scale(0.8);
    opacity: 0;
  }
}

/* Mobile Optimizations */
@media screen and (max-width: 768px) {
  .wrap {
    padding: 16px;
  }
  
  .card {
    padding: 24px 20px;
    border-radius: 20px;
    margin: 0 8px;
  }
  
  .logo-wrap {
    width: 100px;
    height: 100px;
    margin: 0 auto 16px;
  }
  
  .logo {
    width: 80px;
    height: 80px;
    border: 2px solid var(--accent);
  }
  
  .plane {
    width: 32px;
    height: 32px;
  }
  
  h1 {
    font-size: clamp(18px, 6vw, 28px);
    margin: 8px 0 12px;
  }
  
  p {
    font-size: 14px;
    margin: 0 0 20px;
  }
  
  .cta {
    padding: 16px 28px;
    font-size: 16px;
    width: 100%;
    max-width: 280px;
    display: inline-flex;
    margin: 0 auto;
  }
}

@media screen and (max-width: 480px) {
  .wrap {
    padding: 12px;
  }
  
  .card {
    padding: 20px 16px;
    border-radius: 16px;
  }
  
  .logo-wrap {
    width: 90px;
    height: 90px;
    margin: 0 auto 12px;
  }
  
  .logo {
    width: 70px;
    height: 70px;
  }
  
  .plane {
    width: 28px;
    height: 28px;
  }
  
  h1 {
    font-size: clamp(16px, 7vw, 24px);
    line-height: 1.3;
  }
  
  p {
    font-size: 13px;
  }
  
  .cta {
    padding: 14px 24px;
    font-size: 15px;
    display: inline-flex;
    margin: 0 auto;
  }
  
  noscript p {
    font-size: 12px;
    padding: 8px;
  }
}

/* Touch device optimizations */
@media (hover: none) and (pointer: coarse) {
  .cta:hover {
    box-shadow: 0 8px 20px rgba(255,215,0,.5);
  }
  
  .cta:active {
    transform: scale(.95);
  }
}

/* In-app browser overlay */
.rea-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.92);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  backdrop-filter: blur(8px);
  animation: rea-fadeIn 0.3s ease;
}

.rea-overlay-content {
  background: #FFFFFF;
  border: 3px solid var(--accent);
  border-radius: 20px;
  padding: 32px 24px;
  max-width: 500px;
  width: 100%;
  text-align: center;
  box-shadow: 0 20px 60px rgba(255, 215, 0, 0.3);
}

.rea-overlay-content h2 {
  margin: 0 0 16px;
  font-size: clamp(20px, 5vw, 28px);
  color: var(--fg);
}

.rea-overlay-content p {
  margin: 0 0 12px;
  font-size: 16px;
  color: var(--fg);
  opacity: 0.9;
}

.rea-overlay-buttons {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 24px 0 16px;
}

.rea-btn {
  padding: 14px 24px;
  border-radius: 12px;
  border: none;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  font-family: inherit;
}

.rea-btn:active {
  transform: scale(0.97);
}

.rea-btn-primary {
  background: linear-gradient(135deg, var(--accent), #FFA500);
  color: #333;
  box-shadow: 0 4px 15px rgba(255, 215, 0, 0.4);
}

.rea-btn-primary:hover {
  box-shadow: 0 6px 20px rgba(255, 215, 0, 0.6);
}

.rea-btn-secondary {
  background: #F0F0F0;
  color: #333;
  border: 2px solid #DDD;
}

.rea-btn-secondary:hover {
  background: #E8E8E8;
}

.rea-overlay-hint {
  font-size: 13px;
  opacity: 0.7;
  margin-top: 16px;
}

@keyframes rea-fadeIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* Mobile adjustments for overlay */
@media screen and (max-width: 480px) {
  .rea-overlay-content {
    padding: 24px 20px;
  }
  
  .rea-overlay-content h2 {
    font-size: 20px;
  }
  
  .rea-overlay-content p {
    font-size: 14px;
  }
  
  .rea-btn {
    padding: 12px 20px;
    font-size: 15px;
  }
}
