/* ===== Dark nebula-like background (visual only) ===== */
body {
  background: transparent;
  font-family: Arial, sans-serif;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  margin: 0;
  padding: 30px 15px;
  position: relative;
  overflow-x: hidden;
  overflow-y: auto;
}

.bg{
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background: linear-gradient(180deg, #060b15 0%, #0a1323 40%, #0b1220 100%);
}
.bg .blob{
  position:absolute;
  width: 65vmax; height: 55vmax;
  border-radius: 45% 55% 60% 40% / 42% 58% 38% 62%;
  filter: blur(40px);
  opacity: .60;
  mix-blend-mode: screen;
  background:
    radial-gradient(40% 40% at 30% 30%, rgba(147,197,253,.75) 0%, rgba(147,197,253,0) 70%),
    radial-gradient(55% 55% at 70% 65%, rgba(59,130,246,.55) 0%, rgba(59,130,246,0) 70%),
    conic-gradient(from 210deg at 50% 50%, rgba(37,99,235,.55), rgba(56,189,248,.35) 30%, rgba(29,78,216,.45) 65%, rgba(59,130,246,.35) 100%);
  animation: blobFloat 26s ease-in-out infinite;
  will-change: transform, opacity;
}
.bg .b1{ 
  left:-10%; top:-15%; 
  transform: rotate(8deg);
  animation: blobFloat1 33s ease-in-out infinite;
}
.bg .b2{ 
  right:-12%; top:5%;   
  transform: rotate(-18deg);
  animation: blobFloat2 39s ease-in-out infinite;
}
.bg .b3{ 
  left:10%;  bottom:-20%; 
  width: 90vmax; height: 75vmax; 
  transform: rotate(22deg);
  animation: blobFloat3 46s ease-in-out infinite;
}

/* Mobile performance optimizations */
@media (max-width: 600px) {
  .bg .blob {
    filter: blur(32px);
  }
  .bg .b1, .bg .b2 {
    width: 55vmax;
    height: 45vmax;
  }
  .bg .b3 {
    width: 75vmax;
    height: 60vmax;
  }
  .bg .b1 {
    animation-duration: 50s;
  }
  .bg .b2 {
    animation-duration: 60s;
  }
  .bg .b3 {
    animation-duration: 70s;
  }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  .bg .blob,
  .bg .b1,
  .bg .b2,
  .bg .b3 {
    animation: none;
  }
  .step--analyze.is-active::after {
    animation: none;
  }
  .icon-step {
    animation: none;
  }
  .api-status-dot {
    animation: none;
  }
  .stepper-bar.is-visible {
    animation: none;
  }
  .dz-progress.is-active::after {
    animation: none;
  }
  .spia-confidence .skeleton,
  .spia-confidence .bars-container .skeleton {
    animation: none;
  }
  .how-step {
    animation: none;
    opacity: 1;
    transform: translateY(0);
  }
  .fade-section,
  .how-it-works,
  .api-section,
  .about-spia,
  .site-footer {
    opacity: 1;
    transform: translateY(0);
    transition: none;
  }
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

@keyframes blobFloat {
  0%, 100% {
    transform: translate(0, 0) scale(1);
    opacity: 0.6;
  }
  33% {
    transform: translate(30px, -30px) scale(1.1);
    opacity: 0.7;
  }
  66% {
    transform: translate(-20px, 20px) scale(0.9);
    opacity: 0.5;
  }
}

@keyframes blobFloat1 {
  0%, 100% {
    transform: rotate(8deg) translate(0, 0) scale(1);
  }
  50% {
    transform: rotate(12deg) translate(40px, -40px) scale(1.15);
  }
}

@keyframes blobFloat2 {
  0%, 100% {
    transform: rotate(-18deg) translate(0, 0) scale(1);
  }
  50% {
    transform: rotate(-22deg) translate(-35px, 35px) scale(1.1);
  }
}

@keyframes blobFloat3 {
  0%, 100% {
    transform: rotate(22deg) translate(0, 0) scale(1);
  }
  50% {
    transform: rotate(18deg) translate(50px, -30px) scale(1.2);
  }
}

.bg::before{
  content:"";
  position:absolute; inset:0;
  background:
    radial-gradient(1200px 900px at 50% 50%,
      rgba(255,255,255,0) 60%,
      rgba(0,0,0,.35) 100%);
  z-index:-1;
}
.bg::after{
  content:"";
  position:absolute; inset:0;
  opacity:.55;
  mix-blend-mode: overlay;
  background-image:url("data:image/svg+xml;utf8,\
  <svg xmlns='http://www.w3.org/2000/svg' width='120' height='120' viewBox='0 0 120 120'>\
    <filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/>\
    <feColorMatrix type='saturate' values='0'/>\
    <feComponentTransfer><feFuncA type='table' tableValues='0 0 0 .015'/></feComponentTransfer></filter> \
    <rect width='120' height='120' filter='url(%23n)'/>\
  </svg>");
}

/* ===== Hero section: above app card ===== */
.hero-section {
  text-align: center;
  margin-top: 24px;
  margin-bottom: 64px;
  padding: 0 20px;
}

.hero-section .hero-tagline {
  margin: 0;
  padding: 0;
  text-align: center;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

.hero-section .hero-tagline h2 {
  font-size: 48px;
  font-weight: 700;
  color: white;
  margin: 0 0 12px 0;
  letter-spacing: 0.3px;
  line-height: 1.08;
}

.hero-section .hero-tagline p {
  font-size: 20px;
  color: rgba(255, 255, 255, 0.85);
  margin: 0;
  font-weight: 400;
  line-height: 1.45;
}

@media (max-width: 600px) {
  .hero-section {
    margin-top: 20px;
    margin-bottom: 52px;
  }
  .hero-section .hero-tagline h2 {
    font-size: 32px;
  }
  .hero-section .hero-tagline p {
    font-size: 17px;
  }
}

/* ===== Concept UI: centered white card ===== */
.spia-concept-card {
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  padding: 8px 24px 28px;
  background: #ffffff;
  border-radius: 20px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12), 0 2px 8px rgba(0, 0, 0, 0.06);
  position: relative;
  box-sizing: border-box;
}

.spia-concept-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid #e2e8f0;
}

.spia-concept-card .titulo-spia {
  margin: 0;
  padding: 0;
  font-size: 0;
  background: none;
  border: none;
  border-radius: 0;
  box-shadow: none;
  backdrop-filter: none;
}

.spia-concept-card .titulo-spia .logo-img {
  display: block;
  height: 48px;
  width: auto;
  max-width: 120px;
  object-fit: contain;
  object-position: left center;
}

.spia-concept-card__tagline {
  font-size: 12px;
  font-weight: 600;
  color: #64748b;
  text-align: right;
  line-height: 1.3;
  letter-spacing: 0.2px;
}

.spia-concept-card .stepper-container {
  margin-bottom: 8px;
}

.spia-concept-card .stepper {
  justify-content: center;
}

.spia-concept-card .drop-area {
  max-width: 100%;
  margin: 0;
  background: #f8fafc;
  border: 2px dashed #cbd5e1;
  border-radius: 16px;
  min-height: 348px;
  padding-top: 36px;
  padding-bottom: 80px;
  box-shadow: none;
}

.spia-concept-card .drop-area:hover:not(.dragover) {
  border-color: #94a3b8;
  background: #f1f5f9;
  box-shadow: none;
}

.spia-concept-card .drop-area.dragover {
  border-color: #4da6ff;
  background: #eff6ff;
  box-shadow: 0 0 0 3px rgba(77, 166, 255, 0.15);
}

.spia-concept-card .drop-label {
  position: static;
  display: block;
  margin: 0 0 12px 0;
  font-size: 15px;
  color: #475569;
  font-weight: 500;
}

.spia-concept-card .center-hint {
  display: flex;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 0;
}

.spia-concept-card .plus-circle {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: #e2e8f0;
  border: 2px solid #cbd5e1;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.spia-concept-card .drop-area:hover .plus-circle {
  background: #c7d2fe;
  border-color: #a5b4fc;
  transform: scale(1.08);
}

.spia-concept-card .plus::before,
.spia-concept-card .plus::after {
  background: #64748b;
}

.spia-concept-card .drop-area:hover .plus::before,
.spia-concept-card .drop-area:hover .plus::after {
  background: #4da6ff;
}

.spia-concept-card .plus::before {
  height: 3px;
}

.spia-concept-card .plus::after {
  width: 3px;
}

.spia-concept-card .plus {
  width: 28px;
  height: 28px;
}

.spia-concept-card .select-btn-wrap {
  bottom: 16px;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
}

.spia-concept-card .select-btn-wrap .custom-button {
  margin-top: 0;
  padding: 12px 20px;
  font-size: 14px;
  font-weight: 600;
  border-radius: 10px;
}

.spia-concept-card__verify {
  text-align: center;
  margin-top: 16px;
  margin-bottom: 0;
}

.spia-concept-card__verify .verify-helper-text {
  display: none;
  margin: 0;
  padding: 0;
  min-height: 0;
}

.spia-concept-card__verify .custom-button#verificar {
  min-width: 180px;
  padding: 12px 24px;
  font-size: 16px;
  border-radius: 10px;
}

