/* ==========================================================================
   VelizPetrola — estilos del sitio (sin frameworks)
   Paleta del estudio: azul #0f3b5f, tinta #1c2733, crema #faf7f2, arena #ece5da y terracota #b5603a
   (este último solo para detalles).
   ========================================================================== */

:root {
    --ink: #1c2733;
    --ink-2: #26323f;
    --ink-3: #34414f;
    --text: #1c2733;
    --text-muted: #5d6673;
    --text-inverse: #ffffff;
    --text-inverse-muted: #e3dfd6;
    --bg: #ffffff;
    --bg-alt: #f6f2ec;
    --cream: #faf7f2;
    --sand: #ece5da;
    --terra: #b5603a;
    --line: #e5ddd1;
    --line-dark: #34414f;

    --accent: #0f3b5f;
    --accent-hover: #164d78;
    --accent-2: #ece5da;
    --accent-ink: #ffffff;
    --accent-soft: #e7eef4;

    --bad: #b42318;
    --bad-soft: #fef3f2;
    --good: #2f6b3a;
    --good-soft: #eef6ef;

    --radius: 14px;
    --radius-sm: 8px;
    --shadow: 0 1px 2px rgb(0 0 0 / .05), 0 8px 24px rgb(0 0 0 / .06);
    --shadow-lg: 0 20px 50px rgb(0 0 0 / .25);

    --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    --serif: "Newsreader", Georgia, "Times New Roman", serif;
    --mono: "JetBrains Mono", ui-monospace, "Cascadia Code", Consolas, monospace;
}

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

html { scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: var(--font);
    font-size: 16px;
    line-height: 1.6;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 .5em; letter-spacing: -.01em; overflow-wrap: break-word; }
h1, h2 { font-family: var(--serif); font-weight: 500; letter-spacing: -.02em; }
h1 { font-size: clamp(2.2rem, 4.6vw, 3.6rem); line-height: 1.08; }
h2 { font-size: clamp(1.7rem, 3vw, 2.4rem); }
h1 em, h2 em { font-style: italic; color: var(--terra); }
h2 em { font-style: italic; }
h3 { font-size: 1.15rem; font-weight: 600; }
p { margin: 0 0 1em; }
a { color: var(--accent); }
code { font-family: var(--mono); font-size: .9em; }
img { max-width: 100%; height: auto; display: block; }

.container { width: min(1160px, 100% - 2.5rem); margin-inline: auto; }
.muted { color: var(--text-muted); }
.small { font-size: .875rem; }
.eyebrow {
    font-size: .95rem;
    font-weight: 600;
    letter-spacing: .02em;
    text-transform: uppercase;
    margin-bottom: .75rem;
}
.tag {
    display: inline-block;
    font-size: .72rem;
    font-weight: 600;
    padding: .15rem .55rem;
    border-radius: 999px;
    background: var(--accent-soft);
    color: var(--accent);
    margin-left: .4rem;
}
/* ---- Botones ------------------------------------------------------------ */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    padding: .7rem 1.2rem;
    border-radius: var(--radius-sm);
    border: 1px solid transparent;
    font: inherit;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: background .15s ease, color .15s ease;
}
.btn:disabled { opacity: .6; cursor: wait; }
.btn--primary {
    background: var(--accent);
    color: var(--accent-ink);
    padding: .8rem 1.4rem;
    border-radius: 999px;
}
.btn--primary:hover { background: var(--accent-hover); }
.btn--quiet { background: transparent; color: var(--accent); border-color: rgb(15 59 95 / .25); border-radius: 999px; padding: .8rem 1.4rem; }
.btn--quiet:hover { background: var(--accent-soft); }
.btn--ghost { background: transparent; border-color: currentColor; color: inherit; }
.btn--danger { background: transparent; border-color: var(--bad); color: var(--bad); }
.btn--danger:hover { background: var(--bad); color: #fff; }
.btn--sm { padding: .4rem .9rem; font-size: .875rem; }
.btn--lg { padding: .9rem 1.6rem; font-size: 1.05rem; }
.btn--block { width: 100%; }

/* ---- Navegación (solo admin) ------------------------------------------------- */

.nav {
    position: sticky;
    top: 0;
    z-index: 50;
    background: var(--ink);
    color: var(--text-inverse);
}
.nav__inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 64px; }
.brand {
    display: inline-flex;
    align-items: center;
    gap: .55rem;
    font-family: var(--serif);
    font-size: 1.35rem;
    color: inherit;
    text-decoration: none;
}
.nav__links { display: flex; align-items: center; gap: 1.4rem; }
.nav__links a:not(.btn) { color: var(--text-inverse-muted); text-decoration: none; font-weight: 500; }
.nav__links a:not(.btn):hover { color: var(--text-inverse); }
.nav__links form { margin: 0; }

