/* ============================================================================
 * KRP Connect — site institucional
 * Custom CSS — incrementa Tailwind via CDN.
 * Tema dark por padrão (classe `dark` no <html>), toggle persiste no localStorage.
 * ============================================================================ */

/* ============================================================================
 * Design tokens v2 — dark executive industrial premium (PRD redesign)
 * Bloomberg/Claude vibe: carvão profundo + texto legível + accent âmbar
 * ============================================================================ */
:root {
    --bg-primary:   #080A0D;
    --bg-secondary: #0D1117;
    --bg-card:      #111827;
    --bg-card-hover:#1F2937;
    --text-primary: #F3F4F6;
    --text-secondary:#9CA3AF;
    --text-muted:   #6B7280;
    --border:       rgba(255, 255, 255, 0.08);
    --border-hover: rgba(255, 255, 255, 0.16);
    --accent:       #D97706;
    --accent-light: #FBBF24;
    --accent-dark:  #B45309;
}
html:not(.dark) {
    --bg-primary:   #FFFFFF;
    --bg-secondary: #F9FAFB;
    --bg-card:      #FFFFFF;
    --bg-card-hover:#F3F4F6;
    --text-primary: #111827;
    --text-secondary:#6B7280;
    --text-muted:   #9CA3AF;
    --border:       rgba(0, 0, 0, 0.08);
    --border-hover: rgba(0, 0, 0, 0.16);
}

/* ============================================================================
 * Fallback crítico — garante visual mínimo MESMO SE Tailwind CDN falhar
 * ============================================================================ */
html, body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-family: 'Inter', -apple-system, 'Segoe UI', system-ui, sans-serif;
    line-height: 1.55;
    margin: 0;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}
.font-display, h1, h2, h3, .display-hero {
    font-family: 'Fraunces', Georgia, serif;
    font-feature-settings: "kern", "liga", "calt", "ss01";
}
/* Container fallback (Tailwind .max-w-6xl) */
.max-w-6xl, .max-w-4xl, .max-w-3xl {
    margin-left: auto;
    margin-right: auto;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
}
.max-w-6xl { max-width: 72rem; }
.max-w-4xl { max-width: 56rem; }
.max-w-3xl { max-width: 48rem; }
@media (min-width: 1024px) {
    .max-w-6xl, .max-w-4xl, .max-w-3xl { padding-left: 2.5rem; padding-right: 2.5rem; }
}
/* Padding section fallback */
section { padding-top: 4rem; padding-bottom: 4rem; }
@media (min-width: 768px) {
    section { padding-top: 6rem; padding-bottom: 6rem; }
}
/* Header sticky fallback */
header.sticky {
    position: sticky;
    top: 0;
    z-index: 50;
    background-color: rgba(10, 10, 10, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid transparent;
}
html:not(.dark) header.sticky { background-color: rgba(250, 250, 248, 0.85); }
/* Links default sem decoração */
a { color: inherit; text-decoration: none; }

/* ============================================================================
 * Design tokens
 * ============================================================================
 * Accent color: âmbar (espelha a paleta do produto KRP Connect).
 * Usado em CTAs primários, links de destaque, focus rings. */
:root {
    --accent:        #d97706;  /* amber-600 */
    --accent-hover:  #b45309;  /* amber-700 */
    --accent-soft:   #fbbf24;  /* amber-400 (uso em dark se precisar mais brilho) */
    --accent-text:   #ffffff;  /* texto sobre fundo âmbar */
}

/* Utility classes — pra Tailwind CDN não precisar compilar */
.bg-accent       { background-color: var(--accent) !important; }
.bg-accent:hover { background-color: var(--accent-hover) !important; }
.text-accent     { color: var(--accent) !important; }
.border-accent   { border-color: var(--accent) !important; }
.focus\:ring-accent:focus-visible { outline-color: var(--accent) !important; }

/* ============================================================================
 * HERO FULL-BLEED — imagem à direita + gradient horizontal (estilo Linear/Stripe)
 * Texto fica no lado ESQUERDO (área escura do gradient), imagem visível à direita.
 * ============================================================================ */
.krp-hero-fullbleed {
    position: relative;
    min-height: 88vh;
    background-color: #0a0a0a;
    background-size: cover;
    background-position: right center;    /* alinha imagem à direita */
    background-repeat: no-repeat;
    overflow: hidden;
    margin-top: -64px;
    padding: calc(6rem + 64px) 1.5rem 6rem;
    display: flex;
    align-items: center;
}

/* OVERLAY: HORIZONTAL escuro→transparente (DESKTOP) — gradual e cinematográfico */
.krp-hero-fullbleed::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background:
        /* Horizontal: esquerdo bem escuro até 30% (área do texto),
           depois transição GRADUAL pra imagem aparecer plena à direita */
        linear-gradient(to right,
            rgba(8, 8, 8, 0.99) 0%,
            rgba(8, 8, 8, 0.98) 20%,
            rgba(8, 8, 8, 0.94) 35%,
            rgba(10, 10, 10, 0.78) 50%,
            rgba(10, 10, 10, 0.50) 65%,
            rgba(10, 10, 10, 0.22) 82%,
            rgba(10, 10, 10, 0.05) 100%
        ),
        /* Vertical sutil: header e base */
        linear-gradient(180deg,
            rgba(10, 10, 10, 0.55) 0%,
            transparent 15%,
            transparent 78%,
            rgba(10, 10, 10, 0.88) 100%
        );
}

