/* ============================================================
   AnimeDekho — Landing page (index.html)
   The showcase: signature hero (halftone + speed-lines + petals),
   live trending strip, features, genres, SEO block, FAQ.
   ============================================================ */

/* ---------- HERO ---------- */
.hero {
    position: relative;
    min-height: 100svh;
    display: flex;
    align-items: center;
    padding-top: var(--header-h);
    overflow: hidden;
    isolation: isolate;
}

/* Layered background: ink → ember glow + speed-line burst + halftone */
.hero::before {
    content: "";
    position: absolute; inset: 0; z-index: -3;
    background:
        radial-gradient(90% 70% at 82% 8%, rgba(255, 77, 109, 0.30), transparent 55%),
        radial-gradient(70% 60% at 12% 95%, rgba(124, 92, 255, 0.22), transparent 60%),
        linear-gradient(180deg, var(--ink-2), var(--ink) 72%);
}
/* Radiating speed lines (manga action vernacular) behind the headline */
.hero::after {
    content: "";
    position: absolute; z-index: -2;
    top: -30%; right: -20%;
    width: 85vmax; height: 85vmax;
    background: repeating-conic-gradient(from 0deg at 50% 50%,
        transparent 0deg 2.4deg,
        rgba(255, 140, 198, 0.055) 2.4deg 3deg);
    -webkit-mask-image: radial-gradient(closest-side, #000 0%, transparent 72%);
    mask-image: radial-gradient(closest-side, #000 0%, transparent 72%);
    animation: spin 90s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Halftone screentone overlay — the signature texture */
.hero-dots {
    position: absolute; inset: 0; z-index: -1;
    background-image: var(--halftone);
    background-size: var(--halftone-size);
    -webkit-mask-image: radial-gradient(120% 90% at 50% 40%, #000 25%, transparent 80%);
    mask-image: radial-gradient(120% 90% at 50% 40%, #000 25%, transparent 80%);
    opacity: 0.8;
    pointer-events: none;
}

/* Drifting sakura petals */
.petals { position: absolute; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.petal {
    position: absolute; top: -8%;
    width: 14px; height: 14px;
    background: var(--accent-grad);
    border-radius: 14px 2px 14px 2px;
    opacity: 0.55;
    animation: fall linear infinite;
}
@keyframes fall {
    0%   { transform: translateY(-10vh) rotate(0deg); opacity: 0; }
    12%  { opacity: 0.6; }
    100% { transform: translateY(112vh) translateX(16vw) rotate(540deg); opacity: 0; }
}

.hero-inner {
    width: min(100% - (var(--gutter) * 2), var(--maxw));
    margin-inline: auto;
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    align-items: center;
    gap: clamp(30px, 5vw, 70px);
    padding-block: clamp(40px, 7vw, 80px);
}

.hero-copy { max-width: 640px; }
.hero h1 {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: clamp(2.9rem, 8.5vw, 5.6rem);
    line-height: 0.95;
    letter-spacing: -0.03em;
    margin: 20px 0 22px;
}
.hero h1 .glow {
    background: var(--accent-grad);
    -webkit-background-clip: text; background-clip: text;
    color: transparent;
    position: relative;
}
.hero h1 .outline {
    -webkit-text-stroke: 2px var(--line-2);
    color: transparent;
}
.hero-sub {
    font-size: clamp(1.02rem, 2.2vw, 1.22rem);
    color: var(--muted);
    max-width: 52ch;
    margin-bottom: 34px;
}
.hero-sub strong { color: var(--text); font-weight: 600; }

.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 34px; }

.hero-trust { display: flex; flex-wrap: wrap; align-items: center; gap: clamp(16px, 3vw, 32px); }
.hero-stat .n {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 1.5rem;
    background: var(--accent-grad);
    -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-stat .l { font-size: 0.8rem; color: var(--muted); letter-spacing: 0.04em; }

/* Poster collage (desktop) */
.hero-art {
    position: relative;
    height: clamp(380px, 46vw, 560px);
    perspective: 1400px;
}
.hero-art .poster-fan {
    position: absolute; inset: 0;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    transform: rotateY(-14deg) rotateX(6deg) rotateZ(-3deg);
    transform-style: preserve-3d;
}
.hero-art .col { display: flex; flex-direction: column; gap: 16px; }
.hero-art .col:nth-child(2) { margin-top: -34px; }
.hero-art .col:nth-child(3) { margin-top: 28px; }
.hero-poster {
    position: relative;
    aspect-ratio: 2 / 3;
    border-radius: var(--r);
    overflow: hidden;
    background: var(--ink-3);
    border: 1px solid var(--line-2);
    box-shadow: var(--shadow);
    animation: floaty 7s ease-in-out infinite;
}
.hero-art .col:nth-child(2) .hero-poster { animation-delay: -2.5s; }
.hero-art .col:nth-child(3) .hero-poster { animation-delay: -4s; }
.hero-poster img { width: 100%; height: 100%; object-fit: cover; }
@keyframes floaty { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }

/* Scroll cue */
.scroll-cue {
    position: absolute; left: 50%; bottom: 22px; transform: translateX(-50%);
    z-index: 2; color: var(--faint); font-size: 0.74rem; letter-spacing: 0.3em; text-transform: uppercase;
    display: flex; flex-direction: column; align-items: center; gap: 8px;
}
.scroll-cue .bar { width: 1px; height: 34px; background: linear-gradient(var(--sakura), transparent); animation: cue 1.8s ease-in-out infinite; }
@keyframes cue { 0%, 100% { opacity: 0.3; transform: scaleY(0.6); } 50% { opacity: 1; transform: scaleY(1); } }

/* ---------- Reveal-on-load / scroll ---------- */
[data-reveal] { opacity: 0; transform: translateY(24px); transition: opacity 0.7s ease, transform 0.7s cubic-bezier(.2,.8,.2,1); }
[data-reveal].in { opacity: 1; transform: none; }
[data-reveal][data-delay="1"] { transition-delay: 0.08s; }
[data-reveal][data-delay="2"] { transition-delay: 0.16s; }
[data-reveal][data-delay="3"] { transition-delay: 0.24s; }

/* ---------- Section rhythm ---------- */
.section { padding-block: clamp(56px, 9vw, 110px); position: relative; }
.section-tight { padding-block: clamp(40px, 6vw, 72px); }

/* ---------- Trending marquee strip ---------- */
.strip { position: relative; padding-block: clamp(40px, 6vw, 70px); overflow: hidden; }
.strip .wrap { margin-bottom: 26px; }
.marquee { display: flex; gap: 18px; width: max-content; animation: slide 48s linear infinite; }
.strip:hover .marquee { animation-play-state: paused; }
@keyframes slide { to { transform: translateX(-50%); } }
.marquee a {
    position: relative; flex: 0 0 auto; width: 148px; aspect-ratio: 2/3;
    border-radius: var(--r); overflow: hidden; background: var(--ink-3);
    border: 1px solid var(--line); transition: transform 0.3s, border-color 0.3s;
}
.marquee a:hover { transform: translateY(-6px) scale(1.03); border-color: var(--ember); }
.marquee img { width: 100%; height: 100%; object-fit: cover; }
.marquee a span {
    position: absolute; inset: auto 0 0 0; padding: 20px 10px 8px; font-size: 0.78rem; font-weight: 600;
    background: linear-gradient(transparent, rgba(0,0,0,0.9)); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* ---------- Features ---------- */
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(16px, 2.4vw, 24px); }
.feature {
    position: relative;
    padding: 30px 26px;
    border-radius: var(--r-lg);
    background: linear-gradient(180deg, var(--ink-3), var(--ink-2));
    border: 1px solid var(--line);
    overflow: hidden;
    transition: transform 0.3s, border-color 0.3s;
}
.feature:hover { transform: translateY(-6px); border-color: var(--line-2); }
.feature::after {
    content: ""; position: absolute; inset: auto -40% -60% auto; width: 60%; aspect-ratio: 1;
    background: radial-gradient(circle, rgba(255,77,109,0.14), transparent 70%); opacity: 0; transition: opacity 0.3s;
}
.feature:hover::after { opacity: 1; }
.feature .ic {
    width: 52px; height: 52px; display: grid; place-items: center;
    border-radius: 14px; font-size: 1.3rem; color: var(--ember);
    background: rgba(255, 77, 109, 0.12); border: 1px solid rgba(255, 77, 109, 0.25);
    margin-bottom: 18px;
}
.feature h3 { font-family: var(--font-display); font-weight: 700; font-size: 1.22rem; margin-bottom: 10px; }
.feature p { color: var(--muted); font-size: 0.95rem; }

/* ---------- Genre tiles ---------- */
.genres-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(165px, 1fr)); gap: 14px; }
.genre-tile {
    position: relative; height: 112px; border-radius: var(--r);
    display: flex; align-items: flex-end; padding: 16px;
    background: linear-gradient(145deg, var(--ink-3), var(--ink-4));
    border: 1px solid var(--line); overflow: hidden;
    font-family: var(--font-display); font-weight: 700; font-size: 1.1rem;
    transition: transform 0.3s, border-color 0.3s, box-shadow 0.3s;
}
.genre-tile .jp { position: absolute; top: 12px; right: 14px; font-size: 1.5rem; color: var(--line-2); font-weight: 500; }
.genre-tile::before {
    content: ""; position: absolute; inset: 0;
    background-image: var(--halftone); background-size: 9px 9px; opacity: 0.5;
    -webkit-mask-image: linear-gradient(135deg, #000, transparent 70%); mask-image: linear-gradient(135deg, #000, transparent 70%);
}
.genre-tile:hover { transform: translateY(-5px) scale(1.02); border-color: var(--ember); box-shadow: 0 16px 36px -18px rgba(255,77,109,0.5); }
.genre-tile span { position: relative; z-index: 1; }

/* ---------- SEO rich-text block ---------- */
.seo-block { background: linear-gradient(180deg, var(--ink-2), var(--ink)); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.seo-grid { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: clamp(28px, 5vw, 64px); align-items: start; }
.seo-copy h2 { font-family: var(--font-display); font-weight: 800; font-size: clamp(1.7rem, 4vw, 2.5rem); line-height: 1.05; letter-spacing: -0.02em; margin-bottom: 18px; }
.seo-copy h2 .grad { background: var(--accent-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.seo-copy p { color: var(--muted); margin-bottom: 16px; font-size: 0.98rem; }
.seo-copy p strong { color: var(--text); font-weight: 600; }
.seo-points { display: grid; gap: 14px; }
.seo-point { display: flex; gap: 14px; padding: 18px; border-radius: var(--r); background: rgba(255,255,255,0.03); border: 1px solid var(--line); }
.seo-point i { color: var(--gold); font-size: 1.05rem; margin-top: 3px; }
.seo-point h4 { font-weight: 700; margin-bottom: 4px; }
.seo-point p { font-size: 0.9rem; margin: 0; }

/* ---------- FAQ ---------- */
.faq-list { display: grid; gap: 12px; max-width: 860px; margin-inline: auto; }
.faq-item { border: 1px solid var(--line); border-radius: var(--r); background: var(--ink-2); overflow: hidden; transition: border-color 0.3s; }
.faq-item[open] { border-color: var(--line-2); }
.faq-item summary {
    list-style: none; cursor: pointer; padding: 20px 22px;
    display: flex; align-items: center; justify-content: space-between; gap: 16px;
    font-weight: 600; font-size: 1.02rem;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary .plus { flex-shrink: 0; width: 26px; height: 26px; display: grid; place-items: center; border-radius: 8px; background: rgba(255,77,109,0.12); color: var(--ember); transition: transform 0.3s; }
.faq-item[open] summary .plus { transform: rotate(45deg); }
.faq-item .faq-body { padding: 0 22px 22px; color: var(--muted); font-size: 0.96rem; }

/* ---------- CTA banner ---------- */
.cta-banner {
    position: relative; text-align: center; border-radius: var(--r-xl); overflow: hidden;
    padding: clamp(44px, 8vw, 80px) clamp(22px, 5vw, 60px);
    background: linear-gradient(130deg, var(--ink-3), var(--ink-4));
    border: 1px solid var(--line-2);
}
.cta-banner::before { content: ""; position: absolute; inset: 0; background: radial-gradient(70% 120% at 50% 0%, rgba(255,77,109,0.28), transparent 60%); }
.cta-banner::after { content: ""; position: absolute; inset: 0; background-image: var(--halftone); background-size: var(--halftone-size); opacity: 0.5; -webkit-mask-image: radial-gradient(60% 80% at 50% 50%, #000, transparent); mask-image: radial-gradient(60% 80% at 50% 50%, #000, transparent); }
.cta-banner > * { position: relative; z-index: 1; }
.cta-banner h2 { font-family: var(--font-display); font-weight: 800; font-size: clamp(1.9rem, 5vw, 3.2rem); line-height: 1; letter-spacing: -0.02em; margin-bottom: 16px; }
.cta-banner p { color: var(--muted); max-width: 48ch; margin: 0 auto 30px; font-size: 1.05rem; }

/* ---------- Ad slot (standard, clearly labelled) ---------- */
.ad-slot {
    max-width: 970px; margin: 36px auto; padding: 10px;
    border: 1px dashed var(--line-2); border-radius: var(--r);
    display: grid; place-items: center; gap: 6px; min-height: 110px;
    background: rgba(255,255,255,0.015);
}
.ad-slot .ad-label { font-size: 0.66rem; letter-spacing: 0.3em; text-transform: uppercase; color: var(--faint); }

/* ---------- Responsive ---------- */
@media (max-width: 920px) {
    .hero-inner { grid-template-columns: 1fr; text-align: left; }
    .hero-art { display: none; }
    .features { grid-template-columns: 1fr; }
    .seo-grid { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
    .hero h1 { font-size: clamp(2.6rem, 13vw, 3.6rem); }
    .hero-cta .btn { flex: 1; }
    .marquee a { width: 118px; }
}
