/*
 * Site styles: layout primitives, buttons, header, sections in page order, footer, floating button, cookie UI.
 * Mobile-first; breakpoints are Tailwind's (the original's): 640px, 768px, 1024px.
 * Values were transcribed from the Tailwind output the Base44 export compiles to, not from its class names.
 */

/* ---- Layout primitives ---- */

.container {
  max-width: 80rem;
  margin-inline: auto;
  padding-inline: 1.25rem;
}

.container--6xl {
  max-width: 72rem;
}

.container--5xl {
  max-width: 64rem;
}

.container--4xl {
  max-width: 56rem;
}

.container--3xl {
  max-width: 48rem;
}

@media (width >= 640px) {
  .container {
    padding-inline: 2rem;
  }
}

.section {
  padding-block: 5rem;
}

.section--tint {
  background: hsl(var(--secondary-hsl) / 40%);
}

.section__head {
  margin-bottom: 3.5rem;
  text-align: center;
}

.section__head--narrow {
  max-width: 48rem;
  margin-inline: auto;
}

.section__head--steps {
  margin-bottom: 4rem;
}

.section__head--faq {
  margin-bottom: 3rem;
}

@media (width >= 1024px) {
  .section {
    padding-block: 7rem;
  }
}

/* Section titles: Inter 800, 30/36 -> 36/40 -> 48/48 */
.title {
  color: var(--fg);
  font-family: var(--font-heading);
  font-size: 1.875rem;
  font-weight: 800;
  line-height: 2.25rem;
}

.title--tight {
  line-height: 1.25;
}

.title--balance {
  text-wrap: balance;
}

@media (width >= 640px) {
  .title {
    font-size: 2.25rem;
    line-height: 2.5rem;
  }
}

@media (width >= 1024px) {
  .title {
    font-size: 3rem;
    line-height: 1;
  }
}

.hl {
  color: var(--primary);
}

.lead {
  max-width: 42rem;
  margin: 1.25rem auto 0;
  color: hsl(var(--fg-hsl) / 60%);
  font-size: 1.125rem;
  line-height: 1.75rem;
}

.lead--relaxed {
  line-height: 1.625;
}

/* ---- Icons (Lucide sprite, sized per use) ---- */

.icon {
  fill: none;
  stroke: currentcolor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.icon--12 {
  width: 0.75rem;
  height: 0.75rem;
}

.icon--14 {
  width: 0.875rem;
  height: 0.875rem;
}

.icon--16 {
  width: 1rem;
  height: 1rem;
}

.icon--18 {
  width: 1.125rem;
  height: 1.125rem;
}

.icon--20 {
  width: 1.25rem;
  height: 1.25rem;
}

.icon--24 {
  width: 1.5rem;
  height: 1.5rem;
}

.icon--28 {
  width: 1.75rem;
  height: 1.75rem;
}

.icon--40 {
  width: 2.5rem;
  height: 2.5rem;
}

/* ---- Buttons ---- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border-radius: var(--radius-lg);
  font-weight: 600;
  text-align: center;
  white-space: nowrap;
  transition: all 300ms var(--ease);
}

.btn--md {
  padding: 0.75rem 1.25rem;
  font-size: 0.875rem;
  line-height: 1.25rem;
}

.btn--lg {
  padding: 0.875rem 1.75rem;
  font-size: 1rem;
  line-height: 1.5rem;
}

.btn--block {
  width: 100%;
}

.btn--primary {
  background: var(--primary);
  color: #fff;
}

.btn--primary:hover {
  background: hsl(var(--primary-hsl) / 90%);
  box-shadow: 0 20px 25px -5px hsl(var(--primary-hsl) / 25%), 0 8px 10px -6px hsl(var(--primary-hsl) / 25%);
  transform: translateY(-2px);
}

.btn--accent {
  background: var(--accent);
  color: var(--on-accent);
}

.btn--accent:hover {
  background: hsl(var(--accent-hsl) / 90%);
  box-shadow: 0 20px 25px -5px hsl(var(--accent-hsl) / 25%), 0 8px 10px -6px hsl(var(--accent-hsl) / 25%);
  transform: translateY(-2px);
}

/* The mobile-menu WhatsApp button: same green, but none of the hover lift and a plain 150ms transition. */
.btn--accent-flat {
  background: var(--accent);
  color: var(--on-accent);
  white-space: normal;
  transition: all 150ms var(--ease);
}

.btn--accent-flat:hover {
  background: hsl(var(--accent-hsl) / 90%);
}

.btn--light {
  background: #fff;
  color: var(--fg);
}

.btn--light:hover {
  background: rgb(255 255 255 / 90%);
  box-shadow: var(--shadow-xl);
  transform: translateY(-2px);
}

.btn--ghost {
  border: 2px solid rgb(255 255 255 / 40%);
  background: var(--cta-ghost-bg);
  color: #fff;
  backdrop-filter: blur(4px);
}

.btn--ghost:hover {
  background: #fff;
  color: var(--fg); /* D-pdd-P4: the original keeps the label white on white */
}

.ctas {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 2.25rem;
}

.ctas--center {
  justify-content: center;
}

@media (width >= 640px) {
  .ctas {
    flex-direction: row;
  }
}

/* ---- Header ---- */

.site-header {
  position: fixed;
  z-index: 50;
  top: 0;
  right: 0;
  left: 0;
  background: transparent;
  transition: all 300ms var(--ease);
}

.site-header.is-scrolled {
  border-bottom: 1px solid var(--border);
  background: rgb(255 255 255 / 80%);
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(16px);
}

/* No fixed height: like the original, the row is as tall as its content (72px, 76px from 1280px). */
.site-header__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: 1rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.625rem;
}

