/* ========================================
   HEBRA — Premium Hair Analysis
   Rose/Gold/Cream Palette
   Mobile-First Responsive
   ======================================== */

:root {
  --rose: #9B6B6B;
  --rose-dark: #7A5252;
  --rose-light: #C4A0A0;
  --gold: #D4A574;
  --gold-light: #E8C9A8;
  --gold-dark: #B8874E;
  --cream: #FFFAF7;
  --cream-dark: #F5EDE6;
  --text: #2D2424;
  --text-light: #6B5A5A;
  --text-muted: #9B8E8E;
  --white: #FFFFFF;
  --border: #E8DDD8;
  --scanner-bg: #0A0A0F;
  --scanner-gold: #D4A574;
  --scanner-text: #E8E0D8;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--cream);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 600;
  line-height: 1.2;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ---- NAV ---- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(255, 250, 247, 0.92);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.logo {
  font-family: 'Playfair Display', serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--rose);
  text-decoration: none;
}

.nav-cta {
  background: var(--rose);
  color: var(--white);
  padding: 10px 24px;
  border-radius: 100px;
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  transition: all 0.3s;
}

.nav-cta:hover {
  background: var(--rose-dark);
  transform: translateY(-1px);
}

/* ---- BUTTONS ---- */
.btn {
  display: inline-block;
  font-family: 'Inter', sans-serif;
  font-weight: 500;
  text-decoration: none;
  border-radius: 100px;
  transition: all 0.3s ease;
  cursor: pointer;
  border: none;
  text-align: center;
}

.btn-primary {
  background: var(--rose);
  color: var(--white);
  padding: 16px 40px;
  font-size: 1rem;
}

.btn-primary:hover {
  background: var(--rose-dark);
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(155, 107, 107, 0.3);
}

.btn-lg {
  padding: 18px 48px;
  font-size: 1.1rem;
}

.btn-gold {
  background: var(--gold);
  color: var(--white);
}

.btn-gold:hover {
  background: var(--gold-dark);
}

.btn-outline {
  background: transparent;
  border: 2px solid var(--rose);
  color: var(--rose);
  padding: 14px 38px;
}

.btn-outline:hover {
  background: var(--rose);
  color: var(--white);
}

/* ---- HERO ---- */
.hero {
  padding: 140px 0 80px;
  text-align: center;
  background: linear-gradient(180deg, var(--cream) 0%, var(--cream-dark) 100%);
}

.hero-badge {
  display: inline-block;
  background: rgba(155, 107, 107, 0.1);
  color: var(--rose);
  padding: 8px 20px;
  border-radius: 100px;
  font-size: 0.85rem;
  font-weight: 500;
  margin-bottom: 24px;
}

.hero h1 {
  font-size: 3.2rem;
  color: var(--text);
  margin-bottom: 20px;
  letter-spacing: -0.02em;
}

.hero-sub {
  font-size: 1.15rem;
  color: var(--text-light);
  max-width: 550px;
  margin: 0 auto 36px;
  line-height: 1.7;
}

.hero-trust {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin-top: 32px;
  flex-wrap: wrap;
}

.hero-trust span {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* ---- SECTIONS ---- */
.section {
  padding: 80px 0;
}

.section h2 {
  font-size: 2.2rem;
  text-align: center;
  margin-bottom: 16px;
  color: var(--text);
}

.section-sub {
  text-align: center;
  color: var(--text-light);
  font-size: 1.05rem;
  max-width: 500px;
  margin: 0 auto 48px;
}

/* ---- COMPARISON ---- */
.comparison {
  background: var(--white);
}

.comparison-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  max-width: 800px;
  margin: 40px auto 0;
}

.comparison-card {
  padding: 32px;
  border-radius: 16px;
  border: 1px solid var(--border);
}

.comparison-old {
  background: var(--cream);
}

.comparison-new {
  background: linear-gradient(135deg, rgba(155, 107, 107, 0.05), rgba(212, 165, 116, 0.08));
  border-color: var(--rose-light);
}

.comparison-label {
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 20px;
  color: var(--text-muted);
}

.comparison-new .comparison-label {
  color: var(--rose);
}

