/* ==========================================================================
   Home Care Day — Página de Vendas 1
   Single stylesheet com cascade controlada via @layer.
   Stack: vanilla CSS3, sem build step, sem framework.
   ========================================================================== */

@layer reset, tokens, layout, components, responsive;

/* ==========================================================================
   Layer 1 — RESET (modern minimal)
   ========================================================================== */
@layer reset {
  *,
  *::before,
  *::after {
    box-sizing: border-box;
  }

  html, body {
    margin: 0;
    padding: 0;
  }

  body {
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
  }

  img,
  picture,
  video {
    display: block;
    max-width: 100%;
    height: auto;
  }

  h1, h2, h3, h4, h5, h6 {
    margin: 0;
    text-wrap: balance;
  }

  p {
    margin: 0;
    text-wrap: pretty;
  }

  ul,
  ol {
    list-style: none;
    padding: 0;
    margin: 0;
  }

  button,
  input,
  select,
  textarea {
    font: inherit;
    color: inherit;
  }

  a {
    color: inherit;
    text-decoration: none;
  }
}

/* ==========================================================================
   Layer 2 — TOKENS (design tokens, single source of truth)
   ========================================================================== */
@layer tokens {
  :root {
    /* === Cores === */
    --color-bg-primary: #0A1830;
    --color-bg-secondary: #0F2240;
    --color-bg-elevated: #13294A;

    --color-accent-gold: #D4AF7A;
    --color-accent-gold-light: #E5C28C;
    --color-accent-gold-deep: #B8915C;
    --color-accent-gold-soft: rgba(212, 175, 122, 0.12);

    --color-text-primary: #F5F1E8;
    --color-text-muted: #A8B0C0;
    --color-text-on-gold: #0A1830;

    --color-border-subtle: rgba(212, 175, 122, 0.12);
    --color-border-strong: rgba(212, 175, 122, 0.30);

    --color-shadow-gold: rgba(212, 175, 122, 0.35);
    --color-shadow-gold-hover: rgba(212, 175, 122, 0.50);

    /* === Gradientes === */
    --gradient-cta: linear-gradient(135deg, var(--color-accent-gold-light), var(--color-accent-gold-deep));
    --gradient-text-gold: linear-gradient(135deg, var(--color-accent-gold-light), var(--color-accent-gold));
    --gradient-halo: radial-gradient(circle at center, rgba(212, 175, 122, 0.25) 0%, transparent 70%);
    --gradient-bg-radial: radial-gradient(ellipse at top right, rgba(212, 175, 122, 0.06) 0%, transparent 50%);

    /* === Tipografia === */
    --font-heading: 'Manrope', 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
    --font-body: var(--font-heading);

    --fs-h1: clamp(2rem, 6vw, 3.75rem);
    --fs-h2: clamp(1.75rem, 4.5vw, 3rem);
    --fs-h3: clamp(1.25rem, 3vw, 1.75rem);
    --fs-display: clamp(2.5rem, 8vw, 4.5rem);
    --fs-body-large: clamp(1.125rem, 2.5vw, 1.25rem);
    --fs-body: clamp(1rem, 2vw, 1.125rem);
    --fs-body-small: 0.875rem;
    --fs-tiny: 0.75rem;

    /* === Spacing === */
    --space-3xs: 0.25rem;
    --space-2xs: 0.5rem;
    --space-xs: 0.75rem;
    --space-sm: 1rem;
    --space-md: 1.5rem;
    --space-lg: 2rem;
    --space-xl: 3rem;
    --space-2xl: 4.5rem;
    --space-3xl: 6rem;
    --space-4xl: 8rem;

    /* === Radius === */
    --radius-sm: 0.5rem;
    --radius-md: 0.75rem;
    --radius-lg: 1rem;
    --radius-xl: 1.5rem;
    --radius-pill: 999px;

    /* === Duration & easing === */
    --duration-fast: 100ms;
    --duration-base: 200ms;
    --duration-medium: 400ms;
    --easing-standard: cubic-bezier(0.4, 0, 0.2, 1);
    --easing-out: cubic-bezier(0, 0, 0.2, 1);
  }
}

/* ==========================================================================
   Layer 3 — LAYOUT (containers, sections)
   ========================================================================== */