/* No flex-shrink:0 on purpose: at 1024px the original's logo box shrinks to 33px (D-pdd-P14). */
.brand__mark {
  display: block;
  width: 2.25rem;
  height: 2.25rem;
  overflow: hidden;
  border-radius: var(--radius-lg);
  box-shadow: 0 4px 6px -1px hsl(var(--primary-hsl) / 20%), 0 2px 4px -2px hsl(var(--primary-hsl) / 20%);
  transition: transform 150ms var(--ease);
}

.brand:hover .brand__mark {
  transform: scale(1.05);
}

.brand__mark picture,
.footer-brand__mark picture {
  display: block;
  width: 100%;
  height: 100%;
}

.brand__img {
  width: 100%;
  height: 100%;
  mix-blend-mode: multiply;
  object-fit: cover;
}

.brand__name {
  color: var(--fg);
  font-family: var(--font-heading);
  font-size: 1.125rem;
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.75rem;
}

.nav,
.header-cta {
  display: none;
}

.nav a {
  color: hsl(var(--fg-hsl) / 70%);
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.25rem;
  transition: color 150ms var(--ease);
}

.nav a:hover {
  color: var(--primary);
}

.icon-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border: 1px solid hsl(var(--accent-hsl) / 20%);
  border-radius: var(--radius-lg);
  color: var(--accent);
  transition: all 300ms var(--ease);
}

.icon-btn:hover {
  background: var(--accent);
  color: #fff;
}

.burger {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: var(--radius-lg);
  color: var(--fg);
  transition: color 150ms var(--ease), background-color 150ms var(--ease);
}

.burger:hover {
  background: var(--secondary);
}

.burger__open,
.burger__close {
  display: flex;
}

.burger__close {
  display: none;
}

/* Open state: the `is-open` class set by header.js, or the :target fallback without JavaScript. */
.site-header.is-open .burger__open,
.site-header:has(#menu-movil:target) .burger__open {
  display: none;
}

.site-header.is-open .burger__close,
.site-header:has(#menu-movil:target) .burger__close {
  display: flex;
}

.mobile-menu {
  display: none;
  border-top: 1px solid var(--border);
  background: #fff;
  box-shadow: var(--shadow-lg);
}

.mobile-menu:target,
.site-header.is-open .mobile-menu {
  display: block;
}

.mobile-menu nav {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 1.5rem 1.25rem;
}

.mobile-menu__link {
  padding: 0.75rem;
  border-radius: var(--radius-lg);
  color: hsl(var(--fg-hsl) / 80%);
  font-weight: 500;
  transition: color 150ms var(--ease), background-color 150ms var(--ease);
}