.verify-upload-prompt {
  font-size: 13px;
  color: #64748b;
  margin: 8px 0 0 0;
  padding: 0;
}

@media (max-width: 600px) {
  .spia-concept-card {
    padding: 8px 20px 24px;
    margin-left: 12px;
    margin-right: 12px;
  }
  .spia-concept-card .drop-area {
    min-height: 325px;
    padding-top: 32px;
    padding-bottom: 76px;
  }
  .spia-concept-card .plus-circle {
    width: 60px;
    height: 60px;
  }
  .spia-concept-card .plus {
    width: 24px;
    height: 24px;
  }
}

/* ===== Title chip (standalone, when not in card) ===== */
h1.titulo-spia {
  font-size: 44px;
  text-align: center;
  margin: 0 0 25px 0;
  display: inline-block;
  padding: 14px 22px;
  background: rgba(240,243,246,0.9);
  border: 1px solid rgba(0,0,0,0.06);
  border-radius: 12px;
  box-shadow: 0 6px 18px rgba(0,0,0,0.12);
  backdrop-filter: blur(3px);
}
.titulo-spia .logo-img{
  display:block;
  height: 1em;
  width: auto;
}

/* ===== Hero Tagline (standalone, when not in card) ===== */
.hero-tagline {
  text-align: center;
  margin-bottom: 28px;
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
  padding: 0 20px;
}

.hero-tagline h2 {
  font-size: 32px;
  font-weight: 700;
  color: white;
  margin: 0 0 12px 0;
  letter-spacing: 0.3px;
  line-height: 1.2;
}

.hero-tagline p {
  font-size: 17px;
  color: rgba(255, 255, 255, 0.85);
  margin: 0;
  font-weight: 400;
  line-height: 1.4;
  letter-spacing: 0.2px;
}

@media (max-width: 768px) {
  .hero-tagline h2 {
    font-size: 26px;
  }
  .hero-tagline p {
    font-size: 15px;
  }
}

