/* ==========================================================================
   GEO-SUR · responsive.css
   Breakpoints: Desktop ≥1024px | Tablet 768–1023px | Mobile <768px
   ========================================================================== */

/* ---------- TABLET (768px–1023px) ---------- */
@media (max-width: 1023px) {
  /* Nav */
  .nav-links, .nav-cta { display: none; }
  .nav-hamburger { display: flex; }
  .nav-inner { grid-template-columns: auto 1fr auto; }

  /* Hero */
  .hero-content h1 { font-size: clamp(2.8rem, 7vw, 6rem); }
  .hero-crosshair { right: 5%; opacity: 0.35; }
  /* Features: 2 col */
  .hf-grid { grid-template-columns: repeat(2, 1fr); }
  .hf-item:nth-child(2) { border-right: none; }
  .hf-item:nth-child(3) { border-top: 1px solid var(--color-border); }
  .hf-item:nth-child(4) { border-top: 1px solid var(--color-border); border-right: none; }

  /* Services: 2-col maintained, adjust padding */
  .services-head { grid-template-columns: 1fr; gap: 1.5rem; }
  .services-head .lead { justify-self: start; }

  /* About: stack */
  .about-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
  .about-image { order: -1; aspect-ratio: 16/9; }

  /* Projects: narrower card, shorter stacking scroll on tablet */
  .project-card { padding: 2rem 2rem; gap: 1.5rem; }
  .stacking-wrapper { height: 320vh; }

  /* Contact: stack */
  .contact-grid { grid-template-columns: 1fr; gap: 3rem; }

  /* Footer: 2-col */
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}

/* ---------- MOBILE (<768px) ---------- */
@media (max-width: 767px) {
  :root {
    --section-y: 4rem;
    --gutter: 1.25rem;
  }

  /* Nav */
  .nav-links, .nav-cta { display: none; }
  .nav-hamburger { display: flex; }
  .logo .sub { display: none; }

  /* Hero */
  .hero { min-height: 100svh; }
  .hero-content { max-width: 32rem; }
  .hero-main .container { width: 100%; padding-left: 0.75rem; padding-right: 0.75rem; }
  .hero-content .eyebrow {
    gap: 0.75rem;
    font-size: 0.52rem;
    letter-spacing: 0.08em;
    line-height: 1.4;
    margin-left: 0;
  }
  .hero-sub { padding-left: 0; }
  .hero-ctas { margin-left: 0; }
  .hero-content .eyebrow::before {
    width: 16px;
  }
  .hero-content h1 {
    max-width: 11.4ch;
    font-size: 3.25rem;
    line-height: 0.96;
  }
  .hero-sub {
    font-size: 0.78rem;
    letter-spacing: 0.14em;
    margin-bottom: 1.6rem;
  }
  .hero-ctas { flex-wrap: wrap; }
  .hero-ctas .btn { padding: 0.58rem 0.95rem; font-size: 0.78rem; }
  /* Restore horizontal tap area for the zero-padding ghost btn */
  .hero-ctas .btn-ghost { padding-left: 0.85rem; padding-right: 0.85rem; }
  .hero-crosshair { display: none; }
  .hero-signal    { display: none; }
  /* Features: 2 col */
  .hf-grid { grid-template-columns: repeat(2, 1fr); }
  .hf-item:nth-child(2) { border-right: none; }
  .hf-item:nth-child(3) { border-top: 1px solid var(--color-border); }
  .hf-item:nth-child(4) { border-top: 1px solid var(--color-border); border-right: none; }

  /* Certs: fila única de 3 */
  .certs-grid { gap: 0.5rem; }
  .cert-card { padding: 0.9rem 0.6rem; gap: 0.5rem; }
  .cert-logo { max-height: 36px; }
  .cert-card:nth-child(1) .cert-logo { max-height: 44px; }

  /* Services: acordeón en mobile */
  .services-grid { grid-template-columns: 1fr; border-bottom: none; }
  .services-grid .service-card:nth-child(odd) { border-right: none; }
  .services-head { grid-template-columns: 1fr; }
  .service-card {
    padding: 1.4rem 1.5rem;
    cursor: pointer;
    user-select: none;
  }
  .service-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
  }
  .service-card-header h3 { margin: 0; flex: 1; }
  .service-card-chevron {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-accent-light);
    transition: transform 0.3s var(--ease-out);
  }
  .service-card.is-open .service-card-chevron {
    transform: rotate(45deg);
  }
  .service-card p {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    margin-top: 0;
    transition: max-height 0.35s var(--ease-out), opacity 0.25s ease, margin-top 0.3s ease;
  }
  .service-card.is-open p {
    max-height: 400px;
    opacity: 1;
    margin-top: 0.8rem;
  }

  /* About */
  .about-grid { grid-template-columns: 1fr; gap: 2.5rem; }
  .about-image { order: -1; aspect-ratio: 4/3; }
  .about-buttons { display: none; }

  /* Team grid — fila única debajo del texto */
  .team-grid { grid-template-columns: repeat(4, 1fr); gap: 0.45rem; }
  .team-photo { aspect-ratio: 1/1; }
  .team-info { padding: 0.4rem 0.4rem; gap: 0.1rem; }
  .team-name { font-size: 0.72rem; }
  .team-role { font-size: 0.6rem; letter-spacing: 0.02em; }

  /* Stats: fila única achicada */
  .stats { padding: 1rem 0; }
  .stat { padding: 1rem 0.5rem; }
  .stat-number { font-size: clamp(1.8rem, 7vw, 2.6rem); }
  .stat-label { font-size: 0.62rem; letter-spacing: 0.08em; margin-top: 0.5rem; }

  /* Projects — stacking adapted for mobile (4 cards iniciales + expand) */
  .stacking-wrapper { height: 300vh; }
  .stacking-wrapper .project-card:nth-child(n+5) { display: none; }
  .stacking-wrapper.is-expanded { height: 560vh; }
  .stacking-wrapper.is-expanded .project-card:nth-child(n+5) { display: grid; }
  .projects-more-wrap { display: flex; justify-content: center; margin-top: 2.5rem; }
  .project-card {
    top: 72px;
    grid-template-columns: 1fr;
    padding: 1.5rem;
    margin-top: 1rem !important;
  }
  .project-card + .project-card { margin-top: 1rem; }
  .project-card .card-image { aspect-ratio: 16/9; order: -1; margin: 0; }

  /* CTA */
  .cta-section { background-position: 52% center; }
  .cta-section .buttons { flex-direction: column; align-items: stretch; }
  .cta-section .buttons .btn { justify-content: center; }

  /* Contact */
  .contact-grid { grid-template-columns: 1fr; gap: 2.5rem; }

  /* Footer */
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 2rem; }
  .footer-brand { grid-column: 1 / -1; }
  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }

  /* WhatsApp float */
  .wa-float { bottom: 1.25rem; right: 1.25rem; width: 52px; height: 52px; }
  .wa-float svg { width: 24px; height: 24px; }
  .wa-tooltip { display: none; }
}