/* Mobile: ESCONDE a imagem (não cabe bem em viewport estreito),
   usa só fundo escuro com glow âmbar sutil. Foco no texto. */
@media (max-width: 900px) {
    .krp-hero-fullbleed {
        background-image: none !important;  /* override do style inline */
        background-color: #0a0a0a;
        min-height: auto;
        padding-top: calc(3rem + 64px);
        padding-bottom: 4rem;
    }
    .krp-hero-fullbleed::before {
        background:
            /* Glow âmbar discreto no topo-esquerda */
            radial-gradient(ellipse 80% 50% at 20% 15%,
                rgba(217, 119, 6, 0.18), transparent 60%),
            /* Glow âmbar discreto no canto inferior-direito */
            radial-gradient(ellipse 70% 50% at 90% 85%,
                rgba(217, 119, 6, 0.10), transparent 55%),
            /* Base escura com leve textura via gradient */
            linear-gradient(180deg,
                #0a0a0a 0%,
                #141414 50%,
                #0a0a0a 100%
            );
    }
}

/* Tema light: overlay menos escuro */
html:not(.dark) .krp-hero-fullbleed::before {
    background:
        linear-gradient(to right,
            rgba(0, 0, 0, 0.85) 0%,
            rgba(0, 0, 0, 0.70) 30%,
            rgba(0, 0, 0, 0.35) 60%,
            rgba(0, 0, 0, 0.10) 100%
        );
}

/* CONTEÚDO — alinhado à ESQUERDA, max-width 560px, classes próprias (sem Tailwind) */
.krp-hero-content {
    position: relative;
    z-index: 50;
    width: 100%;
    max-width: 72rem;
    margin: 0 auto;
}

.krp-hero-conteudo {
    text-align: left;
    max-width: 560px;
    margin: 0 auto 0 0;  /* esquerda */
    opacity: 1 !important;
    transform: none !important;
}

/* Eyebrow */
.krp-hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.75rem;
    line-height: 1.2;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.75);
    margin: 0 0 1.75rem;
    font-family: 'DM Sans', system-ui, sans-serif;
}
.krp-hero-eyebrow-dash {
    display: inline-block;
    width: 32px;
    height: 1px;
    background: rgba(255, 255, 255, 0.5);
}

/* Título gigante — 1ª frase branca, 2ª frase âmbar (contraste narrativo) */
.krp-hero-titulo {
    font-family: 'Fraunces', Georgia, serif;
    font-weight: 400;
    font-size: clamp(2.8rem, 7vw, 6rem);
    line-height: 0.98;
    letter-spacing: -0.035em;
    margin: 0 0 1.5rem;
}
.krp-hero-titulo-1 {
    color: #ffffff;
    text-shadow: 0 2px 40px rgba(0, 0, 0, 0.85),
                 0 1px 4px  rgba(0, 0, 0, 0.6);
}
.krp-hero-titulo-2 {
    color: #fbbf24;  /* amber-400 — brilha sobre fundo escuro */
    font-style: italic;
    font-weight: 300;
    text-shadow: 0 0 40px rgba(251, 191, 36, 0.35),
                 0 2px 40px rgba(0, 0, 0, 0.85);
}
/* Fallback: se só houver 1 frase, fica branca como antes */
.krp-hero-titulo:not(:has(.krp-hero-titulo-2)) .krp-hero-titulo-1,
.krp-hero-titulo > span:only-child {
    color: #ffffff;
}

/* Subtítulo */
.krp-hero-subtitulo {
    font-size: clamp(1.05rem, 1.4vw, 1.25rem);
    line-height: 1.55;
    color: rgba(255, 255, 255, 0.92);
    text-shadow: 0 1px 16px rgba(0, 0, 0, 0.75);
    margin: 0 0 2.5rem;
    max-width: 540px;
    font-family: 'DM Sans', system-ui, sans-serif;
}

