:root {
  --bg: #FFFFFF;
  --text: #000000;
  --muted: #6E6E80;
  --primary: #10A37F;
  --surface: #F7F7F8;
  --border: #E5E5E7;
  --accent: #10A37F;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* Splash Screen - Cash App style */
.splash-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  opacity: 1;
  transition: opacity 0.8s ease-out, visibility 0.8s ease-out;
  visibility: visible;
}

.splash-screen.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.splash-content {
  text-align: center;
  animation: fadeIn 1s ease-out;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 40px;
}

.splash-logo {
  width: 200px;
  height: auto;
  animation: scaleIn 1s ease-out 0.5s both;
}

.splash-motto {
  font-size: clamp(32px, 5vw, 48px);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0;
  opacity: 0;
  animation: fadeInUp 1.2s ease-out 0.8s both;
}

/* Hide main content initially */
body:not(.loaded) main,
body:not(.loaded) header,
body:not(.loaded) footer {
  opacity: 0;
  visibility: hidden;
}

body.loaded main,
body.loaded header,
body.loaded footer {
  opacity: 1;
  visibility: visible;
  animation: fadeIn 1s ease-out;
}

/* Hide hero title initially to avoid duplication */
body:not(.loaded) .hero-copy h1 {
  opacity: 0;
  transform: translateY(20px);
}

body.loaded .hero-copy h1 {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 1s ease-out 0.3s, transform 1s ease-out 0.3s;
}

/* Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-50px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(50px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes float {

  0%,
  100% {
    transform: translateY(0px);
  }

  50% {
    transform: translateY(-20px);
  }
}

/* Animation classes */
.animate-on-scroll {
  opacity: 0;
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.animate-on-scroll.animated {
  opacity: 1;
}

.fade-in-up {
  animation: fadeInUp 0.8s ease-out forwards;
}

.fade-in {
  animation: fadeIn 1s ease-out forwards;
}

.slide-in-left {
  animation: slideInLeft 0.8s ease-out forwards;
}

.slide-in-right {
  animation: slideInRight 0.8s ease-out forwards;
}

.scale-in {
  animation: scaleIn 0.6s ease-out forwards;
}

.container {
  width: min(1200px, 92%);
  margin: 0 auto;
  padding: 0 24px;
}

/* Header - Cash App style */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 0;
  position: relative;
  min-height: 80px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0;
  color: var(--text);
  text-decoration: none;
  line-height: 0;
  flex-shrink: 0;
}

.brand-logo {
  width: auto;
  height: auto;
  max-height: 40px;
  max-width: min(250px, 70vw);
  object-fit: contain;
  display: block;
}

.site-footer .brand-logo {
  width: 100px;
  height: auto;
}

.nav {
  display: none;
  gap: 32px;
  align-items: center;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  width: 100%;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  padding: 24px;
  flex-direction: column;
  align-items: flex-start;
  z-index: 100;
  justify-content: flex-start;
}

.nav[data-open="true"] {
  display: flex;
}

.nav a {
  color: var(--text);
  text-decoration: none;
  font-size: 16px;
  font-weight: 500;
  padding: 12px 0;
  width: 100%;
  border-bottom: 1px solid var(--border);
  transition: color 0.2s;
}

.nav a:last-child {
  border-bottom: none;
}

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

.nav-toggle {
  display: inline-flex;
  background: transparent;
  color: var(--text);
  border: none;
  padding: 8px;
  cursor: pointer;
  font-size: 24px;
  z-index: 101;
  transition: color 0.2s;
}

.nav-toggle:hover {
  color: var(--primary);
}

@media (min-width: 880px) {
  .header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
  }

  .nav {
    display: flex !important;
    position: static;
    background: transparent;
    border: none;
    padding: 0;
    flex-direction: row;
    align-items: center;
    gap: 32px;
    justify-content: flex-end;
  }

  .nav a {
    padding: 0;
    width: auto;
    border-bottom: none;
  }

  .nav-toggle {
    display: none;
  }
}

