/* ============================================================================
   LANDING ENHANCEMENTS — mobile nav, FAQ, testimonials, sticky CTA, a11y
   ============================================================================ */

/* Skip link */
.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  z-index: 10001;
  padding: 0.65rem 1rem;
  background: var(--accent-teal);
  color: var(--color-black);
  font-weight: 600;
  font-size: 0.875rem;
  border-radius: 8px;
  text-decoration: none;
  transition: top var(--transition-fast);
}

.skip-link:focus-visible {
  top: 1rem;
  outline: 2px solid var(--text-primary);
  outline-offset: 2px;
}

/* Splash skip */
.splash-skip {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  padding: 0.5rem 1.25rem;
  background: transparent;
  border: 1px solid var(--border-light);
  color: var(--text-secondary);
  border-radius: 999px;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all var(--transition-fast);
  z-index: 2;
}

.splash-skip:hover,
.splash-skip:focus-visible {
  border-color: var(--accent-teal);
  color: var(--accent-teal);
  outline: none;
}

@media (prefers-reduced-motion: reduce) {
  #splash .loader,
  #splash .splash-logo,
  #splash .glitch {
    animation: none !important;
  }
}

/* Mobile nav toggle */
.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border: 1px solid var(--border-light);
  border-radius: 12px;
  background: var(--bg-secondary);
  color: var(--text-primary);
  cursor: pointer;
  pointer-events: auto;
  flex-shrink: 0;
  transition: border-color var(--transition-fast), background var(--transition-fast);
}

.nav-toggle:hover,
.nav-toggle:focus-visible {
  border-color: var(--accent-teal);
  outline: none;
}

.nav-toggle__bars {
  display: flex;
  flex-direction: column;
  gap: 5px;
  width: 18px;
}

.nav-toggle__bars span {
  display: block;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
  transition: transform var(--transition-fast), opacity var(--transition-fast);
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bars span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bars span:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bars span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

@media (max-width: 1023px) {
  .nav-toggle {
    display: none !important;
  }
}

/* Nav drawer */
.nav-backdrop {
  position: fixed;
  inset: 0;
  z-index: 998;
  background: rgba(0, 0, 0, 0.55);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-normal);
}

.nav-backdrop.is-open {
  opacity: 1;
  pointer-events: auto;
}

.nav-drawer {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 999;
  width: min(320px, 88vw);
  height: 100%;
  padding: 5rem 1.5rem 2rem;
  background: var(--bg-secondary);
  border-left: 1px solid var(--border-light);
  transform: translateX(100%);
  transition: transform var(--transition-normal);
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  overflow-y: auto;
}

.nav-drawer.is-open {
  transform: translateX(0);
}

.nav-drawer__link {
  display: block;
  padding: 0.85rem 0.5rem;
  color: var(--text-primary);
  text-decoration: none;
  font-weight: 500;
  font-size: 1.05rem;
  border-bottom: 1px solid var(--border-light);
  transition: color var(--transition-fast);
}

.nav-drawer__link:hover,
.nav-drawer__link:focus-visible {
  color: var(--accent-teal);
  outline: none;
}

.nav-drawer__cta {
  margin-top: 1.25rem;
  width: 100%;
  justify-content: center;
}

body.nav-open {
  overflow: hidden;
}

/* Sticky CTA — removido */
.sticky-cta {
  display: none !important;
}

/* Service cards clickable */
.service-card[data-service] {
  cursor: pointer;
}

.service-card[data-service]:focus-visible {
  outline: 2px solid var(--accent-teal);
  outline-offset: 3px;
}

.services-grid--four {
  grid-template-columns: 1fr;
  gap: 0.75rem;
}

@media (min-width: 640px) {
  .services-grid--four {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.875rem;
  }
}

@media (min-width: 1024px) {
  .services-grid--four {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.875rem;
  }
}