/* ===== Stepper ===== */
.stepper-container{ max-width:420px; margin:0 auto 12px auto; }
.stepper{display:flex;gap:10px;margin:0 0 10px 0;padding:0;list-style:none;align-items:center;justify-content:center}
.step{font-size:14px;line-height:1;padding:8px 12px;border-radius:999px;background:#F5F8FF;color:#1F2A44;opacity:.95;font-weight:600;border:1px solid #D9E4FF}
.step.is-active{background:#CFE2FF;color:#1F2A44;box-shadow:0 2px 8px rgba(0,0,0,0.06)}
.step.is-done{opacity:.7;text-decoration:line-through}
.step.is-error{border-color:#ef4444;box-shadow:0 0 0 2px rgba(239,68,68,.12) inset}

.stepper-bar{
  height:4px;
  border-radius:999px;overflow:hidden;
  background:linear-gradient(90deg, rgba(255,255,255,.15), rgba(255,255,255,.35), rgba(255,255,255,.15));
  background-size:200% 100%;
  display:none;
}
.stepper-bar.is-visible{ display:block; animation:barshift 1.2s linear infinite; }
@keyframes barshift { from { background-position:0% 0; } to { background-position:200% 0; } }

/* Step content transitions */
.step-content-area {
  transition: opacity 250ms ease-out, transform 250ms ease-out;
  opacity: 1;
  transform: scale(1);
}
.step-content-area.step-transition-out {
  opacity: 0;
  transform: scale(0.97);
}
.step-content-area.step-transition-in {
  opacity: 1;
  transform: scale(1);
}

/* Analyze step spinner/pulse */
.step--analyze.is-active::after {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-left: 6px;
  border-radius: 50%;
  background: rgba(31,42,68,0.5);
  animation: stepPulse 1.2s ease-in-out infinite;
  vertical-align: middle;
}
.step--analyze.is-active.is-verifying::after {
  background: rgba(31,42,68,0.6);
  animation: stepPulse 0.8s ease-in-out infinite;
}
@keyframes stepPulse {
  0%, 100% {
    opacity: 0.4;
    transform: scale(0.8);
  }
  50% {
    opacity: 1;
    transform: scale(1.2);
  }
}

/* ===== Drag & drop area ===== */
.drop-area {
  border: 2px dashed rgba(0,0,0,0.18);
  border-radius: 20px;
  text-align: center;
  width: 100%;
  max-width: 440px;
  margin: 0 auto 24px auto;
  transition: background-color 0.25s ease, border-color 0.25s ease, box-shadow 0.3s ease, max-width .25s ease;
  position: relative;
  background: rgba(236,240,244,0.95);
  color: #0f172a;
  box-shadow: 0 10px 28px rgba(0,0,0,0.22);
  min-height: 320px;
  padding-top: 40px;
  padding-bottom: 60px;
  padding-left: 24px;
  padding-right: 24px;
  box-sizing: border-box;
  overflow: hidden;
  outline: none;
}
.drop-area:hover:not(.dragover) {
  border-color: rgba(77,166,255,0.4);
  box-shadow: 0 10px 28px rgba(0,0,0,0.22), 0 0 30px rgba(77,166,255,0.3), 0 0 50px rgba(77,166,255,0.15);
}
@media (max-width: 768px){
  .drop-area{ 
    max-width: 360px; 
    padding-left: 16px;
    padding-right: 16px;
  }
}
.drop-area.dragover {
  background: rgba(232,238,245,0.98);
  border-color: #4da6ff;
  box-shadow: 0 12px 32px rgba(77,166,255,0.25), 0 0 40px rgba(77,166,255,0.4), 0 0 60px rgba(77,166,255,0.2);
}
.drop-area:focus-visible {
  border-color: #4da6ff;
  box-shadow: 0 0 0 3px rgba(77,166,255,0.25), 0 10px 28px rgba(0,0,0,0.22), 0 0 30px rgba(77,166,255,0.3);
}
.drop-area.is-highlighted {
  animation: dropAreaHighlight 750ms ease-out;
}
@keyframes dropAreaHighlight {
  0% {
    box-shadow: 0 10px 28px rgba(0,0,0,0.22), 0 0 0 0 rgba(77,166,255,0.6);
  }
  50% {
    box-shadow: 0 10px 28px rgba(0,0,0,0.22), 0 0 40px rgba(77,166,255,0.5), 0 0 60px rgba(77,166,255,0.3);
    border-color: rgba(77,166,255,0.6);
  }
  100% {
    box-shadow: 0 10px 28px rgba(0,0,0,0.22), 0 0 0 0 rgba(77,166,255,0);
    border-color: rgba(0,0,0,0.18);
  }
}

.paste-hint{
  position:absolute;
  top: 28px; left: 50%;
  transform: translateX(-50%) translateY(-6px);
  background: rgba(240,243,246,0.98);
  border: 1px solid rgba(0,0,0,0.06);
  border-radius: 999px;
  padding: 5px 8px;
  font-size: 11px;
  color:#0f172a;
  box-shadow: 0 6px 16px rgba(0,0,0,.12);
  opacity: 0;
  transition: opacity .18s ease, transform .18s ease;
  pointer-events: none;
}
.drop-area:focus-within .paste-hint { opacity: 1; transform: translateX(-50%) translateY(0); }

.drop-label {
  position: absolute;
  top: 10px; left: 12px; right: 12px;
  margin: 0;
  font-size: 14px;
  color: #334155;
  text-align: center;
  pointer-events: none;
}

.center-hint{
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 0;
  display: none;
}
.plus-circle{
  width: 90px; height: 90px;
  border-radius: 9999px;
  background: linear-gradient(135deg, #e0e7ff 0%, #c7d2fe 100%);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 16px rgba(77,166,255,0.15), 0 2px 8px rgba(0,0,0,0.08) inset;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.drop-area:hover .plus-circle {
  transform: scale(1.05);
  box-shadow: 0 6px 20px rgba(77,166,255,0.25), 0 2px 8px rgba(0,0,0,0.08) inset;
}
.plus{
  width: 32px;
  height: 32px;
  position: relative;
  display: inline-block;
  font-size: 0;
  color: transparent;
}
.plus::before,
.plus::after {
  content: "";
  position: absolute;
  background: #4da6ff;
  border-radius: 2px;
  transition: background 0.3s ease;
}
.plus::before {
  width: 100%;
  height: 3px;
  top: 50%;
  left: 0;
  transform: translateY(-50%);
}
.plus::after {
  width: 3px;
  height: 100%;
  left: 50%;
  top: 0;
  transform: translateX(-50%);
}
.drop-area:hover .plus::before,
.drop-area:hover .plus::after {
  background: #3b82f6;
}

.select-btn-wrap{
  position: absolute;
  left: 0; right: 0; bottom: 10px;
  display: flex; justify-content: center; gap:8px;
  pointer-events: auto;
  flex-wrap: wrap;
}

.remove-btn{ 
  position: absolute;
  top: 10px;
  right: 10px;
  width: 30px; height: 30px;
  border-radius: 50%;
  border: 1px solid rgba(0,0,0,0.15);
  background: #e5e7eb;
  color: #0f172a;
  font-size: 18px;
  line-height: 1;
  display: grid;
  place-items: center;
  cursor: pointer;
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
  z-index: 2;
  transition: transform 0.2s ease, filter 0.2s ease;
}
.remove-btn[hidden] { display: none !important; }
.remove-btn:hover { 
  filter: brightness(0.95);
  transform: scale(1.05);
}
.remove-btn:focus-visible {
  outline: 2px solid #4da6ff;
  outline-offset: 2px;
}
.remove-btn:disabled { opacity: .6; filter: brightness(0.78); cursor: not-allowed; }

/* Center preview in the padded content box (above bottom padding / buttons, below label). */
.drop-area:has(#image-preview[src]),
.drop-area:has(#video-preview[src]) {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.drop-area:has(#image-preview[src]) .drop-label,
.drop-area:has(#video-preview[src]) .drop-label {
  align-self: stretch;
}

.drop-area #image-preview[src],
.drop-area #video-preview[src] {
  display: block;
  max-width: 100%;
  max-height: 200px;
  width: auto;
  height: auto;
  margin-inline: auto;
  margin-block: auto;
  object-fit: contain;
  object-position: center;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  box-sizing: border-box;
  position: relative;
  z-index: 1;
}
.drop-area #video-preview:not([src]) {
  display: none;
}
.drop-area #video-preview[src] {
  filter: drop-shadow(rgba(0, 0, 0, 0.28) 0px 6px 24px);
  transition: opacity 200ms ease-out;
}
.drop-area.is-fading-out img,
.drop-area.is-fading-out #video-preview,
.verification-container.is-fading-out {
  opacity: 0;
  transition: opacity 200ms ease-out;
}

/* ===== Drop Area Scale Animation on Image/Video Upload ===== */
.drop-area:has(img[src]),
.drop-area:has(#video-preview[src]) {
  animation: dropAreaScaleIn 300ms ease;
}

@keyframes dropAreaScaleIn {
  0% {
    transform: scale(0.98);
  }
  100% {
    transform: scale(1.00);
  }
}

#imagen { display: none; }

.custom-button {
  background: linear-gradient(135deg, #4da6ff 0%, #3b82f6 50%, #2563eb 100%);
  color: white;
  border: none;
  padding: 10px 18px;
  font-size: 15px;
  border-radius: 8px;
  cursor: pointer;
  margin-top: 10px;
  box-shadow: 0 4px 12px rgba(77,166,255,0.3), 0 2px 4px rgba(0,0,0,0.1);
  transition: transform 0.2s ease, box-shadow 0.3s ease, background 0.3s ease;
  font-weight: 600;
  position: relative;
  overflow: hidden;
}
.custom-button:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(77,166,255,0.4), 0 4px 8px rgba(0,0,0,0.15);
  background: linear-gradient(135deg, #60b5ff 0%, #4da6ff 50%, #3b82f6 100%);
  filter: brightness(1.05);
}
.custom-button:focus-visible:not(:disabled) {
  outline: 2px solid #4da6ff;
  outline-offset: 2px;
  transform: translateY(-1px);
}
.custom-button:active:not(:disabled) {
  transform: translateY(0);
  box-shadow: 0 4px 12px rgba(77,166,255,0.3), 0 2px 4px rgba(0,0,0,0.1);
}
.custom-button:disabled { 
  opacity: .6; 
  filter: brightness(0.78); 
  cursor: not-allowed;
  transform: none;
}

/* ===== Verify Section Helper Text ===== */
.verify-helper-text {
  transition: opacity 0.3s ease, transform 0.3s ease;
}
.verify-helper-text.hidden {
  opacity: 0;
  transform: translateY(-4px);
  min-height: 0;
  margin: 0;
}
#verify-section {
  transition: opacity 0.3s ease;
}

/* ===== Error Message Component ===== */
.error-message {
  display: none;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: 8px;
  color: #dc2626;
  font-size: 14px;
  font-weight: 500;
  margin: 12px 0;
  animation: errorFadeIn 200ms ease-out;
  max-width: 100%;
  box-sizing: border-box;
}
@keyframes errorFadeIn {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.error-message::before {
  content: "";
  font-size: 16px;
  line-height: 1;
}

.custom-button.loading { position: relative; padding-left: 44px; }
.custom-button.loading::before {
  content: "";
  position: absolute;
  left: 14px; top: 50%;
  transform: translateY(-50%);
  width: 18px; height: 18px;
  border-radius: 50%;
  border: 2.5px solid rgba(255,255,255,0.55);
  border-top-color: rgba(255,255,255,0.9);
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: translateY(-50%) rotate(360deg); } }

#resultado {
  margin-top: 0;
  font-size: 16px;
  text-align: center;
  word-wrap: break-word;
  color: black;
}

/* ===== Result Title ===== */
.result-title {
  font-size: 18px;
  font-weight: 700;
  color: #0f172a;
  text-align: center;
  margin: 0 0 12px 0;
  letter-spacing: 0.3px;
}

/* ===== Result Disclaimer ===== */
.result-disclaimer {
  font-size: 12px;
  color: #64748b;
  text-align: center;
  margin: 12px 0 0 0;
  line-height: 1.4;
  opacity: 0.75;
}

/* ===== Consistent Card Container ===== */
.card-container {
  width: 100%;
  max-width: 420px;
  margin-left: auto;
  margin-right: auto;
  padding: 24px;
  border-radius: 18px;
}

/* ===== Verification Results Container ===== */
.verification-container {
  margin-top: 24px;
  margin-bottom: 24px;
  background: #f0f4ff;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

/* Fully hidden when no result - no layout space reserved */
.verification-container[hidden] {
  display: none !important;
}

/* Subtle blur+fade entrance animation when verification area appears */
.verification-container:has(#resultado:not(:empty)),
.verification-container:has(.spia-confidence:not([hidden])) {
  animation: verificationFadeIn 400ms ease-out;
}

@keyframes verificationFadeIn {
  0% {
    opacity: 0;
    filter: blur(4px);
  }
  100% {
    opacity: 1;
    filter: blur(0px);
  }
}

/* Hide API result text and disclaimer - percentages are the main focus */
.verification-container #resultado,
.verification-container .result-disclaimer {
  display: none !important;
}

.verification-container .spia-confidence {
  margin-top: 8px;
  margin-bottom: 24px;
  max-width: 100%;
  gap: 20px;
}

/* Additional spacing between bars and slider inside confidence section */
.verification-container .spia-confidence .demo {
  margin-top: 0;
}

.verification-container #testControls {
  margin-top: 24px;
}

/* Hide Preview as AI button - remove button and its space */
.verification-container #btnShowIA {
  display: none !important;
}

/* Spacing between verification container and seal section */
.verification-container + #sealSection {
  margin-top: 0;
}

/* ===== Verification Section Buttons (Navbar Style) ===== */
.verification-container #testControls .custom-button {
  background: linear-gradient(135deg, #4da6ff 0%, #3b82f6 50%, #2563eb 100%);
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 100px;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(77, 166, 255, 0.3), 0 2px 4px rgba(0, 0, 0, 0.1);
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
  margin-top: 0;
}

.verification-container #testControls .custom-button:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(77, 166, 255, 0.4), 0 4px 8px rgba(0, 0, 0, 0.15);
  background: linear-gradient(135deg, #60b5ff 0%, #4da6ff 50%, #3b82f6 100%);
  filter: brightness(1.05);
}
.verification-container #testControls .custom-button:focus-visible:not(:disabled) {
  outline: 2px solid #4da6ff;
  outline-offset: 2px;
  transform: translateY(-1px);
}
.verification-container #testControls .custom-button:active:not(:disabled) {
  transform: translateY(0);
  box-shadow: 0 4px 12px rgba(77, 166, 255, 0.3), 0 2px 4px rgba(0, 0, 0, 0.1);
}