.mobile-menu__link:hover {
  background: var(--secondary);
  color: var(--primary);
}

.mobile-menu__ctas {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 1rem;
}

@media (width >= 1024px) {
  .nav {
    display: flex;
    align-items: center;
    gap: 2rem;
  }

  .header-cta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
  }

  .burger,
  .mobile-menu,
  .mobile-menu:target,
  .site-header.is-open .mobile-menu {
    display: none;
  }
}

/* ---- Hero ---- */

.hero {
  position: relative;
  overflow: hidden;
  padding: 8rem 0 5rem;
}

.hero__grid {
  display: grid;
  gap: 3rem;
  align-items: center;
}

.hero__copy {
  text-align: center;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  padding: 0.375rem 1rem;
  border: 1px solid hsl(var(--primary-hsl) / 15%);
  border-radius: 9999px;
  background: hsl(var(--primary-hsl) / 8%);
  color: var(--primary);
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.25rem;
}

.pill__dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 9999px;
  background: var(--accent);
  animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

.hero__title {
  color: var(--fg);
  font-size: 2.25rem;
  font-weight: 800;
  line-height: 1.1;
  text-wrap: balance;
}

.hero__lead {
  max-width: 36rem;
  margin: 1.5rem auto 0;
  color: hsl(var(--fg-hsl) / 70%);
  font-size: 1.125rem;
  line-height: 1.625;
}

.hero__ctas {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  justify-content: center;
  margin-top: 2rem;
}

.hero__note {
  margin-top: 1.5rem;
  color: var(--text-subtle);
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.25rem;
}

@media (width >= 640px) {
  .hero__title {
    font-size: 3rem;
    line-height: 1;
  }

  .hero__ctas {
    flex-direction: row;
  }
}

@media (width >= 1024px) {
  .hero {
    padding: 10rem 0 7rem;
  }

  .hero__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 4rem;
  }

  .hero__copy {
    text-align: left;
  }

  .hero__title {
    font-size: 3.5rem;
  }

  .hero__lead {
    margin-inline: 0;
    font-size: 1.25rem;
    line-height: 1.75rem;
  }

  .hero__ctas {
    justify-content: flex-start;
  }
}

/* Mockups (hero and "Asesorías"). The picture is absolutely positioned inside an inline-block span without a
   height, exactly as the Base44 <Image> renders it: the span is 0px tall and only the 26px frame shows (D-pdd-P1).
   To show the screenshot once the Base44 source is fixed, give .mockup__media `aspect-ratio: 4 / 3`. */
.mockup {
  position: relative;
}

.mockup__glow {
  position: absolute;
  inset: -1rem;
  border-radius: var(--radius-3xl);
  background-image: linear-gradient(to top right, hsl(var(--primary-hsl) / 10%), hsl(var(--accent-hsl) / 10%));
  filter: blur(40px);
}

.mockup__frame {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-2xl);
  background: #fff;
  box-shadow: 0 25px 50px -12px hsl(var(--primary-hsl) / 20%);
}

.mockup__media {
  display: inline-block;
  position: relative;
  width: 100%;
}

.mockup__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.float-card {
  display: flex;
  position: absolute;
  bottom: -1.25rem;
  left: -0.75rem;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: #fff;
  box-shadow: var(--shadow-xl);
  animation: float 3s ease-in-out infinite;
}

.float-card__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: var(--radius-lg);
  background: hsl(var(--accent-hsl) / 10%);
}

.float-card__dot {
  width: 0.75rem;
  height: 0.75rem;
  border-radius: 9999px;
  background: var(--accent);
}

.float-card__label {
  color: var(--text-subtle);
  font-size: 0.75rem;
  font-weight: 500;
  line-height: 1rem;
}

.float-card__title {
  color: var(--fg);
  font-size: 0.875rem;
  font-weight: 700;
  line-height: 1.25rem;
}

@media (width >= 640px) {
  .float-card {
    left: -1.5rem;
  }
}

/* ---- Trust bar ---- */

.trust {
  padding-block: 2.5rem;
  border-block: 1px solid var(--border);
  background: hsl(var(--secondary-hsl) / 50%);
}

.trust__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.5rem;
}

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

