html {
    scroll-behavior: smooth;
}

/* ── Skip to content (accessibility) ── */
.skip-link {
    position: absolute;
    top: -100%;
    left: 1rem;
    z-index: 99999;
    padding: 0.75rem 1.5rem;
    background: var(--color-primary);
    color: #fff;
    font-weight: 600;
    border-radius: 0 0 0.5rem 0.5rem;
    transition: top 0.2s;
}
.skip-link:focus {
    top: 0;
}

:root {
    --color-bg: #FFFAF5;
    --color-bg-alt: #FFF7ED;
    --color-surface: #FFFFFF;
    --color-primary: #B8860B;
    --color-primary-light: #D4A847;
    --color-primary-dark: #8B6508;
    --color-accent: #C87156;
    --color-accent-light: #E8A090;
    --color-text: #3D3029;
    --color-text-muted: #6B5B4F;
    --color-text-light: #8B7B6F;
    --color-border: #E8DDD4;
    --color-border-light: #F0E8E0;
}

body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    background-color: var(--color-bg);
    color: var(--color-text);
    line-height: 1.7;
    overflow-x: hidden;
}

/* ── Focus visible (keyboard navigation) ── */
:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 3px;
    border-radius: 4px;
}

/* ── Typography polish ── */
h1, h2, h3 {
    text-wrap: balance;
}
h1 {
    letter-spacing: -0.02em;
}
h2 {
    letter-spacing: -0.015em;
}

/* ── Grain overlay for depth ── */
body::after {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 99990;
    opacity: 0.025;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ── Navigation ── */
.nav-link {
    color: var(--color-text-muted);
    position: relative;
    transition: color 0.3s;
}
.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--color-primary), var(--color-primary-light));
    border-radius: 1px;
    transition: width 0.3s ease;
}
.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}
.nav-link:hover,
.nav-link.active {
    color: var(--color-primary);
}

/* ── Buttons ── */
.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-light));
    color: #fff;
    padding: 0.85rem 2rem;
    border-radius: 0.75rem;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(184, 134, 11, 0.15);
}
.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(184, 134, 11, 0.3);
}
.btn-primary:active {
    transform: translateY(0) scale(0.98);
    box-shadow: 0 2px 8px rgba(184, 134, 11, 0.2);
}
.btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    border: 2px solid var(--color-primary);
    color: var(--color-primary);
    padding: 0.75rem 2rem;
    border-radius: 0.75rem;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.btn-secondary:hover {
    background-color: var(--color-primary);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(184, 134, 11, 0.2);
}
.btn-secondary:active {
    transform: translateY(0) scale(0.98);
}

/* ── Cards ── */
.card {
    background: var(--color-surface);
    border: 1px solid var(--color-border-light);
    border-radius: 1.25rem;
    padding: 2rem;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 12px rgba(184, 134, 11, 0.04);
}
.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 36px rgba(184, 134, 11, 0.12);
    border-color: var(--color-primary-light);
}

/* ── Section styling ── */
.section-alt {
    background-color: var(--color-bg-alt);
}

.section-divider {
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--color-primary-light), transparent);
    border: none;
    margin: 0;
}

/* ── Hero overlay ── */
.hero-overlay {
    background: linear-gradient(to bottom, rgba(255, 250, 245, 0.3) 0%, rgba(255, 250, 245, 0.85) 70%, var(--color-bg) 100%);
}

/* ── Page hero (inner pages) ── */
.page-hero {
    background-color: var(--color-bg-alt);
    border-bottom: 1px solid var(--color-border-light);
}

/* ── Gold decorative line ── */
.gold-line {
    width: 3rem;
    height: 3px;
    background: linear-gradient(90deg, var(--color-primary), var(--color-primary-light));
    border-radius: 2px;
}

/* ── Decorative blobs ── */
.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    pointer-events: none;
    z-index: -1;
}
.blob-gold {
    background: rgba(184, 134, 11, 0.06);
}
.blob-rose {
    background: rgba(200, 113, 86, 0.05);
}

/* ── Quote block ── */
.quote-block {
    position: relative;
    padding: 2.5rem;
    border-radius: 1.25rem;
    background: linear-gradient(135deg, var(--color-bg-alt), rgba(184, 134, 11, 0.03));
    border: 1px solid var(--color-border-light);
}
.quote-block::before {
    content: '\201C';
    position: absolute;
    top: -0.2em;
    left: 1rem;
    font-size: 5rem;
    line-height: 1;
    color: var(--color-primary-light);
    opacity: 0.3;
    font-family: Georgia, serif;
}

/* ── CTA gradient section ── */
.cta-gradient {
    background: linear-gradient(135deg, var(--color-bg-alt) 0%, rgba(184, 134, 11, 0.06) 50%, rgba(200, 113, 86, 0.04) 100%);
    border-top: 1px solid var(--color-border-light);
    border-bottom: 1px solid var(--color-border-light);
}