.header-cta {
  display: none;
}

.btn-sm {
  padding: 8px 20px;
  font-size: 14px;
}

@media (max-width: 768px) {
  .brand-logo {
    width: 200px;
    max-height: 30px;
  }
}

/* Buttons - Cash App style */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 8px;
  padding: 14px 28px;
  text-decoration: none;
  font-weight: 600;
  font-size: 16px;
  border: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.btn-icon {
  font-size: 20px;
  line-height: 1;
}

.btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.btn:hover::before {
  width: 300px;
  height: 300px;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
}

.btn-primary:hover {
  background: #12C08A;
  color: #fff;
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 10px 30px rgba(16, 163, 127, 0.4);
}

.btn-primary:active {
  transform: translateY(0) scale(0.98);
}

.btn-outline {
  background: var(--primary);
  color: #fff;
  border: 2px solid var(--primary);
}

.btn-outline:hover {
  background: #12C08A;
  color: #fff;
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 10px 30px rgba(16, 163, 127, 0.3);
}

.btn-outline:active {
  transform: translateY(0) scale(0.98);
}

/* Hero - Cash App style */
.hero {
  padding: 80px 0 100px;
  background: var(--bg);
  position: relative;
  overflow: hidden;
}

/* Removed hero background glow for seamless navbar transition */
.hero-inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: 60px;
  align-items: center;
  position: relative;
  z-index: 1;
}

