/* ==========================================================================
   Kapitecto — hoja de estilos del sitio
   Tema: tinta cálida + cobre chileno. Perfil: animation-led (motion sobrio).
   ========================================================================== */

/* ---------- Tokens ---------- */
:root {
    --bg: #161310;
    --bg-deep: #100D0B;
    --surface: #1E1A15;
    --surface-2: #282119;
    --surface-3: #322A1F;
    --border: #3A3226;
    --border-soft: #2E2820;
    --text: #F2EBE0;
    --muted: #BDB2A0;
    --accent: #E0964F;
    --accent-hover: #EDAB6F;
    --accent-deep: #B26E33;
    --accent-tint: rgba(224, 150, 79, 0.13);
    --accent-tint-2: rgba(224, 150, 79, 0.22);
    --ink: #1A1208;
    --ok: #8FBF7F;
    --ok-tint: rgba(143, 191, 127, 0.14);
    --bad: #D97C6E;
    --bad-tint: rgba(217, 124, 110, 0.14);

    --font-display: 'Space Grotesk', 'Segoe UI', system-ui, sans-serif;
    --font-body: 'Inter', 'Segoe UI', system-ui, sans-serif;

    --r-sm: 8px;
    --r-md: 12px;
    --r-lg: 16px;
    --r-xl: 22px;

    --shadow-sm: 0 1px 2px rgba(12, 9, 5, 0.5), 0 2px 8px rgba(12, 9, 5, 0.28);
    --shadow-md: 0 2px 4px rgba(12, 9, 5, 0.45), 0 10px 28px rgba(12, 9, 5, 0.34);
    --shadow-lg: 0 4px 10px rgba(12, 9, 5, 0.5), 0 22px 56px rgba(12, 9, 5, 0.44);

    --header-h: 68px;
    --ease: cubic-bezier(0.2, 0.6, 0.2, 1);

    --texture-grid: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='44' height='44'%3E%3Cpath d='M44 0H0v44' fill='none' stroke='%23E0964F' stroke-opacity='.07' stroke-width='1'/%3E%3C/svg%3E");
    --texture-dots: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22'%3E%3Ccircle cx='2' cy='2' r='1.1' fill='%23E0964F' fill-opacity='.12'/%3E%3C/svg%3E");
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

@font-face {
    font-family: 'Space Grotesk';
    src: url('../fonts/spacegrotesk-var.woff2') format('woff2');
    font-weight: 300 700;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Inter';
    src: url('../fonts/inter-var.woff2') format('woff2');
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.65;
    overflow-x: hidden;
}

img, svg, iframe, video, canvas { max-width: 100%; }

h1, h2, h3, h4 {
    font-family: var(--font-display);
    line-height: 1.15;
    margin: 0 0 0.6em;
    font-weight: 700;
    letter-spacing: -0.01em;
}
h1 { font-size: clamp(2rem, 4.6vw, 3.3rem); }
h2 { font-size: clamp(1.55rem, 3vw, 2.25rem); }
h3 { font-size: 1.18rem; line-height: 1.3; }
h4 { font-size: 1rem; }

p { margin: 0 0 1em; }
a { color: var(--accent-hover); text-decoration: none; transition: color 0.16s var(--ease); }
a:hover { color: var(--accent); }

ul, ol { padding-left: 1.25em; margin: 0 0 1em; }
li { margin-bottom: 0.4em; }

strong { color: var(--text); font-weight: 600; }

:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
    border-radius: 4px;
}

.skip-link {
    position: absolute;
    left: 16px;
    top: -60px;
    z-index: 300;
    background: var(--accent);
    color: var(--ink);
    padding: 10px 18px;
    border-radius: var(--r-sm);
    font-weight: 600;
    transition: top 0.18s var(--ease);
}
.skip-link:focus { top: 12px; color: var(--ink); }

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin-inline: auto;
    padding-inline: clamp(16px, 4vw, 40px);
}

main { display: block; }

.section { padding: clamp(56px, 8vw, 96px) 0; position: relative; }
.section-head { max-width: 760px; margin-bottom: clamp(28px, 4vw, 44px); }
.section-head p { color: var(--muted); font-size: 1.04rem; margin-bottom: 0; }

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 12px;
}

/* Fondos decorativos de sección: gradiente base + textura dibujada encima */
.section--tint {
    background:
        var(--texture-grid),
        radial-gradient(1100px 460px at 12% -10%, var(--accent-tint), transparent 60%),
        var(--surface);
    border-block: 1px solid var(--border-soft);
}
.section--dots {
    background:
        var(--texture-dots),
        radial-gradient(900px 420px at 88% 0%, rgba(224, 150, 79, 0.09), transparent 62%),
        var(--bg-deep);
    border-block: 1px solid var(--border-soft);
}
.section--panel { background: var(--surface); border-block: 1px solid var(--border-soft); }

