/* ============================================================
   albertodepalacio.com — hoja de estilo compartida
   Generada en la Fase 0. Base: sistema de servicios.
   ============================================================ */

/* --- Fuentes autoalojadas --- */
@font-face { font-family: 'Fraunces'; font-style: normal; font-weight: 700; font-display: swap; src: url('/fonts/fraunces-700.woff2') format('woff2'); }
@font-face { font-family: 'Libre Baskerville'; font-style: normal; font-weight: 400; font-display: swap; src: url('/fonts/libre-baskerville-400.woff2') format('woff2'); }
@font-face { font-family: 'Libre Baskerville'; font-style: normal; font-weight: 700; font-display: swap; src: url('/fonts/libre-baskerville-700.woff2') format('woff2'); }
@font-face { font-family: 'Libre Baskerville'; font-style: italic; font-weight: 400; font-display: swap; src: url('/fonts/libre-baskerville-400-italic.woff2') format('woff2'); }

/* --- Base --- */
:root {
    --paper: #ffffff;
    --ink: #1b1c1f;
    --red: #bf2e28;
    --muted: #6e6a60;
    --line: #dedacf;
    --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
    --sans: "Helvetica Neue", -apple-system, Arial, sans-serif;
    --serif: "Libre Baskerville", Georgia, "Times New Roman", serif;
    --display: "Fraunces", Georgia, "Times New Roman", serif;
  }
  @media (prefers-color-scheme: dark) {
    :root { --paper: #141519; --ink: #e9e6de; --red: #e2564e; --muted: #96928a; --line: #2a2b30; }
  }
  :root[data-theme="dark"] { --paper: #141519; --ink: #e9e6de; --red: #e2564e; --muted: #96928a; --line: #2a2b30; }
  :root[data-theme="light"] { --paper: #ffffff; --ink: #1b1c1f; --red: #bf2e28; --muted: #6e6a60; --line: #dedacf; }

  * { box-sizing: border-box; margin: 0; }
  html { scroll-behavior: smooth; }
  @media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
  body {
    background: var(--paper);
    color: var(--ink);
    font-family: var(--serif);
    font-size: 1.08rem;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
  }
  h1, h2, h3, .phase-name, .statement { font-family: var(--display); }
  .request-form, .request-form label, .fineprint { font-family: var(--sans); }
  .wrap { max-width: 44rem; margin: 0 auto; padding: 0 1.25rem 5rem; }

  .topbar {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 1rem;
    padding: 1.4rem 0 1rem;
    border-bottom: 3px double var(--ink);
    font-family: var(--mono);
    font-size: 0.72rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
  }
  .topbar .brand { color: var(--ink); text-decoration: none; }
  .topbar nav a { color: var(--muted); text-decoration: none; }
  .topbar nav a:hover { color: var(--red); }

  .eyebrow {
    font-family: var(--mono);
    font-size: 0.72rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--red);
  }

  .hero { padding: 4.5rem 0 4rem; border-bottom: 1px solid var(--line); }
  h1 {
    font-size: clamp(2rem, 6.5vw, 3.2rem);
    line-height: 1.06;
    letter-spacing: -0.03em;
    font-weight: 700;
    text-wrap: balance;
    max-width: 14em;
    margin-top: 0.8rem;
  }
  .hero .sub { margin-top: 1.6rem; font-size: 1.2rem; max-width: 30em; color: var(--muted); }

  .phases-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2.5rem; margin-top: 2.5rem; }
  @media (max-width: 620px) { .phases-grid { grid-template-columns: 1fr; gap: 2.2rem; } }
  .phase-card { border-top: 3px double var(--ink); padding-top: 1.1rem; }
  .phase-card > * { margin: 0; }
  .phase-card .phase-num { font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--red); margin-bottom: 0.7rem; }
  .phase-card .phase-name { font-size: clamp(1.35rem, 3.4vw, 1.75rem); font-weight: 700; letter-spacing: -0.02em; line-height: 1.12; margin-bottom: 0.9rem; text-wrap: balance; }
  .phase-card .phase-tag { font-size: 1.05rem; line-height: 1.35; }
  .phase-card .phase-tag.dim { color: var(--muted); margin-top: 0.15rem; }

  .price-note { margin-top: 0.8rem; font-size: 0.95rem; color: var(--muted); max-width: 34em; }
  .detail h3 { font-size: clamp(1.3rem, 3.5vw, 1.7rem); letter-spacing: -0.02em; line-height: 1.15; margin: 3.2rem 0 1.2rem; text-wrap: balance; }
  .block-label { font-family: var(--mono); font-size: 0.78rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--red); margin: 2.4rem 0 0.8rem; }

  .btn {
    display: inline-block;
    background: var(--red);
    color: var(--paper);
    font-family: var(--mono);
    font-size: 0.82rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    text-decoration: none;
    padding: 1.05em 2em;
    border: 1px solid var(--red);
  }
  .btn:hover { background: transparent; color: var(--red); }
  .btn { cursor: pointer; }
  .btn:focus-visible, a:focus-visible, input:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; }
  .cta-row { display: flex; gap: 1rem; flex-wrap: wrap; margin-top: 2.4rem; align-items: center; }

  section { padding: 4rem 0; border-bottom: 1px solid var(--line); }
  .sec-head { margin-bottom: 2.2rem; }
  .phase-label {
    font-family: var(--mono);
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--red);
    line-height: 1;
  }
  h2 {
    font-size: clamp(1.6rem, 4.8vw, 2.3rem);
    letter-spacing: -0.025em;
    line-height: 1.12;
    text-wrap: balance;
    margin-top: 0.6rem;
  }
  p + p { margin-top: 0.95rem; }
  .prose { max-width: 36em; }
  .prose .big { font-size: 1.25rem; font-weight: 700; letter-spacing: -0.01em; }
  .punch { font-weight: 700; }

  .interlude {
    padding: 5.5rem 0;
    border-bottom: 1px solid var(--line);
    text-align: center;
  }
  .interlude p {
    font-size: clamp(1.8rem, 6vw, 2.9rem);
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.1;
    text-wrap: balance;
    max-width: 17em;
    margin: 0 auto;
  }
  .interlude.red p { color: var(--red); }

  .ledger { margin: 2rem 0 0; border-top: 3px double var(--ink); border-bottom: 3px double var(--ink); font-family: var(--mono); font-variant-numeric: tabular-nums; font-size: 0.92rem; max-width: 36em; }
  .ledger div { display: flex; justify-content: space-between; gap: 1rem; padding: 0.6em 0; border-bottom: 1px dashed var(--line); }
  .ledger div:last-child { border-bottom: 0; }
  .ledger .total { color: var(--red); font-weight: 700; font-size: 1.05rem; }

  .faq details { border-top: 1px solid var(--line); }
  .faq details:last-of-type { border-bottom: 1px solid var(--line); }
  .faq summary { cursor: pointer; list-style: none; position: relative; padding: 1.15rem 2rem 1.15rem 0; font-weight: 700; font-size: 1.15rem; line-height: 1.3; }
  .faq summary::-webkit-details-marker { display: none; }
  .faq summary::after { content: "+"; position: absolute; right: 0.1rem; top: 1.05rem; color: var(--red); font-family: var(--mono); font-size: 1.5rem; line-height: 1; }
  .faq details[open] summary::after { content: "\2013"; }
  .faq summary:hover { color: var(--red); }
  .faq .faq-a { margin: 0 0 1.2rem; color: var(--muted); max-width: 34em; }
  .faq .faq-a p { margin: 0 0 0.6rem; }
  .faq .faq-a p:last-child { margin-bottom: 0; }
  .faq-a .principio { margin: 1.3rem 0; }
  .faq-a .principio-t { font-family: var(--display); font-weight: 700; color: var(--ink); margin: 0 0 0.3rem; }
  .faq-a .principio p { margin: 0 0 0.4rem; }
  .do-list { list-style: none; margin-top: 0.8rem; }
  .do-list li { position: relative; padding: 0 0 0.35em 1.3em; }
  .do-list li::before { content: "—"; position: absolute; left: 0; color: var(--red); }

  .capture {
    margin-top: 2.4rem;
    border-top: 3px double var(--ink);
    border-bottom: 3px double var(--ink);
    padding: 1.8rem 0 1.5rem;
    max-width: 36em;
  }
  .capture .capture-title {
    font-family: var(--mono);
    font-size: 0.72rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--red);
    margin-bottom: 1rem;
  }
  .capture form { display: flex; flex-direction: column; gap: 0.9rem; }
  .capture-row { display: flex; gap: 0.7rem; flex-wrap: wrap; }
  .request-form label.consent, .capture label.consent { display: flex; flex-direction: row; align-items: flex-start; gap: 0.5rem; font-family: var(--sans); font-size: 0.84rem; font-weight: 400; color: var(--muted); line-height: 1.45; }
  label.consent input { width: auto; flex: 0 0 auto; margin: 0.15em 0 0; }
  label.consent a { color: var(--red); }
  .capture input[type="email"] {
    flex: 1 1 14rem;
    font-family: var(--mono);
    font-size: 0.92rem;
    padding: 0.95em 1em;
    border: 1px solid var(--ink);
    background: transparent;
    color: var(--ink);
  }
  .capture input::placeholder { color: var(--muted); }
  .fineprint { margin-top: 1rem; font-size: 0.74rem; line-height: 1.5; color: var(--muted); max-width: 38em; }
  .fineprint a { color: inherit; }

  .arrow { text-align: center; color: var(--red); font-size: 1.8rem; line-height: 1; margin: 0.6rem 0; }
  .method-callout { margin: 2.6rem 0; border-top: 3px double var(--ink); border-bottom: 3px double var(--ink); padding: 1.6rem 0; max-width: 36em; }
  .method-callout p { font-family: var(--display); font-size: 1.05rem; font-weight: 700; letter-spacing: 0.04em; line-height: 1.4; text-transform: uppercase; color: var(--red); }
  .statement { font-weight: 700; font-size: clamp(1.05rem, 2.5vw, 1.3rem); letter-spacing: 0.02em; line-height: 1.3; text-transform: uppercase; margin: 2.2rem 0; max-width: 26em; text-wrap: balance; }
  .statement + .statement { margin-top: -0.8rem; }
  .request-form { display: flex; flex-direction: column; gap: 1.1rem; max-width: 34em; }
  .request-form label { display: flex; flex-direction: column; gap: 0.4rem; font-size: 0.9rem; font-weight: 700; }
  .request-form input, .request-form select, .request-form textarea {
    font-family: var(--sans);
    font-size: 1rem;
    font-weight: 400;
    padding: 0.75em 0.9em;
    border: 1px solid var(--ink);
    background: transparent;
    color: var(--ink);
    width: 100%;
  }
  .request-form textarea { resize: vertical; }
  .request-form button { align-self: flex-start; margin-top: 0.4rem; }

  .close-block { padding: 4rem 0 0; }
  footer {
    margin-top: 4.5rem;
    padding-top: 1.2rem;
    border-top: 3px double var(--ink);
    font-family: var(--mono);
    font-size: 0.75rem;
    color: var(--muted);
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
  }
  footer a { color: inherit; }
  .footer-links { display: flex; gap: 1.2rem; flex-wrap: wrap; }

