/* ============================================================
   HYPE DIGITAL — responsive.css
   Mobile-first overrides: Android & iOS (360px → 768px)
   ============================================================ */

/* ── 1. GLOBAL RESETS MOBILE ─────────────────────────────── */
@media (max-width: 768px) {
  html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
  }

  html,
  body {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  position: relative;
  }

  section {
    padding: 4rem 1.25rem;
  }

  .section-tag {
    font-size: 0.65rem;
    letter-spacing: 0.18em;
  }
}

/* ── 2. LOGO TOPO DIREITA ────────────────────────────────── */
@media (max-width: 768px) {
  .logo-topo-direita {
    top: 14px;
    right: 14px;
    z-index: 9998;
  }

  .logo-topo-direita img {
    width: 96px;
  }
}

/* ── 3. NAV ──────────────────────────────────────────────── */
@media (max-width: 768px) {
  nav {
    padding: 1rem 1.25rem;
  }

  .nav-links {
    display: none;
  }

  .nav-cta {
    padding: 0.55rem 1.1rem;
    font-size: 0.72rem;
  }
}

/* ── 4. HERO ─────────────────────────────────────────────── */
@media (max-width: 768px) {

  /* Estrutura geral do hero */
  .hero {
    min-height: 100svh;
    padding: 0 1.5rem;
    justify-content: center;
    align-items: flex-start;
    gap: 0;
    display: flex;
    flex-direction: column;
  }

  /* Ticker de fundo — menor e mais sutil */
  .hero-ticker {
    font-size: clamp(4.5rem, 22vw, 7rem);
    top: 50%;
    opacity: 1;
    letter-spacing: -0.01em;
  }

  /* Gradiente de fundo reforçado para dar profundidade */
  .hero-bg {
    background:
      radial-gradient(ellipse 110% 50% at 50% 60%, rgba(232, 24, 109, 0.09) 0%, transparent 70%),
      radial-gradient(ellipse 60% 40% at 10% 90%, rgba(155, 39, 175, 0.07) 0%, transparent 60%);
  }

  /* Título principal — fonte controlada, linha a linha */
  .hero-title {
    font-size: clamp(4.25rem, 15vw, 8rem);
    line-height: 1.0;
    letter-spacing: 0.01em;
    margin-bottom: 0;
    position: relative;
    z-index: 2;
  }

  /* Palavra animada com glitch */
  #changing-word {
    font-size: clamp(4.25rem, 15vw, 8rem);
    padding: 0.03em 0.04em 0.15em;
  }

  /* Área inferior: descrição + botão */
  .hero-bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    margin-top: 2.2rem;
    width: 100%;
    position: relative;
    z-index: 2;
  }

  .hero-desc {
    display: none; /* Estava vazio no HTML, esconde para não criar espaço */
  }

  /* Scroll/CTA wrapper — ocupa toda a largura */
  .hero-scroll {
    width: 100%;
  }

  /* Botão CTA — full width, pill, destaque máximo */
  .hero-scroll .nav-cta {
    display: block;
    width: 100%;
    text-align: center;
    padding: 1rem 1.5rem;
    font-size: 0.82rem;
    font-weight: 500;
    letter-spacing: 0.14em;
    border-radius: 100px;
    background: var(--accent);
    color: var(--bg);
    text-decoration: none;
    box-shadow:
      0 0 28px rgba(232, 24, 109, 0.45),
      0 4px 16px rgba(0, 0, 0, 0.4);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    -webkit-tap-highlight-color: transparent;
  }

  .hero-scroll .nav-cta:active {
    transform: scale(0.97);
    box-shadow: 0 0 16px rgba(232, 24, 109, 0.3);
  }
}

/* ── 5. MARQUEE ──────────────────────────────────────────── */
@media (max-width: 768px) {
  .marquee-strip {
    padding: 1.1rem 0;
  }

  .marquee-logo {
    height: 38px;
  }

  .marquee-track {
    gap: 2.5rem;
    animation-duration: 18s;
  }
}

/* ── 6. ABOUT ────────────────────────────────────────────── */
@media (max-width: 768px) {
  #about {
    padding: 4rem 1.25rem;
  }

  .about {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .about-title {
    font-size: clamp(3rem, 11vw, 5rem);
    line-height: 0.95;
  }

  .stats-row {
    gap: 0;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    padding-top: 1.8rem;
    margin-top: 1.2rem;
  }

  .stat-item {
    text-align: center;
    padding: 0 0.5rem;
    border-right: 1px solid var(--border);
  }

  .stat-item:last-child {
    border-right: none;
  }

  .stat-num {
    font-size: 2.4rem;
  }

  .stat-label {
    font-size: 0.6rem;
    letter-spacing: 0.06em;
    line-height: 1.4;
  }

  .about-text {
    font-size: 0.95rem;
    line-height: 1.75;
    margin-bottom: 1.5rem;
  }

  .link-arrow {
    font-size: 0.75rem;
  }
}