.comparison-card ul {
  list-style: none;
}

.comparison-card li {
  padding: 8px 0;
  font-size: 0.95rem;
  color: var(--text-light);
}

.comparison-new li {
  color: var(--text);
}

/* ---- FEATURES ---- */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.feature-card {
  background: var(--white);
  padding: 32px 28px;
  border-radius: 16px;
  border: 1px solid var(--border);
  transition: all 0.3s;
}

.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(155, 107, 107, 0.1);
  border-color: var(--rose-light);
}

.feature-icon {
  font-size: 2rem;
  margin-bottom: 16px;
}

.feature-card h3 {
  font-size: 1.15rem;
  margin-bottom: 8px;
  color: var(--text);
}

.feature-card p {
  font-size: 0.9rem;
  color: var(--text-light);
  line-height: 1.6;
}

/* ---- HOW IT WORKS ---- */
.how-it-works {
  background: var(--white);
}

.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
  text-align: center;
}

.step-number {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--rose), var(--gold));
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Playfair Display', serif;
  font-size: 1.4rem;
  font-weight: 700;
  margin: 0 auto 20px;
}

.step h3 {
  font-size: 1.1rem;
  margin-bottom: 8px;
}

.step p {
  font-size: 0.9rem;
  color: var(--text-light);
}

/* ---- FICHA PREVIEW ---- */
.ficha-preview {
  background: linear-gradient(180deg, var(--cream) 0%, var(--cream-dark) 100%);
}

.ficha-mockup {
  max-width: 500px;
  margin: 0 auto;
  background: var(--white);
  border-radius: 20px;
  padding: 36px;
  border: 1px solid var(--border);
  box-shadow: 0 20px 60px rgba(155, 107, 107, 0.1);
}

.ficha-header {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 32px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
}

.ficha-score {
  text-align: center;
}

.ficha-score-number {
  font-family: 'Playfair Display', serif;
  font-size: 3rem;
  font-weight: 700;
  color: var(--rose);
  line-height: 1;
}

.ficha-score-label {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.ficha-title h3 {
  font-size: 1.2rem;
  color: var(--text);
}

.ficha-title p {
  font-size: 0.85rem;
  color: var(--text-light);
  margin-top: 4px;
}

.ficha-bars {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.ficha-bar-item {
  display: grid;
  grid-template-columns: 120px 1fr 40px;
  align-items: center;
  gap: 12px;
}

.ficha-bar-label {
  font-size: 0.85rem;
  color: var(--text-light);
}

.ficha-bar {
  height: 8px;
  background: var(--cream-dark);
  border-radius: 100px;
  overflow: hidden;
}

.ficha-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--rose), var(--gold));
  border-radius: 100px;
  transition: width 1.5s ease;
}

.ficha-bar-value {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
  text-align: right;
}

/* ---- FAQ ---- */
.faq {
  background: var(--white);
}

.faq-list {
  max-width: 700px;
  margin: 0 auto;
}

.faq-item {
  border-bottom: 1px solid var(--border);
}

