/* ============================================================
   Base — reset, page layout, typography, header/footer.
   No component styling lives here.
   ============================================================ */
* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: var(--font-family);
    font-size: var(--font-size-base);
    /* Midnight base — the glow comes from the aurora orbs, not the page. */
    background: var(--color-bg);
    color: var(--color-text);
    /* Dynamic viewport height: fits the real visible area on desktop
       and on phones (where the browser bar shrinks the viewport). */
    min-height: 100vh;
    min-height: 100dvh;
    /* A normal website page: the whole document scrolls, on every
       screen size. No flex centering, no height caps, no scroll
       locks — the frame that trapped the site is gone. */
    display: block;
    padding: 0;
}

/* --- Aurora background: three slow-drifting glows + a fading dot grid.
       Pure CSS, no canvas, no JS — nothing to break on a phone. --- */
.bg {
    position: fixed;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: 0;
}
.bg-orb {
    position: absolute;
    border-radius: 50%;
    will-change: transform;
}
.bg-orb-warm {
    width: 46vmax;
    height: 46vmax;
    top: -14vmax;
    right: -10vmax;
    background: radial-gradient(circle at center, rgba(240, 185, 11, 0.16), transparent 65%);
    animation: drift 26s ease-in-out infinite alternate;
}
.bg-orb-cool {
    width: 40vmax;
    height: 40vmax;
    bottom: -16vmax;
    left: -12vmax;
    background: radial-gradient(circle at center, rgba(45, 212, 191, 0.10), transparent 65%);
    animation: drift 32s ease-in-out infinite alternate-reverse;
}
.bg-orb-violet {
    width: 36vmax;
    height: 36vmax;
    top: 30%;
    left: 55%;
    background: radial-gradient(circle at center, rgba(139, 92, 246, 0.12), transparent 65%);
    animation: drift 38s ease-in-out infinite alternate;
}
@keyframes drift {
    from { transform: translate3d(0, 0, 0) scale(1); }
    to { transform: translate3d(-3vmax, 2vmax, 0) scale(1.06); }
}
.bg-grid {
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(255, 255, 255, 0.055) 1px, transparent 1.5px);
    background-size: 26px 26px;
    -webkit-mask-image: radial-gradient(ellipse 90% 70% at 50% 0%, black 30%, transparent 78%);
    mask-image: radial-gradient(ellipse 90% 70% at 50% 0%, black 30%, transparent 78%);
}

.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    background: var(--color-text);
    color: var(--color-text-inverse);
    padding: var(--space-2) var(--space-4);
    border-radius: var(--radius-sm);
    z-index: 10;
}
.skip-link:focus { left: var(--space-4); top: var(--space-4); }

/* --- Page container: NOT a framed panel. The page itself is the
       website — full width, no border, no rounded frame, no glass.
       Product tiles and form fields keep their own styling; the
       outer page is just content on the dark background. --- */
.page {
    position: relative;
    z-index: 1;
    width: 100%;
    padding: 28px 24px 32px;
    animation: fadeUp 0.4s ease both;
}
/* Focused flows (checkout, cart, payment, policies) read best as a
   centered column — still frameless, just narrower. */
.page:not(.page-wide) { max-width: 640px; margin: 0 auto; text-align: center; }
.page-wide { width: 100%; text-align: left; }
.page-wide h1, .page-wide .eyebrow { text-align: center; }
.hero-eyebrow {
    margin: 0 0 10px;
    font-size: var(--font-size-xs);
    font-weight: 800;
    letter-spacing: 0.16em;
    color: var(--color-text-faint);
}
/* The one gold moment in the headline: gradient text, not a flat color. */
.hero-gold {
    background: var(--color-brand-grad);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.hero-sub {
    margin: 0 0 22px;
    font-size: var(--font-size-lg);
    line-height: 1.6;
    color: var(--color-text-muted);
    max-width: 420px;
}
.hero-coins { display: flex; gap: 10px; margin-bottom: 20px; }
.hero-coins .coin { width: 32px; height: 32px; }
.hero-trust { color: var(--color-text-muted); font-size: var(--font-size-sm); line-height: 1.5; }

@media (max-width: 920px) {
    /* Tablets/phones: the page just flows — no special layout. */
    .page { padding: 22px 16px 28px; }
    .hero-sub { margin-left: auto; margin-right: auto; }
    .hero-coins { justify-content: center; }
}
@media (max-width: 640px) {
    /* Phones: compact hero text. */
    .hero-sub { font-size: var(--font-size-base); }
}
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* --- Site header: a real website header bar — full width, sticky
       at the top, translucent so the page glows faintly through it. --- */
.topbar {
    position: sticky;
    top: 0;
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 14px 24px;
    background: rgba(10, 13, 19, 0.86);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--color-border);
}
.brand {
    display: flex;
    align-items: center;
    gap: 7px;
    font-weight: 700;
    font-size: var(--font-size-base);
}
.brand-logo { display: block; }
.secure-badge {
    font-size: var(--font-size-xs);
    font-weight: 600;
    color: var(--color-success);
    background: var(--color-success-bg);
    border-radius: var(--radius-pill);
    padding: 5px 11px;
}