.verification-container #testControls .custom-button:disabled {
  opacity: 0.6;
  filter: brightness(0.78);
  cursor: not-allowed;
  transform: none;
}

@media (max-width: 600px) {
  .card-container {
    max-width: calc(100% - 32px);
    padding: 20px 16px;
    margin-left: 16px;
    margin-right: 16px;
  }
  .verification-container {
    margin-top: 20px;
    margin-bottom: 20px;
  }
  .verification-container .spia-confidence {
    margin-bottom: 16px;
    gap: 16px;
  }
  .verification-container #testControls {
    margin-top: 16px;
  }
  .verification-container + #sealSection {
    margin-top: 20px;
  }
  .spia-confidence .bars-container {
    gap: 8px;
  }
  .spia-confidence .diverging-track {
    height: 20px;
  }
  .spia-confidence .track-left,
  .spia-confidence .track-right {
    min-height: 20px;
  }
  .spia-confidence .bar-fill {
    min-height: 20px;
  }
  .result-title {
    font-size: 16px;
    margin-bottom: 10px;
  }
  .result-disclaimer {
    font-size: 11px;
    margin-top: 10px;
  }
}

/* Loading/progress line hidden - not rendered */
.dz-progress {
  display: none !important;
}

/* ===== Seal & download (matches app card aesthetic) ===== */
.seal-section {
  width: 100%;
  max-width: 480px;
  margin: 24px auto;
  padding: 24px;
  background: #ffffff;
  border-radius: 20px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12), 0 2px 8px rgba(0, 0, 0, 0.06);
  box-sizing: border-box;
}