/* CTAs (bloco cta dentro do hero) alinham à esquerda */
.krp-hero-conteudo .flex.flex-wrap {
    justify-content: flex-start !important;
    margin-top: 0 !important;
}

/* Scoreboard à esquerda também */
.krp-hero-fullbleed .krp-scoreboard {
    margin: 3rem 0 0 !important;
    max-width: 560px;
}

/* Pílula confiança (texto markdown) à esquerda */
.krp-hero-conteudo .prose {
    text-align: left !important;
    margin: 1.25rem 0 !important;
    max-width: 540px !important;
    color: rgba(255, 255, 255, 0.7);
}

/* Mobile: tudo centralizado, texto + max-width responsivo */
@media (max-width: 900px) {
    .krp-hero-conteudo {
        text-align: center;
        margin: 0 auto;
    }
    .krp-hero-eyebrow {
        display: inline-flex;
    }
    .krp-hero-conteudo .flex.flex-wrap {
        justify-content: center !important;
    }
    .krp-hero-fullbleed .krp-scoreboard {
        margin: 3rem auto 0 !important;
    }
    .krp-hero-conteudo .prose {
        text-align: center !important;
        margin: 1.25rem auto !important;
    }
}

/* Fallback bonito se imagem 404 */
.krp-hero-fullbleed:not([style*="background-image"])::before {
    background:
        radial-gradient(ellipse 60% 50% at 20% 30%, rgba(217, 119, 6, 0.20), transparent 60%),
        radial-gradient(ellipse 70% 60% at 80% 70%, rgba(217, 119, 6, 0.10), transparent 60%),
        linear-gradient(180deg, #0a0a0a, #141414 70%, #0a0a0a);
}

/* TÍTULO gigante */
.krp-hero-title {
    font-size: clamp(2.8rem, 7vw, 6rem);
    line-height: 0.98;
    letter-spacing: -0.035em;
    color: #ffffff;
}

/* Subtítulo com leve sombra pra ficar legível sobre a imagem */
.krp-hero-sub {
    font-size: clamp(1.05rem, 1.4vw, 1.25rem);
    line-height: 1.55;
    text-shadow: 0 1px 12px rgba(0, 0, 0, 0.5);
}

/* CTAs do hero ficam centralizados */
.krp-hero-content .flex.flex-wrap {
    justify-content: center;
    margin-top: 2.5rem;
}

/* Scoreboard no hero full-bleed: tons mais claros (sobre fundo escuro) */
.krp-hero-fullbleed .krp-scoreboard {
    margin-left: auto;
    margin-right: auto;
    margin-top: 4rem;
    max-width: 720px;
}
.krp-hero-fullbleed .krp-scoreboard__item {
    border-top-color: rgba(255, 255, 255, 0.18);
}
.krp-hero-fullbleed .krp-scoreboard__valor {
    color: #ffffff;
    text-shadow: 0 1px 12px rgba(0, 0, 0, 0.4);
}
.krp-hero-fullbleed .krp-scoreboard__label {
    color: rgba(255, 255, 255, 0.7);
}
.krp-hero-fullbleed .krp-scoreboard__sub {
    color: rgba(255, 255, 255, 0.5);
}

/* Texto de confiança (✓ Trial...) */
.krp-hero-content > div > div.prose,
.krp-hero-content > div > .prose {
    text-align: center !important;
    margin-left: auto !important;
    margin-right: auto !important;
    color: rgba(255, 255, 255, 0.7);
    margin-top: 1.5rem;
}

/* Mobile: imagem fica mais clara pra texto não brigar */
@media (max-width: 768px) {
    .krp-hero-fullbleed::before {
        opacity: 0.35;
    }
    .krp-hero-fullbleed {
        min-height: 80vh;
    }
}

/* Reduce motion */
@media (prefers-reduced-motion: reduce) {
    .krp-hero-fullbleed::before { transform: none; }
}

/* ============================================================================
 * HERO SPLIT — layout principal da home (mantido pra futuras páginas)
 * ============================================================================ */
.krp-hero-split {
    position: relative;
    isolation: isolate;
}
/* Gradient radial sutil no fundo do hero (estilo Linear/Cohere) */
.krp-hero-split::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 80% 50% at 50% 0%,
            rgba(217, 119, 6, 0.08), transparent 70%),
        radial-gradient(ellipse 60% 40% at 90% 30%,
            rgba(217, 119, 6, 0.04), transparent 60%);
    z-index: -1;
    pointer-events: none;
}
html:not(.dark) .krp-hero-split::before {
    background:
        radial-gradient(ellipse 80% 50% at 50% 0%,
            rgba(217, 119, 6, 0.10), transparent 70%);
}