/* ---------- Botones ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 48px;
    padding: 0 26px;
    border-radius: var(--r-md);
    font-family: var(--font-body);
    font-size: 0.98rem;
    font-weight: 600;
    line-height: 1;
    white-space: nowrap;
    border: 1px solid transparent;
    cursor: pointer;
    transition: transform 0.16s var(--ease), box-shadow 0.16s var(--ease),
        background-color 0.16s var(--ease), border-color 0.16s var(--ease), color 0.16s var(--ease);
}
.btn:active { transform: translateY(1px); }
.btn-primary {
    background: var(--accent);
    color: var(--ink);
    box-shadow: var(--shadow-sm);
}
.btn-primary:hover { background: var(--accent-hover); color: var(--ink); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.btn-secondary {
    background: transparent;
    color: var(--accent-hover);
    border-color: var(--accent-deep);
}
.btn-secondary:hover { background: var(--accent-tint); color: var(--accent); border-color: var(--accent); transform: translateY(-2px); }
.btn-sm { height: 40px; padding: 0 18px; font-size: 0.9rem; }
.btn-block { width: 100%; }

/* ---------- Icon badges ---------- */
.icon-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    border-radius: 14px;
    background: var(--accent-tint);
    color: var(--accent);
    flex: 0 0 auto;
}
.icon-badge--lg { width: 60px; height: 60px; border-radius: 16px; }
.icon-badge--round { border-radius: 50%; }
.icon-badge--ok { background: var(--ok-tint); color: var(--ok); }
.icon-badge--bad { background: var(--bad-tint); color: var(--bad); }

/* ---------- Header ---------- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 120;
    background: rgba(22, 19, 16, 0.88);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-soft);
    transition: box-shadow 0.2s var(--ease), background-color 0.2s var(--ease);
}
.site-header.is-scrolled { box-shadow: var(--shadow-md); background: rgba(22, 19, 16, 0.97); }

.header-inner {
    display: flex;
    align-items: center;
    gap: 20px;
    min-height: var(--header-h);
}

.brand { display: inline-flex; align-items: center; color: var(--text); flex: 0 0 auto; }
.brand:hover { color: var(--text); }
.brand svg { display: block; }

.main-nav { margin-left: auto; }
.nav-groups { display: flex; align-items: center; gap: 6px; list-style: none; margin: 0; padding: 0; }
.nav-group { position: relative; }

.nav-trigger {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: none;
    border: 0;
    color: var(--text);
    font-family: var(--font-body);
    font-size: 0.95rem;
    font-weight: 500;
    padding: 10px 12px;
    border-radius: var(--r-sm);
    cursor: pointer;
    transition: background-color 0.15s var(--ease), color 0.15s var(--ease);
}
.nav-trigger:hover, .nav-trigger[aria-expanded="true"] { background: var(--accent-tint); color: var(--accent-hover); }
.nav-trigger .i-caret { transition: transform 0.16s var(--ease); }
.nav-trigger[aria-expanded="true"] .i-caret { transform: rotate(180deg); }
.nav-group.is-active > .nav-trigger { color: var(--accent); }

.dropdown {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    min-width: 260px;
    max-width: min(340px, calc(100vw - 32px));
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 14px;
    box-shadow: var(--shadow-md);
    padding: 8px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(4px);
    transition: opacity 0.16s var(--ease), transform 0.16s var(--ease), visibility 0.16s;
    z-index: 130;
}
/* visibility quita el menú del orden de tabulación y del árbol accesible
   cuando está cerrado; .is-open lo restaura. */
.dropdown::before {
    content: '';
    position: absolute;
    top: -5px;
    left: 22px;
    width: 10px;
    height: 10px;
    background: var(--surface);
    border-left: 1px solid var(--border);
    border-top: 1px solid var(--border);
    transform: rotate(45deg);
}
.dropdown.is-open { opacity: 1; visibility: visible; transform: translateY(0); }
.dropdown.align-right { left: auto; right: 0; }
.dropdown.align-right::before { left: auto; right: 22px; }
.dropdown ul { list-style: none; margin: 0; padding: 0; max-height: min(430px, 62vh); overflow-y: auto; }
.dropdown a {
    display: block;
    padding: 10px 12px;
    border-radius: var(--r-sm);
    color: var(--text);
    font-size: 0.92rem;
    transition: background-color 0.14s var(--ease), color 0.14s var(--ease);
}
.dropdown a:hover, .dropdown a:focus-visible { background: var(--accent-tint); color: var(--accent-hover); }
.dropdown a[aria-current="page"] { color: var(--accent); background: var(--accent-tint); }

.header-cta { display: flex; align-items: center; gap: 10px; flex: 0 0 auto; }

.burger {
    display: none;
    background: none;
    border: 0;
    color: var(--text);
    padding: 8px;
    border-radius: var(--r-sm);
    cursor: pointer;
}
.burger:hover { background: var(--accent-tint); color: var(--accent-hover); }
.burger-close { display: none; }
.burger[aria-expanded="true"] .burger-open { display: none; }
.burger[aria-expanded="true"] .burger-close { display: inline-flex; }