.eyebrow {
    margin: 0 0 6px;
    font-size: var(--font-size-xs);
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--color-text-faint);
}
h1 {
    margin: 0 0 var(--space-2);
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -0.01em;
}
.hint { color: var(--color-text-muted); line-height: 1.5; margin: 0 0 var(--space-1); }
.small { color: var(--color-text-faint); font-size: var(--font-size-sm); line-height: 1.5; }
/* --- Site footer: a full-width footer bar, not a card footnote. --- */
.footer {
    position: relative;
    z-index: 1;
    width: 100%;
    padding: 24px 16px 32px;
    border-top: 1px solid var(--color-border);
    color: var(--color-text-faint);
    font-size: var(--font-size-xs);
    line-height: 1.6;
    text-align: center;
}
a { color: var(--color-brand); }

:focus-visible {
    outline: 3px solid var(--color-brand-soft);
    outline-offset: 2px;
}

@media (max-width: 420px) {
    .page { padding: 18px 14px 24px; }
    .topbar { padding: 12px 14px; }
    /* Smaller, calmer glow on phones: less paint work, same feel. */
    .bg-orb-warm { opacity: 0.75; }
    .bg-orb-cool { opacity: 0.75; }
    .bg-orb-violet { opacity: 0.75; }
}

/* Respect users who prefer no motion: everything becomes static. */
@media (prefers-reduced-motion: reduce) {
    .bg-orb { animation: none; }
}

/* ============================================================
   Midnight Bazaar 2.0 — base layer (2026-11-01): deeper stage,
   gold selection, slim scrollbars, glassier header.
   ============================================================ */

/* Text selection wears the brand gold. */
::selection { background: var(--color-brand); color: var(--color-text-inverse); }

/* Slim dark scrollbar with a gold thumb on hover (desktop). */
html { scrollbar-color: #2c3852 transparent; scrollbar-width: thin; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: #2c3852; border-radius: 8px; border: 2px solid var(--color-bg); }
::-webkit-scrollbar-thumb:hover { background: var(--color-brand); }
::-webkit-scrollbar-track { background: transparent; }

/* Vignette: the stage darkens at the edges so content floats. */
.bg::after {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(120% 90% at 50% 0%, transparent 55%, rgba(0, 0, 0, 0.45) 100%);
}

/* Header: stronger glass, a whisper of gold on the hairline. */
.topbar {
    background: rgba(7, 10, 16, 0.94);
    -webkit-backdrop-filter: blur(16px) saturate(1.4);
    backdrop-filter: blur(16px) saturate(1.4);
    box-shadow: inset 0 -1px 0 rgba(240, 185, 11, 0.14);
}
.brand { font-weight: 800; letter-spacing: -0.01em; }

h1 { letter-spacing: -0.02em; }

/* The closing brand statement gets a touch more presence. */
.hero-gold { background: linear-gradient(90deg, #d99e06, #ffd83d 45%, #f0b90b); -webkit-background-clip: text; background-clip: text; }

/* Short pages: the footer rests at the bottom of the screen
   instead of stranding mid-page above a black void. Plain
   column flow — the page still scrolls normally and nothing
   is height-capped or scroll-locked. */
body { display: flex; flex-direction: column; }
.footer { margin-top: auto; }

/* ============================================================
   IVORY LIGHT — base layer: the aurora stage is retired, the
   page is warm ivory with a soft white wash at the top, and
   the header is white glass.
   ============================================================ */
body { background: linear-gradient(180deg, #fdfbf7 0, var(--color-bg) 420px); }
.bg { display: none; }

.topbar {
    background: rgba(255, 255, 255, 0.88);
    box-shadow: inset 0 -1px 0 rgba(161, 98, 7, 0.18), 0 6px 20px rgba(87, 70, 28, 0.05);
}

a { color: var(--color-brand-text); }

/* Gold gradient text, re-graded for a light background. */
.hero-gold { background: linear-gradient(90deg, #b45309, #f59e0b 55%, #d97706); -webkit-background-clip: text; background-clip: text; }

:focus-visible { outline: 3px solid rgba(217, 119, 6, 0.40); }

html { scrollbar-color: #cfc4ab transparent; }
::-webkit-scrollbar-thumb { background: #cfc4ab; border-color: var(--color-bg); }
::-webkit-scrollbar-thumb:hover { background: var(--color-brand); }
