/* All Things Home — coming soon teaser
   Polished micro-interactions, fluid typography, reduced motion respect. */

/* ===== Base ===== */
body {
    font-family: 'Work Sans', system-ui, -apple-system, sans-serif;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

.serif-heading {
    font-family: 'Fraunces', 'Georgia', serif;
    font-weight: 300;
    letter-spacing: -0.02em;
    font-optical-sizing: auto;
}

/* ===== Fluid typography ===== */
.hero-title {
    font-size: clamp(2.5rem, 7vw + 0.5rem, 5.5rem);
    line-height: 1.02;
    letter-spacing: -0.035em;
    font-weight: 300;
}

.section-title {
    font-size: clamp(2rem, 4vw + 0.5rem, 3.5rem);
    line-height: 1.05;
    font-weight: 300;
}

/* ===== Smooth scroll ===== */
html {
    scroll-behavior: smooth;
    scroll-padding-top: 5rem;
}

/* ===== Focus ring ===== */
:focus-visible {
    outline: 2px solid #17cf54;
    outline-offset: 3px;
    border-radius: 2px;
}
button:focus, input:focus {
    outline: none;
}

/* ===== Selection ===== */
::selection {
    background-color: rgba(23, 207, 84, 0.4);
    color: #0e1a12;
}

/* ===== Scrollbar hiding ===== */
.no-scrollbar::-webkit-scrollbar { display: none; }
.no-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* ===== Nav underline ===== */
.nav-link {
    position: relative;
    padding: 4px 0;
    transition: color 0.25s ease;
}
.nav-link::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -4px;
    height: 1.5px;
    width: 0;
    background: #17cf54;
    transition: width 0.4s cubic-bezier(0.65, 0, 0.35, 1);
}
.nav-link:hover { color: #17cf54; }
.nav-link:hover::after { width: 100%; }

/* ===== Header elevation on scroll ===== */
#site-header.scrolled {
    box-shadow: 0 8px 30px -10px rgba(0, 0, 0, 0.12);
}
.dark #site-header.scrolled {
    box-shadow: 0 8px 30px -10px rgba(0, 0, 0, 0.6);
}

/* ===== Hero background animation ===== */
.hero-bg {
    transform: scale(1.08);
    animation: heroDrift 22s ease-in-out infinite alternate;
    will-change: transform;
}
@keyframes heroDrift {
    0%   { transform: scale(1.08) translate3d(0, 0, 0); }
    100% { transform: scale(1.15) translate3d(-1.5%, -1%, 0); }
}

/* ===== Floating sticker ===== */
@keyframes float {
    0%, 100% { transform: translateY(0) rotate(3deg); }
    50%      { transform: translateY(-14px) rotate(3deg); }
}
.animate-float {
    animation: float 6s ease-in-out infinite;
    will-change: transform;
}

/* ===== Soft ping for status dot ===== */
@keyframes pingSoft {
    0%   { box-shadow: 0 0 0 0 rgba(23, 207, 84, 0.55); }
    70%  { box-shadow: 0 0 0 10px rgba(23, 207, 84, 0); }
    100% { box-shadow: 0 0 0 0 rgba(23, 207, 84, 0); }
}
.animate-ping-soft {
    animation: pingSoft 2.4s cubic-bezier(0, 0, 0.2, 1) infinite;
}

/* ===== Reveal on scroll ===== */
.reveal {
    opacity: 0;
    transform: translateY(28px);
    transition:
        opacity 0.9s cubic-bezier(0.16, 1, 0.3, 1),
        transform 0.9s cubic-bezier(0.16, 1, 0.3, 1);
    transition-delay: var(--reveal-delay, 0ms);
    will-change: opacity, transform;
}
.reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* ===== Back to top ===== */
#back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

/* ===== Product cards (no card chrome — editorial style) ===== */
/* ===== 3D STAGE RAIL =====
   Cards arranged in a horizontal scroller. The card closest to the
   viewport's horizontal center is "focused": full scale, head-on.
   Side cards tilt away on rotateY, dim, and their inner images
   parallax horizontally — like windows you're walking past. */