/* Mockup do hero (SVG inline ou imagem real) */
.krp-hero-mockup {
    position: relative;
    margin: 0;
    width: 100%;
    max-width: 580px;          /* não estoura a coluna; equilibra com o texto */
    margin-left: auto;          /* alinha à direita dentro da coluna */
}
.krp-hero-mockup__svg,
.krp-hero-mockup__img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 14px;
    position: relative;
    z-index: 2;
    box-shadow:
        0 30px 60px -20px rgba(0, 0, 0, 0.6),
        0 18px 36px -18px rgba(0, 0, 0, 0.4);
}
/* Glow âmbar atrás do mockup */
.krp-hero-mockup__glow {
    position: absolute;
    inset: -40px;
    background: radial-gradient(ellipse at center,
        rgba(217, 119, 6, 0.22), transparent 60%);
    filter: blur(40px);
    z-index: 1;
    opacity: 0.7;
    animation: krpGlowPulse 6s ease-in-out infinite;
}
@keyframes krpGlowPulse {
    0%, 100% { opacity: 0.6; transform: scale(1); }
    50%      { opacity: 0.9; transform: scale(1.05); }
}
@media (prefers-reduced-motion: reduce) {
    .krp-hero-mockup__glow { animation: none; }
}

/* ============================================================================
 * Card hover sofisticado — todos os .diff-card e grid_cards outlined/filled
 * ============================================================================ */
article[data-reveal] {
    position: relative;
    transition: transform 300ms cubic-bezier(0.16, 1, 0.3, 1),
                border-color 300ms ease;
}
article[data-reveal]:hover {
    transform: translateY(-3px);
}
/* Border âmbar sutil no hover pra cards outlined */
article.border:hover, article[class*="border-ink"]:hover {
    border-color: rgba(217, 119, 6, 0.5) !important;
}

/* Logo do header: 1 <img> único trocado por JS. CSS aqui só pro hover. */
#krpHeaderLogo { transition: opacity 200ms; }
.group:hover #krpHeaderLogo { opacity: 0.8; }

/* ============================================================================
 * Scoreboard — faixa de métricas no hero (estilo terminal financeiro)
 * ============================================================================ */
