/*
 * CEA Autostanford — página de demostración de myCloudData.
 * Hoja única, sin dependencias: lo que se ve es lo que hay.
 */

:root {
    --ink: #10231a;
    --ink-soft: #52665c;
    --line: #dfe7e2;
    --bg: #ffffff;
    --bg-soft: #f3f8f5;
    --green: #0f9b63;
    --green-dark: #0b7a4e;
    --green-soft: #e4f5ec;
    --radius: 16px;
    --shadow: 0 18px 44px rgb(16 35 26 / 0.12);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: Outfit, system-ui, -apple-system, "Segoe UI", sans-serif;
    font-size: 16px;
    line-height: 1.55;
}

h1, h2, h3 {
    line-height: 1.15;
    margin: 0 0 0.5rem;
}

p {
    margin: 0 0 1rem;
}

a {
    color: var(--green-dark);
}

.wrap {
    width: min(1120px, 100% - 2.5rem);
    margin-inline: auto;
}

/* ---------- barra superior ---------- */

.top {
    position: sticky;
    top: 0;
    z-index: 10;
    background: rgb(255 255 255 / 0.92);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--line);
}

.top-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.75rem 0;
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    text-decoration: none;
    color: inherit;
}

.brand-mark {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: var(--green);
    color: #fff;
    font-weight: 800;
    letter-spacing: 0.02em;
}

.brand-text strong {
    display: block;
    font-size: 1.05rem;
}

.brand-text small {
    display: block;
    color: var(--ink-soft);
    font-size: 0.75rem;
}

.nav {
    display: flex;
    align-items: center;
    gap: 1.4rem;
}

.nav a {
    color: var(--ink-soft);
    text-decoration: none;
    font-size: 0.95rem;
}

.nav a:hover {
    color: var(--ink);
}

/* ---------- botones ---------- */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.7rem 1.2rem;
    border: 1px solid transparent;
    border-radius: 999px;
    background: var(--green);
    color: #fff;
    font: inherit;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
}

.btn:hover {
    background: var(--green-dark);
}

.btn-ghost {
    background: transparent;
    border-color: var(--line);
    color: var(--ink);
}

.btn-ghost:hover {
    background: var(--bg-soft);
    border-color: var(--green);
}

.btn-small {
    padding: 0.45rem 0.9rem;
    font-size: 0.9rem;
}

.btn-big {
    padding: 0.9rem 1.6rem;
    font-size: 1.05rem;
}

/* ---------- portada ---------- */

.hero {
    padding: 4rem 0 3.5rem;
    background:
        radial-gradient(1000px 420px at 12% -8%, var(--green-soft), transparent 70%),
        var(--bg);
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 3rem;
    align-items: start;
}

.eyebrow {
    color: var(--green-dark);
    font-weight: 600;
    font-size: 0.9rem;
    letter-spacing: 0.02em;
    margin-bottom: 0.75rem;
}

.hero h1 {
    font-size: clamp(2.1rem, 4.6vw, 3.2rem);
    font-weight: 800;
    letter-spacing: -0.02em;
}

.hero h1 em {
    font-style: normal;
    color: var(--green);
}

.lead {
    font-size: 1.1rem;
    color: var(--ink-soft);
    max-width: 34rem;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin: 1.75rem 0 0.75rem;
}

.note {
    color: var(--ink-soft);
    font-size: 0.9rem;
}

/* ---------- tarjetas ---------- */

.card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 1.5rem;
}

.hero-card {
    box-shadow: var(--shadow);
}

.hero-card h2 {
    font-size: 1.15rem;
}

.prices {
    list-style: none;
    margin: 1rem 0;
    padding: 0;
}

.prices li {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.6rem 0;
    border-bottom: 1px solid var(--line);
}

.prices li:last-child {
    border-bottom: 0;
}

.fine {
    color: var(--ink-soft);
    font-size: 0.85rem;
    margin: 0;
}

/* ---------- secciones ---------- */

.section {
    padding: 4rem 0;
}

.section-alt {
    background: var(--bg-soft);
}

.section-title {
    font-size: clamp(1.6rem, 3vw, 2.2rem);
    font-weight: 800;
    letter-spacing: -0.015em;
}

.section-lead {
    color: var(--ink-soft);
    max-width: 38rem;
    margin-bottom: 2rem;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.25rem;
}

.grid-2 {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.course {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.course.featured {
    border-color: var(--green);
    box-shadow: var(--shadow);
}

.tag {
    align-self: flex-start;
    padding: 0.2rem 0.6rem;
    border-radius: 999px;
    background: var(--green-soft);
    color: var(--green-dark);
    font-size: 0.78rem;
    font-weight: 700;
}

.course h3 {
    font-size: 1.3rem;
    margin: 0.35rem 0 0;
}

.price {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--green-dark);
    margin: 0 0 0.5rem;
}

.course ul {
    list-style: none;
    margin: 0 0 1.1rem;
    padding: 0;
    color: var(--ink-soft);
    font-size: 0.93rem;
}

.course li {
    padding: 0.18rem 0;
}

.course .btn {
    margin-top: auto;
}

.combos {
    margin-top: 2.5rem;
}

.combos h3 {
    font-size: 1.2rem;
    margin-bottom: 0.9rem;
}

.combo-name {
    margin-bottom: 0.4rem;
}

.combo .price {
    font-size: 1.3rem;
}

.feature h3 {
    font-size: 1.1rem;
}

.feature p {
    color: var(--ink-soft);
    margin: 0;
}

.address {
    font-size: 1.05rem;
}

.hours dl {
    margin: 0;
}

.hours dt {
    font-weight: 600;
    margin-top: 0.9rem;
}

.hours dd {
    margin: 0.15rem 0 0;
    color: var(--ink-soft);
    font-size: 0.93rem;
}

/* ---------- pie ---------- */

.foot {
    background: var(--ink);
    color: #cfded6;
    padding: 2.5rem 0 1.5rem;
}

.foot a {
    color: #7fe3b4;
}

.foot strong {
    color: #fff;
}

.foot .fine {
    color: #9fb5aa;
}

.foot-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.5rem;
}