.seal-section__title {
  font-size: 18px;
  font-weight: 700;
  color: #0f172a;
  margin: 0 0 20px 0;
  letter-spacing: 0.2px;
}

.seal-section__controls {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-bottom: 20px;
}

.seal-control {
  flex: 1 1 140px;
  min-width: 0;
}

.seal-control label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #334155;
  margin-bottom: 8px;
}

.seal-control select,
.seal-control input[type="range"] {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #f8fafc;
  font-size: 14px;
  color: #0f172a;
}

.seal-control input[type="range"] {
  padding: 0;
  border: none;
  background: transparent;
  accent-color: #4da6ff;
}

.seal-format-options {
  display: flex;
  gap: 16px;
  margin-top: 8px;
}

.seal-format-options label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 500;
  cursor: pointer;
  margin-bottom: 0;
}

.seal-section__actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.seal-btn-primary {
  background: linear-gradient(135deg, #4da6ff 0%, #3b82f6 50%, #2563eb 100%);
  color: white;
  border: none;
  padding: 12px 24px;
  font-size: 15px;
  font-weight: 600;
  border-radius: 10px;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(77, 166, 255, 0.3);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.seal-btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(77, 166, 255, 0.35);
}

.seal-btn-secondary {
  background: #f1f5f9;
  color: #475569;
  border: 1px solid #e2e8f0;
  padding: 12px 24px;
  font-size: 15px;
  font-weight: 600;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

.seal-btn-secondary:hover {
  background: #e2e8f0;
  color: #334155;
}

.seal-preview {
  margin-top: 20px;
  text-align: center;
}

.seal-preview img {
  max-width: 100%;
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.48);
  backdrop-filter: blur(2px);
  display: grid;
  place-items: center;
  z-index: 9999;
}
.overlay[hidden] { display: none; }
.overlay-dialog {
  width: min(92vw, 560px);
  background: rgba(236,240,244,0.98);
  border: 1px solid rgba(0,0,0,0.06);
  border-radius: 14px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.35);
  padding: 16px;
}
.overlay-dialog h3 {
  margin: 0 0 10px 0;
  font-size: 18px;
  color:#0f172a;
  text-align: center;
}
.overlay-preview {
  display: block;
  max-width: 100%;
  max-height: 50vh;
  margin: 8px auto 12px auto;
  border-radius: 10px;
  box-shadow: 0 6px 16px rgba(0,0,0,.18);
}
.overlay-actions {
  display:flex; gap:10px; justify-content:center; flex-wrap:wrap;
}

@media (max-width: 600px) {
  h1.titulo-spia { 
    font-size: 24px; 
    padding: 10px 16px; 
    margin-bottom: 20px;
  }
  .titulo-spia .logo-img{ height: 1em; }
  .hero-tagline {
    margin-bottom: 20px;
    padding: 0 16px;
  }
  .hero-tagline h2 {
    font-size: 22px;
    margin-bottom: 10px;
  }
  .hero-tagline p {
    font-size: 14px;
  }
  .custom-button { 
    font-size: 14px; 
    padding: 12px 18px;
    min-height: 44px;
    min-width: 44px;
  }
  .stepper-container{ 
    max-width: calc(100% - 32px);
    margin: 0 auto 12px auto;
  }
  .step {
    font-size: 12px;
    padding: 6px 10px;
  }
  .drop-area { 
    max-width: calc(100% - 32px);
    margin-left: 16px;
    margin-right: 16px;
    min-height: 280px; 
    padding-top: 32px; 
    padding-bottom: 50px;
    padding-left: 16px;
    padding-right: 16px;
  }
  .select-btn-wrap {
    bottom: 8px;
    gap: 8px;
    flex-direction: column;
    align-items: stretch;
  }
  .select-btn-wrap .custom-button {
    width: 100%;
    margin-top: 0;
  }
  #verify-section {
    margin-left: 16px;
    margin-right: 16px;
    margin-top: 20px;
    margin-bottom: 20px;
  }
  #verify-helper {
    font-size: 13px;
    margin-bottom: 10px;
  }
  #resultado { font-size: 15px; }
  .plus-circle{ width: 70px; height: 70px; }
  .plus{ width: 24px; height: 24px; }
  .plus::before { height: 2.5px; }
  .plus::after { width: 2.5px; }
  .remove-btn{ 
    width: 36px; 
    height: 36px; 
    font-size: 18px;
    top: 8px;
    right: 8px;
  }
  .seal-section {
    max-width: calc(100% - 32px);
    margin-left: 16px;
    margin-right: 16px;
    padding: 20px;
  }
  .seal-section__controls {
    flex-direction: column;
    gap: 16px;
  }
  .seal-control {
    flex: 1 1 auto;
  }
  .seal-section__actions {
    flex-direction: column;
  }
  .seal-btn-primary,
  .seal-btn-secondary {
    width: 100%;
  }
}

/* ===== SPIA Confidence Bar (aislado) ===== */
.spia-confidence { width:100%; max-width:420px; margin-top:12px; display:grid; gap:10px; }
.spia-confidence[hidden]{ display:none; }

/* Fixed center label: REAL 71% | 29% IA — static, never moves */
.spia-confidence .confidence-label-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 10px;
}
.spia-confidence .confidence-label-row .chip {
  display: inline;
  font-size: 16px;
  font-weight: 700;
  padding: 0;
  border: none;
  border-radius: 0;
  background: transparent;
  color: #334155;
  letter-spacing: 0.02em;
}
.spia-confidence .confidence-label-row .chip.real {
  color: #475569;
}
.spia-confidence .confidence-label-row .chip.ia {
  color: #2563eb;
}
.spia-confidence .confidence-sep {
  color: #94a3b8;
  font-weight: 600;
  font-size: 14px;
  user-select: none;
}
.spia-confidence .chip.chip-pop {
  animation: chipPop 300ms ease-out;
}
@keyframes chipPop {
  0% { transform: scale(1); }
  50% { transform: scale(1.05); }
  100% { transform: scale(1); }
}
/* ===== Diverging (Center-Origin) Confidence Bars ===== */
.spia-confidence .bars-container {
  display: flex;
  flex-direction: column;
  width: 100%;
  position: relative;
}

