/* ════════════════════════════════════════════════════════════════════════════
   fidelizarte.com.ar — Páginas legales
   Tokens espejo de index.html (paleta "bar a la luz de las velas")
   ════════════════════════════════════════════════════════════════════════════ */
:root {
    --bg: oklch(0.165 0.012 60);
    --bg-2: oklch(0.195 0.013 61);
    --surface: oklch(0.215 0.014 62);
    --raised: oklch(0.255 0.016 64);
    --line: oklch(0.315 0.014 64);
    --line-soft: oklch(0.275 0.012 62);

    --ink: oklch(0.965 0.012 78);
    --muted: oklch(0.770 0.018 72);
    --faint: oklch(0.610 0.018 68);

    --honey: oklch(0.825 0.140 80);
    --honey-2: oklch(0.880 0.110 85);
    --honey-ink: oklch(0.250 0.060 70);
    --ember: oklch(0.700 0.150 45);

    --font-sans: 'Hanken Grotesk', ui-sans-serif, system-ui, sans-serif;
    --font-display: 'Bricolage Grotesque', 'Hanken Grotesk', sans-serif;

    --s-1: 4px;
    --s-2: 8px;
    --s-3: 12px;
    --s-4: 16px;
    --s-5: 24px;
    --s-6: 32px;
    --s-7: 48px;
    --s-8: 64px;
    --s-9: 96px;

    --ease: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-quart: cubic-bezier(0.25, 1, 0.5, 1);

    --maxw: 1180px;
    --radius: 20px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 96px;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-sans);
    background: var(--bg);
    color: var(--ink);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    inset: 0;
    background:
        radial-gradient(60% 45% at 82% -8%, oklch(0.82 0.14 80 / 0.10), transparent 70%),
        radial-gradient(46% 40% at 4% 4%, oklch(0.70 0.15 45 / 0.07), transparent 70%);
    pointer-events: none;
    z-index: 0;
}

::selection {
    background: oklch(0.82 0.14 80 / 0.28);
    color: var(--ink);
}

h1,
h2,
h3,
h4 {
    font-family: var(--font-display);
    letter-spacing: -0.025em;
    line-height: 1.1;
    font-weight: 700;
}

a {
    color: inherit;
    text-decoration: none;
}

:focus-visible {
    outline: 2px solid var(--honey);
    outline-offset: 3px;
    border-radius: 6px;
}

.wrap {
    width: 100%;
    max-width: var(--maxw);
    margin: 0 auto;
    padding: 0 var(--s-5);
    position: relative;
    z-index: 1;
}

.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    z-index: 100;
    background: var(--honey);
    color: var(--honey-ink);
    padding: 10px 18px;
    border-radius: 0 0 12px 0;
    font-weight: 600;
}

.skip-link:focus {
    left: 0;
}

/* ════════════════════════════════════════════════════════════════════════════
   HEADER
   ════════════════════════════════════════════════════════════════════════════ */
.header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: oklch(0.165 0.012 60 / 0.86);
    backdrop-filter: blur(14px) saturate(140%);
    border-bottom: 1px solid var(--line-soft);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--s-4);
    height: 72px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 1.35rem;
    letter-spacing: -0.03em;
}

.brand .mark {
    width: 30px;
    height: 30px;
    flex: none;
}

.brand .arte {
    color: var(--honey);
}

.back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--muted);
    font-size: 0.95rem;
    font-weight: 500;
    padding: 9px 16px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: oklch(0.255 0.016 64 / 0.5);
    transition: color 0.2s, border-color 0.2s, transform 0.12s var(--ease-quart);
}

.back:hover {
    color: var(--ink);
    border-color: var(--honey);
    transform: translateY(-1px);
}

.back svg {
    width: 16px;
    height: 16px;
    flex: none;
}

/* ════════════════════════════════════════════════════════════════════════════
   PORTADA DEL DOCUMENTO
   ════════════════════════════════════════════════════════════════════════════ */