.mobile-nav {
    border-top: 1px solid var(--border-soft);
    background: var(--bg-deep);
    padding: 14px 0 20px;
    max-height: calc(100vh - var(--header-h));
    overflow-y: auto;
}
.mobile-group { border-bottom: 1px solid var(--border-soft); }
.mobile-group summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 13px 4px;
    font-weight: 600;
    color: var(--text);
    cursor: pointer;
    list-style: none;
}
.mobile-group summary::-webkit-details-marker { display: none; }
.mobile-group[open] summary .i-caret { transform: rotate(180deg); }
.mobile-group summary .i-caret { transition: transform 0.16s var(--ease); color: var(--accent); }
.mobile-group ul { list-style: none; margin: 0 0 12px; padding: 0; }
.mobile-group a {
    display: block;
    padding: 9px 12px;
    color: var(--muted);
    border-radius: var(--r-sm);
    font-size: 0.95rem;
}
.mobile-group a:hover { color: var(--accent-hover); background: var(--accent-tint); }
.mobile-nav .btn { margin-top: 16px; }

/* ---------- Hero (home) ---------- */
.hero {
    position: relative;
    overflow: hidden;
    padding: clamp(52px, 7vw, 92px) 0 clamp(56px, 7vw, 96px);
    background:
        var(--texture-grid),
        radial-gradient(1200px 620px at 78% 8%, rgba(224, 150, 79, 0.16), transparent 64%),
        radial-gradient(900px 520px at -8% 100%, rgba(224, 150, 79, 0.08), transparent 58%),
        linear-gradient(180deg, var(--bg-deep), var(--bg));
    border-bottom: 1px solid var(--border-soft);
}
.hero__bg {
    position: absolute;
    inset: -6% -4% -10% auto;
    width: min(860px, 92vw);
    pointer-events: none;
    will-change: transform;
}
.hero__grid {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
    gap: clamp(28px, 5vw, 64px);
    align-items: center;
}
.hero__title { max-width: 15ch; }
.hero__lead { color: var(--muted); font-size: 1.07rem; max-width: 54ch; }
.hero__lead strong { color: var(--text); }

.hero__flags {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin: 18px 0 6px;
    color: var(--muted);
    font-size: 0.93rem;
}
.hero__flags .flag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 5px 12px 5px 6px;
    color: var(--text);
    font-weight: 500;
    font-size: 0.88rem;
}
.flag-ico { width: 24px; height: 17px; border-radius: 3px; overflow: hidden; display: block; flex: 0 0 auto; box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.35); }

.hero__trust {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 20px;
}
.trust-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px 10px 12px;
    border-radius: var(--r-md);
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text);
    font-size: 0.92rem;
    font-weight: 500;
    box-shadow: var(--shadow-sm);
    transition: transform 0.16s var(--ease), box-shadow 0.16s var(--ease), border-color 0.16s var(--ease);
}
.trust-link:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: var(--accent-deep); color: var(--text); }

.hero__form-wrap { position: relative; z-index: 2; }

/* ---------- Héroe de páginas interiores ---------- */
.page-hero {
    position: relative;
    overflow: hidden;
    padding: clamp(44px, 6vw, 76px) 0;
    background:
        var(--texture-dots),
        radial-gradient(900px 420px at 85% 0%, rgba(224, 150, 79, 0.13), transparent 60%),
        linear-gradient(180deg, var(--bg-deep), var(--bg));
    border-bottom: 1px solid var(--border-soft);
}
.page-hero__grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 0.9fr);
    gap: clamp(26px, 4vw, 56px);
    align-items: center;
    position: relative;
}
.page-hero__lead { color: var(--muted); font-size: 1.02rem; max-width: 58ch; }
.page-hero--full .page-hero__grid { grid-template-columns: 1fr; max-width: 860px; }

/* ---------- Formulario (formFactory) ---------- */
.form-block {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-xl);
    box-shadow: var(--shadow-lg);
    padding: clamp(20px, 3vw, 30px);
    position: relative;
}
.form-block::before {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: var(--r-xl);
    padding: 1px;
    background: linear-gradient(140deg, rgba(224, 150, 79, 0.55), transparent 34%, transparent 70%, rgba(224, 150, 79, 0.28));
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}
.form-block__title { margin-bottom: 4px; }
.form-block__sub { color: var(--muted); font-size: 0.9rem; margin-bottom: 16px; }
.form-block__intro { margin: 0 0 14px; color: var(--muted); font-size: 0.93rem; }

.form-block form { display: grid; gap: 14px; }
.form-block form > div:first-child { display: grid; gap: 14px; }

.form-block input[type='text'],
.form-block input[type='email'],
.form-block input[type='tel'],
.form-block input[type='password'] {
    width: 100%;
    height: 48px;
    border-radius: 10px;
    border: 1px solid var(--border) !important;
    background: var(--bg-deep) !important;
    color: var(--text) !important;
    font-family: var(--font-body);
    font-size: 0.95rem;
    transition: border-color 0.15s var(--ease), box-shadow 0.15s var(--ease);
}
.form-block input::placeholder { color: var(--muted) !important; font-size: 0.9rem !important; opacity: 1 !important; }
.form-block input:focus {
    border-color: var(--accent) !important;
    box-shadow: 0 0 0 3px var(--accent-tint-2);
    outline: none;
}
.form-block input[type='submit'],
.calc-modal input[type='submit'] {
    background: var(--accent) !important;
    color: var(--ink) !important;
    height: 50px !important;
    border-radius: var(--r-md) !important;
    border: 0 !important;
    font-family: var(--font-body);
    font-size: 1rem !important;
    font-weight: 700;
    letter-spacing: 0.01em;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    transition: background-color 0.16s var(--ease), transform 0.16s var(--ease), box-shadow 0.16s var(--ease);
}
.form-block input[type='submit']:hover,
.calc-modal input[type='submit']:hover {
    background: var(--accent-hover) !important;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}