/* ── 7. SERVICES ─────────────────────────────────────────── */
@media (max-width: 768px) {
  #services {
    padding: 4rem 1.25rem !important;
  }

  .services-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 2.5rem;
  }

  .services-title {
    font-size: clamp(2.8rem, 11vw, 4.5rem);
    line-height: 0.95;
  }

  .services-grid {
    grid-template-columns: 1fr;
    gap: 1px;
  }

  .service-card {
    padding: 2rem 1.5rem;
    min-height: 220px;
  }

  /* No mobile, mostrar imagem com opacidade leve sempre */
  .service-card .card-img {
    opacity: 0.18;
    transform: scale(1);
  }

  .service-card:active .card-img,
  .service-card:focus .card-img {
    opacity: 1;
  }

  .service-num {
    font-size: 3rem;
  }

  .service-name {
    font-size: 1.35rem;
    margin: 0.6rem 0 0.5rem;
  }

  .service-desc {
    font-size: 0.85rem;
  }
}

/* ── 8. WORK / PORTFÓLIO ─────────────────────────────────── */
@media (max-width: 768px) {
  #work {
    padding: 4rem 1.25rem;
  }

  .work-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 1.2rem;
    margin-bottom: 2rem;
  }

  .about-title {
    font-size: clamp(2.8rem, 11vw, 4.5rem);
  }

  .work-grid {
    grid-template-columns: 1fr;
    gap: 1.2rem;
  }

  .work-card:first-child {
    grid-row: span 1;
  }

  .work-card:first-child .work-thumb {
    aspect-ratio: 4 / 5;
    height: auto;
  }

  .work-thumb {
    aspect-ratio: 16 / 11;
    border-radius: 6px;
    overflow: hidden;
  }

  /* Overlay sempre visível no mobile */
  .work-thumb-overlay {
    opacity: 1;
    background: linear-gradient(to top, rgba(10,10,8,0.88) 0%, transparent 55%);
  }

  .work-thumb-cta {
    font-size: 0.72rem;
    padding: 0.45rem 1rem;
  }

  .work-cats {
    gap: 0.35rem;
    margin-bottom: 0.4rem;
  }

  .work-cat {
    font-size: 0.6rem;
    padding: 0.15rem 0.5rem;
  }

  .work-name {
    font-size: 1.1rem;
    margin-bottom: 0.2rem;
  }

  .work-year {
    font-size: 0.7rem;
  }

  .work-info {
    padding: 0.9rem 0 0;
  }
}

/* ── 9. TESTIMONIALS ─────────────────────────────────────── */
@media (max-width: 768px) {
  #testimonials {
    padding: 4rem 1.25rem;
  }

  .testimonials-title {
    font-size: clamp(2.8rem, 11vw, 4.5rem);
    margin-bottom: 2.5rem;
  }

  .testimonials-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .testimonial-card {
    padding: 1.5rem 1.25rem;
  }

  .testimonial-text {
    font-size: 0.9rem;
    line-height: 1.7;
  }

  .author-name {
    font-size: 0.82rem;
  }

  .author-role {
    font-size: 0.7rem;
  }

  .author-avatar {
    width: 40px;
    height: 40px;
    overflow: hidden;
    flex-shrink: 0;
    border-radius: 50%;
  }

  .author-avatar img {
    width: 100%;
    height: 100%;
    max-width: 100%;
    object-fit: cover;
    display: block;
  }
}

/* ── 10. CTA FINAL ───────────────────────────────────────── */
@media (max-width: 768px) {
  .cta-section {
    padding: 6rem 1.5rem;
  }

  .cta-bg-text {
    font-size: clamp(5.5rem, 22vw, 10rem);
    letter-spacing: -0.02em;
  }

  .cta-eyebrow {
    font-size: 0.68rem;
    letter-spacing: 0.18em;
  }

  .cta-title {
    font-size: clamp(3.2rem, 13vw, 7rem);
    line-height: 0.92;
    margin-bottom: 1.5rem;
  }

  .cta-sub {
    font-size: 0.9rem;
    max-width: 100%;
    margin-bottom: 2.2rem;
    line-height: 1.65;
  }

  .cta-btn {
    width: 100%;
    max-width: 320px;
    padding: 1rem 2rem;
    font-size: 0.9rem;
    letter-spacing: 0.1em;
    display: block;
    margin: 0 auto;
    text-align: center;
  }
}