@media (min-width: 768px) {
  .services-grid--four .service-card {
    display: flex;
    flex-direction: column;
    min-height: 0;
    border-radius: 16px;
  }

  .services-grid--four .service-card__media {
    aspect-ratio: unset;
    height: 100px;
    min-height: 100px;
    max-height: 100px;
    flex-shrink: 0;
  }

  .services-grid--four .service-card__media img {
    transform: none;
  }

  .services-grid--four .service-card__body {
    display: flex;
    flex-direction: column;
    flex: 1;
    position: relative;
    padding: 0.8rem 0.85rem 2.15rem;
  }

  .services-grid--four .service-card__icon {
    width: 28px;
    height: 28px;
    font-size: 0.78rem;
    margin-bottom: 0.4rem;
    border-radius: 8px;
  }

  .services-grid--four .service-card h3 {
    font-size: 0.875rem;
    margin-bottom: 0.3rem;
    line-height: 1.2;
  }

  .services-grid--four .service-card p {
    font-size: 0.6875rem;
    line-height: 1.45;
    padding-right: 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .services-grid--four .service-card__arrow {
    position: absolute;
    right: 0.7rem;
    bottom: 0.7rem;
    width: 26px;
    height: 26px;
    font-size: 0.6rem;
    margin-top: 0;
    align-self: auto;
  }

  .services-grid--four .service-card:hover .service-card__arrow {
    transform: translateX(2px);
  }
}

@media (min-width: 1024px) {
  .services-grid--four {
    gap: 1rem;
  }

  .services-grid--four .service-card__media {
    height: 118px;
    min-height: 118px;
    max-height: 118px;
  }

  .services-grid--four .service-card__body {
    padding: 0.95rem 1rem 2.35rem;
  }

  .services-grid--four .service-card__icon {
    width: 30px;
    height: 30px;
    font-size: 0.82rem;
    margin-bottom: 0.45rem;
  }

  .services-grid--four .service-card h3 {
    font-size: 0.9375rem;
    margin-bottom: 0.35rem;
  }

  .services-grid--four .service-card p {
    font-size: 0.72rem;
    line-height: 1.5;
  }

  .services-grid--four .service-card__arrow {
    width: 28px;
    height: 28px;
    font-size: 0.62rem;
  }
}

@media (min-width: 1024px) {
  .services:has(.services-grid--four) {
    display: flex;
    align-items: center;
    min-height: calc(100svh - 4.5rem);
    padding-block: clamp(3rem, 5vh, 4rem);
    background: var(--bg-primary);
    border-bottom: 1px solid color-mix(in srgb, var(--border-color) 70%, transparent);
  }

  .services:has(.services-grid--four) .container {
    max-width: 1200px;
    margin-inline: auto;
  }

  .services:has(.services-grid--four) .services-header {
    text-align: left;
    margin-inline: 0;
    margin-bottom: 2rem;
    max-width: 720px;
  }

  .services:has(.services-grid--four) .services-subtitle {
    margin-inline: 0;
  }

  .services:has(.services-grid--four) .services-grid--four {
    max-width: none;
    margin-inline: 0;
  }

  .services:has(.services-grid--four) .services-title {
    font-size: clamp(1.85rem, 4.5vw, 2.45rem);
    margin-bottom: 0.85rem;
  }

  .services + .projects {
    padding-top: clamp(4.5rem, 8vh, 6rem);
    border-top: 1px solid color-mix(in srgb, var(--border-color) 55%, transparent);
  }
}

/* Testimonials */
.testimonials {
  padding: 5rem 0;
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-light);
  border-bottom: 1px solid var(--border-light);
}

.testimonials-eyebrow {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--accent-teal);
  margin-bottom: 0.75rem;
}

.testimonials-title {
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  font-weight: 700;
  margin-bottom: 2.5rem;
  color: var(--text-primary);
}

.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  gap: 1.25rem;
}

.testimonial-card {
  padding: 1.5rem;
  background: var(--bg-primary);
  border: 1px solid var(--border-light);
  border-radius: 16px;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.testimonial-card:hover {
  border-color: color-mix(in srgb, var(--accent-teal) 40%, var(--border-light));
}

body.light-mode .testimonial-card {
  box-shadow: var(--shadow-md);
}

.testimonial-card__quote {
  font-size: 0.95rem;
  line-height: 1.65;
  color: var(--text-secondary);
  margin-bottom: 1.25rem;
}

.testimonial-card__author {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.testimonial-card__avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--accent-teal) 18%, var(--bg-tertiary));
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--accent-teal);
  flex-shrink: 0;
}

.testimonial-card__name {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text-primary);
}

.testimonial-card__role {
  font-size: 0.8rem;
  color: var(--text-tertiary);
}

