/* ============================================================================
   Home — AI-girl catalog (Phase 02, polished to match the design refs)
   Layout = a bold hero BANNER (image.png) above a clean wall of portrait
   FACES (image (1).png). Built on the palette CSS variables so the 8-palette
   switcher + light/dark themes keep working. Display type: Bodoni Moda.
   ========================================================================== */

:root {
    --font-display: 'Bodoni Moda', Georgia, 'Times New Roman', serif;
    --gutter: clamp(16px, 4vw, 48px);
    --home-max: 1320px;
}

.home {
    width: 100%;
    overflow-x: clip;
}

/* ---------- Hero banner -------------------------------------------------- */
.hero {
    max-width: var(--home-max);
    margin: 0 auto;
    padding: clamp(16px, 3vw, 34px) var(--gutter) 0;
}

.hero-banner {
    position: relative;
    display: flex;
    align-items: center;
    min-height: clamp(320px, 40vw, 460px);
    border-radius: 24px;
    overflow: hidden;
    isolation: isolate;
    background:
        radial-gradient(125% 145% at 14% 16%,
            color-mix(in srgb, var(--message-bubble) 48%, #1b1222) 0%,
            #170f1e 52%, #0e0a13 100%);
}
/* grain overlay for texture */
.hero-banner::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    opacity: 0.35;
    mix-blend-mode: overlay;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.5'/%3E%3C/svg%3E");
}

.hero-copy {
    position: relative;
    z-index: 2;
    max-width: 560px;
    padding: clamp(28px, 5vw, 64px);
}
.hero-copy > * {
    opacity: 0;
    animation: heroRise 0.8s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
.hero-eyebrow { animation-delay: 0.05s; }
.hero-headline { animation-delay: 0.14s; }
.hero-sub { animation-delay: 0.24s; }
.hero-actions { animation-delay: 0.34s; }

.hero-eyebrow {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 18px;
    font-size: 12px;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.62);
}
.hero-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--message-bubble);
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--message-bubble) 30%, transparent);
}

.hero-headline {
    margin: 0 0 20px;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(2.3rem, 5.4vw, 4.4rem);
    line-height: 1.02;
    letter-spacing: -0.01em;
    color: #fff;
    text-wrap: balance;
}

.hero-sub {
    margin: 0 0 30px;
    max-width: 42ch;
    font-size: clamp(0.98rem, 1.4vw, 1.1rem);
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.74);
}

.hero-actions {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}
.hero-cta {
    border: none;
    cursor: pointer;
    opacity: 0.9;
    display: inline-flex;
    align-items: center;
    padding: 14px 30px;
    border-radius: 999px;
    background: var(--message-bubble);
    color: #fff;
    font-weight: 600;
    font-size: 15px;
    text-decoration: none;
    transition: transform 0.25s ease, box-shadow 0.25s ease, opacity 0.2s ease;
    box-shadow: 0 14px 34px -14px color-mix(in srgb, var(--message-bubble) 80%, transparent);
}
.hero-cta:hover { transform: translateY(-2px); opacity: 0.96; }

.hero-count {
    font-size: 13px;
    letter-spacing: 0.04em;
    color: rgba(255, 255, 255, 0.72);
}
.hero-count::before {
    content: "";
    display: inline-block;
    width: 7px; height: 7px;
    margin-right: 8px;
    border-radius: 50%;
    background: #2ecc71;
    vertical-align: middle;
    box-shadow: 0 0 0 3px rgba(46, 204, 113, 0.25);
}

/* featured girl, bleeding in from the right and fading into the banner */
.hero-portrait {
    position: absolute;
    top: 0; right: 0; bottom: 0;
    width: 54%;
    z-index: 1;
    animation: heroFade 1s ease 0.2s both;
}
.hero-portrait img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    -webkit-mask-image: linear-gradient(to right, transparent 0%, #000 40%);
    mask-image: linear-gradient(to right, transparent 0%, #000 40%);
}

/* ---------- Roster ------------------------------------------------------- */
.roster {
    max-width: var(--home-max);
    margin: 0 auto;
    padding: clamp(28px, 4vw, 48px) var(--gutter) 0;
    scroll-margin-top: 80px;
}
.roster-head {
    display: flex;
    align-items: baseline;
    gap: 20px;
    margin-bottom: clamp(16px, 2.4vw, 26px);
}
.roster-title {
    margin: 0;
    font-family: var(--font-display);
    font-weight: 500;
    font-size: clamp(1.5rem, 3vw, 2.4rem);
    color: var(--text-primary);
}
.roster-rule {
    flex: 1;
    height: 1px;
    background: var(--border-main);
}
.roster-meta {
    font-size: 12px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--text-muted);
    white-space: nowrap;
}