.faq-item summary {
  padding: 20px 0;
  font-size: 1.05rem;
  font-weight: 500;
  cursor: pointer;
  color: var(--text);
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.faq-item summary::-webkit-details-marker { display: none; }

.faq-item summary::after {
  content: '+';
  font-size: 1.4rem;
  color: var(--rose);
  font-weight: 300;
  transition: transform 0.3s;
}

.faq-item[open] summary::after {
  transform: rotate(45deg);
}

.faq-item p {
  padding: 0 0 20px;
  font-size: 0.95rem;
  color: var(--text-light);
  line-height: 1.7;
}

/* ---- CTA SECTION ---- */
.cta-section {
  text-align: center;
  background: linear-gradient(135deg, rgba(155, 107, 107, 0.06), rgba(212, 165, 116, 0.08));
}

/* ---- FOOTER ---- */
.footer {
  padding: 32px 0;
  border-top: 1px solid var(--border);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer p {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* ================================================
   ANALISIS PAGE — Upload Zone
   ================================================ */
.upload-page {
  padding: 120px 0 60px;
  min-height: 100vh;
}

.upload-page h1 {
  font-size: 2.2rem;
  text-align: center;
  margin-bottom: 8px;
}

.upload-page .section-sub {
  margin-bottom: 40px;
}

.upload-zone {
  max-width: 500px;
  margin: 0 auto;
  background: var(--white);
  border-radius: 20px;
  padding: 40px;
  border: 2px dashed var(--border);
  text-align: center;
  cursor: pointer;
  transition: all 0.3s;
}

.upload-zone:hover,
.upload-zone.dragover {
  border-color: var(--rose);
  background: rgba(155, 107, 107, 0.03);
}

.upload-zone-icon {
  font-size: 3rem;
  margin-bottom: 16px;
}

.upload-zone h3 {
  font-size: 1.1rem;
  margin-bottom: 8px;
}

.upload-zone p {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.upload-preview {
  max-width: 500px;
  margin: 24px auto 0;
  display: none;
}

.upload-preview.active {
  display: block;
}

.upload-preview img {
  width: 100%;
  max-height: 400px;
  object-fit: cover;
  border-radius: 16px;
  border: 1px solid var(--border);
}

.upload-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 12px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.upload-actions {
  max-width: 500px;
  margin: 24px auto 0;
  text-align: center;
  display: none;
}

.upload-actions.active {
  display: block;
}

.upload-tips {
  max-width: 500px;
  margin: 40px auto 0;
}

.upload-tips h3 {
  font-size: 1rem;
  margin-bottom: 12px;
  text-align: center;
}

.tips-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.tip {
  background: var(--white);
  padding: 16px;
  border-radius: 12px;
  border: 1px solid var(--border);
  font-size: 0.85rem;
  color: var(--text-light);
}

.tip strong {
  color: var(--text);
}

/* File input hidden */
.file-input { display: none; }

/* ================================================
   SCANNER PAGE — Dark Theme
   ================================================ */
.scanner-page {
  background: var(--scanner-bg);
  min-height: 100vh;
  color: var(--scanner-text);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  overflow: hidden;
}

.scanner-container {
  max-width: 420px;
  width: 100%;
  text-align: center;
}

.scanner-header {
  margin-bottom: 32px;
}

.scanner-header h1 {
  font-size: 1.4rem;
  color: var(--scanner-text);
  margin-bottom: 4px;
}

.scanner-header p {
  font-size: 0.85rem;
  color: rgba(232, 224, 216, 0.5);
}

/* Photo frame with scan effect */
.scanner-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 3/4;
  border-radius: 16px;
  overflow: hidden;
  margin-bottom: 32px;
  background: #1A1A24;
}

.scanner-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Corner brackets */
.scanner-frame::before,
.scanner-frame::after {
  content: '';
  position: absolute;
  width: 40px;
  height: 40px;
  border: 2px solid var(--scanner-gold);
  z-index: 3;
  opacity: 0.6;
}

.scanner-frame::before {
  top: 12px;
  left: 12px;
  border-right: none;
  border-bottom: none;
}

.scanner-frame::after {
  bottom: 12px;
  right: 12px;
  border-left: none;
  border-top: none;
}

.corner-br,
.corner-tl {
  position: absolute;
  width: 40px;
  height: 40px;
  border: 2px solid var(--scanner-gold);
  z-index: 3;
  opacity: 0.6;
}

.corner-tl {
  top: 12px;
  right: 12px;
  border-left: none;
  border-bottom: none;
}

.corner-br {
  bottom: 12px;
  left: 12px;
  border-right: none;
  border-top: none;
}

/* Scan line */
.scan-line {
  position: absolute;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--scanner-gold), transparent);
  box-shadow: 0 0 20px var(--scanner-gold), 0 0 60px rgba(212, 165, 116, 0.3);
  z-index: 5;
  top: 0;
  opacity: 0;
  transition: opacity 0.3s;
}

.scan-line.active {
  opacity: 1;
  animation: scanDown 3s ease-in-out infinite;
}

@keyframes scanDown {
  0% { top: 0; }
  50% { top: 100%; }
  100% { top: 0; }
}

/* Data points */
.data-point {
  position: absolute;
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 8px;
  opacity: 0;
  transform: scale(0.8);
  transition: all 0.5s ease;
}

.data-point.visible {
  opacity: 1;
  transform: scale(1);
}

.data-point-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--scanner-gold);
  box-shadow: 0 0 10px var(--scanner-gold);
  animation: pulse 2s ease infinite;
}

