/* assets/css/home.css — Homepage-specific styles */

/* ── Hero ─────────────────────────────────────────────────────────────────── */
.hero {
    position: relative;
    overflow: hidden;
    padding: 96px 0 80px;
    border-bottom: 1px solid var(--color-border);
    min-height: 520px;
    display: flex;
    flex-direction: column;
}

.hero-bg {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, #FAF8F5 0%, #F5E8DD 55%, #EDD5C2 100%);
    z-index: 0;
}

/* Subtle noise texture overlay */
.hero-bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.03'/%3E%3C/svg%3E");
    opacity: 0.4;
    pointer-events: none;
}

/* Vintage vignette */
.hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at center, transparent 40%, rgba(168, 118, 80, 0.08) 100%);
    pointer-events: none;
    z-index: 1;
}

.hero-inner {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: 1fr;
    gap: 48px;
    align-items: center;
}

@media (min-width: 768px) {
    .hero-inner { grid-template-columns: 1fr 1fr; }
}

.hero-eyebrow {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--color-accent);
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.hero-eyebrow::before {
    content: '';
    display: block;
    width: 28px;
    height: 1.5px;
    background: var(--color-accent);
}

.hero-title {
    font-family: var(--font-display);
    font-size: clamp(3.2rem, 6.5vw, 5.8rem);
    font-weight: 300;
    line-height: 1.0;
    color: var(--color-text);
    margin-bottom: 20px;
    letter-spacing: -0.02em;
}

/* Bold upright "Preloved" contrasts against the italic line below */
.hero-title strong {
    display: block;
    font-weight: 600;
    letter-spacing: -0.03em;
    color: var(--color-text);
    line-height: 1.05;
    margin-bottom: 2px;
}

.hero-title em {
    display: block;
    font-style: italic;
    font-weight: 300;
    font-size: 1.42em;
    color: var(--color-accent);
    letter-spacing: 0.01em;
    line-height: 1.1;
    position: relative;
    /* Text hidden until JS reveals it letter by letter */
    opacity: 1;
}

/* Each letter span injected by JS */
.hero-title em .dust-letter {
    display: inline-block;
    opacity: 0;
    transform: translateY(18px) scale(0.85) rotate(var(--r, 0deg));
    filter: blur(6px);
    animation: dustSettle 0.7s cubic-bezier(0.22, 1, 0.36, 1) forwards;
    animation-delay: var(--d, 0s);
    text-shadow:
        0 0 18px rgba(201, 149, 106, 0.9),
        0 0 40px rgba(201, 149, 106, 0.5),
        0 2px 8px rgba(168, 118, 80, 0.3);
}

@keyframes dustSettle {
    0%   { opacity: 0;    transform: translateY(18px)  scale(0.85) rotate(var(--r, 0deg)); filter: blur(6px); }
    40%  { opacity: 0.9;  transform: translateY(-4px)  scale(1.06) rotate(0deg);           filter: blur(1px); }
    70%  { opacity: 1;    transform: translateY(2px)   scale(0.98) rotate(0deg);           filter: blur(0);   }
    100% { opacity: 1;    transform: translateY(0)     scale(1)    rotate(0deg);           filter: blur(0);
           text-shadow:
               0 2px 12px rgba(201, 149, 106, 0.35),
               0 1px 0 rgba(168, 118, 80, 0.18); }
}

@keyframes heroType {
    from { width: 0; }
    to   { width: 100%; }
}

@keyframes heroCursor {
    0%, 100% { border-color: var(--color-accent); }
    50%      { border-color: transparent; }
}

@keyframes heroCursorFade {
    to { border-color: transparent; }
}

.hero-desc {
    font-family: var(--font-display);
    font-style: italic;
    font-size: 1.05rem;
    font-weight: 300;
    color: var(--color-text-muted);
    line-height: 1.85;
    max-width: 420px;
    margin-bottom: 36px;
    letter-spacing: 0.01em;
    padding-top: 16px;
    border-top: 1px solid var(--color-border);
}