/* ── 11. FOOTER ──────────────────────────────────────────── */
@media (max-width: 768px) {
  .footer-main {
    grid-template-columns: 1fr;
    gap: 2rem;
    padding: 3rem 1.5rem;
    text-align: center;
  }

  .footer-brand {
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .footer-logo {
    margin-bottom: 1rem;
    justify-content: center;
  }

  .footer-logo img {
    width: 80px;
  }

  .footer-slogan {
    font-size: 0.82rem;
    max-width: 280px;
    margin: 0 auto;
    text-align: center;
  }

  .footer-divider-v {
    width: 60px;
    height: 1px;
    background: linear-gradient(to right, transparent, var(--border), transparent);
    margin: 0 auto;
  }

  .footer-contact-block {
    align-items: center;
    gap: 0.9rem;
  }

  .footer-contact-line {
    font-size: 0.82rem;
    justify-content: center;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 1rem;
    padding: 1.25rem 1.5rem;
    text-align: center;
  }

  .footer-bottom p {
    font-size: 0.7rem;
  }

  .footer-socials a {
    width: 38px;
    height: 38px;
    transform: translateX(80px);
  }
}

/* ── 12. FOGUETE SCROLL ──────────────────────────────────── */
@media (max-width: 768px) {
  .foguete-scroll {
    width: 58px;
    height: 58px;
    right: 16px;
    bottom: 18px;
  }

  .foguete-rastro {
    width: 16px;
    height: 44px;
    bottom: -26px;
  }
}

/* ── 13. SMALL PHONES (< 390px) ──────────────────────────── */
@media (max-width: 390px) {
  .hero-title {
    font-size: clamp(2.2rem, 10vw, 2.8rem);
  }

  #changing-word {
    font-size: clamp(2.2rem, 10vw, 2.8rem);
  }

  .stat-num {
    font-size: 2rem;
  }

  .stat-label {
    font-size: 0.55rem;
  }

  .services-title,
  .testimonials-title {
    font-size: clamp(2.4rem, 12vw, 3.5rem);
  }

  .cta-title {
    font-size: clamp(2.8rem, 14vw, 5rem);
  }

  section {
    padding: 3.2rem 1rem;
  }

  #services {
    padding: 3.2rem 1rem !important;
  }
}

/* ── 14. TABLET (769px → 1024px) ────────────────────────── */
@media (min-width: 769px) and (max-width: 1024px) {
  section {
    padding: 6rem 2rem;
  }

  #services {
    padding: 6rem 2rem !important;
  }

  .hero {
    padding: 110px 2rem 4rem;
  }

  .hero-title {
    font-size: clamp(5rem, 10vw, 8rem);
  }

  .about {
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
  }

  .services-grid {
    grid-template-columns: 1fr;
    gap: 1px;
  }

  .work-grid {
    grid-template-columns: 1fr 1fr;
    gap: 1.2rem;
  }

  .testimonials-grid {
    grid-template-columns: 1fr 1fr;
    gap: 1.2rem;
  }

  .testimonial-card:last-child {
    grid-column: span 2;
    max-width: 480px;
    margin: 0 auto;
    width: 100%;
  }

  .footer-main {
    padding: 3.5rem 2rem;
    gap: 3rem;
  }

  .cta-title {
    font-size: clamp(4rem, 9vw, 8rem);
  }
}

/* ── 15. iOS SAFE AREA (notch / Dynamic Island) ──────────── */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
  .foguete-scroll {
    bottom: calc(18px + env(safe-area-inset-bottom));
  }

  footer {
    padding-bottom: env(safe-area-inset-bottom);
  }
}

/* ── 16. TOUCH — remove hover-only effects on touch devices  */
@media (hover: none) and (pointer: coarse) {
  .service-card .card-img {
    opacity: 0.2;
    transform: scale(1);
  }

  .service-card::after {
    opacity: 0.5;
  }

  .work-thumb-overlay {
    opacity: 1;
  }

  .marquee-logo:hover {
    opacity: 0.4;
    filter: brightness(0) invert(1);
  }

  .footer-socials a:hover {
    border-color: var(--border);
    background: transparent;
    transform: none;
  }
}

/* ── 18. ACESSIBILIDADE — focus-visible mobile ────────────── */
@media (max-width: 768px) {
  a:focus-visible,
  button:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
    border-radius: 4px;
  }
}

@media (max-width: 768px) {

  .hero-title,
  #changing-word,
  .about-title,
  .services-title,
  .testimonials-title,
  .cta-title {
    word-break: break-word;
  }

  .hero-ticker,
  .cta-bg-text {
    overflow: hidden;
  }

  .marquee-strip {
    overflow: hidden;
  }
}