.form-legal {
    margin: 14px 0 0;
    font-size: 0.8rem;
    line-height: 1.5;
    color: var(--muted);
    text-align: center;
}
.form-legal a { text-decoration: underline; text-underline-offset: 2px; }
.form-note {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 10px 0 0;
    font-size: 0.85rem;
    color: var(--accent-hover);
}
.form-note svg { color: var(--accent); }

.iti__country, .iti__dial-code, .iti__flag.iti__cn { background-image: none; }
.iti { width: 100%; }
.iti .iti__selected-flag { background: transparent !important; }

/* ---------- Tarjetas ---------- */
.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    box-shadow: var(--shadow-sm);
    padding: 24px;
    transition: transform 0.18s var(--ease), box-shadow 0.18s var(--ease), border-color 0.18s var(--ease);
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--accent-deep); }
.card h3 { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.card p { color: var(--muted); margin-bottom: 0; }
.card p + p { margin-top: 0.7em; }
.card a.stretched-link { color: var(--accent-hover); font-weight: 600; font-size: 0.92rem; }

.card-grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.card-grid--2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.card-grid--asym { grid-template-columns: 1.25fr 1fr; }

/* ---------- Pasos numerados ---------- */
.steps { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); counter-reset: paso; }
.step {
    position: relative;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    box-shadow: var(--shadow-sm);
    padding: 22px;
    transition: transform 0.18s var(--ease), box-shadow 0.18s var(--ease);
}
.step:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.step__num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--accent);
    color: var(--ink);
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 0.95rem;
    margin-bottom: 14px;
}
.step h3 { font-size: 1.05rem; margin-bottom: 8px; }
.step p { color: var(--muted); margin-bottom: 0; font-size: 0.94rem; }

/* ---------- Tablas ---------- */
.table-wrap {
    overflow-x: auto;
    contain: paint;
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    box-shadow: var(--shadow-sm);
    background: var(--surface);
    -webkit-overflow-scrolling: touch;
}
table { width: 100%; border-collapse: collapse; font-size: 0.93rem; min-width: 560px; }
thead th {
    background: var(--surface-2);
    text-align: left;
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 0.88rem;
    letter-spacing: 0.02em;
    color: var(--text);
    padding: 14px 16px;
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}
tbody td, tbody th {
    padding: 13px 16px;
    border-bottom: 1px solid var(--border-soft);
    color: var(--muted);
    vertical-align: top;
    text-align: left;
    font-weight: 400;
}
tbody th { color: var(--text); font-weight: 600; white-space: nowrap; }
tbody tr:last-child td, tbody tr:last-child th { border-bottom: 0; }
tbody tr:nth-child(even) { background: rgba(255, 251, 244, 0.018); }
tbody tr:hover { background: var(--accent-tint); }
table .yes, table .no { display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; border-radius: 50%; }
table .yes { background: var(--ok-tint); color: var(--ok); }
table .no { background: var(--bad-tint); color: var(--bad); }
.table-note { font-size: 0.85rem; color: var(--muted); margin-top: 12px; }

.compare-col-brand { color: var(--accent) !important; font-weight: 700; }

/* ---------- Reviews ---------- */
.reviews-grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.review { display: flex; flex-direction: column; gap: 12px; }
.review__head { display: flex; align-items: center; gap: 14px; }
.review__avatar { border-radius: 50%; flex: 0 0 auto; }
.review__name { font-weight: 600; display: block; }
.review__role { color: var(--muted); font-size: 0.85rem; display: block; }
.review__body { color: var(--muted); font-size: 0.94rem; margin: 0; }
.review__stats {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: auto;
}
.review__stat {
    background: var(--surface-2);
    border: 1px solid var(--border-soft);
    border-radius: var(--r-sm);
    padding: 6px 12px;
    font-size: 0.8rem;
    color: var(--muted);
}
.review__stat strong { display: block; color: var(--text); font-size: 0.95rem; font-variant-numeric: tabular-nums; }
.review__stat--profit strong { color: var(--ok); }
.reviews-note { font-size: 0.82rem; color: var(--muted); margin-top: 18px; }