/* --- Propio de la home --- */
  body.home h1 { margin-top: 1.2rem; }
  body.home h2 { max-width: 18em; }
h1 .accent { color: var(--red); }
.ghost {
    font-family: var(--mono);
    font-size: 0.82rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--ink);
    text-decoration: underline;
    text-underline-offset: 4px;
  }
.interlude .kicker {
    font-family: var(--mono);
    font-size: 0.72rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 1.4rem;
  }
.service { padding: 2.2rem 0; border-top: 1px solid var(--line); display: grid; grid-template-columns: 3.4rem 1fr; gap: 0 1.2rem; }
.service:first-of-type { border-top: 3px double var(--ink); }
.service .n { font-family: var(--mono); color: var(--red); font-size: 1.6rem; font-weight: 700; line-height: 1; padding-top: 0.2em; }
.service h3 { font-size: clamp(1.25rem, 3vw, 1.55rem); letter-spacing: -0.02em; line-height: 1.15; margin-bottom: 0.8rem; }
.service p { color: var(--muted); max-width: 32em; }
.service p + p { margin-top: 0.7rem; }
.draft-tag {
    display: inline-block;
    font-family: var(--mono);
    font-size: 0.6rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--paper);
    background: var(--muted);
    padding: 0.2em 0.55em;
    margin-left: 0.7em;
    vertical-align: middle;
  }