.hero-btns {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

/* ── Hero Visual — Astrolabe Canvas ──────────────────────────────────────── */
.hero-visual {
    display: none;
    position: relative;
    flex-direction: column;
    align-items: center;
    height: 460px;
    overflow: hidden;
}

@media (min-width: 768px) {
    .hero-visual { display: flex; }
}

.glow-canvas {
    width: 100%;
    height: 400px;
    display: block;
    filter: sepia(0.06) saturate(0.94);
}

/* Scroll cue */
.hero-scroll-cue {
    position: absolute;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    color: var(--color-text-muted);
    animation: scrollBounce 2s ease-in-out infinite;
    display: none;
}

@media (min-width: 768px) { .hero-scroll-cue { display: block; } }

@keyframes scrollBounce {
    0%, 100% { transform: translateX(-50%) translateY(0); opacity: 0.5; }
    50%       { transform: translateX(-50%) translateY(6px); opacity: 1; }
}

/* ── Section Headers ──────────────────────────────────────────────────────── */
.section-hdr {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.center-hdr {
    flex-direction: column;
    align-items: center;
    text-align: center;
    margin-bottom: 40px;
}

/* ── Category Showcase Grid ───────────────────────────────────────────────── */
.cat-grid-4 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

@media (min-width: 768px) {
    .cat-grid-4 { grid-template-columns: repeat(4, 1fr); gap: 20px; }
}

.cat-card-v2 {
    display: block;
    text-decoration: none;
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: var(--color-white);
    border: 1px solid var(--color-border);
    box-shadow: var(--shadow-sm);
    transition: transform 250ms ease, box-shadow 250ms ease;
}

.cat-card-v2:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.cat-card-v2__img {
    position: relative;
    aspect-ratio: 4/3;
    overflow: hidden;
    background: var(--color-bg-alt);
}

.cat-card-v2__img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 400ms ease;
}

.cat-card-v2:hover .cat-card-v2__img img {
    transform: scale(1.06);
}

.cat-card-v2__placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-bg-alt);
    color: var(--color-accent);
}

.cat-card-v2__gloss {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 50%, rgba(28,28,28,0.25) 100%);
    pointer-events: none;
}

.cat-card-v2__body {
    padding: 16px;
}

.cat-card-v2__name {
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--color-text);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.cat-card-v2__arrow {
    font-size: 16px;
    color: var(--color-accent);
    transition: transform 250ms ease;
}

.cat-card-v2:hover .cat-card-v2__arrow { transform: translateX(4px); }

.cat-card-v2__subs {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.sub-pill {
    font-size: 11px;
    padding: 2px 8px;
    background: var(--color-bg-alt);
    border-radius: var(--radius-pill);
    color: var(--color-text-muted);
}

/* ── Featured Strip ───────────────────────────────────────────────────────── */
.featured-section { background: var(--color-bg-alt); }

.featured-strip {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

@media (min-width: 640px) { .featured-strip { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1024px) { .featured-strip { grid-template-columns: repeat(4, 1fr); } }

.product-card {
    background: var(--color-white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--color-border);
    box-shadow: var(--shadow-sm);
    transition: transform 240ms ease, box-shadow 240ms ease;
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow);
}

.product-card__img-link { display: block; text-decoration: none; }

.product-card__img-wrap {
    position: relative;
    aspect-ratio: 4/3;
    overflow: hidden;
    background: var(--color-bg-alt);
}

.product-card__img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 400ms ease;
    display: block;
}

.product-card:hover .product-card__img-wrap img { transform: scale(1.04); }

.product-card__no-img {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-text-light);
}

.sold-out-overlay {
    position: absolute;
    inset: 0;
    background: rgba(28, 28, 28, 0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.product-card__body {
    padding: 14px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.product-card__cat-tag {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--color-accent);
}

.product-card__sub-tag {
    font-size: 11px;
    color: var(--color-text-light);
    background: var(--color-bg-alt);
    padding: 2px 7px;
    border-radius: var(--radius-pill);
    display: inline-block;
}

.product-card__name {
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 500;
    line-height: 1.3;
    margin: 2px 0 6px;
}

.product-card__name a {
    color: var(--color-text);
    text-decoration: none;
    transition: color 200ms;
}

.product-card__name a:hover { color: var(--color-accent); }

.product-card__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-top: auto;
}

.product-card__price {
    font-size: 15px;
    font-weight: 600;
    color: var(--color-accent);
}

/* ── Trust Section ────────────────────────────────────────────────────────── */
.trust-section {
    background: var(--color-bg-dark);
    padding-block: 60px;
}

.trust-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 32px;
}

@media (min-width: 768px) { .trust-grid { grid-template-columns: repeat(4, 1fr); } }

.trust-item {
    text-align: center;
    color: rgba(255,255,255,0.8);
}

.trust-icon {
    width: 52px;
    height: 52px;
    background: rgba(201, 149, 106, 0.15);
    border: 1px solid rgba(201, 149, 106, 0.3);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 14px;
    color: var(--color-accent);
}

.trust-item strong {
    display: block;
    font-size: 14px;
    color: white;
    margin-bottom: 6px;
    font-weight: 600;
}

.trust-item p {
    font-size: 13px;
    color: rgba(255,255,255,0.55);
    line-height: 1.5;
    margin: 0;
}