/* ==========================================================================
   Punkio — sistema visual
   Concepto "Punku" (puerta): crema adobe + verde petróleo + terracota.
   ========================================================================== */

:root {
    /* Paleta base */
    --cream-50: #fbf8f3;
    --cream-100: #f6f1e9;
    --cream-200: #ece4d7;
    --sand-300: #e3d3b8;
    --teal-900: #0b3431;
    --teal-800: #0e4f4a;
    --teal-600: #1b7a70;
    --teal-100: #d7ebe6;
    --terra-600: #b8461f;
    --terra-500: #e2643a;
    --terra-100: #f8dccb;
    --ink-900: #14201f;
    --ink-600: #56625f;

    /* Tokens semánticos (tema claro) */
    --bg: var(--cream-100);
    --surface: #ffffff;
    --surface-muted: var(--cream-50);
    --text: var(--ink-900);
    --text-muted: var(--ink-600);
    --line: var(--cream-200);
    --brand: var(--teal-800);
    --brand-strong: var(--teal-900);
    --on-brand: #ffffff;
    --accent: var(--terra-500);
    --accent-text: var(--terra-600);
    --focus: var(--terra-500);
    --error: #b42318;
    --success: #0e7a5a;

    --chip-teal-bg: var(--teal-100);
    --chip-teal-fg: var(--teal-800);
    --chip-terra-bg: var(--terra-100);
    --chip-terra-fg: var(--terra-600);
    --chip-sand-bg: #f1e6d2;
    --chip-sand-fg: #7a5a24;

    --arch-from: var(--teal-800);
    --arch-to: var(--teal-900);
    --arch-line: rgba(246, 241, 233, 0.22);

    --shadow-sm: 0 1px 2px rgba(20, 32, 31, 0.06);
    --shadow-lg: 0 18px 40px -12px rgba(11, 52, 49, 0.28), 0 4px 10px -4px rgba(11, 52, 49, 0.12);

    --font-display: 'Bricolage Grotesque', 'Inter', system-ui, sans-serif;
    --font-body: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;

    --radius-sm: 10px;
    --radius-md: 14px;
    --radius-lg: 22px;
    --gutter: clamp(16px, 5vw, 48px);
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg: #0f1716;
        --surface: #16211f;
        --surface-muted: #131d1b;
        --text: #f2eee7;
        --text-muted: #a3adaa;
        --line: #25332f;
        --brand: #f07a52;
        --brand-strong: #f58f6c;
        --on-brand: #1a0f0a;
        --accent: #f07a52;
        --accent-text: #f58f6c;
        --focus: #f58f6c;
        --error: #f97066;
        --success: #5fd3a8;

        --chip-teal-bg: rgba(63, 182, 168, 0.16);
        --chip-teal-fg: #7fd6c9;
        --chip-terra-bg: rgba(240, 122, 82, 0.16);
        --chip-terra-fg: #f7a283;
        --chip-sand-bg: rgba(227, 211, 184, 0.14);
        --chip-sand-fg: #e3d3b8;

        --arch-from: #13524c;
        --arch-to: #0b2f2c;

        --shadow-sm: none;
        --shadow-lg: 0 18px 40px -12px rgba(0, 0, 0, 0.6);
    }
}

/* ---------- Base ---------- */

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

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

body {
    font-family: var(--font-body);
    background-color: var(--bg);
    color: var(--text);
    line-height: 1.5;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

main {
    flex: 1;
}

a {
    color: var(--accent-text);
    text-underline-offset: 3px;
}

:focus-visible {
    outline: 3px solid var(--focus);
    outline-offset: 3px;
    border-radius: 6px;
}

.icon {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
    flex-shrink: 0;
}

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

.site-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    max-width: 1160px;
    width: 100%;
    margin: 0 auto;
    padding: 24px var(--gutter);
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--text);
    text-decoration: none;
}

.brand-mark {
    width: 36px;
    height: 36px;
}

.brand-mark-bg { fill: var(--teal-800); }
.brand-mark-door { fill: none; stroke: var(--cream-100); stroke-width: 2.6; stroke-linecap: round; }
.brand-mark-knob { fill: var(--terra-500); }

.brand-name {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 1.6rem;
    letter-spacing: -0.03em;
}

