/* ====================================================================
   {1} VARIABLES DE DISEÑO Y COLOR (KHEPWORK)
   ==================================================================== */
:root {
    /* Tipografías */
    --font-titles: "ClashDisplay";
    --font-body: "Inter";

    /* Tus Tamaños de Fuentes Originales (Los que de verdad te funcionan) */
    --xxSmall: clamp(0.55rem, 0.5rem + 0.15vw, 0.65rem);
    --xSmall: clamp(0.625rem, 0.6rem + 0.1vw, 0.75rem);
    --small: clamp(0.8rem, 0.75rem + 0.2vw, 0.875rem);
    --normal: clamp(1rem, 0.95rem + 0.4vw, 1.125rem);
    --large: clamp(1.5rem, 1.2rem + 1.5vw, 2.25rem);
    --xLarge: clamp(2.5rem, 2rem + 4vw, 3.75rem);
    --xxLarge: clamp(3.5rem, 2.5rem + 8vw, 6.5rem);
    --xxxLarge: clamp(8rem, 4rem + 12vw, 9.5rem);
    /* De ~88px en móviles a ~152px en PC */

    /* Tu escala limpia de Fibonacci para espacios fijos (Píxeles nativos) */
    --fib-1: 1px;
    --fib-2: 2px;
    --fib-3: 3px;
    --fib-5: 5px;
    --fib-8: 8px;
    --fib-13: 13px;
    --fib-21: 21px;
    --fib-34: 34px;
    --fib-55: 55px;
    --fib-89: 89px;
    --fib-144: 144px;

    /* Colores oficiales de la marca Kahuna */
    --brand: #E35236;
    --brand-dark: #1E1E28;
    --brand-mid: #E87058;
    --brand-light: #FBECE9;

    --bg: #FAF6F5;
    --bg-dark: #1E1E28;

    --cta: #E35236;
    --cta-hover: #C74127;

    --text: #1E1E28;
    --text-muted: #5C5C6A;
    --text-light: #FFFFFF;

    --border: rgba(30, 30, 40, 0.15);
}

/* =====================
   General
   ===================== */
* {
    box-sizing: border-box;
}

html {
    overflow-x: hidden;
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg);
    color: var(--text);
    width: 100%;
    max-width: 100vw;
    min-height: 100vh;
    margin: 0;
    padding: 0;
    font-family: var(--font-body);
    overflow-x: hidden;

    display: grid;
    grid-template-columns: 100%;
    grid-template-rows: max-content 1fr max-content;
    grid-template-areas:
        "header"
        "main"
        "footer";
}

body::-webkit-scrollbar {
    display: none;
}

a {
    color: var(--brand);
    text-decoration: none;
}

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

hr {
    border: 0;
    border-top: var(--fib-1) solid var(--border);
}

label {
    line-height: 2.618;
}

/* =====================
   Layout
   ===================== */
header {
    width: 100%;
    grid-area: header;
}

main {
    grid-area: main;
    overflow-x: hidden;
}

footer {
    background-color: var(--brand);
    width: 100%;
    grid-area: footer;
}

section {
    /* Tus márgenes fluidos originales */
    margin-block: clamp(55px, 21vw, 89px);
    padding-inline: clamp(21px, 13vw, 34px);
    padding-block: clamp(21px, 34vw, 89px);
}

/* =====================
   Utilidades
   ===================== */
.centerChilds {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--fib-34);
}

.flexRow {
    /* Corregido typo flecRow */
    display: flex;
    flex-direction: row;
    gap: var(--fib-34);
}

.flexCol {
    display: flex;
    flex-direction: column;
    gap: var(--fib-34);
}

.flexJustifyCenter {
    justify-content: center;
}

.flexAlignCenter {
    align-items: center;
}

.centerText {
    text-align: center;
}

.icon {
    color: var(--text);
}

/* =====================
   Imágenes
   ===================== */
.imageSecondary {
    width: 100%;
    height: 100%;
    aspect-ratio: 1.618 / 1;
    object-fit: cover;
    object-position: center;
}

/* =====================
   Botones
   ===================== */