/* ── Service image hover ── */
.service-image {
    overflow: hidden;
    border-radius: 1rem;
    box-shadow: 0 4px 20px rgba(61, 48, 41, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-bg-alt);
}
.service-image img {
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}
.service-image:hover img {
    transform: scale(1.03);
}

/* ── Form inputs ── */
.form-input {
    width: 100%;
    background-color: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 0.75rem;
    padding: 0.85rem 1.1rem;
    color: var(--color-text);
    transition: border-color 0.3s, box-shadow 0.3s;
    font-family: inherit;
    font-size: 1rem;
}
.form-input:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 4px rgba(184, 134, 11, 0.1);
}
.form-input::placeholder {
    color: var(--color-text-light);
}
.form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--color-text-muted);
    margin-bottom: 0.5rem;
}

/* ── Pricing rows ── */
.price-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.25rem;
    border-radius: 0.75rem;
    transition: all 0.25s;
    font-variant-numeric: tabular-nums;
}
.price-row:hover {
    background-color: var(--color-bg-alt);
    transform: translateX(4px);
}
.price-row + .price-row {
    border-top: 1px solid var(--color-border-light);
}

/* ── Certificate grid ── */
.cert-card {
    cursor: pointer;
    border-radius: 1rem;
    overflow: hidden;
    border: 1px solid var(--color-border-light);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    background: var(--color-surface);
}
.cert-card:hover {
    box-shadow: 0 10px 32px rgba(184, 134, 11, 0.15);
    transform: translateY(-4px);
}
.cert-card img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}
.cert-card:hover img {
    transform: scale(1.03);
}

/* ── Lightbox ── */
.lightbox {
    position: fixed;
    inset: 0;
    z-index: 100;
    background: rgba(61, 48, 41, 0.85);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s;
}
.lightbox.active {
    opacity: 1;
    pointer-events: auto;
}
.lightbox img {
    max-width: 90vw;
    max-height: 90vh;
    border-radius: 0.75rem;
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.4);
}
.lightbox-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.95);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--color-text);
    transition: all 0.25s;
    box-shadow: 0 2px 12px rgba(0,0,0,0.15);
}
.lightbox-close:hover {
    background: #fff;
    transform: scale(1.1);
}

/* ── Mobile menu ── */
.mobile-menu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.mobile-menu.open {
    max-height: 30rem;
}

/* ── Scroll animations ── */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1), transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}
.animate-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Staggered children */
.stagger-children > *:nth-child(1) { transition-delay: 0s; }
.stagger-children > *:nth-child(2) { transition-delay: 0.1s; }
.stagger-children > *:nth-child(3) { transition-delay: 0.2s; }
.stagger-children > *:nth-child(4) { transition-delay: 0.3s; }
.stagger-children > *:nth-child(5) { transition-delay: 0.4s; }
.stagger-children > *:nth-child(6) { transition-delay: 0.5s; }

/* Scale-in for value icons */
.animate-scale {
    opacity: 0;
    transform: scale(0.7);
    transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.animate-scale.visible {
    opacity: 1;
    transform: scale(1);
}

/* ── Value icons ── */
.value-icon {
    width: 4.5rem;
    height: 4.5rem;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--color-bg-alt), rgba(184, 134, 11, 0.1));
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 12px rgba(184, 134, 11, 0.06);
}
.card:hover .value-icon,
.value-icon:hover {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 4px 20px rgba(184, 134, 11, 0.15);
}

/* ── Footer ── */
.footer-link {
    color: var(--color-text-muted);
    transition: color 0.3s, transform 0.3s;
    font-size: 0.875rem;
    display: inline-block;
}
.footer-link:hover {
    color: var(--color-primary);
    transform: translateX(3px);
}


/* ── Scroll progress bar (inside nav, at bottom edge) ── */
.scroll-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--color-primary), var(--color-primary-light), var(--color-accent));
    width: 0%;
    pointer-events: none;
}

/* ── Back to top ── */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    box-shadow: 0 4px 16px rgba(61, 48, 41, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 90;
    opacity: 0;
    transform: translateY(20px);
    pointer-events: none;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.back-to-top.visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}
.back-to-top:hover {
    background: var(--color-primary);
    border-color: var(--color-primary);
    box-shadow: 0 6px 20px rgba(184, 134, 11, 0.25);
}
.back-to-top:hover svg {
    color: #fff;
}

/* ── Page transitions ── */
.page-transition-overlay {
    position: fixed;
    inset: 0;
    background: var(--color-bg);
    z-index: 99997;
    pointer-events: none;
    opacity: 1;
    transition: opacity 0.5s ease;
}
.page-transition-overlay.transparent {
    opacity: 0;
}
.page-transition-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

/* ── Magnetic button ── */
.magnetic {
    transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── Scroll-down indicator ── */
.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 3;
    animation: bounceDown 2s infinite;
    opacity: 0.7;
}
@keyframes bounceDown {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(10px); }
}