@layer layout {
  body {
    background: var(--color-bg-primary);
    background-image: var(--gradient-bg-radial);
    background-attachment: fixed;
    color: var(--color-text-primary);
    font-family: var(--font-body);
    font-size: var(--fs-body);
    line-height: 1.55;
    font-weight: 500;
  }

  .container {
    width: 100%;
    max-width: 1200px;
    margin-inline: auto;
    padding-inline: clamp(1rem, 5vw, 3rem);
  }

  .section {
    padding-block: clamp(3rem, 8vw, 6rem);
  }
}

/* ==========================================================================
   Layer 4 — COMPONENTS (atoms, molecules, organisms)
   ========================================================================== */
@layer components {

  /* ---------- Atom: cta-button ---------- */
  .cta-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2xs);
    min-height: 56px;
    padding: clamp(1rem, 3vw, 1.25rem) clamp(1.5rem, 5vw, 2rem);
    border: 0;
    border-radius: var(--radius-md);
    font-family: var(--font-body);
    font-weight: 700;
    font-size: clamp(1rem, 2.5vw, 1.125rem);
    line-height: 1.2;
    text-decoration: none;
    cursor: pointer;
    user-select: none;
    background: var(--gradient-cta);
    color: var(--color-text-on-gold);
    box-shadow: 0 4px 12px var(--color-shadow-gold);
    transition: transform var(--duration-base) var(--easing-standard),
                box-shadow var(--duration-base) var(--easing-standard);
  }

  .cta-button:focus-visible {
    outline: 2px solid var(--color-accent-gold);
    outline-offset: 4px;
  }

  .cta-button:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px var(--color-shadow-gold);
    transition-duration: var(--duration-fast);
  }

  .cta-button--full {
    width: 100%;
  }

  .cta-button__icon {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
  }

  /* ---------- Atom: badge ---------- */
  .badge {
    display: inline-flex;
    /* Mobile: 2 linhas (column). Tablet+: linha única (row). */
    flex-direction: column;
    align-items: center;
    padding: var(--space-2xs) var(--space-sm);
    border: 1px solid var(--color-border-strong);
    border-radius: var(--radius-pill);
    background: rgba(212, 175, 122, 0.05);
    color: var(--color-accent-gold);
    font-weight: 600;
    font-size: var(--fs-tiny);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    text-align: center;
    line-height: 1.3;
  }

  .badge__sep {
    /* Separador "·" — escondido em mobile (badge quebra em 2 linhas), visível em tablet+ */
    display: none;
  }

  /* ---------- Atom: headline ---------- */
  .headline {
    font-family: var(--font-heading);
    color: var(--color-text-primary);
    text-wrap: balance;
  }

  .headline--h1 {
    font-size: var(--fs-h1);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.02em;
  }

  .headline--h2 {
    font-size: var(--fs-h2);
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.015em;
  }

  .headline--h3 {
    font-size: var(--fs-h3);
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: -0.01em;
  }

  .headline--display {
    font-size: var(--fs-display);
    font-weight: 900;
    line-height: 1.0;
    letter-spacing: -0.03em;
  }

  .headline strong {
    color: var(--color-accent-gold);
    font-weight: 800;
  }

  /* ---------- Organism: hero (Dobra 1) ---------- */
  .hero {
    position: relative;
    background: var(--color-bg-primary);
    /* Padding-top simétrico ao bottom: respiro igual em cima e embaixo */
    padding-block: clamp(3rem, 8vw, 6rem);
    overflow: hidden; /* limita o background-image às bordas */
    isolation: isolate;
  }

  .hero__bg {
    position: absolute;
    inset: 0;
    z-index: -1;
  }

  .hero__bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center right;
  }

  /* Overlay escuro para contraste do texto */
  .hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg,
      rgba(10, 24, 48, 0.85) 0%,
      rgba(10, 24, 48, 0.55) 50%,
      rgba(10, 24, 48, 0.40) 100%);
    z-index: -1;
    pointer-events: none;
  }

  .hero .container {
    display: flex;
    flex-direction: column;
    /* Gap unificado: 1.25rem (~20px) entre logo e bloco de texto */
    gap: 1.25rem;
    align-items: center; /* MOBILE default: tudo centralizado */
    text-align: center;
  }

  .hero__logo img {
    /* Mobile: 192px (era 320px, -40%) */
    width: 192px;
    height: auto;
    max-width: 100%;
  }

  .hero__content {
    display: flex;
    flex-direction: column;
    /* Gap unificado: 1.25rem (~20px) entre badge / h1 / subtitle / CTA */
    gap: 1.25rem;
    max-width: 60ch;
    align-items: center; /* MOBILE: centralizado; desktop sobrescreve */
  }

  .hero__subtitle {
    font-size: var(--fs-body-large);
    font-weight: 500;
    line-height: 1.55;
    color: var(--color-text-primary);
  }

  .hero__subtitle strong {
    font-weight: 700;
    color: var(--color-text-primary);
  }

  /* ---------- Organism: investimento (Dobra 5) ---------- */
  .investimento {
    background: var(--color-bg-primary);
    text-align: center;
  }

  .investimento__container {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 640px;
    margin-inline: auto;
  }

  /* ---------- Animated gradient border card ---------- */
  /* Técnica: container com conic-gradient rotativo no ::before, que aparece pelas bordas via padding + bg interno opaco. */
  .investimento__card {
    position: relative;
    width: 100%;
    border-radius: var(--radius-xl);
    padding: 3px; /* espessura da borda */
    overflow: hidden;
    isolation: isolate; /* garante que ::before fique atrás do conteúdo */
  }

  .investimento__card::before {
    content: '';
    position: absolute;
    inset: -50%;
    z-index: -1;
    background: conic-gradient(
      from 0deg,
      transparent 0deg,
      var(--color-accent-gold-light) 60deg,
      var(--color-accent-gold) 120deg,
      var(--color-accent-gold-deep) 180deg,
      var(--color-accent-gold) 240deg,
      var(--color-accent-gold-light) 300deg,
      transparent 360deg
    );
    animation: investimento-border-rotate 8s linear infinite;
  }

  @keyframes investimento-border-rotate {
    to { transform: rotate(360deg); }
  }

  .investimento__card-inner {
    position: relative;
    background-color: var(--color-bg-secondary);
    background-image: url('../images/cta-bg.webp');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    border-radius: calc(var(--radius-xl) - 3px);
    padding: clamp(1.5rem, 5vw, 2.5rem);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-md);
    overflow: hidden;
  }

  /* Overlay escuro sobre o bg-image para contraste do texto */
  .investimento__card-inner::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(15, 34, 64, 0.55), rgba(10, 24, 48, 0.85));
    pointer-events: none;
  }

  .investimento__card-inner > * {
    position: relative;
    z-index: 1;
  }

  .investimento__card-title {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: var(--fs-h3);
    line-height: 1.2;
    color: var(--color-text-primary);
    letter-spacing: -0.01em;
  }

  .investimento__card-title strong {
    color: var(--color-accent-gold);
    font-weight: 800;
  }

  .investimento__benefits {
    display: flex;
    flex-direction: column;
    gap: var(--space-2xs);
    align-items: flex-start;
    text-align: left;
    width: 100%;
    margin-inline: auto;
  }

  .investimento__benefits .bullet-check {
    color: var(--color-text-primary);
    /* Fonte ajustada para caber em 1 linha em mobile sem quebra */
    font-size: clamp(0.875rem, 2.2vw, 1rem);
    /* Whitespace tolerante: deixa quebrar apenas em mobile muito pequeno se preciso */
    line-height: 1.4;
  }

  .investimento__date-badge {
    margin-top: var(--space-2xs);
    /* Garante centralização do badge dentro do card */
    align-self: center;
    text-align: center;
  }

  .investimento__price {
    display: flex;
    flex-direction: column;
    gap: var(--space-2xs);
    align-items: center;
  }

  .investimento__price-prefix {
    font-size: var(--fs-body-large);
    font-weight: 600;
    color: var(--color-text-primary);
  }

  .investimento__price-value {
    font-family: var(--font-heading);
    font-size: var(--fs-display);
    font-weight: 900;
    line-height: 1.0;
    letter-spacing: -0.03em;
    background: var(--gradient-text-gold);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
  }

  @supports not ((background-clip: text) or (-webkit-background-clip: text)) {
    .investimento__price-value {
      background: none;
      color: var(--color-accent-gold);
    }
  }

  /* ---------- Footer ---------- */
  .footer {
    padding-block: var(--space-lg);
    text-align: center;
    background: var(--color-bg-primary);
  }

  .footer p {
    font-size: var(--fs-tiny);
    /* var(--color-text-muted) #A8B0C0 sobre #0A1830 = ~8.3:1 (passa AA 4.5:1 com folga) */
    color: var(--color-text-muted);
  }

  /* ===========================================================================
     DOBRA 2 — Oceano de Oportunidades (carrossel)
     =========================================================================== */
  .oceano {
    background: var(--color-bg-primary);
  }

  .oceano .container {
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
    align-items: center;
  }

  .oceano__title {
    text-align: center;
    max-width: 22ch;
  }

  .oceano__caption {
    text-align: center;
    max-width: 60ch;
    color: var(--color-text-primary);
    /* Aumentado de --fs-body (~16-18px) para --fs-body-large (~18-20px clamp) */
    font-size: var(--fs-body-large);
    line-height: 1.55;
  }

  .oceano__caption strong {
    color: var(--color-accent-gold);
    font-weight: 700;
  }

  /* ---------- Organism: carousel ---------- */
  .carousel {
    position: relative;
    width: 100%;
    max-width: 800px;
    background: var(--color-bg-secondary);
    border: 1px solid var(--color-border-subtle);
    border-radius: var(--radius-lg);
    padding: var(--space-md);
  }

  /* Focus visible no carousel root (tabindex=0 para keyboard nav direto via Tab) */
  .carousel:focus-visible {
    outline: 2px solid var(--color-accent-gold);
    outline-offset: 4px;
  }

  .carousel__viewport {
    overflow: hidden;
    border-radius: var(--radius-md);
  }

  .carousel__track {
    display: flex;
    transition: transform var(--duration-medium) var(--easing-standard);
    will-change: transform;
  }

  .carousel__slide {
    flex: 0 0 100%;
    min-width: 0;
    aspect-ratio: 4 / 3;
    background: var(--color-bg-primary);
    display: grid;
    place-items: center;
  }

  .carousel__slide img {
    width: 100%;
    height: 100%;
    object-fit: contain;
  }

  .carousel__arrow {
    display: none;
    position: absolute;
    top: calc(50% - 24px);
    width: 48px;
    height: 48px;
    border: 0;
    border-radius: 50%;
    background: var(--color-bg-primary);
    color: var(--color-accent-gold);
    cursor: pointer;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    z-index: 1;
  }

  .carousel__arrow:focus-visible {
    outline: 2px solid var(--color-accent-gold);
    outline-offset: 2px;
  }

  .carousel__arrow--prev { left: calc(var(--space-md) + 8px); }
  .carousel__arrow--next { right: calc(var(--space-md) + 8px); }

  .carousel__dots {
    display: flex;
    justify-content: center;
    gap: var(--space-md);
    margin-top: var(--space-md);
    padding: var(--space-2xs) 0;
  }

  .carousel__dot {
    position: relative;
    width: 12px;
    height: 12px;
    border: 0;
    padding: 0;
    border-radius: 50%;
    background: var(--color-accent-gold-deep);
    opacity: 0.5;
    cursor: pointer;
    transition: opacity var(--duration-base) var(--easing-standard),
                transform var(--duration-base) var(--easing-standard),
                background-color var(--duration-base) var(--easing-standard);
  }

  /* Touch target invisível 48x48 (WCAG / mobile) sem alterar o visual de 12px */
  .carousel__dot::before {
    content: '';
    position: absolute;
    inset: -18px;
  }

  .carousel__dot[aria-selected="true"] {
    background: var(--color-accent-gold);
    opacity: 1;
    transform: scale(1.2);
  }

  .carousel__dot:focus-visible {
    outline: 2px solid var(--color-accent-gold);
    outline-offset: 4px;
    opacity: 1;
  }

  /* ===========================================================================
     DOBRA 3 — Como Funciona / Para Quem É
     =========================================================================== */
  .como-funciona {
    background: var(--color-bg-primary);
  }

  .como-funciona .container {
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
    align-items: center;
  }

  .como-funciona__title {
    text-align: center;
    max-width: 26ch;
  }

  .como-funciona__grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-md);
    width: 100%;
  }

  /* ---------- Molecule: card ---------- */
  .card {
    background: var(--color-bg-secondary);
    border: 1px solid var(--color-border-subtle);
    border-radius: var(--radius-lg);
    padding: var(--space-md);
  }

  .card__title {
    color: var(--color-accent-gold);
    margin-bottom: var(--space-2xs);
  }

  .card__divider {
    width: 60px;
    height: 1px;
    background: rgba(212, 175, 122, 0.20);
    margin-block: var(--space-sm) var(--space-md);
  }

  /* ---------- Molecule: bullet-list / atom: bullet-check ---------- */
  .bullet-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
  }

  .bullet-check {
    display: flex;
    align-items: flex-start;
    gap: var(--space-sm);
    color: var(--color-text-primary);
    font-weight: 500;
    line-height: 1.6;
  }

  .bullet-check__icon {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    margin-top: 0.2em;
    stroke: var(--color-accent-gold);
    color: var(--color-accent-gold);
  }

  .bullet-check strong {
    font-weight: 700;
    color: var(--color-accent-gold);
  }

  /* ===========================================================================
     DOBRA 4 — Bio Mancussi
     =========================================================================== */
  .bio {
    background: var(--color-bg-primary);
  }

  .bio .container {
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
  }

  .bio__title {
    text-align: center;
  }

  .bio__card {
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
    align-items: center;
  }

  .bio__photo {
    width: min(280px, 80%);
  }

  .bio__photo img {
    width: 100%;
    aspect-ratio: 4 / 5;
    object-fit: cover;
    border: 2px solid var(--color-accent-gold);
    border-radius: var(--radius-md);
    box-shadow: 0 8px 24px rgba(212, 175, 122, 0.15);
  }

  .bio__name {
    color: var(--color-accent-gold);
    margin-bottom: var(--space-sm);
  }

  .bio__content {
    text-align: center;
  }

  .bio__content p {
    color: var(--color-text-primary);
    font-weight: 500;
    line-height: 1.7;
    margin-bottom: var(--space-2xs);
  }

  .bio__content .cta-button {
    margin-top: var(--space-md);
  }

  /* ==========================================================================
     Form popup (overlay + iframe FullFunnel) — Story 1.8
     Modal full-screen mobile, container central desktop.
     ========================================================================== */
  .form-popup-overlay {
    position: fixed;
    inset: 0;
    background: rgba(10, 24, 48, 0.85);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(0.5rem, 2vw, 1.5rem);
  }

  .form-popup-overlay[hidden] {
    display: none;
  }

  .form-popup-container {
    position: relative;
    width: 100%;
    max-width: 600px;
    height: 100%;
    max-height: 95vh;
    background: #FFF;
    border-radius: var(--radius-md);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4);
  }

  .form-popup-close {
    position: absolute;
    top: 8px;
    right: 12px;
    background: rgba(0, 0, 0, 0.12);
    color: #1a1a1a;
    border: 0;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: background var(--duration-base) var(--easing-standard);
  }

  .form-popup-close:hover {
    background: rgba(0, 0, 0, 0.22);
  }

  .form-popup-close:focus-visible {
    outline: 2px solid var(--color-accent-gold);
    outline-offset: 2px;
  }

  .form-popup-iframe {
    width: 100%;
    height: 100%;
    border: 0;
    flex: 1;
  }

  /* ==========================================================================
     Modifier: hero__headline--combined (PV1 — Story 1.8)
     Frase única com tamanho intermediário entre H1 e subtitle.
     ~80% do font-size do H1 base para acomodar copy mais longa sem quebrar grid.
     ========================================================================== */
  .hero__headline--combined {
    font-size: clamp(1.5rem, 4.5vw, 2.75rem);
    line-height: 1.3;
    max-width: 60ch;
  }

  /* ==========================================================================
     Atom: thank-you (página /obrigado) — Story 1.6
     Layout viewport-fill, sem scroll. Reusa cta-button base + 2 variants novos.
     ========================================================================== */
  .thank-you {
    min-height: 100vh;
    min-height: 100dvh; /* iOS dynamic viewport (suporta browser chrome) */
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-md) clamp(1rem, 4vw, 2rem) calc(var(--space-md) + env(safe-area-inset-bottom));
    background: var(--color-bg-primary);
    background-image: var(--gradient-bg-radial);
  }

  .thank-you__card {
    width: 100%;
    max-width: 560px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: clamp(1rem, 3vw, 1.5rem);
  }

  .thank-you__logo {
    width: clamp(220px, 60vw, 320px);
    margin-bottom: var(--space-2xs);
  }

  .thank-you__logo img,
  .thank-you__logo picture {
    width: 100%;
    height: auto;
    display: block;
  }

  .thank-you__headline {
    font-size: clamp(1.5rem, 4.5vw, 2.25rem);
    line-height: 1.2;
    color: var(--color-text-primary);
    margin: 0;
  }

  .thank-you__subtitle {
    font-size: var(--fs-body);
    line-height: 1.5;
    color: var(--color-text-muted);
    max-width: 480px;
    margin: 0;
  }

  .thank-you__ctas {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
    width: 100%;
    margin-top: var(--space-2xs);
  }

  /* CTA primário verde WhatsApp — sobrescreve apenas background/shadow do .cta-button base */
  .cta-button--whatsapp {
    background: linear-gradient(135deg, #25D366, #128C7E);
    color: #FFF;
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.35);
  }

  /* CTA secundário vermelho de suporte — variant "escape" */
  .cta-button--support {
    background: linear-gradient(135deg, #DC2626, #991B1B);
    color: #FFF;
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.30);
  }

  .cta-button__icon--whatsapp {
    width: 22px;
    height: 22px;
    flex-shrink: 0;
  }
}