@keyframes pulse {
  0%, 100% { box-shadow: 0 0 10px var(--scanner-gold); }
  50% { box-shadow: 0 0 20px var(--scanner-gold), 0 0 40px rgba(212, 165, 116, 0.3); }
}

.data-point-label {
  background: rgba(10, 10, 15, 0.85);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(212, 165, 116, 0.3);
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 0.75rem;
  white-space: nowrap;
}

.data-point-label strong {
  color: var(--scanner-gold);
}

/* Progress section */
.scanner-progress {
  margin-bottom: 24px;
}

.scanner-phase {
  font-size: 0.9rem;
  color: var(--scanner-gold);
  margin-bottom: 12px;
  min-height: 24px;
}

.progress-bar {
  height: 4px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 100px;
  overflow: hidden;
  margin-bottom: 8px;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--rose), var(--scanner-gold));
  border-radius: 100px;
  width: 0%;
  transition: width 0.5s ease;
}

.scanner-percent {
  font-size: 0.8rem;
  color: rgba(232, 224, 216, 0.4);
}

/* ================================================
   RESULTADO PAGE
   ================================================ */
.resultado-page {
  padding: 120px 0 60px;
  min-height: 100vh;
  text-align: center;
}

.resultado-icon {
  font-size: 4rem;
  margin-bottom: 24px;
}

.resultado-page h1 {
  font-size: 2rem;
  margin-bottom: 12px;
}

.resultado-page .section-sub {
  margin-bottom: 40px;
}

.email-form {
  max-width: 440px;
  margin: 0 auto;
  background: var(--white);
  padding: 36px;
  border-radius: 20px;
  border: 1px solid var(--border);
}

.email-form h3 {
  font-size: 1.1rem;
  margin-bottom: 16px;
}

.email-form input[type="email"] {
  width: 100%;
  padding: 14px 20px;
  border: 1px solid var(--border);
  border-radius: 12px;
  font-size: 1rem;
  font-family: 'Inter', sans-serif;
  background: var(--cream);
  color: var(--text);
  margin-bottom: 16px;
  outline: none;
  transition: border-color 0.3s;
}

.email-form input[type="email"]:focus {
  border-color: var(--rose);
}

.email-form .btn {
  width: 100%;
}

.email-success {
  display: none;
  text-align: center;
  padding: 20px;
}

.email-success.active {
  display: block;
}

.email-success p {
  color: var(--text-light);
  font-size: 0.95rem;
}

/* ================================================
   RESPONSIVE
   ================================================ */
@media (max-width: 768px) {
  .hero { padding: 110px 0 60px; }
  .hero h1 { font-size: 2.2rem; }
  .hero-sub { font-size: 1rem; }
  .hero-trust { flex-direction: column; gap: 8px; }

  .section { padding: 60px 0; }
  .section h2 { font-size: 1.8rem; }

  .comparison-grid { grid-template-columns: 1fr; }
  .features-grid { grid-template-columns: 1fr; }
  .steps-grid { grid-template-columns: 1fr; gap: 32px; }

  .ficha-mockup { padding: 24px; }
  .ficha-bar-item { grid-template-columns: 90px 1fr 36px; }
  .ficha-score-number { font-size: 2.5rem; }

  .btn-lg { padding: 16px 36px; font-size: 1rem; }

  .footer-inner { flex-direction: column; gap: 8px; text-align: center; }

  .upload-page h1 { font-size: 1.8rem; }
  .upload-zone { padding: 28px 20px; }
  .tips-grid { grid-template-columns: 1fr; }

  .scanner-container { max-width: 100%; }
}

@media (max-width: 480px) {
  .hero h1 { font-size: 1.8rem; }
  .nav-cta { padding: 8px 16px; font-size: 0.8rem; }
  .comparison-card { padding: 24px; }
  .feature-card { padding: 24px 20px; }
}
