/* =========================================================
   CLASSIC.WEB — CORTE · FICHA DEL TEMPLATE
   Identidad "Carta de barrio" (la misma de la demo),
   con registro de ficha comercial: filetes, numeración,
   ficha técnica y una sola placa de demostración.
   ========================================================= */

:root {
    color-scheme: light;

    /* ===== COLOR ===== */
    --ink: #181614;
    --ink-raised: #211e1b;
    --ink-deep: #100e0d;
    --bone: #eee8df;
    --bone-raised: #f6f2ea;

    --brass: #b49a78;
    --brass-deep: #6b5943;
    --brass-soft: #c8b69e;

    --text-soft: #5f574f;
    --text-mute: #6b5f50;
    --cream-text: #c8c0b7;
    --cream-dim: #a89f95;

    --rule: #cfc6bb;
    --rule-dark: #3a3530;
    --nova-gold: #8b7355;

    /* ===== TIPOGRAFÍA ===== */
    --font-display: 'DM Serif Display', Georgia, 'Times New Roman', serif;
    --font-text: 'DM Sans', system-ui, -apple-system, sans-serif;
    --font-nova: 'Space Grotesk', system-ui, sans-serif;

    --fs-label: .8125rem;      /* 13px */
    --fs-meta: .8125rem;       /* 13px */
    --fs-caption: .9375rem;    /* 15px */
    --fs-body: 1rem;           /* 16px */
    --fs-lead: 1.0625rem;      /* 17px */
    --fs-h3: 1.4rem;
    --fs-h2: clamp(2rem, 4vw, 3.1rem);
    --fs-h1: clamp(3.6rem, 8.4vw, 7.4rem);

    --track-label: .16em;
    --track-meta: .1em;

    --radius: 8px;
    --radius-sm: 6px;
    --dur: .25s;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    min-width: 320px;
    margin: 0;

    font-family: var(--font-text);
    font-size: var(--fs-body);
    line-height: 1.7;

    background-color: var(--ink);
    color: var(--bone);
    -webkit-font-smoothing: antialiased;
}

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

a:focus-visible {
    outline: 2px solid var(--brass-soft);
    outline-offset: 4px;
}

::selection {
    background: var(--brass);
    color: var(--ink);
}

.product-skip {
    position: absolute;
    top: -120px;
    left: clamp(20px, 6vw, 72px);
    z-index: 40;

    padding: .75rem 1.25rem;

    background: var(--bone);
    color: var(--ink);
    border-bottom-right-radius: var(--radius);
    border-bottom-left-radius: var(--radius);

    font-size: var(--fs-caption);
    font-weight: 600;

    transition: top var(--dur) ease;
}

.product-skip:focus {
    top: 0;
}

/* =========================================================
   MARCA CLASSIC.WEB
   ========================================================= */

.nova-mark {
    display: inline-flex;
    align-items: center;
    gap: 12px;

    color: var(--bone);
    font-family: var(--font-nova);
    font-size: 21px;
    font-weight: 700;
    letter-spacing: -1.4px;
}

.nova-word {
    line-height: 1;
}

.nova-icon {
    position: relative;

    display: flex;
    align-items: center;
    justify-content: center;

    width: 24px;
    height: 24px;

    transform: rotate(45deg) translateY(1px);
}

.nova-icon span {
    position: absolute;
    width: 15px;
    height: 15px;
    border: 2.5px solid var(--nova-gold);
}

.nova-icon span:first-child {
    transform: translate(-3px, -3px);
}

.nova-icon span:last-child {
    transform: translate(3px, 3px);
}

/* =========================================================
   ENCABEZADO Y PIE
   ========================================================= */

.detail-header,
.detail-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;

    padding: 20px clamp(20px, 6vw, 88px);
}

.detail-header {
    min-height: 76px;
    background: var(--ink);
    border-bottom: 1px solid var(--rule-dark);
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 9px;

    color: var(--cream-text);
    font-size: var(--fs-label);
    font-weight: 500;
    letter-spacing: .04em;
    transition: color var(--dur) ease;
}

.back-link span {
    color: var(--brass);
}

.back-link:hover {
    color: var(--bone);
}

.detail-footer {
    min-height: 86px;
    background: var(--ink-deep);
    border-top: 1px solid var(--rule-dark);
}

.detail-footer p {
    margin: 0;
    color: var(--cream-dim);
    font-size: var(--fs-meta);
}

.detail-footer > span {
    color: var(--cream-dim);
    font-size: var(--fs-meta);
    font-weight: 600;
    letter-spacing: var(--track-meta);
    text-transform: uppercase;
    text-align: right;
}

/* =========================================================
   PORTADA
   ========================================================= */