/* Landing FAQ */
.landing-faq {
  padding: 5rem 0;
  background: var(--bg-primary);
}

.landing-faq__list {
  max-width: 720px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.landing-faq__item {
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  overflow: hidden;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.07),
    0 4px 20px rgba(0, 0, 0, 0.05);
  transition:
    background 0.25s ease,
    border-color 0.25s ease,
    box-shadow 0.25s ease;
}

.landing-faq__item[open] {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.16);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    0 8px 28px rgba(0, 0, 0, 0.08);
}

body.light-mode .landing-faq__item {
  background: rgba(255, 255, 255, 0.5);
  border-color: rgba(255, 255, 255, 0.82);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.95),
    0 4px 18px rgba(15, 23, 42, 0.04);
}

body.light-mode .landing-faq__item[open] {
  background: rgba(255, 255, 255, 0.66);
  border-color: rgba(255, 255, 255, 0.95);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 1),
    0 8px 24px rgba(15, 23, 42, 0.06);
}

.landing-faq__q {
  padding: 1rem 1.25rem;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  user-select: none;
}

.landing-faq__q:hover {
  background: rgba(255, 255, 255, 0.03);
}

body.light-mode .landing-faq__q:hover {
  background: rgba(255, 255, 255, 0.35);
}

.landing-faq__q-text {
  flex: 1;
  min-width: 0;
  text-align: left;
}

.landing-faq__q::-webkit-details-marker {
  display: none;
}

.landing-faq__chevron {
  flex-shrink: 0;
  width: 7px;
  height: 7px;
  border-right: 1.5px solid rgba(255, 255, 255, 0.45);
  border-bottom: 1.5px solid rgba(255, 255, 255, 0.45);
  transform: rotate(45deg);
  margin-top: -3px;
  transition: transform 0.22s cubic-bezier(0.4, 0, 0.2, 1), margin-top 0.22s cubic-bezier(0.4, 0, 0.2, 1);
}

body.light-mode .landing-faq__chevron {
  border-right-color: rgba(15, 23, 42, 0.35);
  border-bottom-color: rgba(15, 23, 42, 0.35);
}

.landing-faq__item[open] .landing-faq__chevron {
  transform: rotate(-135deg);
  margin-top: 3px;
}

.landing-faq__item[open] .landing-faq__q {
  color: var(--text-primary);
}

.landing-faq__a {
  padding: 0 1.25rem 1rem;
  font-size: 0.925rem;
  line-height: 1.65;
  color: var(--text-secondary);
}

.landing-faq__a b {
  color: var(--text-primary);
}

/* Contact enhancements */
.contact-cta-block {
  margin-top: 2rem;
  padding: 1.5rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.07),
    0 4px 20px rgba(0, 0, 0, 0.05);
}

body.light-mode .contact-cta-block {
  background: rgba(255, 255, 255, 0.5);
  border-color: rgba(255, 255, 255, 0.82);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.95),
    0 4px 18px rgba(15, 23, 42, 0.04);
}

.contact-email {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
  color: var(--text-primary);
  text-decoration: none;
  font-weight: 500;
}

.contact-email:hover,
.contact-email:focus-visible {
  color: var(--accent-teal);
  outline: none;
}

.contact-response-time {
  font-size: 0.85rem;
  color: var(--text-tertiary);
  margin-bottom: 1rem;
}

.contact-cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.btn-contact-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  background: var(--accent-teal);
  color: var(--color-black);
  border: none;
  border-radius: 10px;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  transition: transform var(--transition-fast);
}

.btn-contact-primary:hover,
.btn-contact-primary:focus-visible {
  transform: translateY(-2px);
  outline: 2px solid var(--text-primary);
  outline-offset: 2px;
}

/* Footer links */
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  justify-content: center;
}

.footer-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.875rem;
  transition: color var(--transition-fast);
}

.footer-links a:hover,
.footer-links a:focus-visible {
  color: var(--accent-teal);
  outline: none;
}

.footer-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.75rem;
}

@media (max-width: 768px) {
  .footer-actions {
    align-items: center;
  }
}

/* Hidden dialogs must not intercept clicks (author display overrides [hidden]) */
[hidden] {
  display: none !important;
  pointer-events: none !important;
}

/* Case modal */
.case-modal[hidden] {
  visibility: hidden;
}

