/* ════════════════════════════════════════════════════════════════
   INDRALOKA — Realm shell
   Shared layout + components for the three realm pages (Garments,
   Drops, Prana). Each realm overrides palette + atmosphere via a
   <body data-realm="..."> selector and inline page-level CSS, but
   the geometry, type rhythm, and motion live here.
   ════════════════════════════════════════════════════════════════ */

:root {
    --bg:        #060608;
    --bg-rgb:    6, 6, 8;
    --ink:       #f5f0e3;
    --ink-rgb:   245, 240, 227;
    --grey:      #8c8579;
    --gold:      #cca43b;
    --indigo:    #6478ea;
    --warm:      #ff7a4b;
    --ease:      cubic-bezier(0.22, 1, 0.36, 1);

    --font-h:    'Cinzel', serif;
    --font-m:    'JetBrains Mono', monospace;
    --font-b:    'Montserrat', sans-serif;
    --font-skt:  'Tiro Devanagari Sanskrit', serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body {
    background: var(--bg);
    color: var(--ink);
    font-family: var(--font-b);
}
body {
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}
a { color: inherit; }

/* ─── Cosmos backdrop layer (each realm sets its own orb gradients) ── */
.cosmos {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}
.realm-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(140px);
    opacity: 0.55;
    mix-blend-mode: screen;
    animation: orbDrift 38s var(--ease) infinite;
}
.realm-orb.gold {
    width: 540px; height: 540px;
    top: 8%; left: 18%;
}
.realm-orb.indigo {
    width: 600px; height: 600px;
    top: 35%; right: 14%;
    animation-delay: -12s;
}
.realm-orb.warm {
    width: 480px; height: 480px;
    bottom: 5%; left: 35%;
    animation-delay: -22s;
}
@keyframes orbDrift {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33%      { transform: translate(40px, -30px) scale(1.06); }
    66%      { transform: translate(-30px, 25px) scale(0.95); }
}

/* Loose woven backdrop — used by Garments. Pure CSS, no DOM weight. */
.weave {
    position: absolute;
    inset: -10%;
    background-image:
        repeating-linear-gradient(45deg,
            rgba(245,240,227,0.018) 0 2px, transparent 2px 8px),
        repeating-linear-gradient(-45deg,
            rgba(245,240,227,0.012) 0 2px, transparent 2px 8px);
    opacity: 0.6;
    mix-blend-mode: screen;
}

/* Star field — used by Drops realm. */
.starfield {
    position: absolute;
    inset: -10%;
    background-image:
        radial-gradient(1px 1px at 20% 30%, rgba(255,255,255,0.55) 50%, transparent 60%),
        radial-gradient(1.5px 1.5px at 65% 70%, rgba(255,255,255,0.4) 50%, transparent 60%),
        radial-gradient(1px 1px at 12% 80%, rgba(255,255,255,0.3) 50%, transparent 60%),
        radial-gradient(1px 1px at 50% 50%, rgba(255,255,255,0.4) 50%, transparent 60%),
        radial-gradient(1px 1px at 35% 22%, rgba(255,255,255,0.5) 50%, transparent 60%),
        radial-gradient(1px 1px at 92% 55%, rgba(255,255,255,0.3) 50%, transparent 60%);
    background-size: 1200px 900px, 1000px 800px, 900px 950px, 1100px 850px, 1300px 700px, 950px 900px;
    opacity: 0.55;
    animation: starshift 240s linear infinite;
}
@keyframes starshift {
    from { transform: translateY(0); }
    to   { transform: translateY(-200px); }
}

/* Ember field — used by Prana realm. */
.embers {
    position: absolute;
    inset: 0;
    overflow: hidden;
}
.embers::before, .embers::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(2px 2px at 18% 92%, rgba(255,159,112,0.7) 50%, transparent 60%),
        radial-gradient(1.5px 1.5px at 62% 88%, rgba(255,200,90,0.6) 50%, transparent 60%),
        radial-gradient(1px 1px at 38% 95%, rgba(255,180,80,0.55) 50%, transparent 60%),
        radial-gradient(1.5px 1.5px at 78% 80%, rgba(255,140,60,0.6) 50%, transparent 60%),
        radial-gradient(1px 1px at 88% 92%, rgba(255,180,90,0.5) 50%, transparent 60%);
    background-size: 1000px 100vh;
    animation: emberRise 18s linear infinite;
    filter: blur(0.6px);
}
.embers::after { animation-duration: 26s; animation-delay: -8s; opacity: 0.7; }
@keyframes emberRise {
    from { transform: translateY(0);   opacity: 0; }
    20%  { opacity: 0.9; }
    to   { transform: translateY(-100vh); opacity: 0; }
}