/* ---------- The face wall ------------------------------------------------ */
.girl-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: clamp(8px, 1.1vw, 14px);
}
@media (min-width: 420px)  { .girl-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 680px)  { .girl-grid { grid-template-columns: repeat(4, 1fr); } }
@media (min-width: 980px)  { .girl-grid { grid-template-columns: repeat(5, 1fr); } }
@media (min-width: 1200px) { .girl-grid { grid-template-columns: repeat(6, 1fr); } }

.girl-card {
    position: relative;
    display: block;
    aspect-ratio: 4 / 5;
    border-radius: 12px;
    overflow: hidden;
    background: var(--bg-input);
    text-decoration: none;
    isolation: isolate;
}
.girl-grid .girl-card { animation: cardIn 0.5s ease both; }
.girl-grid .girl-card:nth-child(1) { animation-delay: 0.02s; }
.girl-grid .girl-card:nth-child(2) { animation-delay: 0.05s; }
.girl-grid .girl-card:nth-child(3) { animation-delay: 0.08s; }
.girl-grid .girl-card:nth-child(4) { animation-delay: 0.11s; }
.girl-grid .girl-card:nth-child(5) { animation-delay: 0.14s; }
.girl-grid .girl-card:nth-child(6) { animation-delay: 0.17s; }
.girl-grid .girl-card:nth-child(n+7) { animation-delay: 0.2s; }

.girl-card-media { position: absolute; inset: 0; }
.girl-card-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}
.girl-card-noimg {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    color: var(--text-muted);
}

/* name + age hidden at rest (clean contact-sheet), revealed on hover */
.girl-card-veil {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.7) 0%, rgba(0, 0, 0, 0.15) 40%, transparent 62%);
    opacity: 0;
    transition: opacity 0.35s ease;
}
.girl-card-meta {
    position: absolute;
    left: 13px;
    right: 13px;
    bottom: 11px;
    z-index: 1;
    display: flex;
    align-items: baseline;
    gap: 8px;
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.35s ease, transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}
.girl-card-name {
    font-family: var(--font-display);
    font-weight: 500;
    font-size: clamp(1rem, 1.4vw, 1.2rem);
    color: #fff;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.55);
    line-height: 1.1;
}
.girl-card-age { font-size: 12px; color: rgba(255, 255, 255, 0.72); }

@media (hover: hover) {
    .girl-card:hover .girl-card-media img { transform: scale(1.06); }
    .girl-card:hover .girl-card-veil { opacity: 1; }
    .girl-card:hover .girl-card-meta { opacity: 1; transform: none; }
}
/* touch devices can't hover — keep names readable */
@media (hover: none) {
    .girl-card-veil { opacity: 0.92; }
    .girl-card-meta { opacity: 1; transform: none; }
}
.girl-card:focus-visible {
    outline: 2px solid var(--message-bubble);
    outline-offset: 2px;
}

/* sentinel + loader */
.grid-sentinel { height: 1px; }
.grid-loader { display: flex; justify-content: center; gap: 8px; padding: 30px 0; }
.grid-loader[hidden] { display: none; }
.grid-loader span {
    width: 9px; height: 9px;
    border-radius: 50%;
    background: var(--message-bubble);
    animation: dotPulse 1.1s ease-in-out infinite;
}
.grid-loader span:nth-child(2) { animation-delay: 0.18s; }
.grid-loader span:nth-child(3) { animation-delay: 0.36s; }

/* empty state */
.roster-empty { text-align: center; padding: clamp(40px, 10vw, 100px) 20px; }
.roster-empty-title {
    font-family: var(--font-display);
    font-size: clamp(1.4rem, 3vw, 2rem);
    color: var(--text-primary);
    margin: 0 0 12px;
}
.roster-empty-sub { color: var(--text-muted); margin: 0 0 22px; }

