/* === RESET & BASE === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --blue: #002B5E;
  --blue-dark: #001A3A;
  --blue-light: #003F8A;
  --accent: #C8A000;
  --accent-light: #E8C000;
  --green: #22c55e;
  --red: #ef4444;
  --gray: #64748b;
  --gray-light: #f1f5f9;
  --white: #ffffff;
  --text: #1e293b;
  --radius: 12px;
  --shadow: 0 4px 24px rgba(0,0,0,0.10);
  --shadow-lg: 0 12px 48px rgba(0,0,0,0.15);
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', system-ui, sans-serif;
  color: var(--text);
  background: var(--white);
  line-height: 1.6;
  font-size: 16px;
}

/* === NAV === */
nav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid #e2e8f0;
  padding: 0 24px;
}
.nav-inner {
  max-width: 1100px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  height: 60px;
}
.logo { display: flex; align-items: center; }
.logo-img { height: 36px; width: auto; }

/* Logo MossosApp animat (estàtic per defecte; en hover el daurat escombra L->R) */
.brand-logo { height: 42px; width: auto; display: block; color: #1D1D1B; }
.brand-logo .sq { fill: #007AFF; transition: fill .25s ease, transform .25s ease; transform-box: fill-box; transform-origin: center; }
.brand-logo .sq1 { fill: #C8A000; }
.brand-logo:hover .sq { animation: sqsweep .55s ease both; }
.brand-logo:hover .sq1 { animation-delay: 0s; }
.brand-logo:hover .sq2 { animation-delay: .09s; }
.brand-logo:hover .sq3 { animation-delay: .18s; }
.brand-logo:hover .sq4 { animation-delay: .27s; }
.brand-logo:hover .sq5 { animation-delay: .36s; }
@keyframes sqsweep { 40% { fill: #C8A000; transform: scale(1.22); } 100% { transform: scale(1); } }

/* === BUTTONS === */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 24px; border-radius: 8px;
  font-weight: 600; font-size: 0.95rem;
  text-decoration: none; cursor: pointer;
  transition: all 0.2s ease; border: 2px solid transparent;
}
.btn-sm { padding: 8px 18px; font-size: 0.875rem; }
.btn-large { padding: 16px 32px; font-size: 1rem; }
.btn-primary { background: var(--blue); color: var(--white); }
.btn-primary:hover { background: var(--blue-dark); transform: translateY(-1px); box-shadow: var(--shadow); }
/* CTA primari daurat (acció principal: comença gratis -> /app/) */
.btn-gold { background: #C8A000; color: #fff; font-weight: 800; }
.btn-gold:hover { background: #A88600; transform: translateY(-1px); box-shadow: var(--shadow); }
.btn-secondary { background: transparent; color: var(--blue); border-color: var(--blue); }
.btn-secondary:hover { background: var(--blue); color: var(--white); }
.btn-icon { width: 18px; height: 18px; }

/* === HERO === */
.hero {
  background: linear-gradient(135deg, var(--blue-dark) 0%, var(--blue) 60%, var(--blue-light) 100%);
  color: var(--white);
  padding: 80px 24px 100px;
  display: flex; justify-content: center;
  overflow: hidden;
  position: relative;
}
.hero::before {
  content: ''; position: absolute; inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
.hero-inner {
  max-width: 540px; position: relative; z-index: 1;
  display: flex; flex-direction: column; gap: 20px;
}
.badge {
  display: inline-block; background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.3);
  padding: 6px 14px; border-radius: 100px;
  font-size: 0.8rem; font-weight: 600; letter-spacing: 0.5px;
  width: fit-content;
}
.hero h1 { font-size: clamp(2rem, 5vw, 3rem); font-weight: 800; line-height: 1.15; }
.hero h1 .accent { color: var(--accent-light); }
.hero-sub { font-size: 1.05rem; opacity: 0.9; max-width: 480px; }
.hero-ctas { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-ctas .btn-secondary { border-color: rgba(255,255,255,0.5); color: var(--white); }
.hero-ctas .btn-secondary:hover { background: rgba(255,255,255,0.15); }
.hero-note { font-size: 0.8rem; opacity: 0.6; }

/* Phone mock */
.hero-visual {
  display: none;
  position: relative; z-index: 1; margin-left: 60px; flex-shrink: 0;
}
.phone-mock {
  width: 260px; background: #0a1929;
  border-radius: 24px; padding: 20px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.4), 0 0 0 2px rgba(255,255,255,0.1);
}
.phone-screen { display: flex; flex-direction: column; gap: 12px; }
.mock-header { font-size: 0.75rem; color: #94a3b8; font-weight: 600; letter-spacing: 0.5px; }
.mock-score { font-size: 2.5rem; font-weight: 800; color: var(--white); line-height: 1; }
.mock-score span { font-size: 1rem; color: #94a3b8; }
.mock-label { font-size: 0.875rem; color: var(--green); font-weight: 600; }
.mock-bars { display: flex; flex-direction: column; gap: 8px; margin-top: 4px; }
.bar-row { display: flex; align-items: center; gap: 8px; font-size: 0.7rem; color: #94a3b8; }
.bar-row span:first-child { width: 80px; flex-shrink: 0; }
.bar-row span:last-child { width: 28px; text-align: right; }
.bar { flex: 1; height: 6px; background: rgba(255,255,255,0.1); border-radius: 3px; overflow: hidden; }
.fill { height: 100%; background: var(--green); border-radius: 3px; }
.fill.weak { background: var(--red); }
.mock-tip { font-size: 0.75rem; background: rgba(232,160,32,0.15); border: 1px solid rgba(232,160,32,0.3); color: var(--accent-light); padding: 8px 10px; border-radius: 8px; }

/* === STATS === */
.stats { background: var(--blue-dark); color: var(--white); padding: 32px 24px; }
.stats-inner {
  max-width: 900px; margin: 0 auto;
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px;
}
.stat { text-align: center; }
.stat strong { display: block; font-size: 1.8rem; font-weight: 800; color: var(--accent-light); }
.stat span { font-size: 0.8rem; opacity: 0.7; }

/* === SECTIONS === */
.section-inner { max-width: 1100px; margin: 0 auto; padding: 0 24px; }
.section-inner h2 { font-size: clamp(1.5rem, 3vw, 2rem); font-weight: 700; color: var(--blue-dark); margin-bottom: 12px; }
.section-sub { color: var(--gray); font-size: 1rem; margin-bottom: 40px; max-width: 600px; }
.section-inner.center { text-align: center; }
.section-inner.center .section-sub { margin-left: auto; margin-right: auto; }

/* === FEATURES === */
.features { padding: 80px 0; }
.features-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
}
.feature-card {
  background: var(--gray-light); border-radius: var(--radius);
  padding: 28px; display: flex; flex-direction: column; gap: 10px;
  transition: transform 0.2s, box-shadow 0.2s;
}
.feature-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.feature-card.highlight { background: var(--blue-dark); color: var(--white); }
.feature-card.highlight h3 { color: var(--white); }
.feature-card.highlight p { color: rgba(255,255,255,0.8); }
.feature-icon { font-size: 1.8rem; }
.feature-card h3 { font-size: 1.05rem; font-weight: 700; color: var(--blue-dark); }
.feature-card p { font-size: 0.9rem; color: var(--gray); flex: 1; }
.feature-tag {
  display: inline-block; background: rgba(26,58,92,0.1);
  color: var(--blue); font-size: 0.75rem; font-weight: 600;
  padding: 4px 10px; border-radius: 100px; width: fit-content;
}
.feature-card.highlight .feature-tag { background: rgba(255,255,255,0.15); color: var(--accent-light); }

/* === EXAM PREVIEW === */
.exam-preview { background: var(--gray-light); padding: 80px 0; }
.two-col { display: flex; gap: 60px; align-items: center; flex-wrap: wrap; }
.col-text { flex: 1; min-width: 280px; display: flex; flex-direction: column; gap: 20px; }
.col-text h2 { margin-bottom: 0; }
.check-list { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.check-list li { font-size: 0.95rem; color: var(--text); }
.col-visual { flex: 1; min-width: 280px; }
.exam-mock {
  background: var(--white); border-radius: var(--radius);
  box-shadow: var(--shadow-lg); overflow: hidden;
}
.em-header {
  background: var(--blue); color: var(--white);
  padding: 12px 16px; font-size: 0.85rem; font-weight: 600;
  display: flex; justify-content: space-between;
}
.timer { color: var(--accent-light); font-weight: 700; }
.em-question { padding: 20px 16px; font-weight: 600; font-size: 0.95rem; color: var(--blue-dark); border-bottom: 1px solid #e2e8f0; }
.em-options { padding: 12px 16px; display: flex; flex-direction: column; gap: 8px; }
.em-opt {
  padding: 10px 14px; border-radius: 8px; font-size: 0.875rem;
  background: var(--gray-light); color: var(--text); cursor: pointer;
  transition: background 0.15s;
}
.em-opt.correct { background: #dcfce7; color: #166534; font-weight: 600; }
.em-footer { padding: 10px 16px; font-size: 0.75rem; color: var(--gray); border-top: 1px solid #e2e8f0; }

/* === PSICOTECNICS === */
.psicos { padding: 80px 0; }
.psicos-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px; margin-top: 32px;
}
.psico-item {
  background: var(--gray-light); border-radius: var(--radius);
  padding: 16px; text-align: center; font-size: 0.875rem; font-weight: 500;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  transition: transform 0.2s, box-shadow 0.2s;
}
.psico-item:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.psico-item span { font-size: 1.5rem; }

/* === TESTIMONIALS === */
.testimonials { background: var(--blue-dark); color: var(--white); padding: 80px 0; }
.testimonials h2 { color: var(--white); }
.testimonials-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px; margin-top: 32px;
}
.t-card { background: rgba(255,255,255,0.07); border-radius: var(--radius); padding: 24px; display: flex; flex-direction: column; gap: 12px; }
.t-stars { color: var(--accent-light); font-size: 1rem; letter-spacing: 2px; }
.t-card p { font-size: 0.9rem; opacity: 0.85; flex: 1; font-style: italic; }
.t-author { font-size: 0.8rem; opacity: 0.5; font-weight: 600; }

/* === DOWNLOAD === */
.download { padding: 100px 0; background: linear-gradient(135deg, #f0f7ff 0%, #e8f4fd 100%); }
.download h2 { font-size: clamp(1.8rem, 4vw, 2.5rem); margin-bottom: 16px; }
.download p { color: var(--gray); max-width: 500px; margin: 0 auto 32px; font-size: 1rem; }
.download-ctas { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; margin-bottom: 20px; }
.ios-note { color: var(--gray); font-size: 0.875rem; }

/* === FOOTER === */
footer { background: var(--blue-dark); color: rgba(255,255,255,0.6); padding: 40px 24px; text-align: center; }
.footer-inner { max-width: 600px; margin: 0 auto; display: flex; flex-direction: column; gap: 12px; align-items: center; }
.footer-logo { font-size: 1.1rem; font-weight: 700; color: var(--white); }
footer p { font-size: 0.8rem; }
.footer-links a { color: rgba(255,255,255,0.5); text-decoration: none; }
.footer-links a:hover { color: var(--white); }

/* === RESPONSIVE === */
@media (min-width: 900px) {
  .hero { flex-direction: row; align-items: center; padding: 100px 60px; }
  .hero-inner { max-width: 560px; }
  .hero-visual { display: block; }
  .stats-inner { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 600px) {
  .hero-ctas { flex-direction: column; }
  .btn-large { width: 100%; justify-content: center; }
  .download-ctas { flex-direction: column; align-items: center; }
}
