:root {
    --bg: #ffffff;
    --bg-page: #faf8f4;
    --bg-raised: #f2efe8;
    --ink: #1c1a17;
    --ink-soft: #57534a;
    --ink-faint: #8a8477;
    --line: #e5e1d6;
    --accent: #57534a;

    --drawer-bg: #141210;
    --drawer-ink: #f4f1ea;
    --drawer-ink-soft: #b9b2a2;
    --drawer-line: rgba(244, 241, 234, 0.14);
    --drawer-accent: #b9b2a2;
  }

  * { box-sizing: border-box; }

  html, body {
    margin: 0;
    background: var(--bg-page);
    color: var(--ink);
    font-family: "EB Garamond", Georgia, serif;
    -webkit-font-smoothing: antialiased;
  }

  /* =========================================================
     1. CABECERA DEL BOCETO
     ========================================================= */
  .doc-head {
    max-width: 1180px;
    margin: 0 auto;
    padding: 3rem 1.75rem 0;
  }

  .doc-eyebrow {
    font-variant-caps: small-caps;
    font-style: italic;
    font-size: 1.05rem;
    letter-spacing: 0.02em;
    color: var(--accent);
    margin: 0 0 0.6rem;
  }

  .doc-title {
    font-family: "Playfair Display", Georgia, serif;
    font-weight: 700;
    font-size: clamp(1.9rem, 4.5vw, 2.8rem);
    line-height: 1.1;
    margin: 0 0 1rem;
  }

  .doc-lede {
    font-size: 1.12rem;
    line-height: 1.65;
    color: var(--ink-soft);
    max-width: 68ch;
    margin: 0 0 2.6rem;
  }

  .doc-lede strong { color: var(--ink); }

  .section-label {
    display: flex;
    align-items: baseline;
    gap: 0.9rem;
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 1.75rem;
  }

  .section-label .num {
    font-family: "Playfair Display", Georgia, serif;
    font-style: italic;
    font-weight: 600;
    font-variant-numeric: oldstyle-nums;
    font-size: 1.6rem;
    color: var(--accent);
  }

  .section-label h2 {
    font-family: "Playfair Display", Georgia, serif;
    font-weight: 700;
    font-size: 1.5rem;
    margin: 0;
  }

  .section-label .tag {
    margin-left: auto;
    font-variant-caps: small-caps;
    font-size: 0.95rem;
    color: var(--ink-faint);
  }

  .section-note {
    max-width: 1180px;
    margin: 0.6rem auto 1.4rem;
    padding: 0 1.75rem;
    font-size: 1.02rem;
    line-height: 1.6;
    color: var(--ink-soft);
    max-width: 78ch;
  }

  /* =========================================================
     2. LIVE MOCKUP — portada real + menú funcional
     ========================================================= */
  .live-frame {
    max-width: 1180px;
    margin: 0 auto 1rem;
    padding: 0 1.75rem;
  }

  .live-box {
    position: relative;
    border: 1px solid var(--line);
    box-shadow: 0 1px 2px rgba(28, 26, 23, 0.06), 0 24px 48px -28px rgba(28, 26, 23, 0.28);
    background: var(--bg);
    overflow: hidden;
  }

  .cover {
    position: relative;
    display: grid;
    grid-template-columns: 0.96fr 1.04fr;
    min-height: 70vh;
    background: var(--bg);
  }

  .cover-content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    text-align: left;
    padding: clamp(1.75rem, 6vw, 4rem) clamp(1.1rem, 4vw, 2.5rem) clamp(1.75rem, 6vw, 4rem) clamp(1.35rem, 5vw, 3rem);
  }

  .cover-logo {
    width: clamp(165px, 37.4vw, 330px);
    height: auto;
    margin-bottom: 0.5rem;
  }

  .cover-subtitle {
    font-family: "Playfair Display", Georgia, serif;
    font-weight: 400;
    font-style: italic;
    font-size: clamp(1.045rem, 1.76vw, 1.32rem);
    letter-spacing: 0.02em;
    color: var(--ink);
    margin: 0;
    width: calc(clamp(165px, 37.4vw, 330px) * 0.847);
    text-align: right;
  }

  .cover-media {
    position: relative;
    background: var(--bg);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: clamp(0.5rem, 2vw, 1rem) clamp(1.25rem, 4vw, 2.25rem) clamp(0.5rem, 2vw, 1rem) 0;
  }

  .cover-media img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    display: block;
    user-select: none;
    pointer-events: none;
  }

  .cover-topbar {
    position: absolute;
    top: 0; left: 0; right: 0;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 1.7rem 2rem;
    z-index: 5;
  }

  .menu-trigger {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    background: none;
    border: none;
    cursor: pointer;
    font-family: "EB Garamond", Georgia, serif;
    font-variant-caps: small-caps;
    font-size: 1.05rem;
    letter-spacing: 0.03em;
    color: var(--ink);
    padding: 0.3rem 0.1rem;
  }

  .menu-trigger .burger {
    width: 22px;
    height: 14px;
    position: relative;
  }

  .menu-trigger .burger span {
    position: absolute;
    left: 0;
    width: 100%;
    height: 1.5px;
    background: currentColor;
    transition: transform 0.35s ease, opacity 0.25s ease, top 0.35s ease;
  }

  .menu-trigger .burger span:nth-child(1) { top: 0; }
  .menu-trigger .burger span:nth-child(2) { top: 6px; }
  .menu-trigger .burger span:nth-child(3) { top: 12px; }

  .live-box.is-open .menu-trigger .burger span:nth-child(1) { top: 6px; transform: rotate(45deg); }
  .live-box.is-open .menu-trigger .burger span:nth-child(2) { opacity: 0; }
  .live-box.is-open .menu-trigger .burger span:nth-child(3) { top: 6px; transform: rotate(-45deg); }

  .cover-enter {
    display: inline-flex;
    align-items: center;
    gap: 0.7rem;
    font-family: "EB Garamond", Georgia, serif;
    font-variant-caps: small-caps;
    font-size: 1.05rem;
    letter-spacing: 0.04em;
    color: var(--ink);
    text-decoration: none;
    border-bottom: 1px solid var(--ink);
    padding-bottom: 0.25rem;
  }

  /* ---- scrim + drawer, sobre toda la caja (no solo la portada) ---- */
  .live-scrim {
    position: absolute;
    inset: 0;
    background: rgba(20, 18, 16, 0);
    transition: background 0.45s ease;
    pointer-events: none;
    z-index: 6;
  }

  .live-box.is-open .live-scrim {
    background: rgba(20, 18, 16, 0.38);
    pointer-events: auto;
  }

  .drawer {
    position: absolute;
    top: 0; left: 0; bottom: 0;
    width: min(70%, 360px);
    background: var(--drawer-bg);
    color: var(--drawer-ink);
    transform: translateX(-100%);
    transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
    display: flex;
    flex-direction: column;
    padding: 6% 7%;
    z-index: 7;
  }

  .live-box.is-open .drawer { transform: translateX(0); }

  .drawer-top { display: flex; justify-content: flex-end; }

  .drawer-close {
    background: none;
    border: none;
    color: var(--drawer-ink-soft);
    font-family: "EB Garamond", Georgia, serif;
    font-variant-caps: small-caps;
    font-size: 1rem;
    letter-spacing: 0.02em;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
  }

  .drawer-close:hover { color: var(--drawer-ink); }

  .drawer-nav {
    margin-top: 8%;
    display: flex;
    flex-direction: column;
    flex: 1;
    justify-content: center;
  }

  .drawer-item {
    display: flex;
    align-items: baseline;
    gap: 0.6em;
    padding: 5.5% 0;
    border-top: 1px solid var(--drawer-line);
    text-decoration: none;
    color: inherit;
  }

  .drawer-nav .drawer-item:last-child { border-bottom: 1px solid var(--drawer-line); }

  .drawer-num {
    font-family: "EB Garamond", Georgia, serif;
    font-style: italic;
    font-variant-numeric: oldstyle-nums;
    font-size: 1.05rem;
    color: var(--drawer-accent);
    letter-spacing: 0.02em;
  }

  .drawer-labels { display: flex; flex-direction: column; gap: 0.15em; }

  .drawer-title {
    font-family: "Playfair Display", Georgia, serif;
    font-weight: 600;
    font-size: clamp(1.1rem, 3.2vw, 1.4rem);
    line-height: 1.1;
    color: var(--drawer-ink);
    text-underline-offset: 0.14em;
    text-decoration: underline;
    text-decoration-color: transparent;
    transition: text-decoration-color 0.25s ease, transform 0.2s ease;
  }

  .drawer-sub {
    font-family: "Playfair Display", Georgia, serif;
    font-style: italic;
    font-weight: 400;
    font-size: 0.78rem;
    color: var(--drawer-ink-soft);
  }

  .drawer-item:hover .drawer-title,
  .drawer-item:focus-visible .drawer-title {
    text-decoration-color: var(--drawer-ink);
    transform: translateX(0.2em);
  }

  .drawer-foot {
    font-family: "Playfair Display", Georgia, serif;
    font-style: italic;
    font-size: 0.85rem;
    color: var(--drawer-ink-soft);
    padding-top: 6%;
  }

  .site-footer {
    position: relative;
    background: var(--drawer-bg);
    color: var(--drawer-ink);
    padding: clamp(1.5rem, 4vw, 2.25rem) clamp(1.5rem, 5vw, 3rem);
  }

  .footer-row {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem 2rem;
  }

  .site-footer h3 {
    font-family: "Playfair Display", Georgia, serif;
    font-weight: 400;
    font-style: italic;
    font-size: clamp(1.05rem, 2vw, 1.3rem);
    margin: 0;
    color: var(--drawer-ink);
    white-space: nowrap;
  }

  .footer-form {
    display: flex;
    gap: 0;
    flex: 1 1 18em;
    max-width: 22em;
    border-bottom: 1px solid var(--drawer-ink-soft);
    padding-bottom: 0.4rem;
  }

  .footer-input {
    flex: 1;
    background: transparent;
    border: none;
    font-family: "EB Garamond", Georgia, serif;
    font-size: 1rem;
    color: var(--drawer-ink);
    padding: 0.3rem 0.5rem 0.3rem 0;
    outline: none;
  }

  .footer-input::placeholder { color: rgba(244, 241, 234, 0.4); }

  .footer-submit {
    background: none;
    border: none;
    font-family: "EB Garamond", Georgia, serif;
    font-variant-caps: small-caps;
    font-size: 0.95rem;
    letter-spacing: 0.03em;
    color: var(--drawer-ink);
    cursor: pointer;
    padding: 0.3rem 0;
    white-space: nowrap;
    text-decoration: underline;
    text-decoration-color: transparent;
    transition: text-decoration-color 0.2s ease, transform 0.2s ease;
  }

  .footer-submit:hover {
    text-decoration-color: var(--drawer-accent);
    transform: translateX(0.15em);
  }

  .footer-contact-email {
    font-family: "EB Garamond", Georgia, serif;
    font-size: 0.85rem;
    color: var(--drawer-ink-soft);
    margin: 0.85rem 0 0;
  }

  .footer-contact-email a {
    color: var(--drawer-ink-soft);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: color 0.2s ease, border-color 0.2s ease;
  }

  .footer-contact-email a:hover {
    color: var(--drawer-ink);
    border-color: var(--drawer-accent);
  }

  @media (max-width: 560px) {
    .cover { grid-template-columns: 1fr; min-height: auto; }
    .cover-content { padding: 5.5rem 1.75rem 2rem; align-items: center; text-align: center; }
    .cover-subtitle { width: auto; text-align: center; }
    .cover-media { padding: 0.5rem 1.5rem 2.5rem; }
    .cover-media img { max-width: 100%; max-height: 60vh; width: auto; height: auto; }
    .drawer { width: 100%; }
    .cover-topbar { padding: 1.1rem 1.25rem; }
  }

  @media (prefers-reduced-motion: reduce) {
    .drawer, .live-scrim, .menu-trigger .burger span, .drawer-title { transition: none !important; }
  }

  /* =========================================================
     3. GUÍA DE ESPECIFICACIONES
     ========================================================= */
  .spec {
    max-width: 1180px;
    margin: 0 auto;
    padding: 1.5rem 1.75rem 2rem;
  }

  .spec-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 1.4rem;
    margin-bottom: 1rem;
  }

  .swatch {
    border: 1px solid var(--line);
    background: #fff;
  }

  .swatch-color {
    height: 72px;
  }

  .swatch-info {
    padding: 0.8rem 1rem 1rem;
  }

  .swatch-name {
    font-weight: 600;
    font-size: 0.98rem;
    margin: 0 0 0.2rem;
  }

  .swatch-hex {
    font-family: "Courier New", monospace;
    font-size: 0.88rem;
    color: var(--ink-faint);
    margin: 0 0 0.3rem;
  }

  .swatch-use {
    font-size: 0.88rem;
    color: var(--ink-soft);
    margin: 0;
    line-height: 1.4;
  }

  table.spec-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1.5rem;
    font-size: 0.98rem;
  }

  table.spec-table th, table.spec-table td {
    text-align: left;
    padding: 0.7rem 0.9rem;
    border-bottom: 1px solid var(--line);
    vertical-align: top;
  }

  table.spec-table th {
    font-variant-caps: small-caps;
    color: var(--ink-faint);
    font-weight: 600;
    font-size: 0.92rem;
  }

  table.spec-table td.sample-playfair {
    font-family: "Playfair Display", Georgia, serif;
    font-weight: 700;
    font-size: 1.3rem;
  }

  table.spec-table td.sample-playfair-italic {
    font-family: "Playfair Display", Georgia, serif;
    font-style: italic;
    font-weight: 500;
    font-size: 1.2rem;
  }

  table.spec-table td.sample-garamond {
    font-family: "EB Garamond", Georgia, serif;
    font-size: 1.15rem;
  }

  table.spec-table td.sample-garamond-sc {
    font-family: "EB Garamond", Georgia, serif;
    font-variant-caps: small-caps;
    font-style: italic;
    font-size: 1.1rem;
  }

  .spec-list {
    margin: 0 0 1.5rem;
    padding-left: 1.2rem;
    color: var(--ink-soft);
    font-size: 1.02rem;
    line-height: 1.7;
  }

  .spec-list li { margin-bottom: 0.4rem; }
  .spec-list strong { color: var(--ink); }
  .spec-list code {
    background: var(--bg-raised);
    padding: 0.1rem 0.35rem;
    font-size: 0.92em;
  }

  .asset-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.2rem;
    margin-bottom: 1.5rem;
  }

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

  .asset-card h3 {
    font-family: "Playfair Display", Georgia, serif;
    font-size: 1.05rem;
    margin: 0 0 0.4rem;
  }

  .asset-card p {
    font-size: 0.95rem;
    color: var(--ink-soft);
    line-height: 1.5;
    margin: 0;
  }

  aside.callout {
    margin: 1rem 0 2.5rem;
    padding: 1.6rem 1.8rem;
    background: var(--bg-raised);
    border-left: 3px solid var(--ink);
  }

  aside.callout h2 {
    font-family: "Playfair Display", Georgia, serif;
    font-weight: 600;
    font-size: 1.1rem;
    margin: 0 0 0.6rem;
  }

  aside.callout ul { margin: 0; padding-left: 1.1rem; color: var(--ink-soft); font-size: 0.98rem; line-height: 1.6; }
  aside.callout li { margin-bottom: 0.4rem; }