.doc-head {
    padding: var(--s-8) 0 var(--s-6);
    border-bottom: 1px solid var(--line-soft);
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--honey);
    margin-bottom: var(--s-4);
}

.eyebrow::before {
    content: '';
    width: 22px;
    height: 1px;
    background: var(--honey);
    opacity: 0.7;
}

.doc-head h1 {
    font-size: clamp(2.1rem, 6vw, 3.4rem);
    max-width: 20ch;
}

.doc-meta {
    margin-top: var(--s-5);
    display: flex;
    flex-wrap: wrap;
    gap: var(--s-2) var(--s-5);
    color: var(--faint);
    font-size: 0.9rem;
}

.doc-meta strong {
    color: var(--muted);
    font-weight: 600;
}

/* Conmutador entre los tres documentos */
.doc-switch {
    display: flex;
    flex-wrap: wrap;
    gap: var(--s-2);
    margin-top: var(--s-6);
}

.doc-switch a {
    padding: 9px 16px;
    border-radius: 999px;
    border: 1px solid var(--line);
    color: var(--muted);
    font-size: 0.92rem;
    font-weight: 500;
    transition: color 0.2s, border-color 0.2s, background 0.2s;
}

.doc-switch a:hover {
    color: var(--ink);
    border-color: var(--honey);
}

.doc-switch a[aria-current='page'] {
    background: var(--honey);
    border-color: var(--honey);
    color: var(--honey-ink);
    font-weight: 700;
}

/* ════════════════════════════════════════════════════════════════════════════
   CUERPO: índice + prosa
   ════════════════════════════════════════════════════════════════════════════ */
.doc-body {
    display: grid;
    grid-template-columns: 232px minmax(0, 1fr);
    gap: var(--s-9);
    align-items: start;
    padding: var(--s-7) 0 var(--s-9);
}

.toc {
    position: sticky;
    top: 96px;
}

.toc h2 {
    font-size: 0.76rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--faint);
    font-weight: 700;
    margin-bottom: var(--s-4);
}

.toc ol {
    list-style: none;
    counter-reset: toc;
}

.toc li {
    counter-increment: toc;
}

.toc a {
    display: flex;
    gap: 10px;
    padding: 7px 0;
    font-size: 0.9rem;
    color: var(--faint);
    line-height: 1.35;
    transition: color 0.2s;
}

.toc a::before {
    content: counter(toc);
    font-variant-numeric: tabular-nums;
    font-size: 0.76rem;
    color: oklch(0.610 0.018 68 / 0.6);
    padding-top: 2px;
    flex: none;
    width: 1.1em;
    text-align: right;
}

.toc a:hover {
    color: var(--muted);
}

.toc a.active {
    color: var(--honey);
    font-weight: 600;
}

.toc a.active::before {
    color: var(--honey);
}

.prose {
    max-width: 68ch;
}

.prose .lead {
    font-size: 1.12rem;
    color: var(--muted);
    line-height: 1.65;
    padding-bottom: var(--s-6);
    border-bottom: 1px solid var(--line-soft);
}

.prose section {
    padding-top: var(--s-7);
}

.prose h2 {
    font-size: 1.42rem;
    display: flex;
    align-items: baseline;
    gap: 14px;
    margin-bottom: var(--s-4);
}

.prose h2 .num {
    font-family: var(--font-sans);
    font-size: 0.86rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    color: var(--honey);
    letter-spacing: 0.04em;
    flex: none;
}

.prose h3 {
    font-size: 1.04rem;
    margin: var(--s-5) 0 var(--s-2);
    color: var(--ink);
}

.prose p {
    color: var(--muted);
    margin-bottom: var(--s-4);
    text-wrap: pretty;
}

.prose p:last-child {
    margin-bottom: 0;
}

.prose strong {
    color: var(--ink);
    font-weight: 600;
}

.prose a:not(.back) {
    color: var(--honey);
    text-decoration: underline;
    text-decoration-color: oklch(0.825 0.14 80 / 0.35);
    text-underline-offset: 3px;
    transition: text-decoration-color 0.2s;
}