.krp-scoreboard__item {
    border-top: 1px solid #2A2A2A;
    padding-top: 1.25rem;
    display: flex;
    flex-direction: column;
}
html:not(.dark) .krp-scoreboard__item { border-top-color: #E2E1DD; }

.krp-scoreboard__valor {
    font-family: 'Fraunces', Georgia, serif;
    font-weight: 400;
    font-size: clamp(1.75rem, 3.5vw, 2.75rem);
    line-height: 1;
    letter-spacing: -0.02em;
    font-variant-numeric: tabular-nums;
    color: #ECECEC;
    margin-bottom: 0.5rem;
}
html:not(.dark) .krp-scoreboard__valor { color: #1A1A1A; }

.krp-scoreboard__sufixo {
    font-size: 0.6em;
    color: #999996;
    font-style: italic;
    margin-left: 0.1em;
}

.krp-scoreboard__label {
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #999996;
    line-height: 1.3;
}

.krp-scoreboard__sub {
    margin-top: 0.25rem;
    font-size: 0.7rem;
    color: #6B6B68;
}

/* Alpine.js — esconde elementos com x-cloak até o Alpine montar.
   Evita flash de menu/dropdown aberto durante o carregamento da página. */
[x-cloak] { display: none !important; }

/* ============================================================================
 * Mobile drawer — CSS puro, sem depender de Tailwind compile
 * ============================================================================
 * Estrutura controlada via Alpine (x-if cria/destrói, x-teleport move
 * pra body). Tema dark = default (#0a0a0a fundo). Tema light invertido
 * via seletor html:not(.dark).
 */
.krp-drawer {
    position: fixed;
    inset: 0;
    z-index: 100;
    background-color: #0a0a0a;
    color: #ECECEC;
    padding: 1.5rem 1.5rem 3rem;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    display: flex;
    flex-direction: column;
    animation: krpDrawerIn 280ms cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes krpDrawerIn {
    from { opacity: 0; transform: translateX(16px); }
    to   { opacity: 1; transform: translateX(0); }
}
.krp-drawer__top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 3rem;
}
.krp-drawer__brand {
    font-family: 'Fraunces', Georgia, serif;
    font-style: italic;
    font-weight: 500;
    font-size: 17px;
    color: inherit;
}
.krp-drawer__close {
    background: transparent;
    border: 0;
    padding: 0.5rem;
    color: #999996;
    cursor: pointer;
    border-radius: 6px;
}
.krp-drawer__close:hover { color: inherit; }
.krp-drawer__nav {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    font-family: 'Fraunces', Georgia, serif;
    font-size: 2rem;
    line-height: 1.1;
}
.krp-drawer__nav a {
    color: inherit;
    text-decoration: none;
    transition: opacity 150ms ease;
}
.krp-drawer__nav a:hover { opacity: 0.7; }
.krp-drawer__cta {
    margin-top: 2.5rem;
    align-self: flex-start;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 1.5rem;
    border-radius: 9999px;
    background-color: #d97706;
    color: #ffffff !important;
    text-decoration: none;
    font-weight: 500;
    font-family: 'DM Sans', system-ui, sans-serif;
    font-size: 1rem;
    transition: filter 150ms ease;
}
.krp-drawer__cta:hover { filter: brightness(1.1); }

/* Tema light — fundo claro, texto escuro */
html:not(.dark) .krp-drawer {
    background-color: #FAFAF8;
    color: #1A1A1A;
}
html:not(.dark) .krp-drawer__close { color: #6B6B68; }

/* Reveal on scroll — IntersectionObserver vai marcar data-revealed="true" */
[data-reveal] {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 700ms cubic-bezier(0.16, 1, 0.3, 1),
              transform 800ms cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}
[data-reveal][data-revealed="true"] {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  [data-reveal] { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* Focus visible mais limpo */
a:focus-visible, button:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 3px;
  border-radius: 2px;
}

/* Typography refinements */
.font-display {
  font-feature-settings: "kern", "liga", "calt", "ss01";
  font-variation-settings: "opsz" 144, "SOFT" 100;
}

/* Print fallback */
@media print {
  header, footer, [x-data] { display: none !important; }
  body { color: #000 !important; background: #fff !important; }
}

/* ============================================================================
 * DRAWER MOBILE (Fase 7) — CSS + vanilla JS (sem Alpine).
 * As 4 tentativas anteriores com Alpine falharam por timing/JIT do Tailwind CDN.
 * Esta versão é 100% CSS state + classe `krp-drawer-open` no <body>.
 * ============================================================================ */

/* Backdrop (camada escura atrás do drawer) */
.krp-drawer-backdrop {
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.55);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
    z-index: 90;
    backdrop-filter: blur(2px);
}
body.krp-drawer-open .krp-drawer-backdrop {
    opacity: 1;
    visibility: visible;
}

/* Drawer painel — slide da direita */
.krp-drawer {
    position: fixed;
    top: 0;
    right: 0;
    width: min(22rem, 88vw);
    height: 100dvh;          /* dvh respeita barra do iOS */
    background-color: var(--bg-secondary);
    color: var(--text-primary);
    border-left: 1px solid var(--border);
    transform: translateX(100%);
    transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 100;
    overflow-y: auto;
    overscroll-behavior: contain;
    display: flex;
    flex-direction: column;
    padding: 1.25rem 1.25rem 2rem;
    gap: 0.5rem;
    /* Esconde de leitores de tela quando fechado */
    visibility: hidden;
}
body.krp-drawer-open .krp-drawer {
    transform: translateX(0);
    visibility: visible;
}
/* Acima de md, drawer some completamente (nav desktop assume) */
@media (min-width: 768px) {
    .krp-drawer,
    .krp-drawer-backdrop,
    .krp-burger {
        display: none !important;
    }
}

/* Header interno do drawer (brand + close) */
.krp-drawer__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 1rem;
    margin-bottom: 0.5rem;
    border-bottom: 1px solid var(--border);
}
.krp-drawer__brand {
    font-family: 'Fraunces', Georgia, serif;
    font-style: italic;
    font-size: 1.1rem;
    color: var(--text-primary);
}
.krp-drawer__close {
    padding: 0.4rem;
    border-radius: 0.5rem;
    background: transparent;
    color: var(--text-secondary);
    border: none;
    cursor: pointer;
    transition: background-color 0.15s, color 0.15s;
}
.krp-drawer__close:hover {
    background-color: var(--bg-card-hover);
    color: var(--text-primary);
}

/* Lista de links */
.krp-drawer__nav {
    display: flex;
    flex-direction: column;
}
.krp-drawer__nav a {
    display: block;
    padding: 0.85rem 0.6rem;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 1rem;
    font-weight: 500;
    border-radius: 0.5rem;
    transition: color 0.15s, background-color 0.15s;
}
.krp-drawer__nav a:hover {
    color: var(--text-primary);
    background-color: var(--bg-card-hover);
}
.krp-drawer__nav a.is-active {
    color: var(--accent);
}
.krp-drawer__nav--secondary a {
    font-size: 0.875rem;
    padding: 0.6rem 0.6rem;
    color: var(--text-muted);
}
.krp-drawer__nav--secondary a:hover {
    color: var(--text-primary);
}

.krp-drawer__divider {
    height: 1px;
    background-color: var(--border);
    margin: 1rem 0 0.5rem;
}

/* CTA grudado no fim (mesmo com scroll) */
.krp-drawer__cta-wrap {
    margin-top: auto;
    padding-top: 1.5rem;
}
.krp-drawer__cta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.85rem 1.25rem;
    background-color: var(--accent);
    color: #fff;
    border-radius: 999px;
    font-weight: 500;
    text-decoration: none;
    text-align: center;
    transition: filter 0.15s, transform 0.15s;
}
.krp-drawer__cta:hover {
    filter: brightness(1.08);
    transform: translateY(-1px);
}

/* Trava scroll do body quando drawer aberto */
body.krp-drawer-open {
    overflow: hidden;
}

/* prefers-reduced-motion: desabilita transition do drawer */
@media (prefers-reduced-motion: reduce) {
    .krp-drawer,
    .krp-drawer-backdrop {
        transition: none;
    }
}

/* ============================================================================
 * CHANNEL DELIVERY STRIP (Fase 7) — faixa dos 4 canais de entrega
 * Renderiza grid horizontal com ícone + nome curto.
 * ============================================================================ */
.krp-channel-strip {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.75rem;
    padding: 1.5rem 1rem;
    border: 1px solid var(--border);
    border-radius: 1rem;
    background-color: color-mix(in srgb, var(--bg-card) 60%, transparent);
}
@media (max-width: 640px) {
    .krp-channel-strip {
        grid-template-columns: repeat(2, 1fr);
    }
}
.krp-channel-strip__item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem 0.5rem;
    text-align: center;
    border-radius: 0.625rem;
    transition: background-color 0.2s ease;
}
.krp-channel-strip__item:hover {
    background-color: var(--bg-card-hover);
}
.krp-channel-strip__icon {
    color: var(--accent);
    width: 1.75rem;
    height: 1.75rem;
}
.krp-channel-strip__nome {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-primary);
    letter-spacing: -0.005em;
}
.krp-channel-strip__sub {
    font-size: 0.72rem;
    color: var(--text-muted);
    letter-spacing: 0.02em;
}