/* ─── Realm bar (top) ───────────────────────────────────────────── */
.realm-bar {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 100;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.4rem 2.5rem;
    font-family: var(--font-m);
    font-size: 0.66rem;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: var(--grey);
    backdrop-filter: blur(8px) saturate(140%);
    -webkit-backdrop-filter: blur(8px) saturate(140%);
    background: rgba(var(--bg-rgb), 0.25);
}
.realm-bar a {
    color: var(--ink);
    text-decoration: none;
    transition: opacity 0.3s var(--ease);
    opacity: 0.85;
}
.realm-bar a:hover { opacity: 1; }
.realm-pos {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    color: var(--grey);
}
.realm-pos .dot {
    width: 6px; height: 6px;
    border-radius: 50%;
    background: var(--gold);
    box-shadow: 0 0 8px var(--gold);
    animation: pulseDot 2.4s var(--ease) infinite;
}
@keyframes pulseDot {
    0%, 100% { opacity: 1; transform: scale(1); }
    50%      { opacity: 0.4; transform: scale(0.8); }
}

/* ─── Realm content ─────────────────────────────────────────────── */
.realm {
    position: relative;
    z-index: 10;
    max-width: 1240px;
    margin: 0 auto;
    padding: 8rem 2rem 4rem;
}
@media (min-width: 720px)  { .realm { padding-inline: 4rem; } }
@media (min-width: 1100px) { .realm { padding-inline: 6rem; } }

.realm-hero {
    margin-bottom: 4rem;
    max-width: 720px;
}
.realm-eyebrow {
    display: inline-flex;
    align-items: baseline;
    gap: 0.4rem;
    font-family: var(--font-m);
    font-size: 0.7rem;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: var(--grey);
    margin-bottom: 1.4rem;
}
.realm-eyebrow .seed {
    font-family: var(--font-skt);
    font-size: 1rem;
    color: var(--gold);
}
.realm-title {
    font-family: var(--font-h);
    font-weight: 400;
    font-size: clamp(2.4rem, 5.5vw, 4.2rem);
    line-height: 1.05;
    letter-spacing: -0.005em;
    margin-bottom: 1.4rem;
}
.realm-title .accent {
    font-style: italic;
    font-weight: 500;
}
.realm-lede {
    color: rgba(var(--ink-rgb), 0.72);
    font-size: 1rem;
    line-height: 1.75;
    margin-bottom: 2.4rem;
}
.realm-meta {
    display: flex;
    gap: 2.5rem;
    flex-wrap: wrap;
    font-family: var(--font-m);
}
.realm-meta > div {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}
.realm-meta .num {
    font-size: 1.6rem;
    font-weight: 500;
    line-height: 1;
    letter-spacing: 0.02em;
}
.realm-meta .lbl {
    font-size: 0.6rem;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: var(--grey);
}

/* ─── Stub card grid (each realm overrides via inline CSS) ──────── */
.realm-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}
.stub-card {
    border-radius: 16px;
    border: 1px solid rgba(var(--ink-rgb), 0.08);
    overflow: hidden;
    transition: all 0.55s var(--ease);
    cursor: pointer;
}
.stub-card:hover {
    border-color: rgba(var(--ink-rgb), 0.2);
    transform: translateY(-4px);
}
.stub-img {
    aspect-ratio: 4/5;
    background: linear-gradient(160deg, rgba(var(--ink-rgb), 0.06), rgba(var(--ink-rgb), 0.02));
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(var(--ink-rgb), 0.25);
    font-size: 2.5rem;
}
.stub-img::after {
    content: '◇';
    opacity: 0.5;
}
.stub-img-1 { background: linear-gradient(160deg, rgba(216,184,122,0.10), rgba(216,184,122,0.02)); }
.stub-img-2 { background: linear-gradient(160deg, rgba(245,240,227,0.06), rgba(20,20,20,0.5)); }
.stub-img-3 { background: linear-gradient(160deg, rgba(140,133,121,0.10), rgba(60,55,45,0.3)); }
.stub-img-4 { background: linear-gradient(160deg, rgba(143,163,255,0.18), rgba(72,84,170,0.04)); }
.stub-img-5 { background: linear-gradient(160deg, rgba(143,163,255,0.10), rgba(15,20,55,0.4)); }
.stub-img-6 { background: linear-gradient(160deg, rgba(255,159,112,0.18), rgba(120,40,20,0.4)); }
.stub-img-7 { background: linear-gradient(160deg, rgba(255,200,90,0.18), rgba(90,30,10,0.5)); }