.demo-note {
    width: min(1120px, 100% - 2.5rem);
    margin: 2rem auto 0;
    padding-top: 1.2rem;
    border-top: 1px solid rgb(255 255 255 / 0.12);
    color: #8aa497;
    font-size: 0.8rem;
}

@media (max-width: 860px) {
    .hero-grid {
        grid-template-columns: 1fr;
    }

    .nav a:not(.btn) {
        display: none;
    }
}

/* ---------- el asistente ---------- */

.bot-sr {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
}

.bot-bubble {
    position: fixed;
    right: 1.25rem;
    bottom: 1.25rem;
    z-index: 40;
    display: flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.8rem 1.25rem;
    border: 0;
    border-radius: 999px;
    background: var(--green);
    color: #fff;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
    box-shadow: var(--shadow);
}

.bot-bubble:hover {
    background: var(--green-dark);
}

#bot.is-open .bot-bubble {
    display: none;
}

/*
 * Importa el orden: `display: flex` gana al `display: none` que el
 * atributo `hidden` trae por defecto, así que el panel seguía tapando
 * la página y comiéndose los clics estando "oculto".
 */
.bot-panel[hidden] {
    display: none;
}

.bot-panel {
    position: fixed;
    right: 1.25rem;
    bottom: 1.25rem;
    z-index: 40;
    display: flex;
    flex-direction: column;
    width: min(380px, calc(100vw - 2.5rem));
    height: min(620px, calc(100vh - 2.5rem));
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: #fff;
    box-shadow: var(--shadow);
}

.bot-head {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.85rem 1rem;
    border-bottom: 1px solid var(--line);
    background: var(--bg-soft);
}

.bot-avatar {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--green);
    color: #fff;
    font-size: 0.82rem;
    font-weight: 800;
}

.bot-who {
    flex: 1;
    min-width: 0;
}

.bot-who b {
    display: block;
    font-size: 0.97rem;
}

.bot-who small {
    display: block;
    color: var(--green-dark);
    font-size: 0.78rem;
}

.bot-restart,
.bot-close {
    border: 0;
    background: transparent;
    color: var(--ink-soft);
    font-size: 1rem;
    line-height: 1;
    padding: 0.35rem;
    cursor: pointer;
    border-radius: 8px;
}

.bot-restart:hover,
.bot-close:hover {
    background: #e7efea;
    color: var(--ink);
}

.bot-restart {
    font-size: 1.05rem;
}

.bot-again {
    display: block;
    margin: 0.2rem auto 0.6rem;
    padding: 0.5rem 1rem;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #fff;
    color: var(--green-dark);
    font: inherit;
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
}

.bot-again:hover {
    border-color: var(--green);
    background: var(--green-soft);
}

.bot-log {
    flex: 1;
    overflow-y: auto;
    padding: 1rem 0.9rem;
    background: #f7faf8;
    scrollbar-width: thin;
}

.bot-row {
    display: flex;
    margin-bottom: 0.5rem;
}

.bot-row.is-mine {
    justify-content: flex-end;
}

.bot-msg {
    max-width: 84%;
    padding: 0.55rem 0.75rem;
    border-radius: 14px;
    font-size: 0.93rem;
    line-height: 1.45;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.is-theirs .bot-msg {
    background: #fff;
    border: 1px solid var(--line);
    border-bottom-left-radius: 4px;
}

.is-mine .bot-msg {
    background: var(--green);
    color: #fff;
    border-bottom-right-radius: 4px;
}

.bot-img {
    display: block;
    width: 100%;
    max-height: 180px;
    object-fit: cover;
    border-radius: 10px;
    margin-bottom: 0.4rem;
}

.bot-file {
    display: inline-block;
    padding: 0.4rem 0.6rem;
    border: 1px solid var(--line);
    border-radius: 10px;
    font-size: 0.88rem;
    text-decoration: none;
}

.bot-choices {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    margin: 0.3rem 0 0.6rem;
}

.bot-choice {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    padding: 0.55rem 0.8rem;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fff;
    color: var(--green-dark);
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.bot-choice:hover {
    border-color: var(--green);
    background: var(--green-soft);
}

.bot-choice small {
    color: var(--ink-soft);
    font-size: 0.78rem;
    font-weight: 400;
}

.bot-typing,
.bot-ended,
.bot-error {
    margin: 0.4rem 0;
    font-size: 0.85rem;
    color: var(--ink-soft);
    text-align: center;
}

.bot-error {
    color: #a3301f;
}

.bot-form {
    display: flex;
    gap: 0.5rem;
    padding: 0.7rem;
    border-top: 1px solid var(--line);
    background: #fff;
}

.bot-input {
    flex: 1;
    min-width: 0;
    padding: 0.6rem 0.9rem;
    border: 1px solid var(--line);
    border-radius: 999px;
    font: inherit;
    font-size: 0.93rem;
}

.bot-input:focus {
    outline: 2px solid var(--green);
    outline-offset: 1px;
}

.bot-send {
    width: 42px;
    height: 42px;
    flex-shrink: 0;
    border: 0;
    border-radius: 50%;
    background: var(--green);
    color: #fff;
    font-size: 1rem;
    cursor: pointer;
}

.bot-send:hover {
    background: var(--green-dark);
}