.trust__icon {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: #fff;
  box-shadow: var(--shadow-sm);
  color: var(--primary);
}

.trust__text {
  color: var(--fg);
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.25;
}

@media (width >= 1024px) {
  .trust__grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .trust__item {
    justify-content: center;
  }
}

/* ---- Problem ---- */

.problems {
  display: grid;
  gap: 1rem;
}

.problem {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.25rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: hsl(var(--secondary-hsl) / 60%);
  transition: all 300ms var(--ease);
}

.problem:hover {
  border-color: hsl(var(--primary-hsl) / 30%);
  background: #fff;
  box-shadow: 0 10px 15px -3px hsl(var(--primary-hsl) / 5%), 0 4px 6px -4px hsl(var(--primary-hsl) / 5%);
}

.problem__icon {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: #fff;
  color: hsl(var(--fg-hsl) / 40%);
  transition: color 150ms var(--ease), border-color 150ms var(--ease);
}

.problem:hover .problem__icon {
  border-color: hsl(var(--primary-hsl) / 30%);
  color: var(--primary);
}

.problem__title {
  color: var(--fg);
  font-weight: 600;
  line-height: 1.375;
}

.problems__closing {
  margin-top: 3rem;
  text-align: center;
}

.problems__closing p {
  display: inline-block;
  color: var(--primary);
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 800;
  line-height: 2rem;
}

@media (width >= 640px) {
  .problems {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .problems__closing p {
    font-size: 1.875rem;
    line-height: 2.25rem;
  }
}

@media (width >= 1024px) {
  .problems {
    gap: 1.25rem;
  }

  .problem {
    padding: 1.5rem;
  }

  .problem__title {
    font-size: 1.125rem;
    line-height: 1.75rem;
  }
}

/* ---- Services ---- */

.services {
  display: grid;
  gap: 1.25rem;
}

.service {
  padding: 1.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-2xl);
  background: #fff;
  transition: all 300ms var(--ease);
}

.service:hover {
  border-color: hsl(var(--primary-hsl) / 30%);
  box-shadow: 0 20px 25px -5px hsl(var(--primary-hsl) / 10%), 0 8px 10px -6px hsl(var(--primary-hsl) / 10%);
  transform: translateY(-4px);
}

.service__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 3.5rem;
  height: 3.5rem;
  margin-bottom: 1.25rem;
  border-radius: var(--radius-lg);
  background: hsl(var(--primary-hsl) / 8%);
  color: var(--primary);
  transition: all 300ms var(--ease);
}

.service:hover .service__icon {
  background: var(--primary);
  color: #fff;
  transform: scale(1.1);
}

.service__title {
  margin-bottom: 0.625rem;
  color: var(--fg);
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.75rem;
}

.service__text {
  color: hsl(var(--fg-hsl) / 60%);
  font-size: 15px;
  line-height: 1.625;
}