.case-modal {
  position: fixed;
  inset: 0;
  z-index: 10050;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.case-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
}

.case-modal__panel {
  position: relative;
  z-index: 1;
  width: min(560px, 100%);
  max-height: min(90vh, 720px);
  overflow-y: auto;
  background: var(--bg-secondary);
  border: 1px solid var(--border-light);
  border-radius: 20px;
  padding: 1.75rem;
}

body.light-mode .case-modal__panel {
  box-shadow: var(--shadow-xl);
}

.case-modal__close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 36px;
  height: 36px;
  border: 1px solid var(--border-light);
  border-radius: 10px;
  background: var(--bg-primary);
  color: var(--text-primary);
  cursor: pointer;
  font-size: 1.25rem;
  line-height: 1;
}

.case-modal__eyebrow {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--accent-teal);
  margin-bottom: 0.35rem;
}

.case-modal__title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.case-modal__role {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-bottom: 1.25rem;
}

.case-modal__section {
  margin-bottom: 1rem;
}

.case-modal__section h4 {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent-teal);
  margin-bottom: 0.35rem;
}

.case-modal__section p {
  font-size: 0.925rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.case-modal__stack {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  list-style: none;
  padding: 0;
}

.case-modal__stack li {
  padding: 0.25rem 0.65rem;
  background: var(--bg-primary);
  border: 1px solid var(--border-light);
  border-radius: 999px;
  font-size: 0.8rem;
}

.case-modal__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.25rem;
}

.case-modal__link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.65rem 1rem;
  border: 1px solid var(--border-light);
  border-radius: 10px;
  color: var(--text-primary);
  text-decoration: none;
  font-size: 0.875rem;
}

.case-modal__hire {
  flex: 1;
  min-width: 160px;
}

/* Project hire button */
.project-card__action--hire {
  background: var(--accent-teal);
  color: var(--color-black);
  border-color: transparent;
}

/* Chat success screen */
.chat-success {
  position: absolute;
  inset: 0;
  z-index: 20;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem 1.5rem;
  text-align: center;
  background: var(--bg-primary);
}

.chat-success__icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--color-success) 15%, transparent);
  color: var(--color-success);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  margin-bottom: 1rem;
}

.chat-success__title {
  font-size: 1.35rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.chat-success__desc {
  font-size: 0.925rem;
  color: var(--text-secondary);
  margin-bottom: 1.25rem;
  max-width: 280px;
}

.chat-success__steps {
  text-align: left;
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
  padding-left: 1.25rem;
  max-width: 300px;
}

.chat-success__close {
  padding: 0.75rem 1.5rem;
  background: var(--accent-teal);
  color: var(--color-black);
  border: none;
  border-radius: 12px;
  font-weight: 700;
  cursor: pointer;
}

.chat-phone:has(.chat-success:not(.hidden)) .chat-thread,
.chat-phone:has(.chat-success:not(.hidden)) .chat-composer,
.chat-phone:has(.chat-success:not(.hidden)) .chat-nav-row,
.chat-phone:has(.chat-success:not(.hidden)) .chat-progress-meta {
  visibility: hidden;
  pointer-events: none;
}

/* Legacy modal hidden */
#service-modal.legacy-hidden {
  display: none !important;
  visibility: hidden;
  pointer-events: none;
}

/* Global focus visible */
a:focus-visible,
button:focus-visible,
[tabindex="0"]:focus-visible {
  outline: 2px solid var(--accent-teal);
  outline-offset: 2px;
}

/* Light mode polish */
body.light-mode {
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 12px 28px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 20px 40px rgba(0, 0, 0, 0.12);
}

body.light-mode .nav-container {
  border-color: var(--border-color);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
}

body.light-mode .service-card,
body.light-mode .project-card {
  box-shadow: var(--shadow-md);
}

body.light-mode .services-eyebrow,
body.light-mode .projects-eyebrow,
body.light-mode .testimonials-eyebrow {
  color: color-mix(in srgb, var(--accent-teal) 85%, var(--color-gray-700));
}

/* About CV link */
.about-cv-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1.25rem;
  color: var(--accent-teal);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
}

.about-cv-link:hover,
.about-cv-link:focus-visible {
  text-decoration: underline;
  outline: none;
}

.about-differentiator {
  font-weight: 600;
  color: var(--text-primary);
}