.spia-confidence .bars-container .skeleton {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(255,255,255,.1), rgba(255,255,255,.35), rgba(255,255,255,.1));
  background-size: 200% 100%;
  animation: confShimmer 1.2s linear infinite;
  border-radius: 10px;
  z-index: 1;
}

/* Single cohesive track: neutral background, visible center divider */
.spia-confidence .diverging-track {
  display: flex;
  width: 100%;
  height: 24px;
  border-radius: 10px;
  overflow: hidden;
  background: #e2e8f0;
  border: 1px solid #cbd5e1;
  position: relative;
}

.spia-confidence .track-left,
.spia-confidence .track-right {
  flex: 1 1 50%;
  display: flex;
  position: relative;
  min-height: 24px;
}

.spia-confidence .track-left {
  justify-content: flex-end;
}

.spia-confidence .track-right {
  justify-content: flex-start;
}

/* Visible center divider */
.spia-confidence .track-center {
  flex: 0 0 2px;
  min-width: 2px;
  background: #94a3b8;
  z-index: 1;
}

.spia-confidence .bar-fill {
  height: 100%;
  min-height: 24px;
  position: relative;
  transition: width 0.4s ease;
}

.spia-confidence .bar-fill.real-fill {
  background: #94a3b8;
  border-radius: 10px 0 0 10px;
}