/* ---------- Footer hero (closing CTA + footer, combined into one banner) -- */
.site-footer {
    position: relative;
    width: 100%;
    margin: clamp(48px, 8vw, 110px) 0 0;
    /* full-bleed footer band — square corners, flush to the page edges */
    overflow: hidden;
    isolation: isolate;
    background:
        radial-gradient(125% 145% at 14% 16%,
            color-mix(in srgb, var(--message-bubble) 48%, #1b1222) 0%,
            #170f1e 52%, #0e0a13 100%);
}
/* grain overlay (matches the old hero) */
.site-footer::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    opacity: 0.32;
    mix-blend-mode: overlay;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.5'/%3E%3C/svg%3E");
}
/* the featured girl bleeds in from the right, behind the content */
.site-footer .hero-portrait {
    position: absolute;
    top: 0; right: 0; bottom: 0;
    width: 50%;
    z-index: 1;
}
.site-footer .hero-portrait img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    -webkit-mask-image: linear-gradient(to right, transparent 0%, #000 46%);
    mask-image: linear-gradient(to right, transparent 0%, #000 46%);
}

.footer-inner {
    position: relative;
    z-index: 2;
    max-width: var(--home-max);
    margin: 0 auto;
    padding: clamp(40px, 6vw, 72px) var(--gutter);
}

.footer-hero-copy { max-width: 560px; }
/* eyebrow sits right above the CTA now (headline/sub dropped — already shown above the grid) */
.footer-hero-copy .hero-eyebrow { margin-bottom: 22px; }

.footer-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.12);
    margin: clamp(30px, 5vw, 52px) 0 clamp(28px, 4vw, 40px);
}

.footer-top {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
    justify-content: space-between;
}
.footer-brand { max-width: 320px; }
.footer-logo {
    font-family: var(--font-display);
    font-size: 28px;
    font-weight: 700;
    color: #fff;
    letter-spacing: -0.01em;
}
.footer-logo-accent { color: var(--message-bubble); font-style: italic; }
.footer-tag { margin: 12px 0 0; color: rgba(255, 255, 255, 0.6); font-size: 14px; line-height: 1.6; }
.footer-links { display: flex; gap: clamp(28px, 5vw, 64px); flex-wrap: wrap; }
.footer-col { display: flex; flex-direction: column; gap: 10px; }
.footer-col-head {
    font-size: 11px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 4px;
}
.footer-col a { color: rgba(255, 255, 255, 0.78); text-decoration: none; font-size: 14px; transition: color 0.2s ease; }
.footer-col a:hover { color: #fff; }
.footer-bottom {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    margin-top: clamp(32px, 5vw, 52px);
    padding-top: 22px;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    color: rgba(255, 255, 255, 0.55);
    font-size: 12.5px;
}
.footer-18 {
    display: inline-flex;
    align-items: center;
    padding: 3px 9px;
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 6px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.85);
}
.footer-copy { margin-left: auto; }

/* ---------- Responsive footer hero -------------------------------------- */
@media (max-width: 720px) {
    .footer-hero-copy { max-width: none; }
    /* featured girl becomes a faint backdrop behind the whole footer */
    .site-footer .hero-portrait {
        width: 100%;
        opacity: 0.3;
    }
    .site-footer .hero-portrait img {
        object-position: top center;
        -webkit-mask-image: linear-gradient(to bottom, #000 0%, transparent 88%);
        mask-image: linear-gradient(to bottom, #000 0%, transparent 88%);
    }
}

/* ---------- Keyframes ---------------------------------------------------- */
@keyframes heroRise {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: none; }
}
@keyframes heroFade {
    from { opacity: 0; transform: scale(1.04); }
    to { opacity: 1; transform: none; }
}
@keyframes cardIn {
    from { opacity: 0; transform: translateY(14px); }
    to { opacity: 1; transform: none; }
}
@keyframes dotPulse {
    0%, 100% { opacity: 0.3; transform: scale(0.8); }
    50% { opacity: 1; transform: scale(1); }
}

@media (prefers-reduced-motion: reduce) {
    .hero-copy > *,
    .hero-portrait,
    .girl-grid .girl-card { animation: none !important; opacity: 1 !important; }
    .girl-card-media img { transition: none; }
}
