/* ═══════════════════════════════════════════════════════════
   CAIRO NURSERY — Custom Styles
   ═══════════════════════════════════════════════════════════ */

/* ─── Reset & Base ─── */
*, *::before, *::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    background-color: #fdfcf9;
    color: #2D0B11;
}

::selection {
    background-color: #f9c3cc;
    color: #551824;
}

/* ─── Scrollbar ─── */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #fdfcf9;
}
::-webkit-scrollbar-thumb {
    background: #f49aad;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #ec6b8e;
}

/* ─── Hero Animations ─── */
.hero-line {
    display: inline-block;
    animation: slideUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.hero-line:nth-child(1)  { animation-delay: 0.10s; }
.hero-line:nth-child(2)  { animation-delay: 0.18s; }
.hero-line:nth-child(3)  { animation-delay: 0.26s; }
.hero-line:nth-child(4)  { animation-delay: 0.34s; }
.hero-line:nth-child(5)  { animation-delay: 0.42s; }
.hero-line:nth-child(6)  { animation-delay: 0.50s; }
.hero-line:nth-child(7)  { animation-delay: 0.58s; }
.hero-line:nth-child(8)  { animation-delay: 0.66s; }

.hero-subtitle {
    animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.05s both;
}

.hero-text {
    animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.72s both;
}

.hero-cta {
    animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.88s both;
}

@keyframes slideUp {
    from {
        transform: translateY(110%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes fadeInUp {
    from {
        transform: translateY(24px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* ─── Scroll Reveal (progressive enhancement) ─── */
@media (prefers-reduced-motion: no-preference) {
    .reveal-on-scroll {
        opacity: 1;
        transform: translateY(0);
        transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
                    transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
    }
}

@media (prefers-reduced-motion: reduce) {
    .reveal-on-scroll {
        opacity: 1;
        transform: translateY(0);
        transition: none;
    }
}

/* Hidden state — applied by JS for progressive enhancement */
.reveal-on-scroll.is-hidden {
    opacity: 0;
    transform: translateY(32px);
    transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ─── Navbar ─── */
#site-header {
    background: rgba(253, 252, 249, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(244, 154, 173, 0.15);
}

#site-header.scrolled {
    background: rgba(253, 252, 249, 0.95);
    box-shadow: 0 1px 20px rgba(181, 52, 74, 0.06);
}

/* ─── Mobile Menu ─── */
#mobile-menu {
    width: 100%;
}

/* ─── Buttons ─── */
button, a[type="submit"] {
    cursor: pointer;
}

/* ─── Input autofill override ─── */
input:-webkit-autofill,
textarea:-webkit-autofill {
    -webkit-box-shadow: 0 0 0 30px rgba(255,255,255,0.05) inset !important;
    -webkit-text-fill-color: #fdfcf9 !important;
    caret-color: #fdfcf9;
}

/* ─── Focus visible ─── */
:focus-visible {
    outline: 2px solid #f49aad;
    outline-offset: 2px;
}

/* ─── Back to top ─── */
#back-to-top.is-visible {
    opacity: 1;
    pointer-events: auto;
}

/* ─── Print ─── */
@media print {
    #site-header, #back-to-top { display: none; }
    body { background: white; color: black; }
    a { color: black; text-decoration: underline; }
}
