/* ==========================================================================
   VeKtra Automation — Responsive Media Queries (Mobile-First Architecture)
   Specifically engineered for pristine layout across mobile devices
   (320px to 480px, with 375px reference) through to tablet & desktop.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Mobile Phones (max-width: 639px)
   Targeting iPhone SE, 12, 13, 14, 15, Android (360px–414px) and portrait phones
   -------------------------------------------------------------------------- */
@media (max-width: 639px) {
  /* Ambient Lines: Hide on small mobile to maximize clean contrast and avoid clipping */
  .guide-line {
    display: none;
  }

  /* Floating Header Capsule: Sleek, compact and balanced */
  .header-floating {
    top: 0.5rem;
    padding: 0 var(--space-3);
  }

  .header-floating__inner {
    height: 58px;
    padding: 0 var(--space-4);
    border-radius: 9999px;
  }

  .brand-logo {
    gap: var(--space-2);
  }

  .brand-logo__img {
    height: 30px;
    max-width: 130px;
  }

  .header-actions {
    gap: 0.5rem;
  }

  /* Hide header CTA on mobile phones: user has full-width CTA inside drawer and Hero */
  .header-actions .btn {
    display: none !important;
  }

  .theme-toggle {
    width: 36px;
    height: 36px;
  }

  .nav__toggle {
    width: 36px;
    height: 36px;
  }

  /* Mobile Dropdown Drawer: Card floating beneath header */
  .nav__mobile {
    top: calc(100% + 6px);
    left: var(--space-3);
    right: var(--space-3);
    padding: var(--space-4);
    border-radius: 16px;
  }

  .nav__mobile-link {
    padding: 0.65rem 0.85rem;
    font-size: 0.9375rem;
    min-height: 44px;
  }

  .nav__mobile-cta {
    margin-top: var(--space-3);
    height: 46px;
    font-size: 0.9375rem;
    border-radius: 9999px;
  }

  /* Shared Section Headers */
  .section-header {
    margin-bottom: var(--space-8);
  }

  .section-header .badge-pill,
  .section-header__badge {
    margin-bottom: 1.15rem !important;
  }

  .section-header__title {
    font-size: clamp(1.55rem, 5.5vw, 2.2rem);
    line-height: 1.2;
    margin-bottom: 0.85rem;
  }

  .section-header__subtitle {
    font-size: 0.875rem;
    line-height: 1.55;
    padding: 0 var(--space-2);
  }

  /* Hero Section */
  .hero {
    padding-top: var(--space-6);
    padding-bottom: var(--space-12);
  }

  .hero__badge {
    margin-bottom: var(--space-4);
    height: 28px;
    padding: 0 var(--space-3);
    font-size: 0.75rem;
  }

  .hero__title {
    font-size: clamp(1.75rem, 6.5vw, 2.75rem);
    line-height: 1.15;
    margin-bottom: var(--space-4);
  }

  .hero__subtitle {
    font-size: 0.925rem;
    line-height: 1.55;
    margin-bottom: var(--space-6);
    padding: 0 var(--space-2);
  }

  .hero__highlight {
    white-space: normal;
    display: inline-block;
  }

  .hero__actions {
    flex-direction: column;
    width: 100%;
    max-width: 320px;
    margin: 0 auto var(--space-8);
    gap: var(--space-3);
  }

  .hero__actions .btn {
    width: 100%;
    height: 46px;
    font-size: 0.9375rem;
    justify-content: center;
  }

  .avatar-cluster {
    gap: 0;
    justify-content: center;
    flex-wrap: nowrap;
  }

  .avatar-item {
    width: 36px;
    height: 36px;
    margin-left: -8px;
  }

  .avatar-item:first-child {
    margin-left: 0;
  }

  .avatar-item--count {
    font-size: 0.7rem;
  }

  .rating-stars {
    margin-top: 0.15rem;
    gap: 3px;
  }

  .rating-stars svg {
    width: 15px;
    height: 15px;
  }

  .social-proof__caption {
    font-size: 0.75rem;
    line-height: 1.4;
    text-align: center;
    padding: 0 var(--space-2);
  }

  /* Dual Marquee Section (Tecnologías) */
  .marquee-section {
    padding: var(--space-6) 0 var(--space-8);
  }

  .marquee-section__label {
    font-size: 0.7rem;
    margin-bottom: var(--space-4);
    letter-spacing: 0.1em;
  }

  .marquee-dual-wrapper {
    gap: var(--space-3);
    mask-image: linear-gradient(to right, transparent 0%, black 8%, black 92%, transparent 100%);
    -webkit-mask-image: linear-gradient(to right, transparent 0%, black 8%, black 92%, transparent 100%);
  }

  .tech-logo {
    padding: var(--space-1) var(--space-3);
    gap: 0.45rem;
  }

  .tech-logo__icon {
    width: 18px;
    height: 18px;
  }

  .tech-logo__icon--wide {
    width: 26px;
    height: 16px;
  }

  .tech-logo__name {
    font-size: 0.8125rem;
  }

  /* Bento Grid Services */
  .services-section {
    padding: 3.5rem 0 3.75rem;
  }

  .bento-grid {
    gap: var(--space-4);
  }

  .bento-card {
    padding: var(--space-5) var(--space-4);
    border-radius: 16px;
  }

  .bento-card__badge {
    margin-bottom: 0.75rem;
    font-size: 0.68rem;
    padding: 0.28rem 0.75rem;
  }

  .bento-card__title {
    font-size: 1.28rem;
    line-height: 1.25;
    margin-bottom: var(--space-3);
  }

  .bento-card__desc {
    font-size: 0.875rem;
    line-height: 1.55;
    margin-bottom: var(--space-4);
  }

  .bento-feature-list {
    gap: var(--space-2);
    margin-bottom: var(--space-5);
  }

  .bento-feature-item {
    font-size: 0.8125rem;
    gap: 0.5rem;
  }

  .bento-feature-item svg {
    width: 16px;
    height: 16px;
  }

  .n8n-showcase {
    padding: 0.75rem 0.85rem;
    border-radius: 12px;
  }

  .n8n-showcase__content {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  .n8n-showcase__left {
    gap: 0.65rem;
    width: 100%;
  }

  .n8n-showcase__logo-box {
    width: 48px;
    height: 34px;
    border-radius: 8px;
  }

  .n8n-logo-svg {
    width: 32px;
    height: 17px;
  }

  .n8n-showcase__brand-name {
    font-size: 0.85rem;
  }

  .n8n-showcase__tagline {
    font-size: 0.7rem;
  }

  .n8n-showcase__status {
    align-self: flex-start;
    font-size: 0.7rem;
    padding: 0.25rem 0.6rem;
  }

  .browser-mockup {
    padding: 0.75rem 0.85rem;
    border-radius: 12px;
  }

  .browser-stats {
    font-size: 0.75rem;
    padding: 0.35rem 0.5rem;
  }

  .consulting-grid {
    gap: var(--space-3);
    margin-top: var(--space-4);
  }

  .consulting-item {
    padding: var(--space-3);
    border-radius: 10px;
  }

  .consulting-item__title {
    font-size: 0.875rem;
  }

  .consulting-item__desc {
    font-size: 0.75rem;
    line-height: 1.45;
  }

  /* IA SEO Section */
  .ai-seo-section {
    padding: 3.5rem 0 3rem;
  }

  .ai-seo-grid {
    gap: var(--space-8);
  }

  .ai-seo__title {
    font-size: clamp(1.6rem, 5.5vw, 2.25rem);
    line-height: 1.2;
    margin-bottom: var(--space-4);
  }

  .ai-seo__description {
    font-size: 0.875rem;
    line-height: 1.55;
    margin-bottom: var(--space-5);
  }

  .ai-seo__checklist {
    gap: var(--space-2);
    margin-bottom: var(--space-6);
  }

  .ai-seo__checklist-item {
    font-size: 0.8125rem;
    gap: 0.5rem;
  }

  .visibility-scene {
    height: 420px;
    border-radius: 16px;
  }

  .search-snippet {
    top: 2.25rem;
    left: 0.65rem;
    width: calc(100% - 1.3rem);
    max-width: 245px;
    padding: 0.7rem 0.8rem;
    border-radius: 12px;
  }

  .ai-snippet {
    bottom: 2.25rem;
    right: 0.65rem;
    width: calc(100% - 1.3rem);
    max-width: 255px;
    padding: 0.7rem 0.8rem;
    border-radius: 12px;
  }

  .ai-snippet strong {
    font-size: 0.875rem;
  }

  .ai-snippet p {
    font-size: 0.7rem;
    line-height: 1.4;
    margin-bottom: 0.5rem;
  }

  .map-pin {
    width: 38px;
    height: 38px;
  }

  .map-pin svg {
    width: 18px;
    height: 18px;
  }

  .scene-caption {
    gap: 0.75rem;
    font-size: 0.68rem;
  }

  .ai-seo-pillars {
    margin-top: var(--space-10);
  }

  .ai-seo-pillars__grid {
    gap: var(--space-3);
  }

  .ai-seo-pillar {
    padding: var(--space-4);
    border-radius: 14px;
  }

  .ai-seo-pillar__title {
    font-size: 0.95rem;
  }

  .ai-seo-pillar__desc {
    font-size: 0.8125rem;
    line-height: 1.5;
  }

  /* Web Presence Section */
  .web-presence {
    padding: 3.5rem 0 3rem;
  }

  .web-presence__hero {
    gap: var(--space-8);
    margin-bottom: var(--space-10);
  }

  .web-presence__title {
    font-size: clamp(1.6rem, 5.5vw, 2.25rem);
    line-height: 1.2;
    margin-bottom: var(--space-4);
  }

  .web-presence__description {
    font-size: 0.875rem;
    line-height: 1.55;
    margin-bottom: var(--space-5);
  }

  .web-presence__benefits {
    gap: var(--space-2);
    margin-bottom: var(--space-6);
  }

  .web-benefit-item {
    font-size: 0.8125rem;
    gap: 0.5rem;
  }

  .web-presence__actions .btn {
    width: 100%;
    height: 46px;
    justify-content: center;
    font-size: 0.9375rem;
  }

  .ai-scene-card {
    padding: var(--space-4);
    border-radius: 16px;
  }

  .ai-prompt-box,
  .ai-response-box {
    padding: 0.75rem;
    border-radius: 12px;
  }

  .ai-response-box__body {
    font-size: 0.8125rem;
    line-height: 1.55;
  }

  .web-presence__pillars {
    gap: var(--space-3);
  }

  .pillar-card {
    padding: var(--space-4);
    border-radius: 14px;
  }

  .pillar-card__title {
    font-size: 0.95rem;
  }

  .pillar-card__desc {
    font-size: 0.8125rem;
    line-height: 1.5;
  }

  /* Case Studies */
  .case-studies {
    padding: 3rem 0 3.5rem;
  }

  .case-studies__grid {
    gap: var(--space-4);
    margin-top: var(--space-6);
  }

  .case-card {
    padding: var(--space-5) var(--space-4);
    border-radius: 16px;
  }

  .case-card__company {
    font-size: 0.7rem;
  }

  .case-card__title {
    font-size: 1.05rem;
    line-height: 1.35;
  }

  .case-card__stats {
    padding: var(--space-3);
    gap: var(--space-2);
    border-radius: 12px;
  }

  .case-stat__value {
    font-size: 1.5rem;
  }

  .case-stat__label {
    font-size: 0.7rem;
  }

  .case-card__text {
    font-size: 0.8125rem;
    line-height: 1.55;
  }

  .case-tag {
    font-size: 0.7rem;
    padding: 0.2rem 0.55rem;
  }

  /* Process Steps */
  .process {
    padding: var(--space-12) 0 var(--space-16);
  }

  .process__wrapper {
    margin-top: var(--space-8);
  }

  .process__grid {
    gap: var(--space-3);
  }

  .process-card {
    padding: var(--space-4);
    border-radius: 14px;
  }

  .process-card__number {
    font-size: 1.45rem;
  }

  .process-card__icon-box {
    width: 36px;
    height: 36px;
  }

  .process-card__title {
    font-size: 0.95rem;
  }

  .process-card__desc {
    font-size: 0.8125rem;
    line-height: 1.5;
  }

  /* Integrations Squircle Carousel */
  .integrations-section {
    padding: var(--space-12) 0 var(--space-16);
  }

  .tools-marquee-wrapper {
    padding: var(--space-3) 0;
    gap: var(--space-3);
    mask-image: linear-gradient(to right, transparent 0%, black 8%, black 92%, transparent 100%);
    -webkit-mask-image: linear-gradient(to right, transparent 0%, black 8%, black 92%, transparent 100%);
  }

  .tool-tile {
    width: 56px;
    height: 56px;
    border-radius: 14px;
  }

  .tool-tile svg {
    width: 24px;
    height: 24px;
  }

  .integrations-footer {
    margin-top: var(--space-6);
  }

  .integrations-footer__text {
    font-size: 0.8125rem;
    line-height: 1.5;
  }

  /* FAQ Accordion */
  .faq-section {
    padding: var(--space-12) 0 var(--space-16);
  }

  .faq-accordion {
    gap: var(--space-2);
  }

  .faq-item {
    border-radius: 12px;
  }

  .faq-trigger {
    padding: 0.95rem 1rem;
    min-height: 48px;
    gap: var(--space-3);
  }

  .faq-question {
    font-size: 0.9375rem;
    line-height: 1.4;
  }

  .faq-icon {
    width: 18px;
    height: 18px;
  }

  .faq-content__inner {
    padding: 0 1rem 1rem;
    font-size: 0.875rem;
    line-height: 1.6;
  }

  /* CTA Banner */
  .cta-banner {
    padding: var(--space-4) 0 var(--space-16);
  }

  .cta-banner__card {
    padding: var(--space-10) var(--space-4);
    border-radius: 18px;
    min-height: 300px;
  }

  .cta-banner__title {
    font-size: clamp(1.75rem, 6vw, 2.5rem);
    line-height: 1.15;
    margin-bottom: var(--space-6);
  }

  .cta-banner__btn {
    width: 100%;
    max-width: 300px;
    height: 48px;
    justify-content: center;
    font-size: 0.9375rem;
  }

  .cta-banner__note {
    font-size: 0.75rem;
    line-height: 1.5;
  }

  /* Footer */
  .footer {
    padding-top: var(--space-6);
  }

  .footer__bottom {
    gap: var(--space-3);
    text-align: center;
    padding-bottom: var(--space-6);
  }

  .footer__text {
    font-size: 0.75rem;
    line-height: 1.5;
  }

  .footer__links {
    font-size: 0.75rem;
    justify-content: center;
    gap: var(--space-2);
  }

  .footer-matrix {
    height: 110px;
    margin-top: var(--space-2);
  }
}

/* --------------------------------------------------------------------------
   2. Small Tablets & Landscape Phones (min-width: 640px)
   -------------------------------------------------------------------------- */
@media (min-width: 640px) {
  .hero__actions {
    flex-direction: row;
    justify-content: center;
    max-width: none;
    gap: var(--space-4);
    margin-bottom: var(--space-12);
  }

  .ai-scene-card {
    padding: var(--space-6);
  }

  .web-presence__pillars {
    grid-template-columns: repeat(2, 1fr);
  }

  .case-card {
    padding: var(--space-8);
  }

  .process__grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .process-card {
    padding: var(--space-6);
  }

  .footer__bottom {
    flex-direction: row;
  }

  .ai-seo-pillars__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* --------------------------------------------------------------------------
   3. Tablets Portrait (min-width: 768px)
   -------------------------------------------------------------------------- */
@media (min-width: 768px) {
  :root {
    --header-height: 80px;
  }

  .container {
    padding-left: var(--space-8);
    padding-right: var(--space-8);
  }

  .guide-line--left { left: 2.5rem; }
  .guide-line--right { right: 2.5rem; }

  .brand-logo__img {
    height: 44px;
    max-width: 210px;
    filter: drop-shadow(0 0 14px rgba(179, 149, 255, 0.45));
  }

  .hero {
    padding-top: var(--space-16);
    padding-bottom: var(--space-24);
  }

  .bento-card {
    padding: var(--space-8);
  }

  .consulting-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .services-section {
    padding: 4.5rem 0 5rem;
  }

  .ai-seo-section {
    padding: 4.5rem 0 4rem;
  }

  .web-presence {
    padding: 4.5rem 0 3.5rem;
  }

  .case-studies {
    padding: 3.5rem 0 4.5rem;
  }

  .integrations-section {
    padding: 4.5rem 0;
  }

  .faq-section {
    padding: 4.5rem 0;
  }

  .cta-banner__card {
    padding: var(--space-20) var(--space-12);
    min-height: 420px;
  }

  .footer-matrix {
    height: 200px;
  }
}

/* --------------------------------------------------------------------------
   4. Desktop Navigation & Bento Grid Breakpoint (min-width: 900px)
   -------------------------------------------------------------------------- */
@media (min-width: 900px) {
  .nav__desktop {
    display: flex;
    align-items: center;
  }

  .nav__toggle {
    display: none;
  }

  .bento-grid {
    grid-template-columns: repeat(12, 1fr);
  }

  .bento-card--automation {
    grid-column: span 7;
  }

  .bento-card--web {
    grid-column: span 5;
  }

  .bento-card--consulting {
    grid-column: span 12;
  }
}

/* --------------------------------------------------------------------------
   5. IA SEO Two-Column Breakpoint (min-width: 992px)
   -------------------------------------------------------------------------- */
@media (min-width: 992px) {
  .ai-seo-grid {
    grid-template-columns: 1fr 1.15fr;
  }
}

/* --------------------------------------------------------------------------
   6. Laptops & Wide Desktops (min-width: 1024px)
   -------------------------------------------------------------------------- */
@media (min-width: 1024px) {
  .hero__title {
    font-size: 3.75rem;
    line-height: 1.08;
  }

  .hero__subtitle {
    font-size: 1.25rem;
  }

  .web-presence__hero {
    grid-template-columns: 1.1fr 0.9fr;
    gap: var(--space-16);
  }

  .web-presence__pillars {
    grid-template-columns: repeat(4, 1fr);
  }

  .case-studies__grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .process__line {
    display: block;
    position: absolute;
    top: 48px;
    left: 40px;
    right: 40px;
    height: 2px;
    background: linear-gradient(90deg, rgba(56, 189, 248, 0.2) 0%, rgba(99, 102, 241, 0.3) 50%, rgba(56, 189, 248, 0.2) 100%);
    z-index: 1;
  }

  .process__grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .ai-seo-pillars__grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .footer-matrix {
    height: 220px;
  }
}

/* --------------------------------------------------------------------------
   7. Large Displays (min-width: 1280px)
   -------------------------------------------------------------------------- */
@media (min-width: 1280px) {
  .hero__title {
    font-size: 4.25rem;
  }
}