.hero {
    position: relative;
    display: grid;
    grid-template-columns: minmax(300px, .82fr) minmax(0, 1.18fr);
    align-items: center;
    gap: clamp(2rem, 5vw, 4.5rem);

    max-width: 1680px;
    margin: 0 auto;
    padding: clamp(3rem, 6vw, 5.5rem) clamp(20px, 6vw, 88px) clamp(4rem, 7vw, 7rem);
    overflow: hidden;
}

.hero-copy {
    max-width: 30rem;
}

.eyebrow {
    display: flex;
    align-items: center;
    gap: 11px;
    margin: 0;

    color: var(--brass);
    font-size: var(--fs-label);
    font-weight: 600;
    letter-spacing: var(--track-label);
    text-transform: uppercase;
}

.overline {
    margin: 1.75rem 0 0;
    color: var(--cream-dim);
    font-size: var(--fs-meta);
    font-weight: 600;
    letter-spacing: var(--track-meta);
    text-transform: uppercase;
}

.hero h1 {
    margin: .5rem 0 0;

    font-family: var(--font-display);
    font-size: var(--fs-h1);
    font-weight: 400;
    letter-spacing: -.02em;
    line-height: .96;
}

.hero h1 span {
    color: var(--brass);
}

.hero-description {
    max-width: 44ch;
    margin: 1.75rem 0 0;

    font-size: var(--fs-lead);
    line-height: 1.7;
    color: var(--cream-text);
}

.hero-actions,
.closing-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem 1.75rem;
    margin-top: 2.25rem;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 18px;

    min-height: 52px;
    padding: 0 24px;

    border: 1px solid transparent;
    border-radius: var(--radius-sm);

    font-size: var(--fs-caption);
    font-weight: 600;
    letter-spacing: .06em;
    text-transform: uppercase;

    transition: background-color var(--dur) ease, color var(--dur) ease;
}

.button-gold {
    background: var(--brass);
    color: var(--ink);
}

.button-gold:hover {
    background: var(--bone);
}

.button-light {
    background: var(--bone);
    color: var(--ink);
}

.button-light:hover {
    background: var(--brass);
}

.text-link,
.inline-link {
    display: inline-block;
    padding-bottom: 5px;

    border-bottom: 1px solid var(--rule-dark);

    font-size: var(--fs-caption);
    font-weight: 600;

    transition: color var(--dur) ease, border-color var(--dur) ease;
}

.text-link {
    color: var(--bone);
}

.text-link span,
.inline-link span {
    margin-left: 6px;
    color: var(--brass);
}

.text-link:hover {
    color: var(--brass);
}

.demo-note {
    display: flex;
    align-items: flex-start;
    gap: 13px;

    max-width: 48ch;
    margin: 2.5rem 0 0;
    padding-top: 1.25rem;
    border-top: 1px solid var(--rule-dark);

    color: var(--cream-dim);
    font-size: var(--fs-caption);
    line-height: 1.7;
}

.demo-note > span {
    display: grid;
    width: 20px;
    height: 20px;
    flex: 0 0 auto;
    place-items: center;

    border: 1px solid var(--brass);
    border-radius: 50%;
    color: var(--brass);

    font-family: var(--font-display);
    font-size: 13px;
    line-height: 1;
}

/* =========================================================
   PLACA DE DEMOSTRACIÓN
   ========================================================= */

.preview-composition {
    position: relative;
    padding: 18px 0 22px 18px;
}

.preview-composition::before {
    content: "";
    position: absolute;
    z-index: -1;
    inset: 0 22px 0 0;
    border: 1px solid var(--rule-dark);
}

.preview-frame {
    overflow: hidden;
    border: 1px solid var(--rule-dark);
    border-radius: var(--radius);
    background: var(--ink);
}

.preview-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;

    min-height: 42px;
    padding: 0 16px;

    background: var(--ink-raised);
    border-bottom: 1px solid var(--rule-dark);

    color: var(--cream-dim);
    font-size: var(--fs-meta);
    font-weight: 600;
    letter-spacing: var(--track-meta);
    text-transform: uppercase;
}

.window-dots {
    display: flex;
    gap: 5px;
}

.window-dots i {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--brass);
}

.window-dots i:nth-child(2) {
    background: var(--rule-dark);
}

.window-dots i:nth-child(3) {
    background: var(--rule-dark);
}

.preview-state {
    color: var(--brass);
}

.preview-frame iframe {
    display: block;
    width: 100%;
    height: clamp(430px, 44vw, 590px);
    border: 0;
    background: var(--ink);
}