/* ---------- Logos de exchanges ---------- */
.exchanges { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; }
.exchange-chip {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: var(--surface);
    border: 1px solid var(--border-soft);
    border-radius: 999px;
    padding: 9px 20px 9px 12px;
    color: var(--text);
    transition: border-color 0.16s var(--ease), transform 0.16s var(--ease), box-shadow 0.16s var(--ease);
}
.exchange-chip:hover { border-color: var(--accent-deep); transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.exchange-chip svg { color: var(--accent); display: block; }
.exchange-chip span { font-family: var(--font-display); font-weight: 500; font-size: 0.95rem; letter-spacing: 0.01em; }

/* ---------- Breadcrumbs ---------- */
.breadcrumbs { padding: 14px 0; border-bottom: 1px solid var(--border-soft); background: var(--bg-deep); }
.breadcrumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; font-size: 0.84rem; color: var(--muted); }
.breadcrumbs li + li::before { content: '/'; margin-right: 6px; color: var(--border); }
.breadcrumbs a { color: var(--muted); }
.breadcrumbs a:hover { color: var(--accent-hover); }
.breadcrumbs [aria-current] { color: var(--accent); }

/* ---------- FAQ ---------- */
.faq-list { display: grid; gap: 12px; max-width: 860px; }
.faq-item {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}
.faq-item summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 16px 18px;
    cursor: pointer;
    font-weight: 600;
    font-family: var(--font-display);
    font-size: 1rem;
    list-style: none;
    color: var(--text);
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary .i-caret { color: var(--accent); flex: 0 0 auto; transition: transform 0.16s var(--ease); }
.faq-item[open] summary .i-caret { transform: rotate(180deg); }
.faq-item[open] summary { border-bottom: 1px solid var(--border-soft); }
.faq-item__body { padding: 14px 18px 16px; color: var(--muted); font-size: 0.95rem; }
.faq-item__body p:last-child { margin-bottom: 0; }

/* ---------- Alertas ---------- */
.alert {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    border-radius: var(--r-md);
    padding: 18px 20px;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--muted);
    margin: 0 0 18px;
}
.alert svg { flex: 0 0 auto; margin-top: 2px; }
.alert--warn { border-color: rgba(224, 150, 79, 0.45); background: linear-gradient(120deg, var(--accent-tint), var(--surface) 62%); }
.alert--warn svg { color: var(--accent); }
.alert p:last-child { margin-bottom: 0; }
.alert p + p { margin-top: 0.6em; }

/* ---------- Mapa ---------- */
.map-embed {
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    box-shadow: var(--shadow-md);
    overflow: hidden;
    max-width: 920px;
    aspect-ratio: 16 / 9;
    min-height: 300px;
    background: var(--surface-2);
}
.map-embed iframe { width: 100%; height: 100%; border: 0; display: block; }
@media (max-width: 640px) {
    .map-embed { aspect-ratio: 4 / 3; min-height: 0; }
}

/* ---------- Empresa / ventajas ---------- */
.company-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: clamp(26px, 4vw, 54px); align-items: start; }
.facts-list { display: grid; gap: 12px; margin: 18px 0 0; padding: 0; list-style: none; }
.facts-list li {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    background: var(--surface);
    border: 1px solid var(--border-soft);
    border-radius: var(--r-md);
    padding: 13px 16px;
    font-size: 0.93rem;
    color: var(--muted);
}
.facts-list svg { color: var(--accent); flex: 0 0 auto; margin-top: 2px; }
.facts-list strong { color: var(--text); }

/* ---------- Artículos ---------- */
.article-card { display: flex; flex-direction: column; gap: 8px; }
.article-card h3 { margin-bottom: 4px; }
.article-card .card-link { color: var(--accent-hover); font-weight: 600; font-size: 0.92rem; margin-top: auto; }

/* ---------- Bloque calculador ---------- */
.calc-section { overflow: hidden; }

/* ---------- Cinta CTA final ---------- */
.cta-band {
    background:
        var(--texture-grid),
        linear-gradient(120deg, rgba(224, 150, 79, 0.2), rgba(224, 150, 79, 0.06) 55%, transparent),
        var(--surface-2);
    border: 1px solid var(--accent-deep);
    border-radius: var(--r-xl);
    box-shadow: var(--shadow-md);
    padding: clamp(28px, 4vw, 44px);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}
.cta-band h2 { margin-bottom: 6px; }
.cta-band p { color: var(--muted); margin: 0; max-width: 52ch; }