.stub-meta {
    padding: 1.1rem 1.2rem 1.3rem;
    border-top: 1px solid rgba(var(--ink-rgb), 0.06);
}
.stub-tag {
    display: inline-block;
    font-family: var(--font-m);
    font-size: 0.6rem;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--grey);
    margin-bottom: 0.5rem;
}
.stub-meta h3 {
    font-family: var(--font-h);
    font-weight: 500;
    font-size: 1.15rem;
    margin-bottom: 0.6rem;
}
.stub-price {
    font-family: var(--font-m);
    font-size: 0.78rem;
    color: rgba(var(--ink-rgb), 0.7);
    letter-spacing: 0.04em;
}

.realm-note {
    font-family: var(--font-m);
    font-size: 0.78rem;
    color: var(--grey);
    text-align: center;
    margin: 3rem auto 0;
    max-width: 600px;
    letter-spacing: 0.05em;
}
.realm-note a {
    color: var(--gold);
    text-decoration: none;
    border-bottom: 1px solid rgba(204,164,59,0.3);
    transition: border-color 0.3s var(--ease);
}
.realm-note a:hover {
    border-color: var(--gold);
}

/* ─── Drop / Prana specifics ────────────────────────────────────── */
.drop-status {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.35rem 0.8rem;
    border-radius: 999px;
    font-family: var(--font-m);
    font-size: 0.62rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}
.drop-status.live {
    background: rgba(204,164,59,0.14);
    color: var(--gold);
    border: 1px solid rgba(204,164,59,0.4);
}
.drop-status.live::before {
    content: '';
    width: 5px; height: 5px;
    border-radius: 50%;
    background: var(--gold);
    box-shadow: 0 0 8px var(--gold);
    animation: pulseDot 1.6s var(--ease) infinite;
}
.drop-status.queued {
    background: rgba(143,163,255,0.10);
    color: #b0bdff;
    border: 1px solid rgba(143,163,255,0.3);
}
.drop-status.ember {
    background: rgba(255,140,80,0.14);
    color: #ffae8a;
    border: 1px solid rgba(255,140,80,0.4);
}
.drop-status.ember::before {
    content: '';
    width: 5px; height: 5px;
    border-radius: 50%;
    background: #ffae8a;
    box-shadow: 0 0 10px rgba(255,140,80,0.7);
    animation: pulseDot 0.9s var(--ease) infinite;
}

.countdown {
    font-family: var(--font-m);
    font-size: 0.78rem;
    letter-spacing: 0.06em;
    color: var(--ink);
}
.countdown .lbl {
    font-size: 0.58rem;
    letter-spacing: 0.25em;
    color: var(--grey);
    margin-right: 0.5rem;
    text-transform: uppercase;
}

/* ─── Threadline (footer) ───────────────────────────────────────── */
.threadline {
    position: relative;
    z-index: 10;
    padding: 2rem 2.5rem 3rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: var(--font-m);
    font-size: 0.62rem;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: var(--grey);
    border-top: 1px solid rgba(var(--ink-rgb), 0.06);
}
.threadline a {
    text-decoration: none;
    transition: color 0.3s;
}
.threadline a:hover { color: var(--ink); }

/* ─── Discount ribbon on drop cards + was/now pricing ─── */
.drop-discount-ribbon {
    position: absolute;
    top: 0.85rem;
    right: 0.85rem;
    padding: 0.32rem 0.7rem;
    background: linear-gradient(135deg, #d4af37, #b8860b);
    color: #1a1a1a;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    border-radius: 2px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
    z-index: 2;
}
.stub-img { position: relative; }
.stub-price .price-was {
    text-decoration: line-through;
    opacity: 0.5;
    margin-right: 0.4rem;
    font-size: 0.9em;
}
.stub-price .price-now {
    color: #d4af37;
    font-weight: 600;
}

/* ─── Mobile ────────────────────────────────────────────────────── */
@media (max-width: 720px) {
    .realm-bar { padding: 1rem 1.25rem; }
    .realm { padding: 6.5rem 1.25rem 3rem; }
    .threadline { padding: 1.5rem 1.25rem; flex-direction: column; gap: 0.5rem; }
    .realm-meta { gap: 1.5rem; }
}