.stage-rail-wrap {
    perspective: 1800px;
    perspective-origin: 50% 55%;
}

.stage-rail {
    display: flex;
    gap: clamp(1rem, 2.5vw, 2.25rem);
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    /* end-padding so first and last cards can sit dead-center */
    padding: 1.5rem max(1.25rem, calc(50vw - 9.5rem)) 2rem;
    cursor: grab;
    transform-style: preserve-3d;
    overscroll-behavior-x: contain;
}
.stage-rail.dragging { cursor: grabbing; scroll-behavior: auto; }
.stage-rail:focus-visible { outline: none; }

@media (min-width: 640px) {
    .stage-rail { padding-left: max(2rem, calc(50vw - 11rem)); padding-right: max(2rem, calc(50vw - 11rem)); }
}
@media (min-width: 1024px) {
    .stage-rail { padding-left: max(2rem, calc(50vw - 13rem)); padding-right: max(2rem, calc(50vw - 13rem)); }
}

.stage-card {
    flex: 0 0 18rem;
    scroll-snap-align: center;
    transform-origin: center center;
    transition:
        transform 0.55s cubic-bezier(0.22, 1, 0.36, 1),
        opacity 0.55s cubic-bezier(0.22, 1, 0.36, 1),
        filter 0.55s cubic-bezier(0.22, 1, 0.36, 1);
    will-change: transform, opacity;
}
@media (min-width: 640px) { .stage-card { flex-basis: 21rem; } }
@media (min-width: 1024px) { .stage-card { flex-basis: 25rem; } }