/* ---------- LANDSCAPE PHONE (short viewports ≤520px tall) ---------- */
@media (orientation: landscape) and (max-height: 520px) {
  /* Compress hero so it fits without overflow */
  .hero-main {
    padding-bottom: 2rem;
  }
  .hero-content .eyebrow {
    margin-bottom: 0.9rem;
  }
  .hero-content h1 {
    font-size: clamp(1.8rem, 5vh, 2.5rem);
    margin-bottom: 1.2rem;
  }
  /* GPS coords and scroll cue collide with content in short viewports */
  .hero-gps,
  .hero-scroll-cue { display: none; }
}

/* ---------- SMALL MOBILE (<420px) ---------- */
@media (max-width: 419px) {
  :root { --gutter: 1rem; }

  .hero-content h1 { font-size: 3rem; }
  .certs-grid { max-width: 100%; }

  /* Team grid — 4 columnas muy ajustadas */
  .team-grid { gap: 0.3rem; }
  .team-info { padding: 0.3rem 0.3rem; }
  .team-name { font-size: 0.66rem; }
  .team-role { font-size: 0.55rem; letter-spacing: 0.01em; }
}

/* ---------- LARGE DESKTOP (≥1440px) ---------- */
@media (min-width: 1440px) {
  :root {
    --container: 1380px;
    --section-y: 10rem;
  }

  .hero-content h1 { font-size: 8.2rem; }
  .project-card { max-width: 1100px; }
}

/* ---------- PRINT ---------- */
@media print {
  .navbar, .wa-float, .nav-overlay, .scroll-progress { display: none !important; }
  body { background: white; color: black; }
  .hero { height: auto; padding: 2rem 0; }
  .hero-bg { display: none; }
  .hero-content { color: black; }
  h1, h2, h3, h4 { color: black; }
}