.spia-confidence .bar-fill.ia-fill {
  background: linear-gradient(135deg, #4da6ff 0%, #3b82f6 50%, #2563eb 100%);
  border-radius: 0 10px 10px 0;
}

/* Hide floating percentage text on bar — no moving badges */
.spia-confidence .bar-text {
  display: none !important;
}
.spia-confidence .demo { display:grid; gap:6px; margin-top:4px; opacity:0.85; }
.spia-confidence .demo small{ text-align:center; color:#64748b; font-size:11px; opacity:.85; }

/* ===== Modern Slider Design ===== */
.spia-confidence .demo input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  background: rgba(230, 237, 246, 0.6);
  border-radius: 999px;
  outline: none;
  transition: all 0.25s ease;
}

.spia-confidence .demo input[type="range"]:focus {
  outline: none;
}

/* Track styling - Webkit (Chrome, Safari, Edge) */
.spia-confidence .demo input[type="range"]::-webkit-slider-runnable-track {
  width: 100%;
  height: 6px;
  background: rgba(230, 237, 246, 0.6);
  border-radius: 999px;
  transition: all 0.25s ease;
}

/* Thumb styling - Webkit */
.spia-confidence .demo input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  background: linear-gradient(135deg, #4da6ff 0%, #3b82f6 50%, #2563eb 100%);
  border: 3px solid #ffffff;
  border-radius: 50%;
  cursor: pointer;
  margin-top: -7px;
  transition: all 0.25s ease;
  box-shadow: 0 2px 8px rgba(77, 166, 255, 0.3);
}

.spia-confidence .demo input[type="range"]::-webkit-slider-thumb:hover {
  transform: scale(1.1);
  box-shadow: 0 4px 16px rgba(77, 166, 255, 0.5);
}

.spia-confidence .demo input[type="range"]:active::-webkit-slider-thumb {
  transform: scale(1.05);
  box-shadow: 0 0 24px rgba(77, 166, 255, 0.7), 0 0 12px rgba(77, 166, 255, 0.5), 0 4px 16px rgba(77, 166, 255, 0.4);
}

/* Track styling - Mozilla (Firefox) */
.spia-confidence .demo input[type="range"]::-moz-range-track {
  width: 100%;
  height: 6px;
  background: rgba(230, 237, 246, 0.6);
  border-radius: 999px;
  border: none;
  transition: all 0.25s ease;
}

/* Thumb styling - Mozilla */
.spia-confidence .demo input[type="range"]::-moz-range-thumb {
  width: 20px;
  height: 20px;
  background: linear-gradient(135deg, #4da6ff 0%, #3b82f6 50%, #2563eb 100%);
  border: 3px solid #ffffff;
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.25s ease;
  box-shadow: 0 2px 8px rgba(77, 166, 255, 0.3);
  -moz-appearance: none;
}

.spia-confidence .demo input[type="range"]::-moz-range-thumb:hover {
  transform: scale(1.1);
  box-shadow: 0 4px 16px rgba(77, 166, 255, 0.5);
}

.spia-confidence .demo input[type="range"]:active::-moz-range-thumb {
  transform: scale(1.05);
  box-shadow: 0 0 24px rgba(77, 166, 255, 0.7), 0 0 12px rgba(77, 166, 255, 0.5), 0 4px 16px rgba(77, 166, 255, 0.4);
}

/* Disabled state */
.spia-confidence .demo input[type="range"]:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.spia-confidence .demo input[type="range"]:disabled::-webkit-slider-thumb {
  cursor: not-allowed;
}

.spia-confidence .demo input[type="range"]:disabled::-moz-range-thumb {
  cursor: not-allowed;
}
.spia-confidence .skeleton{
  position:absolute; inset:0; background:linear-gradient(90deg, rgba(255,255,255,.1), rgba(255,255,255,.35), rgba(255,255,255,.1));
  background-size:200% 100%; animation:confShimmer 1.2s linear infinite;
}
@keyframes confShimmer{ from{ background-position:0% 0; } to{ background-position:200% 0; } }

/* ===== NAVBAR SPIA (glass-blur effect) ===== */
.site-nav{
  position: fixed; top:0; left:0; right:0; z-index: 1000;
  background: linear-gradient(180deg, rgba(11,18,32,0.75) 0%, rgba(10,19,35,0.8) 100%);
  border-bottom: 1px solid rgba(255,255,255,0.08);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  box-shadow: 0 8px 32px rgba(0,0,0,0.12);
}
.site-nav .nav-inner{
  max-width: 1160px; margin: 0 auto;
  display:flex; align-items:center; justify-content:space-between;
  padding: 12px 16px;
}
.site-nav .brand{
  display:flex; align-items:center; gap:10px; text-decoration:none;
}
.site-nav .brand img{ width: 22px; height: 22px; display:block; }
.site-nav .brand span{
  font-weight: 800; letter-spacing:.5px; color:#e6edf6; font-size: 14px;
}
.site-nav .nav-links{
  display:flex; align-items:center; gap:18px;
}
.site-nav .nav-links a{
  color:#e6edf6; text-decoration:none; font-size: 14px; opacity:.92;
  transition: opacity 0.2s ease, color 0.2s ease;
  position: relative;
}
.site-nav .nav-links a:hover{ opacity:1; text-decoration: underline; }
.site-nav .nav-links a:focus-visible {
  outline: 2px solid #4da6ff;
  outline-offset: 4px;
  border-radius: 2px;
  opacity: 1;
}
.site-nav .nav-links a.is-active{
  opacity: 1;
  color: #4da6ff;
}
.site-nav .nav-links a.is-active::after{
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  right: 0;
  height: 2px;
  background: #4da6ff;
  border-radius: 1px;
}
.site-nav .cta{
  margin-left: 8px;
  background: linear-gradient(135deg, #4da6ff 0%, #3b82f6 50%, #2563eb 100%);
  color: white; 
  border: none;
  padding:8px 14px; 
  border-radius:999px; 
  font-weight:700; 
  font-size:13px;
  cursor:pointer; 
  box-shadow: 0 4px 12px rgba(77,166,255,0.3), 0 2px 4px rgba(0,0,0,0.1);
  transition: transform 0.2s ease, box-shadow 0.3s ease, background 0.3s ease;
}
.site-nav .cta:hover{ 
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(77,166,255,0.4), 0 4px 8px rgba(0,0,0,0.15);
  background: linear-gradient(135deg, #60b5ff 0%, #4da6ff 50%, #3b82f6 100%);
  filter: brightness(1.05);
}
.site-nav .cta:focus-visible {
  outline: 2px solid #4da6ff;
  outline-offset: 2px;
  transform: translateY(-1px);
}
.site-nav .cta:active {
  transform: translateY(0);
  box-shadow: 0 4px 12px rgba(77,166,255,0.3), 0 2px 4px rgba(0,0,0,0.1);
}

/* Empuje para que el contenido no quede debajo del nav fijo */
body{ padding-top: 88px; }

/* Scroll suave opcional */
html{ scroll-behavior: smooth; }

@media (max-width: 640px){
  .site-nav .nav-inner {
    padding: 10px 12px;
  }
  .site-nav .nav-links{ 
    gap: 10px; 
    flex-wrap: nowrap;
  }
  .site-nav .nav-links a {
    font-size: 12px;
    white-space: nowrap;
  }
  .site-nav .cta{ 
    padding: 8px 14px; 
    font-size: 12px;
    min-height: 36px;
  }
  .site-nav .brand span {
    font-size: 13px;
  }
  body{ padding-top: 90px; }
}

.brand-title {
  letter-spacing: 0.05em;
  font-weight: 700;
}

.brand-ia {
  color: #4da6ff !important;
  position: relative;
}

.brand:hover .brand-ia {
  animation: ia-tech 0.6s ease-out;
}

@keyframes ia-tech {
  0% {
    text-shadow: 0 0 0 rgba(77,166,255,0);
    transform: translateY(0);
  }
  40% {
    text-shadow: 0 0 10px rgba(77,166,255,1);
    transform: translateY(-0.5px) translateX(0.3px);
  }
  100% {
    text-shadow: 0 0 4px rgba(77,166,255,0.4);
    transform: translateY(0);
  }
}

/* ===== HOW IT WORKS (SPIA Style) ===== */

.how-it-works {
  margin-top: 48px;
  margin-bottom: 48px;
  text-align: center;
  padding: 0 20px;
  color: white;
}

.how-it-works h2 {
  font-size: 28px;
  margin-bottom: 40px;
  font-weight: 700;
  letter-spacing: 0.5px;
}

@media (max-width: 600px) {
  .how-it-works {
    margin-top: 32px;
    margin-bottom: 32px;
    padding: 0 16px;
  }
  .how-it-works h2 {
    font-size: 22px;
    margin-bottom: 28px;
  }
  .how-step p {
    font-size: 14px;
  }
  .icon-step {
    width: 56px;
    height: 56px;
    font-size: 24px;
    margin-bottom: 14px;
  }
}

.how-steps {
  display: flex;
  flex-direction: column;
  gap: 40px;
  align-items: center;
}

.how-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 300px;
  opacity: 0;
  animation: fadeInUp 0.6s ease-out forwards;
}

.how-step:nth-child(1) {
  animation-delay: 0.1s;
}

.how-step:nth-child(2) {
  animation-delay: 0.3s;
}

.how-step:nth-child(3) {
  animation-delay: 0.5s;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.icon-step {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background-color: #4da6ff22;
  border: 2px solid #4da6ff;
  color: #4da6ff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 18px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  animation: iconPulse 3s ease-in-out infinite;
}

@keyframes iconPulse {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(77,166,255,0.4);
  }
  50% {
    box-shadow: 0 0 0 8px rgba(77,166,255,0);
  }
}

.icon-step:hover {
  transform: translateY(-4px) scale(1.05);
  box-shadow: 0 0 16px rgba(77,166,255,0.6);
  animation: none;
}

.how-step p {
  color: #d9e6f2;
  font-size: 16px;
  line-height: 1.5;
  margin: 0;
  padding: 0 10px;
}

/* Responsive */
@media (min-width: 700px) {
  .how-steps {
    flex-direction: row;
    justify-content: center;
    gap: 80px;
  }
  .how-step {
    max-width: 280px;
  }
}

.spia-divider {
  margin: 48px auto;
  width: 100%;
  max-width: 420px;
  border: none;
  height: 1px;
  background-color: #0b1220;
  opacity: 0.6;
}

@media (max-width: 600px) {
  .spia-divider {
    margin: 32px auto;
    max-width: calc(100% - 32px);
  }
}

/* ===== API ===== */
.api-section {
  margin-top: 48px;
  margin-bottom: 48px;
  text-align: center;
  padding: 0 20px;
  color: white;
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
}

.api-section h2 {
  font-size: 32px;
  margin-bottom: 16px;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: white;
}

@media (max-width: 600px) {
  .api-section {
    margin-top: 32px;
    margin-bottom: 32px;
    padding: 0 16px;
  }
  .api-section h2 {
    font-size: 24px;
    margin-bottom: 12px;
  }
  .api-subtitle {
    font-size: 16px;
    margin-bottom: 10px;
  }
  .api-description {
    font-size: 14px;
    margin-bottom: 20px;
  }
}

.api-subtitle {
  color: rgba(255, 255, 255, 0.9);
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 12px;
  letter-spacing: 0.3px;
}

.api-description {
  color: rgba(255, 255, 255, 0.75);
  font-size: 15px;
  line-height: 1.6;
  margin: 0 auto 28px;
  max-width: 560px;
  letter-spacing: 0.2px;
}

.api-button,
.custom-button.api-button {
  background: linear-gradient(135deg, #6b7280 0%, #4b5563 50%, #374151 100%) !important;
  color: rgba(255, 255, 255, 0.7) !important;
  border: none;
  padding: 12px 32px;
  font-size: 15px;
  border-radius: 8px;
  cursor: not-allowed !important;
  margin-top: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2) !important;
  font-weight: 600;
  pointer-events: none;
  opacity: 0.7;
  transition: none !important;
}
.api-button:hover,
.custom-button.api-button:hover {
  transform: none !important;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2) !important;
  background: linear-gradient(135deg, #6b7280 0%, #4b5563 50%, #374151 100%) !important;
}

.api-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: rgba(255, 255, 255, 0.6);
  font-size: 13px;
  font-weight: 500;
  margin-top: 16px;
  padding: 6px 12px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.api-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #fbbf24;
  box-shadow: 0 0 8px rgba(251, 191, 36, 0.5);
  animation: statusPulse 2s ease-in-out infinite;
}

@keyframes statusPulse {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.6;
    transform: scale(1.1);
  }
}

/* ===== ABOUT SPIA ===== */
.about-spia {
  margin-top: 48px;
  margin-bottom: 48px;
  text-align: center;
  padding: 0 20px;
  color: white;
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
}

.about-spia h2 {
  font-size: 28px;
  margin-bottom: 24px;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.about-spia p {
  color: #d9e6f2;
  font-size: 16px;
  line-height: 1.6;
  margin: 0;
}

@media (max-width: 600px) {
  .about-spia {
    margin-top: 32px;
    margin-bottom: 32px;
    padding: 0 16px;
  }
  .about-spia h2 {
    font-size: 22px;
    margin-bottom: 18px;
  }
  .about-spia p {
    font-size: 14px;
    line-height: 1.5;
  }
  .about-spia .about-box {
    padding: 28px 20px;
  }
  .about-spia .about-box h2 {
    font-size: 28px;
    margin-bottom: 20px;
  }
}

.about-box {
  background-color: #0a2747;
  padding: 20px;
  border-radius: 10px;
  margin-top: 20px;
  color: white;
}

.about-box h2 {
  color: inherit;
}

.about-box p {
  font-size: 0.9rem;
}

/* Enhanced About SPIA container */
.about-spia .about-box {
  padding: 45px 35px;
  border-radius: 18px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5), 0 10px 30px rgba(0,0,0,0.3), 0 0 40px rgba(77,166,255,0.15);
}

.about-spia .about-box h2 {
  font-size: 36px;
  margin-bottom: 28px;
}

.api-box {
  padding: 50px 60px;
}

/* ===== Legal (terms.html) ===== */
.terms-main {
  max-width: 720px;
  margin: 32px auto 56px;
  padding: 0 20px;
  color: rgba(230, 237, 246, 0.95);
  position: relative;
  z-index: 0;
}
.terms-kicker {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(147, 197, 253, 0.9);
  margin: 0 0 8px 0;
}
.terms-page-title {
  font-size: clamp(26px, 4vw, 34px);
  font-weight: 700;
  color: #fff;
  margin: 0 0 16px 0;
  letter-spacing: 0.3px;
  line-height: 1.15;
}
.terms-lead {
  font-size: 16px;
  line-height: 1.55;
  color: rgba(217, 230, 242, 0.92);
  margin: 0 0 28px 0;
}
.terms-card {
  background-color: #0a2747;
  padding: 36px 32px;
  border-radius: 18px;
  margin-bottom: 24px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5), 0 10px 30px rgba(0,0,0,0.3), 0 0 40px rgba(77,166,255,0.15);
  color: #fff;
  scroll-margin-top: 96px;
}
.terms-card h2 {
  font-size: clamp(24px, 3.5vw, 32px);
  font-weight: 700;
  margin: 0 0 8px 0;
  letter-spacing: 0.2px;
}
.terms-card h3 {
  font-size: 17px;
  font-weight: 600;
  margin: 24px 0 10px 0;
  color: rgba(230, 237, 246, 0.98);
}
.terms-card h3:first-of-type {
  margin-top: 20px;
}
.terms-card p {
  font-size: 15px;
  line-height: 1.6;
  margin: 0 0 14px 0;
  color: rgba(217, 230, 242, 0.95);
}
.terms-card p:last-child {
  margin-bottom: 0;
}
.terms-card#contact a,
.terms-card#contact a:visited {
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.terms-card#contact a:hover {
  color: rgba(255, 255, 255, 0.88);
}
.terms-updated {
  font-size: 13px !important;
  color: rgba(148, 163, 184, 0.95) !important;
  margin: 0 0 8px 0 !important;
}
.site-nav .nav-links a.cta {
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
}
@media (max-width: 600px) {
  .terms-main {
    margin-top: 24px;
    margin-bottom: 40px;
    padding: 0 16px;
  }
  .terms-card {
    padding: 28px 20px;
  }
}