/* --- Propio de la calculadora --- */
.calc { max-width: 34em; margin: 2.4rem 0 0; }
.calc fieldset { border: none; padding: 0; margin: 0 0 1.9rem; }
.calc legend { font-family: var(--mono); font-size: 0.78rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--red); padding: 0; margin-bottom: 1.1rem; }
.calc label { display: flex; flex-direction: column; gap: 0.4rem; font-family: var(--sans); font-size: 0.98rem; margin-bottom: 1.15rem; }
.calc .hint { font-family: var(--sans); font-size: 0.8rem; color: var(--muted); font-weight: 400; line-height: 1.4; }
.calc input { font-family: var(--mono); font-size: 1rem; padding: 0.7rem 0.8rem; background: transparent; border: 1px solid var(--ink); border-radius: 0; color: var(--ink); width: 100%; }
.calc input::placeholder { color: var(--muted); }
.calc button { align-self: flex-start; margin-top: 0.5rem; }
.calc-error { color: var(--red); font-family: var(--sans); font-size: 0.9rem; margin: 0.2rem 0 0.6rem; max-width: 34em; }
.calc-error[hidden] { display: none; }
.result[hidden] { display: none; }
.result .lead-cap { font-family: var(--mono); font-size: 0.74rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); margin: 0; }
.result .lead-num { font-family: var(--display); font-weight: 700; font-size: clamp(2.2rem, 9vw, 3.4rem); color: var(--red); line-height: 1; margin: 0.35rem 0 0.25rem; letter-spacing: -0.02em; }
.result .note { margin-top: 1rem; font-size: 1rem; line-height: 1.5; color: var(--muted); max-width: 34em; }
.result .note strong { color: var(--ink); font-weight: 700; }
.result .note a { color: var(--red); }
.ledger .over span:last-child { color: var(--red); }
.ledger .subhead span { color: var(--muted); font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase; }