/* ==========================================================================
   Layer 5 — RESPONSIVE (breakpoints + a11y motion)
   ========================================================================== */
@layer responsive {

  /* Reduced motion — desabilita animações decorativas */
  @media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
      animation-duration: 0.01ms !important;
      animation-iteration-count: 1 !important;
      transition-duration: 0.01ms !important;
      scroll-behavior: auto !important;
    }

    /* Gradient border do card investimento: borda dourada estática (não gira) */
    .investimento__card::before {
      animation: none;
      background: linear-gradient(135deg, var(--color-accent-gold-light), var(--color-accent-gold-deep));
    }
  }

  /* Hover state apenas em devices com hover real (mouse) */
  @media (hover: hover) {
    .cta-button:hover {
      transform: translateY(-2px);
      box-shadow: 0 8px 20px var(--color-shadow-gold-hover);
    }
  }

  /* Tablet */
  @media (min-width: 768px) {
    .hero__logo img {
      width: 400px;
    }

    /* Badge volta para linha única em tablet+ */
    .badge {
      flex-direction: row;
      gap: 0.5em;
    }
    .badge__sep {
      display: inline;
    }
  }

  /* Desktop — hero alinhado à esquerda; foto Mancussi vem do bg-image */
  @media (min-width: 1024px) {
    .hero__logo img {
      width: 440px;
    }

    .hero .container {
      align-items: flex-start;
      text-align: left;
      max-width: 1200px;
      /* Limita coluna de texto à metade esquerda para não sobrepor a foto */
    }

    .hero__content {
      align-items: flex-start;
      text-align: left;
      max-width: 56ch;
    }

    /* Reserva espaço à direita: a foto Mancussi vem do bg-image (lado direito) */
    .hero__logo,
    .hero__content {
      max-width: 58%;
    }

    /* Dobra 3 — 2 cards lado a lado */
    .como-funciona__grid {
      grid-template-columns: 1fr 1fr;
      gap: var(--space-lg);
    }

    .card {
      padding: var(--space-lg);
    }

    /* Dobra 4 — split horizontal foto/texto, mas H2 mantém centralizado */
    .bio__card {
      display: grid;
      grid-template-columns: 4fr 8fr;
      gap: var(--space-2xl);
      align-items: center;
    }

    .bio__photo {
      width: 100%;
      max-width: 400px;
    }

    .bio__content {
      text-align: left;
    }
    /* .bio__title mantém o text-align: center default — não sobrescrever em desktop */
  }

  /* Setas do carrossel: visível apenas em hover-capable + desktop */
  @media (hover: hover) and (min-width: 1024px) {
    .carousel__arrow {
      display: inline-flex;
    }
  }

  /* Thank-you page — hover variants */
  @media (hover: hover) {
    .cta-button--whatsapp:hover {
      transform: translateY(-2px);
      box-shadow: 0 8px 20px rgba(37, 211, 102, 0.50);
    }

    .cta-button--support:hover {
      transform: translateY(-2px);
      box-shadow: 0 8px 20px rgba(220, 38, 38, 0.45);
    }
  }

  /* Thank-you — desktop: CTAs lado a lado se houver espaço */
  @media (min-width: 600px) {
    .thank-you__ctas {
      flex-flow: row wrap;
      justify-content: center;
    }

    .thank-you__ctas .cta-button {
      flex: 1 1 240px;
      max-width: 320px;
    }
  }
}