/* ===== SECTION FADE TRANSITIONS ===== */
.fade-section {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.fade-section.fade-in {
  opacity: 1;
  transform: translateY(0);
}

.how-it-works,
.api-section,
.about-spia,
.site-footer {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.how-it-works.fade-in,
.api-section.fade-in,
.about-spia.fade-in,
.site-footer.fade-in {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger delays for sections */
.how-it-works.fade-in {
  transition-delay: 0.1s;
}
.api-section.fade-in {
  transition-delay: 0.2s;
}
.about-spia.fade-in {
  transition-delay: 0.3s;
}
.site-footer.fade-in {
  transition-delay: 0.4s;
}

/* ===== FOOTER ===== */
.site-footer {
  background: linear-gradient(180deg, #0a1323 0%, #060b15 100%);
  border-top: 1px solid rgba(255,255,255,0.06);
  margin-top: 80px;
  padding: 40px 20px 30px;
  color: rgba(255,255,255,0.7);
}

.footer-content {
  max-width: 1160px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  align-items: center;
  justify-content: center;
}

.footer-links a {
  color: rgba(255,255,255,0.7);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: color 0.2s ease;
  padding: 4px 0;
}

.footer-links a:hover {
  color: #4da6ff;
}

.footer-copyright {
  font-size: 13px;
  color: rgba(255,255,255,0.5);
  text-align: center;
  margin-top: 8px;
}

@media (max-width: 640px) {
  .footer-links {
    gap: 16px;
  }
  .footer-links a {
    font-size: 13px;
  }
  .footer-copyright {
    font-size: 12px;
  }
}