/* ---- Encabezado del sitio --------------------------------------------------- */

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgb(250 247 242 / .9);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--line);
}
.site-header__inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 68px; }
.site-brand { display: inline-flex; align-items: center; gap: .65rem; color: var(--ink); text-decoration: none; }
.site-brand__mark {
    display: grid; place-items: center;
    width: 38px; height: 38px; border-radius: 50%;
    background: var(--accent); color: #fff;
    font-family: var(--serif); font-size: .95rem; font-weight: 600; letter-spacing: .02em;
}
.site-brand__text { display: flex; flex-direction: column; line-height: 1.1; font-family: var(--serif); font-size: 1.2rem; font-weight: 500; }
.site-brand__text small { font-family: var(--font); font-size: .72rem; font-weight: 500; letter-spacing: .06em; text-transform: uppercase; color: var(--text-muted); }
.site-brand--light { color: #fff; }
.site-brand--light .site-brand__mark { background: #fff; color: var(--accent); }
.site-brand--light .site-brand__text small { color: rgb(255 255 255 / .65); }
.site-nav { display: flex; align-items: center; gap: 1.6rem; }
.site-nav a:not(.btn) { color: var(--ink); text-decoration: none; font-weight: 500; font-size: .95rem; }
.site-nav a:not(.btn):hover { color: var(--accent); }
@media (max-width: 760px) { .site-nav a:not(.btn) { display: none; } }

/* ---- Secciones ------------------------------------------------------------ */

.section { padding: clamp(3.5rem, 8vw, 6rem) 0; }
.section--dark { background: var(--ink); color: var(--text-inverse); }
.section--sand { background: var(--sand); }
.section--cream { background: var(--cream); }
.section--navy { background: var(--accent); color: #fff; }
.section-head { max-width: 640px; margin-bottom: 2.5rem; }
.kicker {
    display: inline-flex; align-items: center; gap: .6rem;
    margin: 0 0 .9rem;
    font-size: .78rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase;
    color: var(--terra);
}
.kicker::before { content: ""; width: 22px; height: 1px; background: currentColor; }
.kicker--light { color: var(--sand); }

.card {
    background: var(--bg);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 1.6rem;
}

/* ---- Home: hero -------------------------------------------------------------- */

.home-hero { background: linear-gradient(180deg, var(--cream), #fff); padding: clamp(3rem, 8vw, 6.5rem) 0 clamp(3rem, 6vw, 5rem); }
.home-hero__grid { display: grid; grid-template-columns: 1.25fr 1fr; gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }
.home-hero__grid > * { min-width: 0; }
.home-hero h1 { margin-bottom: 1.5rem; }
.home-hero__lead { font-size: 1.15rem; color: var(--text-muted); max-width: 54ch; }
.home-hero__actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 2rem; }
.intents { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.6rem 1.6rem 1rem; }
.intents h2 { font-size: 1.35rem; margin-bottom: .75rem; }
.intents ul { list-style: none; margin: 0; padding: 0; }
.intents li + li { border-top: 1px solid var(--line); }
.intents a { display: flex; justify-content: space-between; gap: 1rem; padding: .85rem 0; color: var(--ink); text-decoration: none; font-weight: 500; }
.intents a span { color: var(--terra); transition: transform .15s ease; }
.intents a:hover { color: var(--accent); }
.intents a:hover span { transform: translateX(3px); }
@media (max-width: 900px) { .home-hero__grid { grid-template-columns: 1fr; } }

/* ---- Home: áreas ------------------------------------------------------------- */

.areas { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.25rem; }
@media (max-width: 1000px) { .areas { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .areas { grid-template-columns: 1fr; } }
.area {
    display: flex; flex-direction: column;
    padding: 1.5rem; border: 1px solid var(--line); border-radius: var(--radius);
    background: #fff; color: var(--ink); text-decoration: none;
    transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}
.area:hover { border-color: rgb(15 59 95 / .35); box-shadow: var(--shadow); transform: translateY(-2px); }
.area__icon { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 12px; background: var(--accent-soft); color: var(--accent); margin-bottom: 1.1rem; }
.area h3 { font-family: var(--serif); font-weight: 500; font-size: 1.3rem; margin-bottom: 1rem; }
.area p { color: var(--text-muted); font-size: .93rem; margin-bottom: 1.1rem; }
.area__more { margin-top: auto; font-weight: 600; font-size: .9rem; color: var(--accent); }

/* ---- Home: ¿Tu prepaga te negó un tratamiento? ------------------------------ */

.feature { display: grid; grid-template-columns: 1fr 1.2fr; gap: clamp(1.5rem, 5vw, 4.5rem); align-items: start; }
.feature h2 { margin: 0; }
.feature p { font-size: 1.12rem; color: var(--text-muted); margin-bottom: 2rem; }
@media (max-width: 760px) { .feature { grid-template-columns: 1fr; } }

/* ---- Home: en qué nos enfocamos ---------------------------------------------- */

.focus-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
@media (max-width: 900px) { .focus-cards { grid-template-columns: 1fr; } }
.focus-card { display: flex; flex-direction: column; padding: 1.75rem; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.focus-card h3 { font-family: var(--serif); font-weight: 500; font-size: 1.45rem; margin-bottom: .75rem; }
.focus-card p { color: var(--text-muted); }
.focus-card__more { margin-top: auto; padding-top: .5rem; font-weight: 600; font-size: .92rem; text-decoration: none; }
.section-head__sub { color: var(--text-muted); font-size: 1.05rem; margin: 0; }

/* ---- Home: un poco más de nosotros ------------------------------------------- */

.about h2 { margin-bottom: 1.5rem; }
.about p { font-size: 1.05rem; color: var(--text-muted); max-width: 75ch; }

/* ---- Formularios ------------------------------------------------------------ */

.form { display: grid; gap: 1rem; }
.form label { display: grid; gap: .35rem; font-size: .9rem; font-weight: 500; }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 560px) { .form__row { grid-template-columns: 1fr; } }
input, select, textarea {
    width: 100%;
    font: inherit;
    font-size: .95rem;
    color: var(--text);
    padding: .65rem .8rem;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: #fff;
    transition: border-color .15s ease, box-shadow .15s ease;
}
input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgb(15 59 95 / .18);
}
textarea { resize: vertical; }
.input-validation-error { border-color: var(--bad); }
.field-error { color: var(--bad); font-size: .8rem; font-weight: 500; }
.field-error:empty { display: none; }
.form__note { font-size: .8rem; color: var(--text-muted); text-align: center; margin: 0; }
.form__error { margin: 0; text-align: center; }
.form__note a { color: inherit; }
/* Badge flotante de reCAPTCHA oculto: el aviso que exige Google está debajo del formulario. */
.grecaptcha-badge { visibility: hidden; }
.hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.alert { background: var(--bad-soft); color: var(--bad); padding: .7rem 1rem; border-radius: var(--radius-sm); margin: 0; }

.thanks { text-align: center; padding: 3rem 2rem; }
.thanks__icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 1rem;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--good-soft);
    color: var(--good);
    font-size: 2rem;
    font-weight: 800;
}

/* ---- Pie del sitio ------------------------------------------------------------ */

.site-footer { background: var(--ink); color: rgb(255 255 255 / .75); padding: 3.5rem 0 6rem; font-size: .93rem; }
.site-footer a { color: inherit; text-decoration: none; }
.site-footer a:hover { color: #fff; }
.site-footer__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2.5rem; }
@media (max-width: 900px) { .site-footer__grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .site-footer__grid { grid-template-columns: 1fr; } }
.site-footer h2 { font-family: var(--font); font-size: .78rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--sand); margin-bottom: 1rem; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .55rem; }
.site-footer .kicker { margin-bottom: 1.75rem; }
/* Al tocar "Contacto" en el menú, el bloque de datos se marca un momento para orientar al usuario. */
.footer-contact { align-self: start; border-radius: 10px; outline: 1px solid transparent; outline-offset: 14px; }
.footer-contact.is-highlighted { animation: contact-highlight 3.2s ease-out; }
@keyframes contact-highlight {
    0%, 100% { outline-color: transparent; background-color: transparent; box-shadow: 0 0 0 14px transparent; }
    15%, 70% { outline-color: rgb(236 229 218 / .6); background-color: #2f4a66; box-shadow: 0 0 0 14px #2f4a66; }
}
.site-footer__bottom { display: flex; flex-wrap: wrap; gap: 1.25rem; margin-top: 3rem; padding-top: 1.25rem; border-top: 1px solid var(--line-dark); font-size: .82rem; }

.prose { max-width: 70ch; }

/* ---- Páginas por área de práctica ----------------------------------------- */

.landing-hero { background: linear-gradient(180deg, var(--cream), #fff); padding: clamp(2.5rem, 6vw, 4.5rem) 0 clamp(2.5rem, 5vw, 3.5rem); border-bottom: 1px solid var(--line); }
.landing-hero h1 { max-width: 22ch; margin-bottom: 1.25rem; font-size: clamp(2rem, 4.4vw, 3.4rem); }
.landing-hero__lead { font-size: 1.15rem; max-width: 62ch; color: var(--text-muted); }
.landing-hero__actions { display: flex; flex-wrap: wrap; gap: .75rem; margin: 2rem 0 1.5rem; }
.landing-hero__by { margin: 0; font-size: .9rem; letter-spacing: .02em; color: var(--text-muted); }
.breadcrumb { font-size: .85rem; margin-bottom: 1.5rem; color: var(--text-muted); }
.breadcrumb a { color: var(--accent); }
.btn--light { background: #fff; color: var(--accent); border-color: #fff; }
.btn--light:hover { background: var(--sand); border-color: var(--sand); }
.btn--outline-light { background: transparent; color: #fff; border-color: #fff; }
.btn--outline-light:hover { background: rgb(255 255 255 / .12); }
.landing-narrow { max-width: 820px; }
.checklist { list-style: none; margin: 1.5rem 0; padding: 0; display: grid; gap: .9rem; }
.checklist li { position: relative; padding-left: 2rem; font-size: 1.05rem; }
.checklist li::before { content: "✓"; position: absolute; left: 0; top: 0; font-weight: 700; color: var(--terra); }
.landing-note { font-weight: 600; }
.landing-steps { list-style: none; margin: 2rem 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1.25rem; counter-reset: step; }
.landing-steps li { background: #fff; padding: 1.4rem; border-radius: var(--radius); counter-increment: step; }
.landing-steps li::before { content: "0" counter(step); display: block; font-family: var(--serif); font-size: 1rem; color: var(--terra); margin-bottom: .6rem; }
.landing-steps h3 { font-family: var(--serif); font-weight: 500; font-size: 1.25rem; }
.landing-steps p { margin: 0; color: var(--text-muted); }
.faq { display: grid; gap: .75rem; margin-top: 1.5rem; }
.faq details { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 1rem 1.25rem; background: #fff; }
.faq summary { cursor: pointer; font-weight: 600; }
.faq details p { margin: .75rem 0 0; color: var(--text-muted); }
.disclaimer { margin-top: 2rem; font-size: .85rem; color: var(--text-muted); }
.landing-contact { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: start; }
.landing-contact a { color: #fff; }
.landing-contact .form a { color: var(--accent); }
.landing-contact .card { color: var(--text); }
.landing-contact__areas a { margin-right: .75rem; }
@media (max-width: 860px) { .landing-contact { grid-template-columns: 1fr; } }
.focus-card__more { display: inline-block; margin-top: .75rem; font-weight: 600; color: inherit; }
.services__list a { color: inherit; }

/* ---- Admin ----------------------------------------------------------------------- */

.admin { padding-block: 2rem 4rem; }
.admin h1 { font-size: 1.4rem; }
.empty { padding: 2rem; text-align: center; color: var(--text-muted); background: var(--bg-alt); border-radius: var(--radius); }

.leads { display: grid; gap: 1rem; }
.lead { background: #fff; border: 1px solid var(--line); border-left: 4px solid var(--accent); border-radius: var(--radius-sm); padding: 1rem 1.2rem; }
.lead.is-handled { border-left-color: var(--line); opacity: .65; }
.lead header { display: flex; gap: .4rem; align-items: baseline; flex-wrap: wrap; }
.lead header time { margin-left: auto; font-size: .78rem; color: var(--text-muted); }
.lead__meta { font-size: .88rem; margin: .3rem 0 .6rem; }
.lead__msg { white-space: pre-wrap; font-size: .93rem; }

.admin__section { margin-top: 2.5rem; }
.email-log__scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius-sm); background: #fff; }
.email-log { width: 100%; border-collapse: collapse; font-size: .88rem; }
.email-log th, .email-log td { text-align: left; vertical-align: top; padding: .55rem .8rem; border-bottom: 1px solid var(--line); }
.email-log th { background: var(--bg-alt); font-weight: 600; white-space: nowrap; }
.email-log tr:last-child td { border-bottom: none; }
.email-log td:first-child { white-space: nowrap; }

.login { min-height: 60vh; display: grid; place-items: center; }
.login .form { width: min(400px, 100%); }
.login h1 { font-size: 1.4rem; }

.nav--admin .tag { background: var(--ink-3); color: var(--accent-2); }

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