.stage-card-frame {
    position: relative;
    aspect-ratio: 4 / 5;
    border-radius: 1.5rem;
    overflow: hidden;
    background: linear-gradient(160deg, #e2e8f0, #cbd5e1);
    box-shadow:
        0 1px 2px rgba(0, 0, 0, 0.06),
        0 30px 60px -20px rgba(0, 0, 0, 0.18);
    transition: box-shadow 0.6s ease;
}
.dark .stage-card-frame {
    background: linear-gradient(160deg, #1e293b, #0f172a);
    box-shadow:
        0 1px 2px rgba(0, 0, 0, 0.3),
        0 30px 60px -20px rgba(0, 0, 0, 0.6);
}

.stage-img-wrap {
    position: absolute;
    inset: 0;
    overflow: hidden;
}
.stage-img-wrap img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* inner parallax — JS drives --parallax (-1..1) */
    transform: translate3d(calc(var(--parallax, 0) * -6%), 0, 0) scale(1.12);
    transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

/* moving light sweep — reads "premium" */
.stage-shine {
    position: absolute;
    inset: 0;
    background: linear-gradient(115deg,
        transparent 35%,
        rgba(255, 255, 255, 0.18) 50%,
        transparent 65%);
    transform: translateX(calc(var(--shine, 0) * 100%));
    opacity: 0;
    transition: opacity 0.6s ease, transform 0.9s ease;
    pointer-events: none;
    mix-blend-mode: overlay;
}

/* tag pills inside the frame */
.stage-tag {
    position: absolute;
    top: 1rem;
    left: 1rem;
    z-index: 2;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    padding: 0.45rem 0.85rem;
    border-radius: 9999px;
    backdrop-filter: blur(8px);
}
.stage-tag-primary { background: #17cf54; color: #0f172a; }
.stage-tag-dark    { background: rgba(15, 23, 42, 0.88); color: #fff; }

/* meta below the frame */
.stage-meta {
    padding-top: 1.25rem;
    transition: opacity 0.5s ease, transform 0.5s ease;
    opacity: 0.55;
    transform: translateY(6px);
}
.stage-eyebrow {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.28em;
    text-transform: uppercase;
    color: #d4af37;
    margin-bottom: 0.5rem;
}
.stage-name {
    font-size: 1.05rem;
    font-weight: 600;
    color: #0f172a;
    margin-bottom: 0.25rem;
}
.dark .stage-name { color: #fff; }
.stage-detail {
    font-size: 0.875rem;
    color: #64748b;
}
.dark .stage-detail { color: #94a3b8; }

/* focused state */
.stage-card.is-focused .stage-meta {
    opacity: 1;
    transform: translateY(0);
}
.stage-card.is-focused .stage-card-frame {
    box-shadow:
        0 1px 2px rgba(0, 0, 0, 0.08),
        0 50px 90px -30px rgba(0, 0, 0, 0.35),
        0 0 0 1px rgba(23, 207, 84, 0.08);
}
.dark .stage-card.is-focused .stage-card-frame {
    box-shadow:
        0 1px 2px rgba(0, 0, 0, 0.4),
        0 50px 90px -30px rgba(0, 0, 0, 0.8),
        0 0 0 1px rgba(23, 207, 84, 0.18);
}
.stage-card.is-focused .stage-shine { opacity: 1; }

/* off-focus dim */
.stage-card:not(.is-focused) {
    filter: saturate(0.85) brightness(0.92);
}
.dark .stage-card:not(.is-focused) {
    filter: saturate(0.7) brightness(0.7);
}

/* ===== Headline that crossfades with active card ===== */
.stage-headline { transition: opacity 0.4s ease; }
.stage-headline.is-swapping { opacity: 0; transform: translateY(8px); }
.stage-headline-wrap {
    border-bottom: 1px solid rgba(15, 23, 42, 0.08);
}
.dark .stage-headline-wrap {
    border-bottom-color: rgba(255, 255, 255, 0.08);
}

/* ===== Pagination dots ===== */
.stage-dots {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}
.stage-dot {
    width: 28px;
    height: 4px;
    border-radius: 9999px;
    background: rgba(15, 23, 42, 0.15);
    border: none;
    padding: 0;
    cursor: pointer;
    transition: background 0.3s ease, width 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}
.dark .stage-dot { background: rgba(255, 255, 255, 0.15); }
.stage-dot.is-active {
    background: #17cf54;
    width: 56px;
}
.stage-dot:hover { background: rgba(23, 207, 84, 0.6); }

/* reduce-motion friendliness */
@media (prefers-reduced-motion: reduce) {
    .stage-card,
    .stage-img-wrap img,
    .stage-shine,
    .stage-meta {
        transition: none !important;
    }
    .stage-card { transform: none !important; }
}

/* ===== Rail nav buttons ===== */
.rail-btn {
    width: 44px;
    height: 44px;
    border-radius: 9999px;
    background: rgba(255, 255, 255, 0.9);
    color: #0f172a;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 20px -8px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(0, 0, 0, 0.05);
    transition: transform 0.25s ease, background 0.25s ease;
}
.rail-btn:hover { transform: scale(1.08); background: #fff; }
.dark .rail-btn {
    background: rgba(30, 41, 59, 0.9);
    color: #f1f5f9;
    border-color: rgba(255, 255, 255, 0.08);
}
.dark .rail-btn:hover { background: rgba(30, 41, 59, 1); }

/* ===== Material icons fine-tune ===== */
.material-symbols-outlined {
    font-variation-settings: 'FILL' 0, 'wght' 300, 'GRAD' 0, 'opsz' 24;
    user-select: none;
}

/* ===== Image rendering ===== */
img {
    object-fit: cover;
    -webkit-user-drag: none;
}

/* ===== Toast notification ===== */
.notification-toast {
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.35);
}

/* ===== Custom scrollbar (rail) ===== */
#product-rail {
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
}

/* ===== Print ===== */
@media print {
    header, footer, #back-to-top, #mobile-drawer, .announcement-bar { display: none !important; }
    .hero-bg { animation: none; }
}

/* ===== Reduced motion ===== */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
        scroll-behavior: auto !important;
    }
    .reveal { opacity: 1; transform: none; }
    .hero-bg { transform: scale(1.05); }
}

/* ===== Small-screen polish ===== */
@media (max-width: 480px) {
    .hero-title { letter-spacing: -0.03em; }
}