/* ============================================================================
 * FORM DE CONTATO (Fase 5) — bloco `form_contato`
 * Estilo: terminal premium, charcoal + âmbar, single-page com agrupamento visual.
 * Todas as cores via var() — segue o padrão da paleta.
 * ============================================================================ */

.krp-form-wrap {
    max-width: 56rem;
    margin: 0 auto;
}

[x-cloak] { display: none !important; }

/* Honeypot: invisível, sem ocupar espaço */
.krp-form-honeypot {
    position: absolute;
    left: -10000px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.krp-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.krp-form-grupo {
    border: 1px solid var(--border);
    border-radius: 1rem;
    padding: 1.75rem 1.5rem 1.5rem;
    background-color: color-mix(in srgb, var(--bg-card) 50%, transparent);
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    transition: border-color 0.2s ease;
}
.krp-form-grupo:focus-within {
    border-color: color-mix(in srgb, var(--accent) 50%, var(--border));
}
.krp-form-grupo > legend {
    font-family: 'Fraunces', Georgia, serif;
    font-size: 1.125rem;
    font-weight: 500;
    color: var(--text-primary);
    padding: 0 0.5rem;
    margin-left: -0.5rem;
    margin-bottom: 0.25rem;
}

.krp-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}
@media (max-width: 640px) {
    .krp-form-row { grid-template-columns: 1fr; }
}

.krp-form-campo {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}
.krp-form-campo--full { grid-column: 1 / -1; }

.krp-form-label {
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--text-primary);
    letter-spacing: 0.01em;
}
.krp-form-label i {
    color: var(--accent);
    font-style: normal;
    margin-left: 0.15rem;
}
.krp-form-label em {
    color: var(--text-muted);
    font-style: normal;
    font-weight: 400;
    margin-left: 0.25rem;
    font-size: 0.75rem;
}

