/* Responsive layer — mobile & tablet only. Desktop (1024px+) unchanged. */

html {
  overflow-x: hidden;
  width: 100%;
  max-width: 100%;
}

body {
  width: 100%;
  max-width: 100%;
}

main,
section,
.container,
.hero-grid,
.hero-content,
.hero-visual,
.dashboard-mockup,
.dashboard-main,
.cards-grid,
.impact-grid,
.contact-grid,
.about-grid {
  min-width: 0;
  max-width: 100%;
}

/* Cursor + touch: only hide custom cursor below tablet */
@media (max-width: 1023px) {
  body {
    cursor: auto;
  }

  #cursor-ring,
  #cursor-dot,
  .cursor-segment {
    display: none !important;
  }
}

/* Disable hover lifts on touch devices */
@media (hover: none) {
  .glow-card:hover,
  .feature-card:hover,
  .dash-card:hover,
  .btn:hover,
  .tag:hover,
  .hero-stat:hover,
  .contact-link:hover {
    transform: none;
  }

  .glow-card:hover .card-image-hover img {
    transform: none;
    filter: none;
  }
}

/* ── Tablet + mobile shared (≤1023px) ── */
@media (max-width: 1023px) {
  :root {
    --container: min(1180px, calc(100% - 2rem));
    --nav-h: 72px;
  }

  .container {
    width: 100%;
    max-width: 100%;
    padding-inline: 1rem;
  }

  .section {
    padding: 4rem 0;
    scroll-margin-top: 5.5rem;
  }

  .section-title {
    font-size: clamp(1.75rem, 8vw, 2.5rem);
  }

  .section-lead {
    font-size: 1rem;
    max-width: 100%;
  }

  /* Navbar */
  .site-nav-wrap {
    top: 0.625rem;
    left: 0;
    right: 0;
    padding: 0 0.75rem;
    justify-content: stretch;
  }

  .site-nav {
    width: calc(100% - 0px);
    max-width: calc(100vw - 24px);
    margin-inline: auto;
    min-height: 56px;
    padding: 0.625rem 0.75rem;
    border-radius: 1.375rem;
    gap: 0.5rem;
  }

  .site-nav__name {
    font-size: clamp(0.95rem, 4.2vw, 1.05rem);
  }

  .site-nav__badge {
    font-size: 0.5625rem;
    letter-spacing: 0.06em;
    line-height: 1.3;
    max-width: 100%;
  }

  .site-nav__brand {
    flex: 1;
    min-width: 0;
    overflow: hidden;
  }

  .site-nav__actions .btn-beam {
    display: none !important;
  }

  .site-nav__mobile {
    left: 12px;
    right: 12px;
    top: calc(56px + 1.25rem);
    max-width: calc(100vw - 24px);
    border: 1px solid var(--border-glow);
  }

  .site-nav__mobile-cta {
    display: flex;
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
  }

  .site-nav__mobile-cta .btn {
    width: 100%;
    min-height: 48px;
  }

  /* Hero */
  .hero {
    min-height: auto;
    padding: calc(var(--nav-h) + 2.5rem) 0 3rem;
  }

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

  .hero-content,
  .hero-visual {
    width: 100%;
  }

  .hero-title {
    font-size: clamp(2rem, 11vw, 2.75rem);
    line-height: 1.05;
    max-width: 100%;
    overflow-wrap: break-word;
  }

  .hero-subtitle {
    font-size: 0.9375rem;
    max-width: 100%;
  }

  .hero-authority {
    flex-direction: row;
    padding: 0.875rem 1rem;
  }

  .hero-authority p {
    font-size: 0.8125rem;
  }

  .hero-actions {
    flex-direction: column;
    width: 100%;
  }

  .hero-actions .btn {
    width: 100%;
    max-width: 100%;
    min-height: 48px;
  }

  .hero-visual {
    padding: 0;
  }

  .hero-photo-card {
    width: 100%;
    max-width: 100%;
    margin-inline: auto;
    padding: 0.625rem;
    border-radius: 1.125rem;
    overflow: hidden;
  }

  .hero-photo-inner {
    max-height: none;
    width: 100%;
  }

  .hero-photo-inner img {
    height: auto;
    min-height: 280px;
    max-height: 520px;
  }

  /* Chips: scroll horizontal abaixo da foto */
  .hero-chip-row {
    display: flex;
    flex-wrap: nowrap;
    gap: 0.5rem;
    overflow-x: auto;
    margin-top: 0.75rem;
    padding-bottom: 0.25rem;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .hero-chip-row::-webkit-scrollbar {
    display: none;
  }

  .hero-chip-row .hero-float-tag {
    position: static;
    animation: none;
    flex-shrink: 0;
    font-size: 0.625rem;
    padding: 0.3rem 0.55rem;
  }

  /* Dashboard */
  .dashboard-section {
    padding: 3.5rem 0 4rem;
  }

  .dashboard-intro {
    text-align: left;
    margin-bottom: 1.5rem;
  }

  .dashboard-mockup {
    width: 100%;
    max-width: 100%;
    height: auto;
    min-height: 0;
    flex-direction: column;
    border-radius: 0.875rem;
  }

  .dashboard-sidebar {
    display: none !important;
  }

  .dashboard-main {
    width: 100%;
  }

  .dashboard-header {
    height: auto;
    min-height: 4rem;
    flex-wrap: wrap;
    gap: 0.75rem;
    padding: 1rem;
    align-items: flex-start;
  }

  .dashboard-live {
    font-size: 0.625rem;
    max-width: 100%;
  }

  .dashboard-body {
    grid-template-columns: 1fr;
    padding: 1rem;
    overflow: visible;
  }

  .dash-card {
    width: 100%;
    min-width: 0;
    max-width: 100%;
  }

  .dash-card--highlight {
    grid-column: span 1;
  }

  /* Grids */
  .cards-grid {
    grid-template-columns: 1fr;
  }

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

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

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

  .feature-card {
    width: 100%;
    min-width: 0;
    min-height: 0;
    padding: 1.25rem;
    border-radius: 1.25rem;
  }

  .feature-card__stat {
    font-size: clamp(1.75rem, 8vw, 2.5rem);
  }

  .feature-card__thumb {
    max-width: 100%;
  }

  .positioning {
    padding: 4rem 0;
    text-align: left;
  }

  .positioning .section-title {
    max-width: 100%;
    margin-inline: 0;
  }

  .positioning p {
    margin-inline: 0;
  }

  .form-card {
    padding: 1.25rem;
  }

  .form-grid input,
  .form-grid select,
  .form-grid textarea {
    width: 100%;
    max-width: 100%;
  }

  /* Ambient blobs — smaller movement */
  .ambient-light,
  .ambient-light-2,
  .ambient-light-3 {
    width: 180px;
    height: 180px;
    opacity: 0.5;
  }
}

/* ── Mobile only (≤640px) ── */
@media (max-width: 640px) {
  :root {
    --nav-h: 88px;
  }

  .container {
    padding-inline: 1rem;
  }

  .section {
    padding: 3.5rem 0;
  }

  .hero {
    padding-top: 6.875rem;
  }

  .hero-stats {
    grid-template-columns: 1fr;
  }

  .hero-stat strong {
    font-size: 1rem;
    word-break: break-word;
  }

  .hero-badge {
    font-size: 0.6875rem;
    flex-wrap: wrap;
  }

  .timeline-item {
    flex-direction: column;
    gap: 0.35rem;
  }

  .talk-tags {
    gap: 0.5rem;
  }

  .project-card {
    min-height: 0;
  }
}

/* ── Small phones: 1 col stats; wider phones: 2 cols ── */
@media (min-width: 391px) and (max-width: 640px) {
  .hero-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* ── Tablet (641px–1023px) ── */
@media (min-width: 641px) and (max-width: 1023px) {
  .cards-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .dashboard-body {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dash-card--highlight {
    grid-column: span 2;
  }

  .hero-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hero-photo-inner img {
    max-height: 560px;
  }
}

/* Desktop: chips sobre a foto (comportamento original) */
@media (min-width: 1024px) {
  .hero-photo-card {
    position: relative;
    overflow: visible;
  }

  .hero-chip-row {
    display: contents;
  }

  .hero-chip-row .hero-float-tag {
    position: absolute;
  }
}