.prose a:not(.back):hover {
    text-decoration-color: var(--honey);
}

.prose ul {
    list-style: none;
    margin: 0 0 var(--s-4);
    display: grid;
    gap: var(--s-3);
}

.prose ul li {
    position: relative;
    padding-left: 22px;
    color: var(--muted);
}

.prose ul li::before {
    content: '';
    position: absolute;
    left: 2px;
    top: 0.68em;
    width: 6px;
    height: 6px;
    border-radius: 2px;
    background: var(--honey);
    opacity: 0.75;
}

/* Nota destacada (avisos legales puntuales) */
.note {
    margin: var(--s-5) 0;
    padding: var(--s-5);
    border: 1px solid var(--line);
    border-radius: 14px;
    background: oklch(0.215 0.014 62 / 0.7);
}

.note p {
    color: var(--muted);
    font-size: 0.95rem;
}

.note p:last-child {
    margin-bottom: 0;
}

.note .note-title {
    display: flex;
    align-items: center;
    gap: 9px;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--honey-2);
    margin-bottom: var(--s-2);
}

.note .note-title svg {
    width: 17px;
    height: 17px;
    flex: none;
}

/* Cierre del documento */
.doc-end {
    margin-top: var(--s-8);
    padding-top: var(--s-5);
    border-top: 1px solid var(--line-soft);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: var(--s-4);
    color: var(--faint);
    font-size: 0.86rem;
}

.to-top {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: var(--muted);
    transition: color 0.2s;
}

.to-top:hover {
    color: var(--honey);
}

.to-top svg {
    width: 14px;
    height: 14px;
}

/* ════════════════════════════════════════════════════════════════════════════
   FOOTER
   ════════════════════════════════════════════════════════════════════════════ */
.footer {
    border-top: 1px solid var(--line-soft);
    padding: var(--s-6) 0;
}

.footer-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--s-4);
    flex-wrap: wrap;
    color: var(--faint);
    font-size: 0.84rem;
}

.footer-legal {
    display: flex;
    flex-wrap: wrap;
    gap: var(--s-2) var(--s-4);
}

.footer-legal a {
    color: var(--faint);
    transition: color 0.2s;
}

.footer-legal a:hover {
    color: var(--honey);
}

.made-by {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--faint);
    transition: opacity 0.2s var(--ease);
}

.made-by:hover {
    opacity: 0.75;
}

.made-by .pc-logo {
    height: 30px;
    width: auto;
    display: block;
}

/* ════════════════════════════════════════════════════════════════════════════
   RESPONSIVE
   ════════════════════════════════════════════════════════════════════════════ */
@media (max-width: 900px) {
    .doc-body {
        grid-template-columns: 1fr;
        gap: var(--s-6);
        padding-top: var(--s-6);
    }

    .toc {
        position: static;
        border: 1px solid var(--line-soft);
        border-radius: 14px;
        padding: var(--s-4) var(--s-5);
        background: oklch(0.195 0.013 61 / 0.6);
    }

    .toc ol {
        columns: 2;
        column-gap: var(--s-5);
    }

    .toc li {
        break-inside: avoid;
    }

    .prose .lead {
        font-size: 1.05rem;
    }
}

@media (max-width: 620px) {
    .header-inner {
        height: 64px;
    }

    .brand {
        font-size: 1.18rem;
    }

    .back span {
        display: none;
    }

    .back {
        padding: 9px 11px;
    }

    .doc-head {
        padding-top: var(--s-6);
    }

    .toc ol {
        columns: 1;
    }

    .footer-bottom {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--s-4);
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    * {
        transition-duration: 0.01ms !important;
    }
}

@media print {
    .header,
    .doc-switch,
    .toc,
    .footer,
    .to-top {
        display: none !important;
    }

    body {
        background: #fff;
        color: #111;
    }

    body::before {
        display: none;
    }

    .prose,
    .prose p,
    .prose ul li,
    .doc-meta {
        color: #222;
        max-width: none;
    }

    .doc-body {
        display: block;
    }
}