/* Inputs / select / textarea — base */
.krp-form input[type="text"],
.krp-form input[type="email"],
.krp-form input[type="tel"],
.krp-form input[type="date"],
.krp-form select,
.krp-form textarea {
    width: 100%;
    padding: 0.75rem 0.95rem;
    background-color: var(--bg-card);
    color: var(--text-primary);
    border: 1px solid var(--border);
    border-radius: 0.625rem;
    font-family: inherit;
    font-size: 0.95rem;
    line-height: 1.4;
    transition: border-color 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease;
}
.krp-form input:focus,
.krp-form select:focus,
.krp-form textarea:focus {
    outline: none;
    border-color: var(--accent);
    background-color: var(--bg-card-hover);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent);
}
.krp-form input::placeholder,
.krp-form textarea::placeholder {
    color: var(--text-muted);
}
.krp-form textarea {
    resize: vertical;
    min-height: 6rem;
}

/* Native form controls (date picker, select arrows, etc) seguem o tema.
   color-scheme controla cor do calendar indicator do <input type="date">,
   das setas de <select>, dos spinners, etc. */
html.dark .krp-form input[type="date"],
html.dark .krp-form input[type="time"],
html.dark .krp-form input[type="datetime-local"],
html.dark .krp-form select {
    color-scheme: dark;
}
html:not(.dark) .krp-form input[type="date"],
html:not(.dark) .krp-form input[type="time"],
html:not(.dark) .krp-form input[type="datetime-local"],
html:not(.dark) .krp-form select {
    color-scheme: light;
}
.krp-form input.krp-form-input--erro,
.krp-form select.krp-form-input--erro {
    border-color: #DC2626;
    box-shadow: 0 0 0 3px color-mix(in srgb, #DC2626 18%, transparent);
}
.krp-form-erro {
    font-size: 0.78rem;
    color: #F87171;
    margin-top: 0.1rem;
}

/* Radio + Checkbox custom */
.krp-form-radio-group,
.krp-form-checkbox-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}
.krp-form-radio-group--wrap { gap: 0.6rem; }

.krp-form-radio,
.krp-form-checkbox {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.55rem 0.85rem;
    border: 1px solid var(--border);
    border-radius: 999px;
    background-color: var(--bg-card);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.15s ease;
    font-size: 0.875rem;
}
.krp-form-radio:hover,
.krp-form-checkbox:hover {
    border-color: color-mix(in srgb, var(--accent) 35%, var(--border));
    color: var(--text-primary);
}
.krp-form-radio input,
.krp-form-checkbox input {
    accent-color: var(--accent);
    width: 1rem;
    height: 1rem;
    margin: 0;
}
.krp-form-radio:has(input:checked),
.krp-form-checkbox:has(input:checked) {
    border-color: var(--accent);
    background-color: color-mix(in srgb, var(--accent) 12%, var(--bg-card));
    color: var(--text-primary);
}

/* Consentimento: ocupa linha inteira + texto leve */
.krp-form-consent {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    padding: 0.75rem 0.85rem;
    border-radius: 0.625rem;
    font-size: 0.82rem;
    color: var(--text-secondary);
    line-height: 1.5;
}
.krp-form-consent input {
    margin-top: 0.15rem;
    flex-shrink: 0;
}
.krp-form-consent span i {
    color: var(--accent);
    font-style: normal;
    margin-left: 0.15rem;
}

/* Submit */
.krp-form-actions {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    margin-top: 0.5rem;
}
.krp-form-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    padding: 0.95rem 1.5rem;
    background-color: var(--accent);
    color: #fff;
    border: none;
    border-radius: 999px;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: filter 0.15s, transform 0.15s;
}
.krp-form-submit:hover { filter: brightness(1.08); transform: translateY(-1px); }
.krp-form-submit:disabled { opacity: 0.65; cursor: wait; transform: none; }
.krp-form-submit--ghost {
    background-color: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border);
}
.krp-form-submit--ghost:hover {
    background-color: var(--bg-card-hover);
    border-color: var(--border-hover);
    filter: none;
}
.krp-form-arrow {
    transition: transform 0.15s ease;
}
.krp-form-submit:hover .krp-form-arrow { transform: translateX(2px); }