/* --- Páginas legales --- */
  body.legal { background: var(--paper); color: var(--ink); font-family: var(--serif); font-size: 1.02rem; line-height: 1.65; -webkit-font-smoothing: antialiased; }
  body.legal h1, body.legal h2, body.legal h3 { font-family: var(--display); }
  body.legal .wrap { max-width: 42rem; margin: 0 auto; padding: 0 1.25rem 5rem; }
  body.legal .hero { padding: 3.5rem 0 2.5rem; border-bottom: 1px solid var(--line); }
  body.legal h1 { font-size: clamp(1.9rem, 5.5vw, 2.8rem); line-height: 1.1; letter-spacing: -0.02em; text-wrap: balance; margin-top: 0.8rem; }
  body.legal .hero .sub { margin-top: 1rem; color: var(--muted); font-size: 0.95rem; }
  body.legal .hero .sub a { color: var(--red); }
  body.legal section { padding: 3rem 0; border-bottom: 1px solid var(--line); }
  body.legal h3 { font-size: 1.15rem; letter-spacing: -0.01em; margin: 1.8rem 0 0.6rem; }
  body.legal p { max-width: 38em; }
  body.legal p + p { margin-top: 0.9rem; }
  body.legal strong { font-weight: 700; }
  body.legal .updated { font-family: var(--mono); font-size: 0.75rem; color: var(--muted); margin-top: 1.4rem; }
  body.legal .fill { background: rgba(191,46,40,0.1); color: var(--red); padding: 0 0.3em; border-radius: 2px; font-family: var(--mono); font-size: 0.85em; }
  body.legal .legal-meta { margin: 0.5rem 0 0; border-top: 3px double var(--ink); border-bottom: 3px double var(--ink); font-family: var(--mono); font-size: 0.88rem; max-width: 38em; }
  body.legal .legal-meta div { display: flex; justify-content: space-between; gap: 1rem; padding: 0.55em 0; border-bottom: 1px dashed var(--line); }
  body.legal .legal-meta div:last-child { border-bottom: 0; }
  body.legal .legal-meta span:first-child { color: var(--muted); }
  body.legal .legal-meta span:last-child { text-align: right; }
  body.legal footer { margin-top: 3.5rem; padding-top: 1.2rem; border-top: 3px double var(--ink); font-family: var(--mono); font-size: 0.75rem; color: var(--muted); display: flex; justify-content: space-between; gap: 1rem 1.4rem; flex-wrap: wrap; }
  body.legal ul { max-width: 38em; margin: 0.7rem 0 0; padding-left: 1.3em; }
  body.legal li { margin-bottom: 0.4rem; }