/* ── WhatsApp button ── */
.whatsapp-btn {
    position: fixed;
    bottom: 2rem;
    left: 2rem;
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 50%;
    background: #25D366;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 90;
    box-shadow: 0 4px 16px rgba(37, 211, 102, 0.3);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.whatsapp-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 24px rgba(37, 211, 102, 0.4);
}
.whatsapp-btn svg {
    width: 1.75rem;
    height: 1.75rem;
    fill: #fff;
}

/* ── Step timeline ── */
.step-item {
    position: relative;
    padding-left: 3.5rem;
}
.step-item::before {
    content: attr(data-step);
    position: absolute;
    left: 0;
    top: 0;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-light));
    color: #fff;
    font-weight: 700;
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    justify-content: center;
}
.step-connector {
    position: absolute;
    left: 1.2rem;
    top: 2.5rem;
    bottom: -1.5rem;
    width: 2px;
    background: linear-gradient(to bottom, var(--color-primary-light), var(--color-border-light));
}

/* ── FAQ accordion ── */
.faq-item {
    border: 1px solid var(--color-border-light);
    border-radius: 0.75rem;
    overflow: hidden;
    transition: border-color 0.3s;
}
.faq-item:hover {
    border-color: var(--color-border);
}
.faq-question {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.5rem;
    background: var(--color-surface);
    font-weight: 600;
    color: var(--color-text);
    cursor: pointer;
    transition: background 0.2s;
    width: 100%;
    border: none;
    text-align: left;
    font-family: inherit;
    font-size: 1rem;
}
.faq-question:hover {
    background: var(--color-bg-alt);
}
.faq-icon {
    width: 1.25rem;
    height: 1.25rem;
    flex-shrink: 0;
    transition: transform 0.3s ease;
    color: var(--color-primary);
}
.faq-item.open .faq-icon {
    transform: rotate(180deg);
}
.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), padding 0.3s;
    padding: 0 1.5rem;
    color: var(--color-text-muted);
    line-height: 1.7;
}
.faq-item.open .faq-answer {
    max-height: 20rem;
    padding: 0 1.5rem 1.25rem;
}

/* ── Cookie consent banner ── */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    background: var(--color-surface);
    border-top: 1px solid var(--color-border);
    box-shadow: 0 -4px 24px rgba(61, 48, 41, 0.08);
    padding: 1.25rem 1.5rem;
    transform: translateY(100%);
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}
.cookie-banner.visible {
    transform: translateY(0);
}

/* ── Testimonials ── */
.testimonial-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border-light);
    border-radius: 1.25rem;
    padding: 2rem;
    position: relative;
}
.testimonial-card::before {
    content: '\201C';
    position: absolute;
    top: 0.5rem;
    left: 1.25rem;
    font-size: 3.5rem;
    line-height: 1;
    color: var(--color-primary-light);
    opacity: 0.25;
    font-family: Georgia, serif;
}
.testimonial-avatar {
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--color-primary-light), var(--color-accent-light));
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.875rem;
    color: #fff;
    flex-shrink: 0;
}

/* ── Counter animation ── */
.counter-value {
    font-variant-numeric: tabular-nums;
    display: inline-block;
}

/* ── Typing animation ── */
.typing-cursor {
    display: inline-block;
    width: 3px;
    height: 1em;
    background: var(--color-primary);
    margin-left: 2px;
    animation: blink 0.8s infinite;
    vertical-align: text-bottom;
}
@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

/* ── Image blur-up ── */
.blur-up {
    filter: blur(10px);
    transition: filter 0.6s ease;
}
.blur-up.loaded {
    filter: blur(0);
}

/* ── Breadcrumbs ── */
.breadcrumbs {
    font-size: 0.8125rem;
    color: var(--color-text-light);
}
.breadcrumbs a {
    color: var(--color-text-muted);
    transition: color 0.2s;
}
.breadcrumbs a:hover {
    color: var(--color-primary);
}
.breadcrumbs .separator {
    margin: 0 0.4rem;
    opacity: 0.5;
}

/* ── Mobile fixes ── */
@media (max-width: 420px) {
    .price-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.125rem;
        padding: 0.75rem 1rem;
    }
}

/* ── Print styles ── */
@media print {
    header, footer, .back-to-top, .whatsapp-btn, .cookie-banner,
    .scroll-progress, .page-transition-overlay,
    .btn-primary, .btn-secondary, .scroll-indicator { display: none !important; }
    body { background: #fff !important; color: #000 !important; font-size: 11pt; }
    .card { border: 1px solid #ccc !important; box-shadow: none !important; break-inside: avoid; }
    .price-row { padding: 0.5rem 0 !important; }
    .section-alt, .cta-gradient { background: #fff !important; }
    a { color: #000 !important; text-decoration: none !important; }
    .page-hero { background: #f5f5f5 !important; }
}
