/* Mobile-first responsive layer */
:root {
  --page-padding: clamp(1rem, 4vw, 1.25rem); /* 16-20px */
  --section-gap: clamp(10rem, 28vw, 16rem);
  --section-padding-block: clamp(1.25rem, 5vw, 2.25rem);
  --header-offset: 96px;
  --bg-offset-y: 0px;
}

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

body {
  font-size: clamp(1rem, 1.6vw, 1.125rem);
  background-color: var(--bg);
  background-image:
    linear-gradient(180deg, rgba(248, 240, 234, 0.28) 0%, rgba(232, 236, 244, 0.26) 100%),
    linear-gradient(120deg, rgba(183, 52, 43, 0.1), rgba(218, 180, 129, 0.08)),
    url("isis-mobile.jpg");
  background-position: center top, center top, center var(--bg-offset-y);
  background-size: auto, auto, 100% auto;
  background-repeat: no-repeat, no-repeat, repeat-y;
  background-attachment: scroll;
}

img,
video,
iframe {
  max-width: 100%;
  height: auto;
}

video,
iframe {
  display: block;
}

.section-content {
  width: 100%;
  max-width: 68.75rem; /* 1100px */
  padding: 0 var(--page-padding);
}

.hero.section-content {
  max-width: 75rem; /* 1200px */
}

.page {
  padding: 0 0 4rem;
}

header {
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.75rem var(--page-padding) 1rem;
}

header nav {
  font-size: clamp(0.95rem, 2.4vw, 1rem);
}

.brand > div > div:first-child {
  font-size: clamp(1.1rem, 4vw, 1.4rem);
}

.nav-toggle-label {
  display: inline-flex;
  width: 44px;
  height: 44px;
}

.nav-toggle-label:focus-visible {
  outline: 2px solid rgba(var(--primary-rgb), 0.55);
  outline-offset: 2px;
}

nav {
  width: 100%;
  font-size: clamp(0.95rem, 2.4vw, 1rem);
  gap: 0.25rem;
  flex-direction: column;
  align-items: stretch;
  flex-basis: 100%;
  max-height: 0;
  opacity: 0;
  pointer-events: none;
  overflow: hidden;
  padding-top: 0;
  border-top: 1px solid transparent;
  transition: max-height 0.25s ease, opacity 0.2s ease;
}

nav a {
  width: 100%;
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 0.65rem 0.85rem;
}

.nav-toggle:checked + .nav-toggle-label + nav {
  max-height: 70vh;
  opacity: 1;
  pointer-events: auto;
  padding-top: 0.5rem;
  border-top-color: rgba(0, 0, 0, 0.08);
}

.nav-toggle:checked + .nav-toggle-label span {
  background: transparent;
}

.nav-toggle:checked + .nav-toggle-label span::before {
  top: 0;
  transform: rotate(45deg);
}

.nav-toggle:checked + .nav-toggle-label span::after {
  top: 0;
  transform: rotate(-45deg);
}

main {
  gap: var(--section-gap);
  padding-top: clamp(5rem, 16vw, 8rem);
}

section {
  scroll-margin-top: var(--header-offset);
}

main > section {
  padding: var(--section-padding-block) 0;
}

h1 {
  font-size: clamp(1.9rem, 7vw, 2.6rem);
}

h2 {
  font-size: clamp(1.5rem, 5.5vw, 2rem);
}

h3 {
  font-size: clamp(1.2rem, 4.5vw, 1.45rem);
}

.hero,
.about,
.contact,
.services,
.testimonials {
  grid-template-columns: 1fr;
}

.hero {
  gap: 1.5rem;
  overflow: hidden;
}

.hero::before {
  inset: -16px;
}

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

.actions .button,
.actions .ghost {
  width: 100%;
}

.button,
.ghost,
nav a,
.nav-toggle-label {
  min-height: 44px;
}

form {
  padding: 1.125rem;
  gap: 0.75rem;
}

input,
textarea {
  font-size: 1rem;
  min-height: 44px;
}

textarea {
  min-height: 9rem;
}

form .button {
  width: 100%;
}

footer {
  margin-top: 2rem;
  padding: 1rem;
  font-size: clamp(0.95rem, 2.2vw, 1rem);
}

/* <= 480px (mobile pequeno): base */

/* 481-768px (tablet) */
@media (min-width: 481px) {
  :root {
    --page-padding: clamp(1.25rem, 3.5vw, 1.5rem);
    --section-gap: clamp(6rem, 10vw, 8rem);
  }

  .actions .button,
  .actions .ghost {
    width: auto;
  }

  form .button {
    width: auto;
  }

  .services,
  .testimonials {
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  }
}

/* 769-1024px (small desktop) */
@media (min-width: 769px) {
  body {
    background-image:
      linear-gradient(180deg, rgba(248, 240, 234, 0.28) 0%, rgba(232, 236, 244, 0.26) 100%),
      linear-gradient(120deg, rgba(183, 52, 43, 0.1), rgba(218, 180, 129, 0.08)),
      url("isis.jpg");
    background-position: center top, center top, center var(--bg-offset-y);
    background-size: auto, auto, min(100%, 1600px) auto;
    background-repeat: no-repeat, no-repeat, repeat-y;
    background-attachment: scroll;
  }

  header {
    padding: 1rem clamp(1.5rem, 3vw, 2rem) 1.25rem;
  }

  .nav-toggle-label {
    display: none;
  }

  nav {
    width: auto;
    flex-direction: row;
    align-items: center;
    max-height: none;
    opacity: 1;
    pointer-events: auto;
    overflow: visible;
    padding-top: 0;
    border-top: 0;
    gap: 1rem;
  }

  nav a {
    width: auto;
  }

  main {
    padding-top: clamp(7rem, 12vw, 10rem);
  }

  :root {
    --header-offset: 120px;
  }

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

  .hero {
    overflow: visible;
  }

  .hero::before {
    inset: -28px -22px;
  }

  .services,
  .testimonials {
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  }
}

/* >= 1025px (desktop) */
@media (min-width: 1025px) {
  :root {
    --page-padding: clamp(1.75rem, 2vw, 2.25rem);
    --section-gap: clamp(8rem, 14vw, 12rem);
  }

  header {
    padding: 1rem clamp(2rem, 3vw, 2.5rem) 1.5rem;
  }

  header nav {
    font-size: 1.05rem;
  }

  nav {
    gap: 1.125rem;
  }

  .hero {
    gap: 2rem;
  }

  main {
    padding-top: clamp(8rem, 12vw, 12rem);
  }
}