.preview-caption {
    position: absolute;
    right: -4px;
    bottom: -1px;

    display: flex;
    align-items: center;
    gap: 12px;

    padding: 13px 16px;

    background: var(--bone);
    color: var(--ink);
    border-left: 2px solid var(--brass);

    font-size: var(--fs-meta);
    font-weight: 600;
    letter-spacing: var(--track-meta);
    text-transform: uppercase;
}

.preview-caption b {
    font-family: var(--font-display);
    font-size: 16px;
    font-weight: 400;
    color: var(--brass-deep);
}

.preview-side-note {
    position: absolute;
    top: 50%;
    right: -12px;

    color: var(--brass);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: var(--track-label);
    text-transform: uppercase;
    writing-mode: vertical-rl;
}

/* =========================================================
   SECCIONES
   ========================================================= */

.craft-section,
.services-section,
.experience-section {
    padding: clamp(3.5rem, 7vw, 6.5rem) clamp(20px, 8vw, 120px);
}

.craft-section {
    background: var(--ink);
}

.services-section {
    background: var(--bone);
    color: var(--ink);
    max-width: 1500px;
    margin: 0 auto;
}

.experience-section {
    background: var(--bone-raised);
    color: var(--ink);
}

.section-label {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 1.5rem;

    color: var(--brass);
    font-size: var(--fs-label);
    font-weight: 600;
    letter-spacing: var(--track-label);
    text-transform: uppercase;
}

.section-label span:first-child {
    font-family: var(--font-display);
    font-size: 15px;
    font-weight: 400;
    letter-spacing: 0;
    color: var(--cream-dim);
}

.services-section .section-label,
.experience-section .section-label {
    color: var(--brass-deep);
}

.services-section .section-label span:first-child,
.experience-section .section-label span:first-child {
    color: var(--text-mute);
}

.craft-grid {
    display: grid;
    grid-template-columns: 1fr .74fr;
    align-items: end;
    gap: clamp(2rem, 4vw, 4rem);
    padding-bottom: clamp(2.5rem, 4vw, 4rem);
}

.craft-grid h2,
.services-heading h2,
.experience-heading h2,
.closing-section h2 {
    margin: 0;

    font-family: var(--font-display);
    font-size: var(--fs-h2);
    font-weight: 400;
    letter-spacing: -.02em;
    line-height: 1.06;
}

.craft-grid h2 em,
.services-heading h2 em,
.experience-heading h2 em,
.closing-section h2 em {
    color: var(--brass);
    font-style: normal;
}

.services-heading h2 em,
.experience-heading h2 em {
    color: var(--brass-deep);
}

.craft-copy p,
.services-heading > p,
.experience-copy p {
    margin: 0 0 20px;

    font-size: var(--fs-caption);
    line-height: 1.75;
    color: var(--cream-text);
}

.services-heading > p,
.experience-copy p {
    color: var(--text-soft);
}

.craft-copy .inline-link,
.experience-copy .inline-link {
    border-bottom-color: var(--rule-dark);
}

.services-section .inline-link {
    border-bottom-color: var(--rule);
    color: var(--ink);
}

.craft-copy .inline-link span,
.experience-copy .inline-link span {
    color: var(--brass);
}

.services-section .inline-link span {
    color: var(--brass-deep);
}

/* Ficha técnica: la tira de valores. */
.craft-rule {
    display: flex;
    align-items: center;
    gap: 18px;

    padding-top: 1.5rem;
    border-top: 2px solid var(--brass);

    color: var(--cream-text);
    font-size: var(--fs-label);
    font-weight: 600;
    letter-spacing: var(--track-label);
    text-transform: uppercase;
}

.craft-rule i {
    width: 5px;
    height: 5px;
    flex: 0 0 auto;
    border-radius: 50%;
    background: var(--brass);
}

.services-heading {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(230px, .62fr);
    align-items: end;
    gap: 1.5rem clamp(2rem, 5vw, 5rem);
    margin-bottom: clamp(2.5rem, 4vw, 4rem);
}

.services-heading .section-label {
    grid-column: 1 / -1;
}

.service-list {
    border-top: 2px solid var(--ink);
}

.service-row {
    display: grid;
    grid-template-columns: 46px minmax(150px, .7fr) minmax(0, 1.3fr) 20px;
    align-items: baseline;
    gap: clamp(1rem, 2.5vw, 2.5rem);

    padding: 1.5rem 0;
    border-bottom: 1px solid var(--rule);

    transition: background-color var(--dur) ease;
}

.service-row:hover {
    background-color: var(--bone-raised);
}

.service-number {
    font-family: var(--font-display);
    font-size: 1.05rem;
    color: var(--text-mute);
}

.service-name {
    font-family: var(--font-display);
    font-size: var(--fs-h3);
    line-height: 1.15;
}

.service-description {
    font-size: var(--fs-caption);
    color: var(--text-soft);
}