.hero-copy h1 {
  font-size: clamp(48px, 8vw, 80px);
  margin: 0 0 24px;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.subtitle {
  color: var(--muted);
  margin: 0 0 32px;
  font-size: clamp(18px, 2.5vw, 24px);
  line-height: 1.5;
  max-width: 600px;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 1s ease-out 0.5s, transform 1s ease-out 0.5s;
}

body.loaded .subtitle {
  opacity: 1;
  transform: translateY(0);
}

.cta {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 1s ease-out 0.7s, transform 1s ease-out 0.7s;
}

body.loaded .cta {
  opacity: 1;
  transform: translateY(0);
}

.cta {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 0;
}

.hero-media {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 40px 0;
  overflow: visible;
  min-height: 500px;
}

.animated-phone {
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 1s ease-out 0.5s, transform 1s ease-out 0.5s;
  width: 100%;
  max-width: 100%;
}

body.loaded .animated-phone {
  opacity: 1;
  transform: translateY(0);
}

.phone-frame-custom {
  width: min(320px, 75vw);
  height: auto;
  aspect-ratio: 9/18;
  max-width: 320px;
  max-height: 640px;
  background: linear-gradient(145deg, #e0e0e0, #f5f5f5);
  border-radius: 50px;
  padding: 20px;
  box-shadow:
    0 30px 80px rgba(0, 0, 0, 0.15),
    0 0 100px rgba(16, 163, 127, 0.15),
    /* Primary glow effect */
    inset 0 0 0 8px #d0d0d0,
    inset 0 0 0 10px #e8e8e8;
  position: relative;
}

.phone-screen-custom {
  width: 100%;
  height: 100%;
  background: #000;
  border-radius: 35px;
  overflow: hidden;
  position: relative;
}

.phone-image-custom {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 1.5s ease-in-out, transform 1.5s ease-in-out;
}

.phone-image-1 {
  opacity: 1;
  animation: switchImage 4s ease-in-out 1s infinite;
}

.phone-image-2 {
  animation: switchImage2 4s ease-in-out 1s infinite;
}

@keyframes switchImage {

  0%,
  45% {
    opacity: 1;
    transform: scale(1);
  }

  50%,
  95% {
    opacity: 0;
    transform: scale(1.05);
  }

  100% {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes switchImage2 {

  0%,
  45% {
    opacity: 0;
    transform: scale(1.05);
  }

  50%,
  95% {
    opacity: 1;
    transform: scale(1);
  }

  100% {
    opacity: 0;
    transform: scale(1.05);
  }
}

@media (max-width: 960px) {
  .header-inner {
    min-height: 60px;
  }

  .hero {
    padding: 40px 0 60px;
  }

  .hero-inner {
    gap: 20px;
  }

  .subtitle {
    margin-bottom: 12px;
  }

  .hero-media {
    padding: 5px 0 10px;
    min-height: 350px;
  }

  .phone-frame-custom {
    width: min(240px, 60vw);
    height: auto;
    max-height: min(480px, calc(100vh - 200px));
    aspect-ratio: 9/18;
    padding: 12px;
    border-radius: 36px;
  }

  .phone-screen-custom {
    border-radius: 24px;
  }
}

@media (max-width: 480px) {
  .header-inner {
    min-height: 50px;
  }

  .hero {
    padding: 30px 0 40px;
  }

  .hero-inner {
    gap: 12px;
  }

  .subtitle {
    margin-bottom: 8px;
  }

  .hero-media {
    padding: 0;
    min-height: 300px;
  }

  .phone-frame-custom {
    width: min(220px, 55vw);
    max-height: min(440px, calc(100vh - 250px));
    padding: 10px;
    border-radius: 32px;
  }

  .phone-screen-custom {
    border-radius: 22px;
  }
}

@media (min-width: 960px) {
  .hero-inner {
    grid-template-columns: 1.2fr 1fr;
  }
}

/* Fix per MacBook: mobile più quadrato e non stretchato */
@media (min-width: 1024px) {
  .phone-frame-custom {
    width: 300px !important;
    height: auto !important;
    max-width: 300px !important;
    max-height: 600px !important;
    aspect-ratio: 1/2 !important;
    padding: 18px !important;
  }
  
  .phone-screen-custom {
    border-radius: 32px !important;
    width: 100% !important;
    height: 100% !important;
  }
  
  .phone-image-custom {
    object-fit: cover !important;
    width: 100% !important;
    height: 100% !important;
  }
  
  .hero-media {
    min-height: 650px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
  }
  
  .animated-phone {
    width: 100% !important;
    max-width: 300px !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
  }
}

/* Fix per schermi molto larghi (MacBook Pro, iMac) */
@media (min-width: 1440px) {
  .phone-frame-custom {
    width: 340px !important;
    max-width: 340px !important;
    max-height: 680px !important;
  }
  
  .animated-phone {
    max-width: 340px !important;
  }
}

/* Features - Cash App style */
.features {
  padding: 100px 0;
  background: var(--bg);
  border-top: 1px solid var(--border);
}

.feature-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 24px;
  grid-template-columns: 1fr;
}

.feature-grid li {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 32px;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  opacity: 0;
  transform: translateY(30px);
}

.feature-grid li.animated {
  opacity: 1;
  transform: translateY(0);
}

.feature-grid li:hover {
  border-color: var(--primary);
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 20px 40px rgba(16, 163, 127, 0.2);
}

.feature-grid .icon {
  font-size: 40px;
  margin-bottom: 16px;
}

.feature-grid h3 {
  font-size: 24px;
  font-weight: 600;
  margin: 0 0 12px;
}

.feature-grid p {
  color: var(--muted);
  font-size: 16px;
  line-height: 1.6;
  margin: 0;
}

@media (min-width: 720px) {
  .feature-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* How it works - Cash App style */
.how {
  padding: 100px 0;
  background: var(--surface);
  border-top: 1px solid var(--border);
}

.how-title {
  text-align: center;
  font-size: clamp(40px, 5vw, 56px);
  margin: 0 0 16px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.how-subtitle {
  text-align: center;
  color: var(--muted);
  font-size: 20px;
  margin: 0 0 64px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.steps-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  margin-bottom: 60px;
  justify-items: center;
}

.step-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 32px;
  position: relative;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  max-width: 450px;
  width: 100%;
  opacity: 0;
  transform: translateY(40px);
}

.step-card.animated {
  opacity: 1;
  transform: translateY(0);
}

.step-card:hover {
  transform: translateY(-8px) scale(1.02);
  border-color: var(--primary);
  box-shadow: 0 30px 60px rgba(16, 163, 127, 0.2);
}

.step-card:nth-child(1) {
  transition-delay: 0s;
}

.step-card:nth-child(2) {
  transition-delay: 0.1s;
}

.step-card:nth-child(3) {
  transition-delay: 0.2s;
}

.step-card:nth-child(4) {
  transition-delay: 0.3s;
}

.step-number {
  position: absolute;
  top: -16px;
  left: 32px;
  background: var(--primary);
  color: #fff;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 18px;
}

.step-icon {
  font-size: 48px;
  margin-bottom: 16px;
}

.step-card h3 {
  margin: 0 0 12px;
  font-size: 24px;
  font-weight: 600;
}

.step-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
  font-size: 16px;
}

.privacy-note {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 32px;
  display: flex;
  gap: 24px;
  align-items: flex-start;
  max-width: 800px;
  margin: 0 auto;
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.6s ease-out;
}

.privacy-note.animated {
  opacity: 1;
  transform: translateY(0);
}

.privacy-icon {
  font-size: 48px;
  flex-shrink: 0;
}

.privacy-note h3 {
  margin: 0 0 12px;
  font-size: 24px;
  font-weight: 600;
}

.privacy-note p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
  font-size: 16px;
}

@media (min-width: 720px) {
  .steps-grid {
    grid-template-columns: repeat(2, 1fr);
    max-width: 1000px;
    margin-left: auto;
    margin-right: auto;
  }
}

@media (min-width: 1024px) {
  .steps-grid {
    grid-template-columns: repeat(4, 1fr);
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
  }
}

/* CTA Band - Cash App style */
.cta-band {
  padding: 100px 0;
  background: var(--bg);
  border-top: 1px solid var(--border);
  text-align: center;
}

.cta-band h2 {
  font-size: clamp(40px, 5vw, 56px);
  font-weight: 700;
  margin: 0 0 32px;
  letter-spacing: -0.02em;
}

.cta-band-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 24px;
}

/* FAQ - Cash App style */
.faq {
  padding: 100px 0;
  background: var(--surface);
  border-top: 1px solid var(--border);
}

.faq h2 {
  margin-top: 0;
  margin-bottom: 48px;
  font-size: clamp(40px, 5vw, 56px);
  font-weight: 700;
  letter-spacing: -0.02em;
}

details {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px;
  margin-bottom: 16px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  opacity: 0;
  transform: translateY(20px);
}

details.animated {
  opacity: 1;
  transform: translateY(0);
}

details:hover {
  border-color: var(--primary);
  transform: translateY(-2px);
}

details[open] {
  border-color: var(--primary);
  box-shadow: 0 10px 30px rgba(16, 163, 127, 0.1);
}

details[open] summary::after {
  transform: rotate(45deg);
}

summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 18px;
  color: var(--text);
  list-style: none;
  position: relative;
  padding-right: 32px;
}

summary::-webkit-details-marker {
  display: none;
}

summary::after {
  content: '+';
  position: absolute;
  right: 0;
  font-size: 24px;
  color: var(--primary);
  transition: transform 0.2s;
}

details[open] summary::after {
  transform: rotate(45deg);
}

details p {
  color: var(--muted);
  margin: 16px 0 0;
  line-height: 1.7;
  font-size: 16px;
}

/* Footer - Cash App style */
.site-footer {
  padding: 60px 0 40px;
  border-top: 1px solid var(--border);
  background: var(--bg);
}

.footer-grid {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 40px;
  flex-wrap: wrap;
}

.brand-row {
  display: flex;
  align-items: center;
  gap: 16px;
}

.links {
  display: flex;
  gap: 32px;
  flex-wrap: wrap;
}

.links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
  transition: color 0.2s;
}

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

.footnote {
  color: var(--muted);
  font-size: 14px;
  margin-top: 8px;
}

@media (min-width: 720px) {
  .footer-grid {
    flex-direction: row;
    align-items: flex-start;
  }
}