/* ---------- Página de oferta especial ---------- */
.urgency-strip {
    background: linear-gradient(90deg, #7A3A12, #A85B1E 45%, #7A3A12);
    color: #FFF4E6;
    font-size: 0.86rem;
    font-weight: 600;
    padding: 9px 0;
}
.urgency-strip .container { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 34px; }
.urgency-strip span { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
.urgency-strip svg { color: #FFD9AC; }

.so-hero { position: relative; overflow: hidden; padding: clamp(40px, 6vw, 72px) 0; background:
    var(--texture-grid),
    radial-gradient(1000px 500px at 80% 0%, rgba(224, 150, 79, 0.2), transparent 62%),
    linear-gradient(180deg, #201709, var(--bg));
    border-bottom: 1px solid var(--border-soft); }

.offer-steps { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }

.countdown { display: inline-flex; gap: 8px; align-items: center; font-variant-numeric: tabular-nums; }
.countdown__pair {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}
.countdown__digits {
    display: inline-flex;
    gap: 3px;
}
.countdown__digit {
    background: var(--bg-deep);
    border: 1px solid var(--border);
    border-bottom: 2px solid var(--accent-deep);
    border-radius: 6px;
    color: var(--accent-hover);
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.6rem;
    line-height: 1;
    padding: 8px 7px;
    min-width: 32px;
    text-align: center;
}
.countdown__label { font-size: 0.66rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.countdown__sep { color: var(--accent); font-size: 1.5rem; font-weight: 700; padding-bottom: 16px; }

.so-modal {
    position: fixed;
    inset: 0;
    z-index: 400;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.so-modal.is-open { display: flex; }
.so-modal__overlay { position: absolute; inset: 0; background: rgba(10, 8, 5, 0.72); backdrop-filter: blur(3px); }
.so-modal__card {
    position: relative;
    background: var(--surface);
    border: 1px solid var(--accent-deep);
    border-radius: var(--r-xl);
    box-shadow: var(--shadow-lg);
    max-width: 480px;
    width: 100%;
    padding: 30px 28px 26px;
    text-align: center;
    animation: so-pop 0.22s var(--ease);
}
@keyframes so-pop { from { opacity: 0; transform: translateY(12px) scale(0.98); } to { opacity: 1; transform: none; } }
.so-modal__close {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: var(--surface-2);
    color: var(--text);
    font-size: 1.25rem;
    line-height: 1;
    cursor: pointer;
    transition: background-color 0.15s var(--ease), color 0.15s var(--ease);
}
.so-modal__close:hover { background: var(--accent-tint); color: var(--accent-hover); }
.so-modal__card h3 { font-size: 1.5rem; margin: 14px 0 10px; }
.so-modal__card p { color: var(--muted); font-size: 0.95rem; }

/* ---------- 404 ---------- */
.error-page { text-align: center; padding: clamp(70px, 10vw, 130px) 0; }
.error-page h1 { font-size: clamp(4rem, 14vw, 7.5rem); color: var(--accent); margin-bottom: 0.1em; }
.error-page p { color: var(--muted); max-width: 52ch; margin-inline: auto; }

/* ---------- Footer ---------- */
.site-footer {
    background: var(--bg-deep);
    border-top: 1px solid var(--border-soft);
    padding: clamp(44px, 6vw, 70px) 0 26px;
    margin-top: auto;
}
.footer-grid { display: grid; grid-template-columns: 1.3fr repeat(4, minmax(150px, 0.8fr)); gap: 30px 24px; }
.footer-brand p { color: var(--muted); font-size: 0.9rem; margin: 16px 0 0; }
.footer-contact { font-size: 0.86rem; color: var(--muted); display: flex; flex-direction: column; gap: 6px; }
.footer-contact svg { color: var(--accent); vertical-align: -3px; margin-right: 6px; }
.footer-col h3 { font-size: 0.85rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text); margin-bottom: 14px; }
.footer-col ul { list-style: none; margin: 0; padding: 0; }
.footer-col a { display: inline-block; color: var(--muted); font-size: 0.88rem; padding: 4px 0; }
.footer-col a:hover { color: var(--accent-hover); }
.footer-disclaimer {
    margin-top: 40px;
    border-top: 1px solid var(--border-soft);
    padding-top: 24px;
    font-size: 0.8rem;
    color: var(--muted);
}
.footer-disclaimer h3 { font-size: 0.85rem; letter-spacing: 0.1em; text-transform: uppercase; }
.footer-bottom {
    margin-top: 22px;
    border-top: 1px solid var(--border-soft);
    padding-top: 18px;
    font-size: 0.8rem;
    color: var(--muted);
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 10px;
}

/* ---------- Scroll reveal ---------- */
html.js .reveal { opacity: 0; transform: translateY(10px); transition: opacity 0.5s var(--ease), transform 0.5s var(--ease); }
html.js .reveal.is-visible { opacity: 1; transform: none; }
html.js .reveal-d1 { transition-delay: 0.07s; }
html.js .reveal-d2 { transition-delay: 0.14s; }
html.js .reveal-d3 { transition-delay: 0.21s; }

/* ---------- Motivos decorativos (SVG) ---------- */
.motif-side { position: absolute; color: var(--accent); opacity: 0.5; pointer-events: none; }
.hero-motif-candle { transform-origin: center bottom; }

/* ---------- Responsive ---------- */
@media (max-width: 1020px) {
    .footer-grid { grid-template-columns: 1fr 1fr 1fr; }
    .footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 920px) {
    #home-form-grid { grid-template-columns: minmax(0, 1fr) !important; }
    .main-nav { display: none; }
    .burger { display: inline-flex; }
    .header-cta .btn { display: none; }
    .hero__grid, .page-hero__grid { grid-template-columns: minmax(0, 1fr); }
    .hero__bg { opacity: 0.42; inset: -4% -6% auto auto; }
    .card-grid--asym { grid-template-columns: minmax(0, 1fr); }
    .company-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .hero__title { max-width: none; }
    .table-wrap table { min-width: 520px; }
    .urgency-strip .container { gap: 6px 18px; font-size: 0.78rem; }
}

/* ---------- Movimiento reducido ---------- */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    html.js .reveal { opacity: 1; transform: none; }
    .card:hover, .step:hover, .exchange-chip:hover, .trust-link:hover, .btn:hover { transform: none; }
}

/* ---------- Ajustes de accesibilidad sobre el widget del calculador ---------- */
.calc-widget__range { height: 24px !important; }
.calc-widget__cta { min-height: 24px; }
.calc-modal__title { color: #F2EBE0 !important; }
.calc-modal__content { color: #BDB2A0; }
.calc-modal__content p, .calc-modal__legal { color: #BDB2A0; }

/* Shared ticker and telephone field adjustments. */
.tv-ticker-wrapper {
    padding-top: 0 !important;
    height: 58px !important;
}

.iti__selected-country,
.iti__selected-dial-code {
    color: rgb(24, 33, 47) !important;
}

/* Home page */
.hero--regional,
.home-reviews {
    --home-edge: rgba(224, 150, 79, .32);
}

.hero--regional {
    border-bottom: 1px solid var(--home-edge);
}

.hero--regional h1 {
    text-wrap: balance;
}

.hero--regional .hero__grid {
    column-gap: clamp(32px, 5.2vw, 80px);
}

.home-reviews {
    gap: clamp(16px, 2vw, 28px);
}

.home-reviews .review,
.home-reviews .review-card {
    border-top: 2px solid var(--home-edge);
}

.home-reviews img.review__avatar,
.home-reviews img.review-avatar {
    display: block;
    width: 56px;
    height: 56px;
    object-fit: cover;
    border: 2px solid var(--home-edge);
    border-radius: 50%;
    flex: none;
}

/* Requested shared widget adjustments */
.tv-ticker-wrapper { padding-top: 0 !important; height: 58px !important; }
.iti__selected-country, .iti__selected-dial-code { color: rgb(24, 33, 47) !important; }

/* Homepage visual refinement */
.home-refresh { position:relative; isolation:isolate; overflow:hidden; background:rgb(23,19,15) !important; }
.home-refresh::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background-image: linear-gradient(105deg, rgba(23,19,15, .91) 0%, rgba(23,19,15, .84) 32%, rgba(23,19,15, .40) 92%), url('../images/regional-finance.png');
    background-size: 100% 100%, 200% 300%;
    background-position: center, 0% 100%;
    pointer-events: none;
}
.home-refresh h1 { text-wrap:balance; letter-spacing:-.035em; line-height:1.12; }
.home-refresh .hero__copy { max-width:720px; }
.home-refresh .hero__lead, .home-refresh .hero__text { line-height:1.75; }
.home-refresh .hero__aside, .home-refresh .hero__form-col, .home-refresh .hero__form-wrap { filter:drop-shadow(0 18px 26px rgba(0,0,0,.14)); }
.home-refresh ~ .section .card { border-radius:18px; }
.home-reviews .review, .home-reviews .review-card { box-shadow:0 12px 30px rgba(0,0,0,.06); border-top:2px solid var(--accent); }
.review-photo { display:block; flex:0 0 56px; width:56px; height:56px; border-radius:50%; background-image:url('../images/review-portraits.png'); background-repeat:no-repeat; background-size:600% 300%; box-shadow:0 0 0 3px var(--accent-tint); }
@media (max-width: 700px) {
    .home-refresh::before {
        background-image: linear-gradient(110deg, rgba(23,19,15, .88), rgba(23,19,15, .69) 75%, rgba(23,19,15, .62)), url('../images/regional-finance.png');
    }
}
.review-photo-0 { background-position:0.000% 0%; }
.review-photo-1 { background-position:20.000% 0%; }
.review-photo-2 { background-position:40.000% 0%; }
.review-photo-3 { background-position:60.000% 0%; }
.review-photo-4 { background-position:80.000% 0%; }
.review-photo-5 { background-position:100.000% 0%; }

/* Homepage hero */
.home-refresh {
    --hero-edge: color-mix(in srgb, var(--accent) 27%, var(--border, var(--surface)));
    --hero-muted: color-mix(in srgb, var(--text) 86%, var(--surface));
    padding-block: clamp(40px, 5vw, 76px);
}

.home-refresh :is(.hero__grid, .hero-grid, .hero__inner) {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(340px, .9fr);
    gap: clamp(32px, 5vw, 76px);
    align-items: center;
    padding-block: 0;
}

.home-refresh :is(.hero__grid, .hero-grid, .hero__inner) > div {
    min-width: 0;
}

.home-refresh h1 {
    max-inline-size: 24ch;
    margin: 0 0 16px;
    font-size: clamp(2.25rem, 3.6vw, 3.125rem);
    letter-spacing: -.035em;
    line-height: 1.09;
    text-wrap: balance;
}

.home-refresh .hero__accent {
    color: var(--accent);
}

.home-refresh :is(p.hero__lead, .hero-sub, .hero__text) {
    max-inline-size: 55ch;
    margin: 0;
    color: var(--hero-muted);
    font-size: 1rem;
    line-height: 1.62;
}

.home-refresh :is(.hero__meta, .hero-meta, .hero__flags, .hero-flags) {
    margin-block: 20px 0;
    gap: 8px 12px;
}

.home-refresh :is(.hero__badges, .hero__links, .hero__trust, .hero-trust) {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-block: 14px 0;
}

.home-refresh :is(.hero__badge-link, .hero__link, .hero__trust-link, .trust-chip, .hero-trust-link, .trust-link, .hero-trust__link) {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    max-inline-size: 100%;
    min-block-size: 44px;
    padding: 6px 10px;
    border: 1px solid var(--hero-edge);
    border-radius: 10px;
    background: var(--surface);
    color: var(--text);
    text-decoration: none;
    font-size: .875rem;
}

.home-refresh :is(.hero__badge-link, .hero__link, .hero__trust-link, .trust-chip, .hero-trust-link, .trust-link, .hero-trust__link):is(:hover, :focus-visible) {
    border-color: var(--accent);
}

.home-refresh .hero-registration {
    box-sizing: border-box;
    inline-size: 100%;
    max-inline-size: 470px;
    justify-self: end;
    padding: clamp(20px, 2.5vw, 32px);
    border: 1px solid var(--hero-edge);
    border-block-start: 3px solid var(--accent);
    border-radius: 18px;
    background: var(--surface);
    box-shadow: 0 18px 48px rgba(0, 0, 0, .19);
}

.home-refresh .hero-registration :is(.form-slot, #registration-form, .hero-form-frame) {
    inline-size: 100%;
    max-inline-size: none;
    margin: 0;
    padding: 0;
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
}

.home-refresh .hero-registration :is(.form-heading, .form-block__heading, .form-block__title, .hero__form > h2, .form-block__intro:first-child) {
    margin: 0 0 16px;
    color: var(--text);
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1.25;
    text-wrap: pretty;
}

.home-refresh .hero-registration :is(.form-note, .form-block__note, .hero-form-note, .form-block__manager, .form-legal) {
    margin: 12px 0 0;
    color: var(--hero-muted);
    font-size: .8125rem;
    line-height: 1.5;
}

.home-refresh .hero-registration .form-legal {
    text-align: start;
}

.home-refresh .registration-form:has(> div:nth-child(5):last-child input[type="submit"]):not(:has(input[type="password"])) {
    grid-template: auto / repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.home-refresh .registration-form:has(> div:nth-child(5):last-child input[type="submit"]):not(:has(input[type="password"])) > div {
    grid-area: auto;
    min-width: 0;
}

.home-refresh .registration-form:has(> div:nth-child(5):last-child input[type="submit"]):not(:has(input[type="password"])) > div:nth-child(n + 3) {
    grid-column: 1 / -1;
}

.home-refresh .registration-form:has(> div:nth-child(5):last-child input[type="submit"]):not(:has(input[type="password"])) input:not([type="hidden"], .iti__search-input) {
    margin-block-end: 0;
}

.home-refresh .wpcf7-101 input:not([type="hidden"], [type="submit"], [type="checkbox"], [type="radio"], .iti__search-input) {
    min-height: 44px;
    border-radius: 9px;
}

.home-refresh .wpcf7-101 input[type="submit"] {
    min-height: 46px;
    border-radius: 9px;
    font-weight: 700;
}

.home-refresh .wpcf7-101 input:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.iti__selected-dial-code {color: #fff!important}
.iti__country-name {color: #000!important}

@media (max-width: 840px) {
    .home-refresh {
        padding-block: 32px 40px;
    }

    .home-refresh :is(.hero__grid, .hero-grid, .hero__inner) {
        grid-template-columns: minmax(0, 1fr);
        gap: 24px;
        align-items: start;
    }

    .home-refresh .hero__copy {
        display: block;
    }

    .home-refresh .hero-registration {
        order: 0;
        max-inline-size: 560px;
        justify-self: start;
    }

    .home-refresh h1 {
        max-inline-size: 27ch;
        margin-block-end: 12px;
        font-size: clamp(1.875rem, 6.5vw, 2.5rem);
        text-wrap: pretty;
    }

    .home-refresh :is(p.hero__lead, .hero-sub, .hero__text) {
        font-size: .9375rem;
        line-height: 1.55;
    }

    .home-refresh :is(.hero__badges, .hero__links, .hero__trust, .hero-trust) {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        max-inline-size: 420px;
    }

    .home-refresh :is(.hero__badge-link, .hero__link, .hero__trust-link, .trust-chip, .hero-trust-link, .trust-link, .hero-trust__link) {
        gap: 6px;
        padding-inline: 8px;
        font-size: .8125rem;
        line-height: 1.3;
    }

    .home-refresh :is(.hero__badges, .hero__links, .hero__trust, .hero-trust) :is(.icon-badge, .hero__trust-badge, .trust-chip__icon) {
        flex: 0 0 24px;
        inline-size: 24px !important;
        block-size: 24px !important;
    }

    .home-refresh .hero-registration :is(.form-heading, .form-block__heading, .form-block__title, .hero__form > h2, .form-block__intro:first-child) {
        margin-block-end: 14px;
        font-size: 1.125rem;
    }
}