.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
    background: var(--surface);
    border: 1px solid var(--line);
    padding: 6px 14px;
    border-radius: 999px;
    box-shadow: var(--shadow-sm);
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 0 0 rgba(226, 100, 58, 0.5);
    animation: pulse 2.4s ease-out infinite;
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(226, 100, 58, 0.45); }
    70% { box-shadow: 0 0 0 8px rgba(226, 100, 58, 0); }
    100% { box-shadow: 0 0 0 0 rgba(226, 100, 58, 0); }
}

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

.hero {
    max-width: 1160px;
    margin: 0 auto;
    padding: clamp(24px, 6vw, 72px) var(--gutter) clamp(48px, 8vw, 96px);
    display: grid;
    grid-template-columns: 1fr;
    gap: clamp(48px, 7vw, 80px);
    align-items: center;
}

@media (min-width: 920px) {
    .hero {
        grid-template-columns: 1.1fr 0.9fr;
    }
}

.eyebrow {
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--accent-text);
    margin-bottom: 18px;
}

.eyebrow i {
    font-family: var(--font-display);
    font-weight: 800;
}

h1 {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: clamp(2.5rem, 6.4vw, 4.4rem);
    line-height: 1.02;
    letter-spacing: -0.03em;
    margin-bottom: 22px;
    text-wrap: balance;
}

.hl {
    position: relative;
    isolation: isolate;
    white-space: nowrap;
    color: var(--brand);
}

.hl::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0.04em;
    height: 0.14em;
    background: var(--accent);
    opacity: 0.35;
    border-radius: 999px;
    z-index: -1;
}

.lead {
    font-size: clamp(1.05rem, 1.6vw, 1.2rem);
    line-height: 1.6;
    color: var(--text-muted);
    max-width: 34em;
    margin-bottom: 32px;
    text-wrap: pretty;
}

/* ---------- Formulario ---------- */

.waitlist {
    max-width: 520px;
}

.form-card {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 20px;
    box-shadow: var(--shadow-lg);
}

@media (min-width: 520px) {
    .form-card {
        grid-template-columns: 1fr 1fr;
        padding: 24px;
    }

    .field-full {
        grid-column: 1 / -1;
    }
}

.field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

.field label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text);
}

.optional {
    font-weight: 400;
    color: var(--text-muted);
}

.field input,
.field textarea {
    width: 100%;
    padding: 11px 13px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--surface-muted);
    color: var(--text);
    font: inherit;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.field textarea {
    resize: vertical;
    min-height: 84px;
    line-height: 1.5;
}

.field input::placeholder,
.field textarea::placeholder {
    color: var(--text-muted);
    opacity: 0.7;
}

.field input:focus-visible,
.field textarea:focus-visible {
    border-color: var(--brand);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 18%, transparent);
    outline: none;
    border-radius: var(--radius-sm);
}

.field [aria-invalid="true"] {
    border-color: var(--error);
}

button {
    background: var(--brand);
    color: var(--on-brand);
    font: inherit;
    font-weight: 600;
    font-size: 1rem;
    padding: 13px 20px;
    border-radius: var(--radius-sm);
    border: none;
    cursor: pointer;
    white-space: nowrap;
    transition: background-color 0.2s ease, transform 0.2s ease;
}

button:hover {
    background: var(--brand-strong);
    transform: translateY(-1px);
}

button:active {
    transform: translateY(0);
}

button:disabled {
    opacity: 0.6;
    cursor: wait;
    transform: none;
}

.form-status {
    min-height: 1.5em;
    margin: 10px 2px 4px;
    font-size: 0.9rem;
    font-weight: 500;
}

.form-status.is-success { color: var(--success); }
.form-status.is-error { color: var(--error); }

.perks {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 6px 18px;
    font-size: 0.875rem;
    color: var(--text-muted);
}

