/* =============================================================
   1. Tokens — diario editorial
   ============================================================= */
:root {
  --bg:    #faf7f0;
  --paper: #ffffff;
  --ink:   #16140e;
  --soft:  #4a453b;
  --mute:  #7a7468;
  --red:   #960018;
  --line:  #16140e;
  --display: "Playfair Display", Georgia, serif;
  --serif:   "Source Serif 4", Georgia, serif;
  --sans:    "Inter", system-ui, sans-serif;
}

/* =============================================================
   2. Reset & base
   ============================================================= */
*, *::before, *::after { box-sizing: border-box; margin: 0; }
html { -webkit-text-size-adjust: 100%; overflow-x: clip; scroll-behavior: smooth; scroll-padding-top: 20px; }
body { font-family: var(--serif); font-size: 17px; line-height: 1.65; color: var(--ink); background: var(--bg); -webkit-font-smoothing: antialiased; overflow-x: clip; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }
[hidden] { display: none !important; }  /* lo que el código oculta, queda oculto aunque su clase tenga display */
a { color: inherit; }
h1, h2, h3 { font-family: var(--display); text-wrap: balance; line-height: 1.1; }
:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; }

/* =============================================================
   3. Utilities
   ============================================================= */
.container { width: min(1000px, 100% - 2rem); margin-inline: auto; }
.skip-link { position: fixed; top: -100px; left: 1rem; padding: .6rem 1rem; background: var(--ink); color: var(--bg); z-index: 9999; }
.skip-link:focus { top: 1rem; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.demo-bar { background: var(--ink); color: var(--bg); text-align: center; font-family: var(--sans); font-size: .75rem; padding: .35rem 1rem; }
.hairline { height: 0; border-top: 1px solid var(--line); }
.center { text-align: center; }

/* =============================================================
   4. Masthead
   ============================================================= */
.masthead { padding-top: 1.2rem; }
.mast-row { display: grid; grid-template-columns: 1fr; text-align: center; padding: 1rem 0 .6rem; }
.brand { font-family: var(--display); font-weight: 800; font-size: clamp(2.4rem, 8vw, 4.6rem); text-decoration: none; letter-spacing: -.01em; line-height: 1.05; }
.meta { display: none; font-family: var(--sans); font-size: .72rem; text-transform: uppercase; letter-spacing: .14em; color: var(--mute); align-self: center; }
.mast-nav { display: flex; justify-content: center; flex-wrap: wrap; gap: .3rem 1.6rem; padding: .6rem 0; border-top: 1px solid var(--line); font-family: var(--sans); font-size: .8rem; text-transform: uppercase; letter-spacing: .1em; }
.mast-nav a { text-decoration: none; }
.mast-nav a:hover { color: var(--red); }

/* =============================================================
   5. Components
   ============================================================= */
.btn { display: inline-flex; align-items: center; justify-content: center; padding: .85rem 1.4rem; font-family: var(--sans); font-weight: 600; font-size: .92rem; text-decoration: none; border: 1px solid var(--ink); transition: background .2s, color .2s; }
.btn-red { background: var(--red); color: #fff; border-color: var(--red); }
.btn-red:hover { background: var(--ink); border-color: var(--ink); }
.btn-line:hover { background: var(--ink); color: var(--bg); }
.btn-block { width: 100%; }

.field { display: grid; gap: .3rem; margin-bottom: 1rem; border: 0; padding: 0; }
.field label, .field legend { font-family: var(--sans); font-size: .82rem; font-weight: 600; }
.field input, .field select { font: inherit; font-size: 1rem; padding: .7rem .8rem; border: 1px solid var(--ink); background: var(--paper); color: var(--ink); }
.chips { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .3rem; }
.chip input { position: absolute; opacity: 0; }
.chip span { display: inline-block; padding: .45rem .8rem; border: 1px solid var(--ink); font-family: var(--sans); font-size: .82rem; cursor: pointer; }
.chip input:checked + span { background: var(--ink); color: var(--bg); }
.chip input:focus-visible + span { outline: 2px solid var(--red); }
.form-error { color: var(--red); font-family: var(--sans); font-size: .85rem; margin-bottom: .6rem; }

/* =============================================================
   6. Sections
   ============================================================= */
.lead-story { padding: 3rem 0 3.5rem; }
.kicker { font-family: var(--sans); font-size: .76rem; font-weight: 600; text-transform: uppercase; letter-spacing: .16em; color: var(--red); margin-bottom: 1rem; }
.headline { font-weight: 800; font-size: clamp(2.4rem, 6.4vw, 4.4rem); max-width: 20ch; margin-bottom: 1.2rem; }
.headline em { font-weight: 500; font-style: italic; color: var(--red); }
.deck { font-size: 1.25rem; font-style: italic; color: var(--soft); max-width: 60ch; margin-bottom: 2rem; }
.cols p { margin-bottom: 1rem; text-align: justify; hyphens: auto; }
.dropcap { float: left; font-family: var(--display); font-weight: 800; font-size: 4.6rem; line-height: .82; padding: .3rem .5rem 0 0; color: var(--red); }
.actions { display: flex; flex-wrap: wrap; gap: .7rem; margin-top: 1.5rem; }

.section { padding: 2rem 0 3.5rem; }
.sec-title { font-weight: 800; font-size: clamp(1.8rem, 4vw, 2.6rem); margin: 1.2rem 0 1.6rem; }
.body { color: var(--soft); margin-bottom: 1rem; max-width: 46ch; }
.small { font-size: .9rem; color: var(--mute); }

.services { display: grid; gap: 0; border-top: 1px solid var(--line); }
.svc { padding: 1.3rem 0; border-bottom: 1px solid rgba(22,20,14,.2); }
.svc h3 { font-size: 1.35rem; margin-bottom: .4rem; }
.svc p { color: var(--soft); }
.pull { margin: 2.5rem auto 0; max-width: 34ch; text-align: center; font-family: var(--display); font-style: italic; font-weight: 500; font-size: clamp(1.4rem, 3vw, 1.9rem); line-height: 1.3; position: relative; padding-top: 2.2rem; }
.pull::before { content: "“"; position: absolute; top: -1.2rem; left: 50%; transform: translateX(-50%); font-size: 5rem; color: var(--red); line-height: 1; }
.pull cite { display: block; margin-top: .8rem; font-family: var(--sans); font-style: normal; font-size: .75rem; letter-spacing: .1em; text-transform: uppercase; color: var(--mute); }

.consulta-grid { display: grid; gap: 1.5rem; }
.consulta { background: var(--paper); border: 1px solid var(--ink); padding: 1.5rem; }

.plans { display: grid; gap: 1rem; margin-bottom: 1.5rem; }
.plan { border: 1px solid var(--ink); padding: 1.5rem; background: var(--paper); }
.plan-main { border-width: 3px; }
.plan-k { font-family: var(--sans); font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: var(--red); }
.plan h3 { font-size: 1.8rem; margin: .3rem 0 .8rem; }
.plan ul { padding-left: 1.1rem; color: var(--soft); }
.plan li { margin-bottom: .3rem; }

.faq details { border-bottom: 1px solid rgba(22,20,14,.25); padding: 1rem 0; }
.faq summary { font-family: var(--display); font-weight: 600; font-size: 1.2rem; cursor: pointer; }
.faq details p { margin-top: .6rem; color: var(--soft); }

.footer { padding: 0 0 6rem; font-family: var(--sans); font-size: .85rem; color: var(--mute); }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; padding-top: 1.2rem; }
.footer a { color: var(--red); font-weight: 600; }

/* Chat */
.chat-fab { position: fixed; right: 1rem; bottom: 1rem; z-index: 60; padding: .85rem 1.1rem; background: var(--red); color: #fff; font-family: var(--sans); font-weight: 600; font-size: .9rem; box-shadow: 0 14px 30px -12px rgba(0,0,0,.45); }
.chat { position: fixed; right: 1rem; bottom: 1rem; left: 1rem; z-index: 70; max-height: min(620px, calc(100svh - 2rem)); display: flex; flex-direction: column; background: var(--paper); border: 1px solid var(--ink); box-shadow: 0 30px 60px -24px rgba(0,0,0,.4); font-family: var(--sans); }
.chat[hidden] { display: none; }
.chat-head { display: flex; justify-content: space-between; align-items: center; padding: .9rem 1.1rem; border-bottom: 1px solid var(--ink); }
.chat-name { font-family: var(--display); font-weight: 800; font-size: 1.1rem; }
.chat-status { font-size: .74rem; color: var(--mute); }
.chat-close { font-size: 1.6rem; width: 36px; height: 36px; }
.chat-log { flex: 1; overflow-y: auto; padding: 1rem 1.1rem; display: flex; flex-direction: column; gap: .6rem; min-height: 180px; }
.msg { max-width: 88%; padding: .7rem .9rem; font-size: .92rem; line-height: 1.45; white-space: pre-line; }
.msg-bot { background: var(--bg); align-self: flex-start; border-left: 3px solid var(--red); }
.msg-user { background: var(--ink); color: var(--bg); align-self: flex-end; }
.msg-typing { color: var(--mute); font-style: italic; }
.chat-suggest { display: flex; flex-wrap: wrap; gap: .4rem; padding: 0 1.1rem .8rem; }
.chat-suggest button { font-size: .78rem; padding: .4rem .7rem; border: 1px solid var(--ink); }
.chat-suggest button:hover { background: var(--ink); color: var(--bg); }
.chat-form { display: flex; border-top: 1px solid var(--ink); }
.chat-form input { flex: 1; min-width: 0; font: inherit; padding: .85rem 1rem; border: 0; background: var(--paper); }
.chat-form button { width: 52px; background: var(--red); color: #fff; }
.chat-wa { display: block; text-align: center; padding: .7rem; font-weight: 600; font-size: .88rem; color: var(--red); border-top: 1px solid var(--ink); text-decoration: none; }

/* =============================================================
   7. Responsive
   ============================================================= */
@media (min-width: 720px) {
  .mast-row { grid-template-columns: 1fr auto 1fr; }
  .meta { display: block; }
  .meta.right { text-align: right; }
  .cols { column-count: 2; column-gap: 2.4rem; column-rule: 1px solid rgba(22,20,14,.25); }
  .services { grid-template-columns: 1fr 1fr; column-gap: 2.4rem; }
  .plans { grid-template-columns: repeat(3, 1fr); }
  .chat { left: auto; width: 380px; }
}
@media (min-width: 960px) {
  .consulta-grid { grid-template-columns: .9fr 1.1fr; gap: 3rem; }
}