/* Pie: nota de privacidad bajo el formulario y franja legal inferior */
.privacy-note { margin: .9rem 0 0; font-size: .92rem; color: #b9b2a2; }
.privacy-note a { color: inherit; border-bottom: 1px solid rgba(185,178,162,.5); text-decoration: none; }
.legal-bar { margin-top: 1.6rem; padding-top: 1.1rem; border-top: 1px solid rgba(185,178,162,.25); display: flex; flex-wrap: wrap; gap: .6rem 1.6rem; align-items: baseline; justify-content: space-between; }
.legal-links { display: flex; flex-wrap: wrap; gap: .5rem 1.4rem; }
.legal-links a { font-family: "EB Garamond", Georgia, serif; font-variant-caps: small-caps; font-size: 1rem; color: #b9b2a2; text-decoration: none; background-image: linear-gradient(currentColor, currentColor); background-size: 0 1px; background-repeat: no-repeat; background-position: 0 100%; transition: background-size .25s ease, color .25s ease; }
.legal-links a:hover { color: #f4f1ea; background-size: 100% 1px; }
.legal-copy { margin: 0; font-size: .9rem; color: #b9b2a2; }
@media (max-width: 560px) { .legal-bar { flex-direction: column; align-items: flex-start; } }
/* Páginas legales */
.legal h2 { font-family: "Playfair Display", Georgia, serif; font-weight: 600; font-size: 1.3rem; margin: 2rem 0 .6rem; }
.legal dl { display: grid; grid-template-columns: max-content 1fr; gap: .45rem 1.4rem; margin: 0 0 1rem; font-size: 1.05rem; }
.legal dt { font-variant-caps: small-caps; color: #57534a; }
.legal dd { margin: 0; }
.legal .draft { font-style: italic; color: #8a8477; font-size: .98rem; border-left: 2px solid #e5e1d6; padding-left: .9rem; margin: 0 0 1.6rem; }
.legal a { color: #1c1a17; text-decoration: none; border-bottom: 1px solid #8a8477; }
.legal a:hover { border-color: #1c1a17; }

/* Casillas de aceptación de la política de privacidad (obligatorias) */
.consent { display: flex; gap: .6rem; align-items: flex-start; width: 100%; font-size: .98rem; line-height: 1.5; color: #57534a; margin: 0 0 1.2rem; cursor: pointer; }
.consent input { margin: .32rem 0 0; width: 1rem; height: 1rem; accent-color: #1c1a17; flex: 0 0 auto; }
.consent a { color: #1c1a17; border-bottom: 1px solid #8a8477; text-decoration: none; }
.consent-dark { color: #b9b2a2; margin: 1rem 0 0; }
.consent-dark a { color: #f4f1ea; border-bottom-color: rgba(185,178,162,.6); }
.consent-dark input { accent-color: #f4f1ea; }
.privacy-note { display: none; }
/* Casilla dentro del formulario del pie: ocupa su propia línea debajo del campo */
.footer-form { flex-wrap: wrap; }
.footer-form .consent-dark { order: 3; flex-basis: 100%; margin: .9rem 0 0; }

/* Pie: la línea del formulario queda sobre el campo y el botón; la aceptación va debajo */
.footer-form { border-bottom: none; padding-bottom: 0; }
.footer-field { display: flex; flex: 1 1 auto; width: 100%; border-bottom: 1px solid var(--drawer-ink-soft); padding-bottom: 0.4rem; }
.footer-form .consent-dark { order: 3; flex-basis: 100%; margin: 0.8rem 0 0; }

/* Casilla de aceptación: discreta, fondo oscuro y contorno claro */
.consent { font-size: 0.84rem; line-height: 1.5; gap: .5rem; margin: 0 0 1rem; }
.consent input[type="checkbox"] {
  -webkit-appearance: none; appearance: none;
  width: .8rem; height: .8rem; margin: .3rem 0 0;
  border: 1px solid #b9b2a2; border-radius: 0;
  background: #141210; flex: 0 0 auto; cursor: pointer;
}
.consent input[type="checkbox"]:checked { background: #f4f1ea; box-shadow: inset 0 0 0 2px #141210; }
.consent input[type="checkbox"]:focus-visible { outline: 1px solid #b9b2a2; outline-offset: 2px; }
.consent-dark { color: #b9b2a2; }
.consent-dark a { color: #f4f1ea; }