button,
.btn {
    background-color: var(--cta);
    color: var(--text-light);
    margin-block: var(--fib-13);
    padding-block: var(--fib-13);
    padding-inline: clamp(21px, 13vw, 34px);
    border: none;
    border-radius: var(--fib-13);
    font-family: var(--font-body);
    font-weight: 400;
    letter-spacing: 0.007rem;
    white-space: nowrap;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

button:hover,
.btn:hover {
    background-color: var(--cta-hover);
    transform: scale(1.03);
}

button:active,
.btn:active {
    transform: scale(0.98);
}

/* =====================
   Inputs / Textarea
   ===================== */
input,
textarea {
    width: 100%;
    font-family: var(--font-body);
    padding: clamp(8px, 5vw, 13px);
    border: var(--fib-1) solid var(--border);
    border-radius: 4px;
}

input {
    min-height: 50px;
}

textarea {
    min-height: 120px;
}

/* =====================
   Componentes
   ===================== */
.target {
    width: 100%;
    height: 100%;
    padding: clamp(21px, 8vw, 34px);
    border: var(--fib-1) solid var(--border);
    border-radius: 4px;
}

.carouselFather {
    display: flex;
    gap: var(--fib-34);
    scroll-snap-type: x mandatory;
    overflow-x: auto;
    scrollbar-width: none;
}

.carouselFather::-webkit-scrollbar {
    display: none;
}

.carouselChild {
    flex: 0 0 85%;
    scroll-snap-align: start;
}

/* =====================
   Tipografía — Asignaciones
   ===================== */
.txtXx-small {
    font-size: var(--xxSmall);
}

.txtX-small {
    font-size: var(--xSmall);
}

.txtSmall {
    font-size: var(--small);
}

.txtNormal {
    font-size: var(--normal);
}

.txtLarge {
    font-size: var(--large);
}

.txtX-large {
    font-size: var(--xLarge);
}

.txtXx-large {
    font-size: var(--xxLarge);
}

.txtXxx-large {
    font-size: var(--xxxLarge);
    line-height: 0.89;
    /* Truco de oro: cuando el texto es tan gigante, reduce el line-height para que se vea compacto y agresivo */
    letter-spacing: -0.02em;
    /* Junta un pelín las letras para que tenga más impacto visual */
}

h1,
h2,
h3,
h4,
.txtHighlight,
.txtCtaHighlight {
    font-family: var(--font-titles);
    font-weight: bolder;
    margin: 0;
}

.txtCtaHighlight {
    color: var(--cta);
}

.txtComplement {
    font-size: var(--small);
    text-transform: uppercase;
    letter-spacing: 0.07em;
}

.txtDescription {
    font-size: var(--small);
}

.txtPrincipal {
    font-size: var(--large);
}

.titleContainer {
    width: 100%;
    max-width: 40ch;
    line-height: 1.118;
    font-weight: 900;
}

.textContainer {
    max-width: clamp(20ch, 100%, 65ch);
    line-height: 1.618;
}

/* ====================================================================
   Componente Marquee Blindado (Filosofía Khepwork original)
   ==================================================================== */
.marqueeContainer {
    width: 100%;
    max-width: 100vw;
    display: flex;
    overflow: hidden;
    background-color: var(--bg-dark);
}

.marqueeTrack {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    /* Blindaje contra saltos */
    flex-shrink: 0;
    /* Regla de oro: no se deforma */
    min-width: max-content;
    /* Mide el contenido real exacto */
    animation: marqueeAnimation 21s infinite linear;
}

.marqueeText {
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
    margin-block: 0;
    padding: 0;
    /* Mantiene tu texto estilizado original */
    padding-block: var(--fib-13);
    /* Tu padding ideal para que respire */
    padding-right: var(--fib-55);
    /* Tu GAP seguro de Fibonacci */
}

p span {
    margin-right: clamp(3px, 2vw, 13px);
    margin-left: clamp(3px, 2vw, 13px);
}

@keyframes marqueeAnimation {
    0% {
        transform: translate3d(0, 0, 0);
    }

    100% {
        transform: translate3d(-100%, 0, 0);
    }
}

/* =====================
   Responsive
   ===================== */
@media (max-width: 600px) {
    .carouselChild {
        flex: 0 0 85%;
    }
}