/* Loading spinner */
.krp-form-loading { display: inline-flex; align-items: center; gap: 0.55rem; }
.krp-form-spinner {
    width: 1rem;
    height: 1rem;
    border: 2px solid color-mix(in srgb, #fff 30%, transparent);
    border-top-color: #fff;
    border-radius: 50%;
    animation: krp-spin 0.8s linear infinite;
}
@keyframes krp-spin { to { transform: rotate(360deg); } }

.krp-form-disclaimer {
    font-size: 0.78rem;
    color: var(--text-muted);
    line-height: 1.5;
    text-align: center;
}
.krp-form-disclaimer a {
    color: var(--accent);
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* Resultado (sucesso/erro) */
.krp-form-resultado {
    text-align: center;
    padding: 3rem 1.5rem;
    border: 1px solid var(--border);
    border-radius: 1rem;
    background-color: color-mix(in srgb, var(--bg-card) 60%, transparent);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}
.krp-form-resultado__icone {
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-size: 1.75rem;
    font-weight: 600;
    color: #fff;
    background-color: var(--accent);
}
.krp-form-resultado--sucesso .krp-form-resultado__icone { background-color: #16A34A; }
.krp-form-resultado--erro    .krp-form-resultado__icone { background-color: #DC2626; }

.krp-form-resultado__titulo {
    font-family: 'Fraunces', Georgia, serif;
    font-size: 1.875rem;
    line-height: 1.2;
    color: var(--text-primary);
    max-width: 36ch;
    margin: 0;
}
.krp-form-resultado__sub {
    color: var(--text-secondary);
    max-width: 50ch;
    line-height: 1.6;
    margin: 0;
}
.krp-form-resultado__proxima {
    margin-top: 1rem;
    padding: 1rem 1.25rem;
    border: 1px solid color-mix(in srgb, var(--accent) 40%, var(--border));
    border-radius: 0.75rem;
    background-color: color-mix(in srgb, var(--accent) 6%, var(--bg-card));
    max-width: 48ch;
    text-align: left;
}
.krp-form-resultado__proxima-label {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--accent);
    margin: 0 0 0.35rem;
    font-weight: 600;
}
.krp-form-resultado__proxima-texto {
    color: var(--text-primary);
    margin: 0;
    line-height: 1.5;
}
.krp-form-resultado__voltar {
    margin-top: 1rem;
    color: var(--text-secondary);
    font-size: 0.875rem;
    text-decoration: underline;
    text-underline-offset: 3px;
}
.krp-form-resultado__voltar:hover { color: var(--text-primary); }
.krp-form-resultado__acoes {
    display: flex;
    gap: 0.6rem;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 0.75rem;
}

/* ============================================================================
 * COOKIE BANNER (LGPD) — fixed bottom, full width
 * Estado controlado pelo JS via localStorage + cookie.
 * ============================================================================ */

.krp-cookie-banner {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1000;
    background-color: color-mix(in srgb, var(--bg-secondary) 96%, transparent);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-top: 1px solid var(--border);
    box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.25);
    padding: 1.1rem 1rem;
    animation: krp-cookie-slide-up 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.krp-cookie-banner[hidden] {
    display: none;
}

@keyframes krp-cookie-slide-up {
    from { transform: translateY(100%); opacity: 0; }
    to   { transform: translateY(0);    opacity: 1; }
}

.krp-cookie-banner__content {
    max-width: 72rem;
    margin: 0 auto;
    padding: 0 1rem;
    display: flex;
    gap: 1.5rem;
    align-items: center;
    flex-wrap: wrap;
    justify-content: space-between;
}

.krp-cookie-banner__texto {
    flex: 1 1 28rem;
    min-width: 18rem;
}

.krp-cookie-banner__titulo {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 0.35rem;
    letter-spacing: 0.005em;
}

.krp-cookie-banner__corpo {
    font-size: 0.82rem;
    color: var(--text-secondary);
    margin: 0;
    line-height: 1.5;
    max-width: 52rem;
}

.krp-cookie-banner__acoes {
    display: flex;
    gap: 0.6rem;
    flex-shrink: 0;
}

.krp-cookie-banner__btn {
    display: inline-flex;
    align-items: center;
    padding: 0.6rem 1.4rem;
    border-radius: 999px;
    font-family: inherit;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: filter 0.15s, background-color 0.15s, border-color 0.15s, transform 0.15s;
    border: 1px solid transparent;
}

.krp-cookie-banner__btn--primary {
    background-color: var(--accent);
    color: #fff;
    border-color: var(--accent);
}
.krp-cookie-banner__btn--primary:hover {
    filter: brightness(1.08);
    transform: translateY(-1px);
}

.krp-cookie-banner__btn--ghost {
    background-color: transparent;
    color: var(--text-primary);
    border-color: var(--border);
}
.krp-cookie-banner__btn--ghost:hover {
    background-color: var(--bg-card-hover);
    border-color: var(--border-hover);
}

/* Mobile: stack vertical */
@media (max-width: 640px) {
    .krp-cookie-banner__content {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }
    .krp-cookie-banner__acoes {
        justify-content: stretch;
    }
    .krp-cookie-banner__btn {
        flex: 1;
        justify-content: center;
    }
}

/* prefers-reduced-motion: sem animação */
@media (prefers-reduced-motion: reduce) {
    .krp-cookie-banner {
        animation: none;
    }
}
