/* ============================================
   KYVERA DIGITAL — Polish pass (Impeccable)
   Tokens, rhythm, mobile-first, brand unity
   ============================================ */

:root {
  --section-y: clamp(2rem, 4vw, 3.25rem);
  --content-max: 72rem;
  --brand-soft: rgba(0, 123, 255, 0.1);
  --brand-border: rgba(0, 123, 255, 0.22);
  --text-secondary: #b8b8b8;
  --text-muted: #8a8a8a;
}

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

body {
  overflow-x: clip;
}

img,
svg,
video {
  max-width: 100%;
  height: auto;
}

/* Solid accent instead of gradient clip (readability + a11y) */
.section-title .gradient-text,
.cta-banner-inner .gradient-text,
.compare-header .gradient-text {
  background: none;
  -webkit-background-clip: unset;
  background-clip: unset;
  -webkit-text-fill-color: var(--blue-glow);
  color: var(--blue-glow);
}

.section {
  padding-block: var(--section-y);
}

.section-header {
  margin-bottom: clamp(1.25rem, 2.5vw, 2rem);
}

.section-subtitle {
  font-size: clamp(0.95rem, 2.5vw, 1.05rem);
  max-width: 42ch;
  margin-inline: auto;
}

.section-tag {
  background: var(--brand-soft);
  border-color: var(--brand-border);
  letter-spacing: 0.12em;
}

.container {
  max-width: var(--content-max);
}