@media (width >= 640px) {
  .services {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

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

/* ---- Asesorías ---- */

.split {
  display: grid;
  gap: 3rem;
  align-items: center;
}

.split__lead {
  margin-top: 1.5rem;
  color: hsl(var(--fg-hsl) / 60%);
  font-size: 1.125rem;
  line-height: 1.625;
}

.chips {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  margin-top: 2rem;
}

.chip {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: hsl(var(--secondary-hsl) / 60%);
  color: var(--fg);
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.25rem;
}

.chip__dot {
  flex-shrink: 0;
  width: 0.375rem;
  height: 0.375rem;
  border-radius: 9999px;
  background: var(--accent);
}

.mockup--asesorias {
  order: -9999;
}

.mockup--asesorias .mockup__glow {
  background-image: linear-gradient(to bottom left, hsl(var(--primary-hsl) / 10%), hsl(var(--accent-hsl) / 10%));
}

.mockup--asesorias .mockup__frame {
  box-shadow: 0 25px 50px -12px hsl(var(--primary-hsl) / 15%);
}

@media (width >= 1024px) {
  .split {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 4rem;
  }

  .mockup--asesorias {
    order: 9999;
  }
}

/* ---- How it works ---- */

.steps {
  display: grid;
  position: relative;
  gap: 2rem;
}

/* Connector line behind the three step icons (desktop only). */
.steps::before {
  display: none;
  content: "";
  position: absolute;
  top: 3rem;
  right: 16%;
  left: 16%;
  height: 1px;
  background-image: linear-gradient(to right, hsl(var(--primary-hsl) / 20%), hsl(var(--primary-hsl) / 40%), hsl(var(--primary-hsl) / 20%));
}

.step {
  position: relative;
  text-align: center;
}

.step__badge {
  display: inline-flex;
  position: relative;
}

.step__icon {
  display: flex;
  position: relative;
  z-index: 10;
  align-items: center;
  justify-content: center;
  width: 6rem;
  height: 6rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-2xl);
  background: #fff;
  box-shadow: 0 10px 15px -3px hsl(var(--primary-hsl) / 10%), 0 4px 6px -4px hsl(var(--primary-hsl) / 10%);
  color: var(--primary);
}

.step__num {
  display: flex;
  position: absolute;
  z-index: 20;
  top: -0.5rem;
  right: -0.5rem;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 9999px;
  background: var(--primary);
  box-shadow: 0 4px 6px -1px rgb(0 0 0 / 10%), 0 2px 4px -2px rgb(0 0 0 / 10%);
  color: #fff;
  font-family: var(--font-heading);
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1rem;
}

.step__title {
  margin-top: 1.5rem;
  color: var(--fg);
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.75rem;
}

.step__text {
  max-width: 20rem;
  margin: 0.625rem auto 0;
  color: hsl(var(--fg-hsl) / 60%);
  line-height: 1.625;
}

@media (width >= 768px) {
  .steps {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .steps::before {
    display: block;
  }
}

@media (width >= 1024px) {
  .steps {
    gap: 1.5rem;
  }
}

/* ---- About us / comparison ---- */

.compare {
  display: grid;
  gap: 1.25rem;
  align-items: stretch;
}

.compare__card {
  padding: 1.75rem;
  border-radius: var(--radius-2xl);
}

.compare__card--diy {
  border: 1px solid var(--border);
  background: hsl(var(--secondary-hsl) / 40%);
}

.compare__card--us {
  position: relative;
  overflow: hidden;
  border: 2px solid hsl(var(--primary-hsl) / 20%);
  background: #fff;
  box-shadow: 0 20px 25px -5px hsl(var(--primary-hsl) / 10%), 0 8px 10px -6px hsl(var(--primary-hsl) / 10%);
}

.compare__glow {
  position: absolute;
  top: 0;
  right: 0;
  width: 10rem;
  height: 10rem;
  border-radius: 9999px;
  background: hsl(var(--primary-hsl) / 5%);
  filter: blur(64px);
}

/* Title and list sit above the glow, as the original's inner `relative` wrapper does. */
.compare__title,
.compare__list {
  position: relative;
}

.compare__title {
  margin-bottom: 1.5rem;
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.75rem;
}

.compare__card--diy .compare__title {
  color: hsl(var(--fg-hsl) / 50%);
}

.compare__card--us .compare__title {
  color: var(--primary);
}

.compare__list li {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.compare__card--diy li {
  color: hsl(var(--fg-hsl) / 60%);
}

.compare__card--us li {
  color: var(--fg);
}

.compare__list li + li {
  margin-top: 1rem;
}

.compare__list li > span:last-child {
  font-weight: 500;
}

.compare__card--us li > span:last-child {
  font-weight: 600;
}

.mark {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 9999px;
}

.mark--no {
  background: hsl(var(--fg-hsl) / 5%);
}

.mark--yes {
  background: hsl(var(--accent-hsl) / 15%);
  color: var(--accent);
}

.compare__closing {
  margin-top: 3rem;
  text-align: center;
}

.compare__closing p {
  color: var(--fg);
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 800;
  line-height: 2rem;
  text-wrap: balance;
}

@media (width >= 640px) {
  .compare__closing p {
    font-size: 1.875rem;
    line-height: 2.25rem;
  }
}

@media (width >= 768px) {
  .compare {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (width >= 1024px) {
  .compare {
    gap: 2rem;
  }

  .compare__card {
    padding: 2.25rem;
  }
}

/* ---- Portfolio ---- */

.projects {
  display: grid;
  gap: 1.5rem;
}

.project {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-2xl);
  background: #fff;
  transition: all 300ms var(--ease);
}

.project:hover {
  box-shadow: 0 20px 25px -5px hsl(var(--primary-hsl) / 10%), 0 8px 10px -6px hsl(var(--primary-hsl) / 10%);
  transform: translateY(-4px);
}

.project__media {
  position: relative;
  overflow: hidden;
  aspect-ratio: 3 / 2;
  background: var(--secondary);
}

.project__media picture {
  display: block;
}

.project__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.project__body {
  padding: 1.5rem;
}

.project__title {
  color: var(--fg);
  font-size: 1.125rem;
  font-weight: 700;
  line-height: 1.75rem;
}

.project__type {
  margin-top: 0.25rem;
  color: var(--primary);
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.25rem;
}

.project__services {
  margin-top: 0.5rem;
  color: var(--text-subtle);
  font-size: 0.875rem;
  line-height: 1.25rem;
}

@media (width >= 768px) {
  .projects {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* ---- Benefits ---- */

.benefits {
  display: grid;
  gap: 1.25rem;
}

.benefit {
  display: flex;
  gap: 1rem;
  padding: 1.5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transition: all 300ms var(--ease);
}

.benefit:hover {
  border-color: hsl(var(--primary-hsl) / 20%);
  background: hsl(var(--secondary-hsl) / 40%);
}

.benefit__icon {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  border-radius: var(--radius-lg);
  background: hsl(var(--primary-hsl) / 8%);
  color: var(--primary);
}

.benefit__title {
  color: var(--fg);
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.5rem;
}

.benefit__text {
  margin-top: 0.375rem;
  color: hsl(var(--fg-hsl) / 60%);
  font-size: 0.875rem;
  line-height: 1.625;
}

@media (width >= 640px) {
  .benefits {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (width >= 1024px) {
  .benefits {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* ---- Final call to action ---- */

.cta-panel {
  position: relative;
  overflow: hidden;
  padding: 4rem 1.5rem;
  border-radius: var(--radius-3xl);
  background: var(--primary);
  text-align: center;
}

.cta-panel__deco {
  position: absolute;
  z-index: 0;
  inset: 0;
  overflow: hidden;
}

.cta-panel__blob {
  position: absolute;
  border-radius: 9999px;
  filter: blur(64px);
}

.cta-panel__blob--light {
  top: 0;
  left: 0;
  width: 18rem;
  height: 18rem;
  background: rgb(255 255 255 / 10%);
  transform: translate(-33.3333%, -33.3333%);
}

.cta-panel__blob--green {
  right: 0;
  bottom: 0;
  width: 24rem;
  height: 24rem;
  background: hsl(var(--accent-hsl) / 20%);
  transform: translate(25%, 25%);
}

.cta-panel__content {
  position: relative;
}

.cta-panel .title {
  color: #fff;
}

.cta-panel__lead {
  max-width: 42rem;
  margin: 1.25rem auto 0;
  color: var(--cta-lead);
  font-size: 1.125rem;
  line-height: 1.625;
}

@media (width >= 1024px) {
  .cta-panel {
    padding: 6rem 4rem;
  }
}

/* ---- FAQ ---- */

.faq {
  padding-inline: 1.5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-2xl);
  background: #fff;
  box-shadow: var(--shadow-sm);
}

.faq__item {
  border-bottom: 1px solid var(--border);
}

.faq__q {
  margin: 0;
  font: inherit;
  letter-spacing: normal;
}

.faq__btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: 100%;
  padding-block: 1.25rem;
  text-align: left;
}

.faq__text {
  color: var(--fg);
  font-family: var(--font-heading);
  font-weight: 600;
  transition: color 150ms var(--ease);
}

.faq__btn:hover .faq__text {
  color: var(--primary);
}

.faq__icon {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border: 1px solid var(--border);
  border-radius: 9999px;
  color: var(--primary);
  transition: all 300ms var(--ease);
}

.faq__item.is-open .faq__icon {
  border-color: var(--primary);
  background: var(--primary);
  color: #fff;
  transform: rotate(45deg);
}

/* Without JavaScript every answer stays open; faq.js (class `js`) collapses all but the first. */
.faq__a {
  display: grid;
  grid-template-rows: 1fr;
  padding-bottom: 1.25rem;
  opacity: 1;
}

.faq__inner {
  overflow: hidden;
}

.faq__a p {
  padding-right: 3rem;
  color: hsl(var(--fg-hsl) / 60%);
  line-height: 1.625;
}

.js .faq__a {
  transition: all 300ms var(--ease-out);
}

.js .faq__item:not(.is-open) .faq__a {
  grid-template-rows: 0fr;
  padding-bottom: 0;
  opacity: 0;
}

.js .faq__item:not(.is-open) .faq__inner {
  visibility: hidden;
}

@media (width >= 1024px) {
  .faq {
    padding-inline: 2rem;
  }

  .faq__text {
    font-size: 1.125rem;
    line-height: 1.75rem;
  }
}

/* ---- Footer ---- */

.site-footer {
  border-top: 1px solid var(--border);
  background: var(--secondary);
}

.site-footer > .container {
  padding-block: 3.5rem;
}

.site-footer__grid {
  display: grid;
  gap: 2.5rem;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  margin-bottom: 1rem;
}

.footer-brand__mark {
  display: block;
  width: 2.25rem;
  height: 2.25rem;
  overflow: hidden;
  border-radius: var(--radius-lg);
}

.footer-brand__name {
  color: #000;
  font-family: var(--font-heading);
  font-size: 1.125rem;
  font-weight: 700;
  line-height: 1.75rem;
}

.footer__bio {
  max-width: 20rem;
  color: rgb(0 0 0 / 60%);
  font-size: 0.875rem;
  line-height: 1.625;
}

.footer__heading {
  margin-bottom: 1rem;
  color: var(--footer-subtle);
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  line-height: 1.25rem;
  text-transform: uppercase;
}

.footer__list li + li {
  margin-top: 0.625rem;
}

.footer__link {
  color: rgb(0 0 0 / 70%);
  font-size: 0.875rem;
  line-height: 1.25rem;
  transition: color 150ms var(--ease);
}

.footer__link:hover {
  color: #000;
}

.footer__cookie {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: rgb(0 0 0 / 70%);
  font-size: 0.875rem;
  line-height: 1.25rem;
  transition: color 150ms var(--ease);
}

.footer__cookie:hover {
  color: var(--primary);
}

.site-footer__bottom {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}

.site-footer__bottom p {
  color: var(--footer-subtle);
  font-size: 0.875rem;
  line-height: 1.25rem;
  text-align: center;
}

@media (width >= 640px) {
  .site-footer__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .site-footer__bottom p {
    text-align: left;
  }
}

@media (width >= 1024px) {
  .site-footer > .container {
    padding-block: 5rem;
  }

  .site-footer__grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 2rem;
  }
}

/* ---- Floating WhatsApp (below 1024px only) ---- */

.wa-float {
  display: flex;
  position: fixed;
  z-index: 50;
  right: 1.25rem;
  bottom: 1.25rem;
  align-items: center;
  justify-content: center;
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 9999px;
  background: var(--accent);
  box-shadow: 0 20px 25px -5px hsl(var(--accent-hsl) / 40%), 0 8px 10px -6px hsl(var(--accent-hsl) / 40%);
  color: #fff;
  transition: all 300ms var(--ease);
  transform: scale(1);
}

/* Hidden until the page is scrolled (floating-whatsapp.js). Without JavaScript the plain link stays visible. */
.js .wa-float:not(.is-visible) {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  transform: scale(0);
}

.wa-float__ping {
  position: absolute;
  inset: 0;
  border-radius: 9999px;
  background: var(--accent);
  opacity: 0.2;
  animation: ping 1s cubic-bezier(0, 0, 0.2, 1) infinite;
}

.wa-float__icon {
  position: relative;
  z-index: 10;
}

@media (width >= 1024px) {
  .wa-float {
    display: none;
  }
}

/* ---- Cookie banner and preferences modal ---- */

.cookie-banner {
  position: fixed;
  z-index: 60;
  right: 0;
  bottom: 0;
  left: 0;
  padding: 1rem;
}

.cookie-banner__panel {
  max-width: 64rem;
  margin-inline: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-2xl);
  background: #fff;
  box-shadow: 0 25px 50px -12px hsl(var(--primary-hsl) / 10%);
}

.cookie-banner__body {
  padding: 1.5rem;
}

.cookie-banner__body p {
  max-width: 48rem;
  color: hsl(var(--fg-hsl) / 60%);
  font-size: 0.875rem;
  line-height: 1.625;
}

.cookie-actions {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 1.25rem;
}

/* The three choices look identical (equal prominence, AEPD). */
.cookie-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  height: 3rem;
  padding-inline: 1.25rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: #fff;
  color: var(--fg);
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.25rem;
  transition: all 200ms var(--ease);
}

.cookie-btn:hover {
  background: var(--secondary);
}

.cookie-modal {
  inset: 0;
  width: 100%;
  max-width: none;
  height: 100%;
  max-height: none;
  margin: 0;
  padding: 1rem;
  overflow: visible;
  border: 0;
  background: transparent;
  color: inherit;
}

.cookie-modal[open] {
  display: flex;
  align-items: center;
  justify-content: center;
}

.cookie-modal::backdrop {
  background: transparent;
}

.cookie-modal__overlay {
  position: absolute;
  inset: 0;
  background: var(--modal-overlay);
  backdrop-filter: blur(4px);
}

.cookie-modal__panel {
  position: relative;
  width: 100%;
  max-width: 32rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-2xl);
  background: #fff;
  box-shadow: 0 25px 50px -12px rgb(0 0 0 / 25%);
}

.cookie-modal__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem;
  border-bottom: 1px solid var(--border);
}

.cookie-modal__head h2 {
  color: var(--fg);
  font-size: 1.125rem;
  font-weight: 700;
  line-height: 1.75rem;
}

.cookie-modal__close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: var(--radius-lg);
  color: hsl(var(--fg-hsl) / 50%);
  transition: color 150ms var(--ease), background-color 150ms var(--ease);
}

.cookie-modal__close:hover {
  background: var(--secondary);
}

.cookie-modal__body {
  max-height: 60vh;
  padding: 1.5rem;
  overflow-y: auto;
}

.cookie-modal__body > * + * {
  margin-top: 1.25rem;
}

.cookie-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.cookie-row__title {
  color: var(--fg);
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.25rem;
}

.cookie-row__text {
  margin-top: 0.25rem;
  color: var(--text-subtle);
  font-size: 0.75rem;
  line-height: 1.625;
}

.cookie-badge {
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem 0.625rem;
  border-radius: 9999px;
  background: hsl(var(--accent-hsl) / 10%);
  color: var(--badge-on-tint);
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1rem;
}

.cookie-modal__divider {
  border-top: 1px solid var(--border);
}

.switch {
  position: relative;
  flex-shrink: 0;
  width: 3rem;
  height: 1.75rem;
  border-radius: 9999px;
  background: var(--border);
  transition: background-color 150ms var(--ease);
}

.switch[aria-checked="true"] {
  background: var(--primary);
}

.switch__knob {
  position: absolute;
  top: 0.25rem;
  left: 0.25rem;
  width: 1.25rem;
  height: 1.25rem;
  border-radius: 9999px;
  background: #fff;
  box-shadow: 0 1px 3px 0 rgb(0 0 0 / 10%), 0 1px 2px -1px rgb(0 0 0 / 10%);
  transition: transform 150ms var(--ease);
}

.switch[aria-checked="true"] .switch__knob {
  transform: translateX(1.25rem);
}

.cookie-modal__foot {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 1.5rem;
  border-top: 1px solid var(--border);
}

@media (width >= 640px) {
  .cookie-banner {
    padding: 1.5rem;
  }

  .cookie-actions,
  .cookie-modal__foot {
    flex-direction: row;
  }
}

@media (width >= 1024px) {
  .cookie-banner__body {
    padding: 1.75rem;
  }
}

/* ---- Reduced motion: the infinite decorations stop on their first frame (what the original shows frozen) ---- */

@media (prefers-reduced-motion: reduce) {
  .pill__dot,
  .float-card,
  .wa-float__ping {
    animation: none;
  }
}