.perks li {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.perks .icon {
    width: 16px;
    height: 16px;
    stroke-width: 2.4;
    color: var(--success);
}

/* ---------- Visual del hero: arco + notificaciones ---------- */

.hero-visual {
    position: relative;
    width: min(100%, 420px);
    height: 460px;
    margin: 0 auto;
}

.arch {
    position: absolute;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
    width: 300px;
    height: 430px;
    border-radius: 150px 150px 20px 20px;
    background: linear-gradient(170deg, var(--arch-from), var(--arch-to));
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

/* Arcos concéntricos: el "portal" */
.arch::before,
.arch::after {
    content: "";
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    border: 1.5px solid var(--arch-line);
    border-bottom: none;
}

.arch::before {
    top: 26px;
    width: 248px;
    height: 420px;
    border-radius: 124px 124px 0 0;
}

.arch::after {
    top: 56px;
    width: 188px;
    height: 400px;
    border-radius: 94px 94px 0 0;
    background: radial-gradient(ellipse at 50% 20%, rgba(248, 220, 203, 0.18), transparent 70%);
}

/* Escalonado andino en la base del arco */
.arch-steps {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 64px;
    background: var(--terra-500);
    opacity: 0.9;
    clip-path: polygon(
        0 100%, 0 75%, 12% 75%, 12% 50%, 24% 50%, 24% 25%, 36% 25%, 36% 0,
        64% 0, 64% 25%, 76% 25%, 76% 50%, 88% 50%, 88% 75%, 100% 75%, 100% 100%
    );
}

.notif {
    position: absolute;
    display: flex;
    align-items: center;
    gap: 12px;
    width: 260px;
    padding: 12px 14px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    animation: float 6s ease-in-out infinite;
}

.notif-1 { top: 70px; left: 0; }
.notif-2 { top: 200px; right: 0; animation-delay: -2s; }
.notif-3 { top: 330px; left: 18px; animation-delay: -4s; }

@media (max-width: 440px) {
    .notif { width: 236px; }
    .notif-time { display: none; }
    .notif-1 { left: -4px; }
    .notif-2 { right: -4px; }
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}

.notif-icon,
.audience-icon {
    display: grid;
    place-items: center;
    border-radius: var(--radius-sm);
    flex-shrink: 0;
}

.notif-icon {
    width: 38px;
    height: 38px;
}

.is-teal { background: var(--chip-teal-bg); color: var(--chip-teal-fg); }
.is-terra { background: var(--chip-terra-bg); color: var(--chip-terra-fg); }
.is-sand { background: var(--chip-sand-bg); color: var(--chip-sand-fg); }

.notif-body {
    display: flex;
    flex-direction: column;
    min-width: 0;
    flex: 1;
}

.notif-body strong,
.notif-body small {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.notif-body strong {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text);
}

.notif-body small {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.notif-time {
    align-self: flex-start;
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* ---------- Audiencias ---------- */

.audiences {
    max-width: 1160px;
    margin: 0 auto;
    padding: 0 var(--gutter) clamp(56px, 8vw, 96px);
}

.audiences h2 {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(1.6rem, 3.2vw, 2.2rem);
    letter-spacing: -0.025em;
    margin-bottom: 28px;
}

.audience-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}

@media (min-width: 760px) {
    .audience-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.audience {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 28px 24px;
    box-shadow: var(--shadow-sm);
}

.audience-icon {
    width: 44px;
    height: 44px;
    margin-bottom: 18px;
}

.audience-icon .icon {
    width: 22px;
    height: 22px;
}

.audience h3 {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.25rem;
    letter-spacing: -0.015em;
    margin-bottom: 8px;
}

.audience p {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.6;
}

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

.site-footer {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 12px;
    max-width: 1160px;
    width: 100%;
    margin: 0 auto;
    padding: 24px var(--gutter) 32px;
    border-top: 1px solid var(--line);
    font-size: 0.875rem;
    color: var(--text-muted);
}

.site-footer a {
    color: var(--text-muted);
}

.site-footer a:hover {
    color: var(--text);
}

/* ---------- Páginas de texto (privacidad, 404) ---------- */

.page {
    max-width: 720px;
    margin: 0 auto;
    padding: clamp(24px, 6vw, 64px) var(--gutter) 72px;
}

.page h1 {
    font-size: clamp(2rem, 5vw, 3rem);
}

.page h2 {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.25rem;
    letter-spacing: -0.015em;
    margin: 32px 0 8px;
}

.page p {
    color: var(--text-muted);
    line-height: 1.7;
    margin-bottom: 12px;
}

.page .meta {
    font-size: 0.875rem;
}

.page .back {
    display: inline-block;
    margin-top: 32px;
    font-weight: 600;
}

/* ---------- Utilidades ---------- */

.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;
}

.hp {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation: none !important;
        transition: none !important;
    }
}