/* Touch targets */
.btn,
.nav-cta,
.plans-cat-link,
.faq-item summary,
.nav-menu a {
  min-height: 44px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

/* Cards — restrained radius, no scale jumps on mobile */
.service-card,
.plan-card,
.sector-card,
.testimonial-card,
.blog-card,
.value-prop {
  border-radius: var(--radius-md);
}

.plan-card-featured {
  transform: none;
}

@media (hover: hover) {
  .plan-card-featured:hover {
    transform: translateY(-4px);
  }
}

@media (hover: none) {
  .service-card:hover,
  .plan-card:hover,
  .sector-card:hover,
  .value-prop:hover,
  .blog-card:hover {
    transform: none;
  }
}

/* Hero mobile rhythm */
.marketing-hero {
  min-height: auto;
  padding-block: calc(var(--header-height, 72px) + 0.75rem) 0;
}

.hero-marquee {
  margin-top: 1.5rem;
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}

.hero-proof span {
  border-radius: var(--radius-sm);
}

/* Plan tabs — horizontal scroll on small screens */
.plans-categories {
  flex-wrap: nowrap;
  justify-content: flex-start;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding-inline: 0.25rem;
  padding-bottom: 0.35rem;
  margin-inline: -0.25rem;
  scroll-snap-type: x proximity;
}

.plans-categories::-webkit-scrollbar {
  display: none;
}

.plans-cat-link {
  flex-shrink: 0;
  scroll-snap-align: start;
  white-space: nowrap;
}

.plans-cat-link.is-active {
  color: var(--text-primary);
  border-color: rgba(0, 123, 255, 0.45);
  background: rgba(0, 123, 255, 0.12);
}

.plans-panels {
  min-height: 0;
}

.plans-panel.is-active .reveal {
  opacity: 1;
  transform: none;
}

.plans-note {
  text-align: center;
  font-size: 0.92rem;
  line-height: 1.65;
  max-width: 52ch;
  margin-inline: auto;
  color: var(--text-secondary);
}

/* Pack 360º */
.plan-bundle {
  border-radius: var(--radius-md);
  padding: clamp(1.25rem, 4vw, 2rem);
}

.plan-bundle-now strong {
  word-break: break-word;
}

.plan-bundle-lines li {
  font-size: clamp(0.85rem, 2.5vw, 0.95rem);
}

/* Grids — single column earlier where needed */
@media (min-width: 769px) {
  .plans-categories {
    flex-wrap: wrap;
    justify-content: center;
    overflow-x: visible;
    scroll-snap-type: none;
    margin-inline: 0;
    padding-inline: 0;
  }
}

@media (max-width: 768px) {
  :root {
    --section-y: clamp(1.75rem, 3.5vw, 2.5rem);
    --header-height: 64px;
  }

  .header {
    padding-top: env(safe-area-inset-top);
  }

  .marketing-hero {
    min-height: auto;
    justify-content: flex-start;
  }

  .marketing-hero .hero-content {
    padding-block: 1.25rem 1.5rem;
    gap: 1.5rem;
  }

  .hero-badge {
    font-size: 0.62rem;
    padding: 6px 12px;
    line-height: 1.45;
    text-align: center;
    margin-bottom: 1rem;
  }

  .hero-title {
    font-size: clamp(1.65rem, 7.5vw, 2rem);
    margin-bottom: 0.5rem;
  }

  .hero-title-accent {
    font-size: clamp(2.4rem, 13vw, 3.2rem);
  }

  .hero-tagline {
    font-size: clamp(1rem, 4.5vw, 1.15rem);
    margin-bottom: 0.75rem;
  }

  .hero-lead {
    font-size: 0.9rem;
    line-height: 1.65;
    margin-bottom: 1.25rem;
  }

  .hero-visual {
    width: 100%;
  }

  /* Hero visual: grid limpio en lugar de tarjetas absolutas */
  .hero-float-scene {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    min-height: unset !important;
    max-width: min(100%, 400px);
    margin-inline: auto;
    transform: none !important;
  }

  .hero-float-watermark {
    display: none;
  }

  .hero-float-browser {
    position: relative;
    top: auto;
    left: auto;
    width: 100%;
    grid-column: 1 / -1;
  }

  .hero-float-browser-body {
    padding: 14px 12px 16px;
  }

  .hero-float-bars {
    height: 56px;
  }

  .hero-float-card {
    position: relative !important;
    top: auto !important;
    right: auto !important;
    bottom: auto !important;
    left: auto !important;
    animation: none;
    min-width: 0 !important;
    max-width: none !important;
    width: 100%;
    padding: 10px 11px;
  }

  .hero-float-card--social {
    display: none;
  }

  .hero-float-card--web {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    gap: 10px;
  }

  .hero-float-mini {
    height: 40px;
    margin-bottom: 6px;
  }

  .hero-float-card strong {
    font-size: 0.82rem;
  }

  .hero-float-card-tag {
    font-size: 0.58rem;
    margin-bottom: 2px;
  }

  .hero-float-pill {
    font-size: 0.58rem !important;
    padding: 3px 8px;
    margin-top: 4px !important;
  }

  .hero-marquee-track {
    padding: 10px 0;
  }

  .hero-marquee-track span {
    font-size: 0.65rem;
    letter-spacing: 0.1em;
  }

  .trust-bar {
    padding: 1.25rem 0;
  }

  .trust-label {
    font-size: 0.72rem;
    margin-bottom: 0.65rem;
  }

  .plan-bundle-header h3 {
    font-size: clamp(1.2rem, 5vw, 1.45rem);
  }

  .plan-bundle-lead {
    font-size: 0.9rem;
  }

  .plan-card {
    padding: 1.35rem 1.15rem;
  }

  .plan-card-art {
    width: 46px;
    height: 46px;
  }

  .plans-categories {
    mask-image: linear-gradient(90deg, transparent, #000 4%, #000 94%, transparent);
    padding-inline: 0.5rem 1.25rem;
  }

  .seo-keywords {
    padding: 1.15rem;
  }

  .seo-keywords a {
    min-height: 36px;
    display: inline-flex;
    align-items: center;
    font-size: 0.78rem;
  }

  .compare-col {
    min-width: 0;
  }

  .cta-banner-inner .btn {
    width: 100%;
    justify-content: center;
  }

  .contact-form .btn {
    width: 100%;
    justify-content: center;
  }

  .plans-cta .btn,
  .plan-bundle-cta {
    width: 100%;
    justify-content: center;
  }

  .nav-toggle {
    min-width: 44px;
    min-height: 44px;
  }
}

@media (max-width: 640px) {
  .services-grid {
    grid-template-columns: 1fr;
  }

  .sectors-grid {
    grid-template-columns: 1fr;
  }

  .blog-grid {
    grid-template-columns: 1fr;
  }

  .guarantee-grid {
    grid-template-columns: 1fr;
  }

  .process-timeline {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
    text-align: left;
  }

  .footer-legal {
    flex-wrap: wrap;
    gap: 0.75rem 1.25rem;
  }

  .compare-grid {
    gap: 1rem;
  }

  .contact-grid {
    gap: 2rem;
  }

  .services-cta,
  .portfolio-cta {
    text-align: center;
  }

  .plan-includes {
    text-align: left;
  }

  .plans-cat-link {
    font-size: 0.78rem;
    padding: 0.5rem 0.85rem;
  }

  .section-title {
    font-size: clamp(1.55rem, 6.5vw, 2rem);
    text-wrap: balance;
  }

  .hero-float-card {
    font-size: 0.72rem;
    padding: 0.65rem 0.75rem;
  }

  .marketing-hero .scroll-indicator {
    display: none;
  }
}

@media (max-width: 480px) {
  .container {
    padding-inline: 16px;
  }

  .hero-title-line {
    font-size: clamp(1.45rem, 6.8vw, 1.75rem);
  }

  .hero-float-scene {
    gap: 8px;
    max-width: 100%;
  }

  .hero-float-card--web span:last-child {
    font-size: 0.68rem;
  }

  .plan-price {
    font-size: clamp(1.5rem, 8vw, 1.85rem);
  }

  .plan-bundle-totals {
    gap: 0.75rem;
  }

  .fab-dock {
    flex-direction: column;
    align-items: flex-end;
  }
}

/* Nav drawer */
@media (max-width: 768px) {
  .nav-menu {
    padding-bottom: calc(1rem + env(safe-area-inset-bottom));
  }

  .nav-menu a {
    padding-block: 0.85rem;
  }
}

/* Compare table overflow safety */
.compare-grid {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* FAQ readability */
.faq-item summary {
  padding: 1rem 1.1rem;
  line-height: 1.45;
}

.faq-item[open] summary {
  border-bottom-color: var(--brand-border);
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  html {
    scroll-behavior: auto;
  }
}

/* ---- Contact form + WhatsApp alt ---- */
.contact-side {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.contact-form-header {
  margin-bottom: 1.5rem;
}

.contact-form-header h3 {
  font-family: var(--font-display);
  font-size: clamp(1.2rem, 3vw, 1.45rem);
  font-weight: 700;
  margin-bottom: 0.4rem;
}

.contact-form-header p {
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.55;
  margin: 0;
}

.form-honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.form-status {
  margin-top: 1rem;
  padding: 0.85rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  line-height: 1.5;
  text-align: center;
}

.form-status--success {
  background: rgba(0, 123, 255, 0.12);
  border: 1px solid rgba(0, 123, 255, 0.3);
  color: var(--blue-glow);
}

.form-status--error {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.28);
  color: #fca5a5;
}

.form-status--warn {
  background: rgba(251, 191, 36, 0.1);
  border: 1px solid rgba(251, 191, 36, 0.28);
  color: #fcd34d;
}

.contact-whatsapp-alt {
  padding: 1.25rem 1.35rem;
  background: var(--bg-card);
  border: 1px solid rgba(37, 211, 102, 0.2);
  border-radius: var(--radius-md);
}

.contact-whatsapp-alt-inner {
  display: flex;
  gap: 0.85rem;
  align-items: flex-start;
  margin-bottom: 1rem;
}

.contact-whatsapp-alt-inner .whatsapp-cta-icon {
  width: 40px;
  height: 40px;
  min-width: 40px;
}

.contact-whatsapp-alt-inner strong {
  display: block;
  font-family: var(--font-display);
  font-size: 0.95rem;
  margin-bottom: 0.35rem;
}

.contact-whatsapp-alt-inner p {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.45;
  margin: 0;
  font-style: italic;
}

.contact-form {
  padding: clamp(1.35rem, 4vw, 2.5rem);
}

@media (max-width: 768px) {
  .contact-form {
    padding: 1.35rem 1.15rem;
  }

  .contact-whatsapp-alt {
    padding: 1.15rem;
  }
}

/* ---- Lead form strips (compact) ---- */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.lead-form-strip {
  padding: clamp(2rem, 5vw, 3rem) 0;
  background: linear-gradient(180deg, rgba(0, 123, 255, 0.06) 0%, transparent 100%);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.lead-form-strip-inner {
  display: grid;
  gap: 1.5rem;
  align-items: center;
  padding: clamp(1.25rem, 4vw, 2rem);
  background: var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-lg);
}

@media (min-width: 768px) {
  .lead-form-strip-inner {
    grid-template-columns: minmax(200px, 1fr) minmax(280px, 1.4fr);
    gap: 2rem;
  }
}

.lead-form-strip-copy .section-tag {
  margin-bottom: 0.5rem;
}

.lead-form-strip-title {
  font-family: var(--font-display);
  font-size: clamp(1.15rem, 3vw, 1.45rem);
  margin: 0 0 0.35rem;
  line-height: 1.25;
}

.lead-form-strip-copy p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.contact-form--compact {
  padding: 0;
  background: transparent;
  border: none;
}

.contact-form--compact .form-row--compact {
  display: grid;
  gap: 0.75rem;
}

@media (min-width: 540px) {
  .contact-form--compact .form-row--compact {
    grid-template-columns: 1fr 1fr;
  }

  .contact-form--compact .form-row--compact:last-child {
    grid-template-columns: 1fr auto;
    align-items: end;
  }
}

.contact-form--compact .form-group {
  margin-bottom: 0;
}

.contact-form--compact input {
  width: 100%;
}

.kyvera-lead-global .contact-grid--form-only {
  grid-template-columns: 1fr;
}

@media (min-width: 900px) {
  .kyvera-lead-global .contact-grid--form-only {
    grid-template-columns: 1fr 1.2fr;
  }
}

/* ---- Portfolio prototypes teaser ---- */
.portfolio-prototypes-teaser {
  margin: clamp(1rem, 2.5vw, 1.5rem) 0 0;
}

.portfolio-prototypes-teaser-inner {
  text-align: center;
  padding: clamp(1rem, 2.5vw, 1.5rem);
  background: linear-gradient(135deg, rgba(0, 123, 255, 0.1) 0%, rgba(0, 123, 255, 0.03) 100%);
  border: 1px solid rgba(0, 123, 255, 0.2);
  border-radius: var(--radius-lg);
}

.portfolio-prototypes-teaser-inner h3 {
  font-family: var(--font-display);
  font-size: clamp(1.2rem, 3vw, 1.5rem);
  margin: 0.5rem 0 0.75rem;
}

.portfolio-prototypes-teaser-inner p {
  max-width: 42ch;
  margin: 0 auto 1.25rem;
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.55;
}

.portfolio-cta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
  margin-top: 1rem;
}

.portfolio-cta-actions .btn {
  min-width: min(100%, 220px);
}