.service-arrow {
    justify-self: end;
    color: var(--brass-deep);
    font-size: 16px;
    transition: transform var(--dur) ease;
}

.service-row:hover .service-arrow {
    transform: translate(3px, -3px);
}

.services-disclaimer {
    margin: 1.5rem 0 0;

    font-size: var(--fs-meta);
    line-height: 1.7;
    color: var(--text-soft);
}

.experience-heading {
    max-width: 40rem;
    margin-bottom: clamp(2rem, 3.5vw, 3rem);
}

.experience-copy {
    max-width: 46rem;
}

/* =========================================================
   CIERRE
   ========================================================= */

.closing-section {
    position: relative;
    overflow: hidden;

    padding: clamp(4rem, 8vw, 7rem) 20px;

    background: var(--ink-raised);
    text-align: center;
}

.closing-mark {
    position: absolute;
    right: 4%;
    bottom: -160px;

    color: rgba(180, 154, 120, .09);
    font-family: var(--font-display);
    font-size: 360px;
    line-height: 1;
    pointer-events: none;
}

.closing-section > .eyebrow {
    position: relative;
    z-index: 1;
    justify-content: center;
    color: var(--brass);
}

.closing-section h2 {
    position: relative;
    z-index: 1;
    margin-top: 1.5rem;
    font-size: clamp(2.2rem, 5vw, 3.9rem);
}

.closing-copy {
    position: relative;
    z-index: 1;
    max-width: 52ch;
    margin: 1.5rem auto 0;

    font-size: var(--fs-caption);
    line-height: 1.75;
    color: var(--cream-text);
}

.closing-actions {
    position: relative;
    z-index: 1;
    justify-content: center;
}

/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 1020px) {
    .hero {
        grid-template-columns: minmax(0, 1fr);
        gap: 2.5rem;
    }

    .hero-copy {
        max-width: 42rem;
    }

    .preview-composition {
        width: min(100%, 860px);
        margin-inline: auto;
    }

    .service-row {
        grid-template-columns: 40px minmax(140px, .8fr) minmax(0, 1fr) 20px;
        gap: 1.25rem;
    }
}

@media (max-width: 760px) {
    .detail-header,
    .detail-footer {
        padding: 16px 20px;
    }

    .detail-header {
        min-height: 64px;
    }

    .nova-mark {
        font-size: 18px;
    }

    .nova-icon {
        width: 20px;
        height: 20px;
    }

    .nova-icon span {
        width: 13px;
        height: 13px;
        border-width: 2px;
    }

    .back-link {
        font-size: 12px;
    }

    .hero {
        padding: 2.5rem 20px 3.5rem;
    }

    .hero-actions,
    .closing-actions {
        align-items: flex-start;
        flex-direction: column;
    }

    .hero-actions .button,
    .closing-actions .button {
        width: 100%;
    }

    .preview-composition {
        padding-left: 10px;
    }

    .preview-composition::before {
        right: 12px;
    }

    .preview-side-note {
        right: -8px;
        font-size: 10px;
    }

    .preview-bar {
        min-height: 38px;
        padding: 0 12px;
        font-size: 10px;
        letter-spacing: .06em;
    }

    .preview-bar > span:nth-child(2) {
        display: none;
    }

    .preview-frame iframe {
        height: 440px;
    }

    .preview-caption {
        right: -2px;
        gap: 9px;
        padding: 11px 13px;
        font-size: 10px;
        letter-spacing: .06em;
    }

    .craft-section,
    .services-section,
    .experience-section {
        padding: 3.5rem 20px 4rem;
    }

    .craft-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .craft-rule {
        flex-wrap: wrap;
        gap: 10px 14px;
        font-size: 11px;
    }

    .services-heading {
        grid-template-columns: minmax(0, 1fr);
        gap: 1.25rem;
    }

    .service-row {
        grid-template-columns: 32px minmax(0, 1fr) 18px;
        align-items: baseline;
        gap: .5rem .85rem;
    }

    .service-number {
        grid-column: 1;
        grid-row: 1;
    }

    .service-name {
        grid-column: 2;
        grid-row: 1;
    }

    .service-arrow {
        grid-column: 3;
        grid-row: 1 / span 2;
    }

    .service-description {
        grid-column: 2 / -1;
        grid-row: 2;
    }

    .closing-section {
        padding: 3.5rem 20px 3.75rem;
    }

    .closing-mark {
        right: -20px;
        bottom: -110px;
        font-size: 240px;
    }

    .detail-footer {
        align-items: flex-start;
        flex-wrap: wrap;
        gap: 10px 16px;
    }

    .detail-footer > span {
        text-align: left;
    }
}

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

    *,
    *::before,
    *::after {
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        scroll-behavior: auto !important;
    }
}
