:root {
    --bg-1: #c7d2fe; /* periwinkle */
    --bg-2: #e9d5ff; /* soft purple */
    --panel: #ffffff;
    --text: #0b1020;
    --muted: #8a8f9b;
    --brand: #1f4cff; /* deep blue */
    --chip: #f6f7fb;
}

* { box-sizing: border-box; }
html, body { min-height: 100%; }
html { scrollbar-gutter: stable both-edges; }
body {
    margin: 0;
    font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
    color: var(--text);
    background: radial-gradient(1200px 800px at 10% 10%, #f3e8ff 0%, transparent 60%),
                            radial-gradient(1000px 800px at 90% 20%, #dbeafe 0%, transparent 60%),
                            linear-gradient(120deg, #a5b4fc 0%, #93c5fd 100%);
    display: grid;
    place-items: center;
    overflow-x: hidden; /* allow vertical scrolling */
    padding-top: 48px; /* extra headroom so brand chip/logo never clips */
    padding-bottom: 96px; /* reserve space below to avoid flicker from animated decor */
}

.bg-grad { position: fixed; inset: 0; pointer-events: none; }

.panel {
    position: relative;
    width: min(1100px, 92vw);
    background: var(--panel);
    border-radius: 28px;
    padding: 108px 48px 40px;
    box-shadow:
        0 30px 80px rgba(13, 23, 54, 0.18),
        inset 0 1px 0 rgba(255,255,255,0.6);
}

/* top notch/chip */
.brand-chip {
    position: absolute;
    top: -34px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--panel);
    border-radius: 14px 14px 18px 18px / 14px 14px 26px 26px;
    padding: 12px 22px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.08);
}
.brand-logo { display: block; height: 56px; width: auto; object-fit: contain; }

.content { text-align: center; max-width: 760px; margin: 0 auto; position: relative; z-index: 2; }
.emoji { font-size: 34px; margin-bottom: 18px; }
.eyebrow { letter-spacing: 2px; font-weight: 600; font-size: 12px; color: var(--muted); margin-bottom: 14px; }
.title { font-size: clamp(36px, 6vw, 60px); margin: 0 0 16px; color: var(--brand); font-weight: 800; }
.title span { background: linear-gradient(180deg, #2563eb, #1e40af); -webkit-background-clip: text; background-clip: text; color: transparent; }
.subtitle { color: #8b94a7; font-size: 17px; line-height: 1.7; margin: 0 0 28px; }

.cta {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    padding: 15px 24px;
    border-radius: 36px;
    background: radial-gradient(120% 120% at 20% 0%, #334155 0%, #0f172a 60%);
    color: #fff;
    border: none;
    box-shadow: 0 18px 32px rgba(2,6,23,0.25);
    cursor: pointer;
    font-weight: 600;
    transition: transform .15s ease, box-shadow .2s ease;
}
.cta:hover { transform: translateY(-2px); box-shadow: 0 24px 36px rgba(2,6,23,0.3); }
.cta:active { transform: translateY(0); }
.cta-icon, .cta-caret { display: grid; place-items: center; width: 28px; height: 28px; background: rgba(255,255,255,0.08); border-radius: 999px; }

.socials { margin: 28px auto 0; display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.social {
    width: 40px; height: 40px; border-radius: 999px; display: grid; place-items: center;
    background: #fff; color: #0f172a; text-decoration: none; box-shadow: 0 6px 16px rgba(0,0,0,0.1);
}
.social:hover { transform: translateY(-2px); box-shadow: 0 10px 18px rgba(0,0,0,0.12); }
.social-text { font-weight: 700; font-size: 14px; }

/* floating decorations */
.decor { position: absolute; width: 42px; height: 42px; border-radius: 12px; filter: drop-shadow(0 10px 20px rgba(0,0,0,0.15)); will-change: transform; }
.decor-1 { left: 22px; top: 34%; background: linear-gradient(145deg, #d1fae5, #86efac); animation: float1 1s ease-in-out infinite alternate; }
.decor-2 { right: 28px; top: 52%; background: linear-gradient(145deg, #fde68a, #f59e0b); border-radius: 999px 16px 999px 16px; animation: float2 1s ease-in-out infinite alternate; }
.decor-3 { left: 12%; top: 8%; background: linear-gradient(145deg, #fecaca, #f97316); border-radius: 999px; width: 24px; height: 24px; animation: float3 0.5s ease-in-out infinite alternate; }
.decor-4 { right: 4%; bottom: -12px; background: linear-gradient(145deg, #fbbf24, #fb923c); border-radius: 999px 999px 8px 999px; width: 50px; height: 50px; animation: float4 2s ease-in-out infinite alternate; }

@keyframes float1 {
    from { transform: translate(0, -6px) rotate(18deg); }
    to   { transform: translate(6px, 6px) rotate(22deg); }
}
@keyframes float2 {
    from { transform: translate(0, 4px) rotate(-18deg); }
    to   { transform: translate(-8px, -8px) rotate(-26deg); }
}
@keyframes float3 {
    from { transform: translate(0, 0) scale(1) rotate(0deg); }
    to   { transform: translate(4px, -6px) scale(1.05) rotate(12deg); }
}
@keyframes float4 {
    from { transform: translate(0, 0) rotate(0deg); }
    to   { transform: translate(-6px, 8px) rotate(-10deg); }
}

/* star sparks */
.spark {
        position: absolute;
        z-index: 1; /* behind the main .content (z-index:2) */
        width: 7px;
        height: 7px;
        border-radius: 50%;
        background: radial-gradient(circle, #ffffff 0%, #e5f0ff 50%, rgba(255,255,255,0) 70%);
        box-shadow: 0 0 10px rgba(255,255,255,0.7);
        opacity: 0.85;
        animation: twinkle 2.2s ease-in-out infinite;
}

/* panel corner screws */
.screw {
    position: absolute;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: radial-gradient(120% 120% at 30% 30%, #e5e7eb 0%, #cbd5e1 35%, #9ca3af 70%, #6b7280 100%);
    box-shadow:
        inset 2px 2px 3px rgba(255,255,255,0.65),
        inset -2px -3px 4px rgba(17,24,39,0.35),
        0 2px 6px rgba(0,0,0,0.18);
}
.screw::after {
    content: '';
    position: absolute;
    top: 50%; left: 50%; transform: translate(-50%, -50%);
    width: 12px; height: 2px; border-radius: 2px;
    background: linear-gradient(180deg, #111827, #374151);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.25);
}
.screw-tl { top: 10px; left: 10px; }
.screw-tr { top: 10px; right: 10px; }
.screw-bl { bottom: 10px; left: 10px; }
.screw-br { bottom: 10px; right: 10px; }

@media (max-width: 768px) {
    .screw { width: 16px; height: 16px; }
    .screw::after { width: 10px; }
    .screw-tl, .screw-tr { top: 8px; }
    .screw-bl, .screw-br { bottom: 8px; }
}

@media (max-width: 480px) {
    .screw { width: 14px; height: 14px; }
    .screw::after { width: 9px; }
    .screw-tl, .screw-tr { top: 6px; }
    .screw-bl, .screw-br { bottom: 6px; }
}
.spark::after {
        content: '';
        position: absolute;
        inset: -4px;
        border-radius: 50%;
        box-shadow: 0 0 10px rgba(147,197,253,0.55);
}
/* positions around the panel */
.spark-1 { top: 12%; left: 6%; animation-delay: .2s; }
.spark-2 { top: 9%; right: 7%; animation-delay: .6s; }
.spark-3 { top: 44%; left: 3%; animation-delay: .9s; }
.spark-4 { top: 60%; right: 5%; animation-delay: 1.2s; }
.spark-5 { bottom: 12%; left: 14%; animation-delay: 1.5s; }
.spark-6 { bottom: 8%; right: 12%; animation-delay: 1.9s; }
.spark-7 { top: 28%; right: 16%; animation-delay: 2.1s; }
.spark-8 { top: 34%; left: 18%; animation-delay: 2.4s; }

@keyframes twinkle {
    0%, 100% { transform: scale(0.9) translateY(0); opacity: 0.6; }
    50% { transform: scale(1.25) translateY(-2px); opacity: 1; }
}

/* modal */
.modal { position: fixed; inset: 0; background: rgba(2,6,23,0.45); display: flex; align-items: center; justify-content: center; z-index: 50; }
.modal.hidden { display: none; }
.modal-content { background: #fff; padding: 28px 24px; border-radius: 16px; width: min(380px, 92vw); box-shadow: 0 22px 60px rgba(15,23,42,0.28); position: relative; text-align: center; }
.close { position: absolute; top: 8px; right: 12px; width: 36px; height: 36px; border-radius: 999px; border: none; background: #f2f4f8; color: #111827; font-size: 22px; cursor: pointer; }
#notifyForm { display: flex; gap: 12px; flex-direction: column; margin-top: 12px; }
#emailInput { padding: 12px 14px; border-radius: 10px; border: 1px solid #d7dbe3; font-size: 15px; }
#emailInput:focus { outline: 2px solid #93c5fd; border-color: #93c5fd; }
.submit-btn { padding: 12px 16px; border-radius: 999px; background: #111827; color: #fff; border: none; font-weight: 600; }
.success-msg { color: #059669; margin-top: 10px; }
.success-msg.hidden { display: none; }

.attribution { margin-top: 42px; display: inline-flex; gap: 10px; align-items: center; color: #6b7280; font-size: 13px; }
.attribution a { color: #0f172a; text-decoration: none; font-weight: 600; }
.attribution a:hover { text-decoration: underline; }
.mofusa-logo { height: 18px; width: auto; object-fit: contain; filter: drop-shadow(0 1px 1px rgba(0,0,0,0.05)); }

/* Tablet */
@media (max-width: 1024px) {
    .panel { width: min(960px, 94vw); padding: 96px 36px 36px; }
    .brand-chip { top: -32px; }
    .brand-logo { height: 48px; }
}

/* Large phones / small tablets */
@media (max-width: 768px) {
    .panel { width: 94vw; padding: 88px 22px 28px; border-radius: 24px; }
    .brand-chip { top: -22px; padding: 10px 18px; }
    .brand-logo { height: 38px; }
    .title { font-size: clamp(30px, 7.2vw, 44px); }
    .subtitle { font-size: 16px; }
    .cta { padding: 13px 20px; }
    .social { width: 38px; height: 38px; }
    .decor-3 { display: none; }
    .spark-2, .spark-7 { display: none; }
}

/* Mobile */
@media (max-width: 480px) {
    /* Center panel vertically on small screens */
    body { display: flex; align-items: center; justify-content: center; min-height: 100svh; padding-top: 16px; padding-bottom: 48px; }
    .panel { width: 94vw; padding: 78px 14px 24px; border-radius: 20px; margin: 0; }
    .brand-logo { height: 30px; }
    .emoji { font-size: 28px; }
    .title { font-size: clamp(26px, 8vw, 36px); }
    .subtitle { font-size: 15px; }
    .cta { padding: 12px 18px; gap: 12px; }
    .social { width: 36px; height: 36px; }
    .decor-1, .decor-2, .decor-4 { opacity: 0.65; filter: blur(0.1px) drop-shadow(0 8px 14px rgba(0,0,0,0.12)); }
    .spark { width: 6px; height: 6px; opacity: 0.75; }
    .spark-1, .spark-6 { display: none; }
}
