/* ═══════════════════════════════════════════════════════════
   PERP X DESIGN TOKENS (master reference)
   ═══════════════════════════════════════════════════════════ */
:root {
    --blue:        #42a5f5;
    --blue-dark:   #1e88e5;
    --orange:      #ff9800;
    --orange-dark: #f57c00;
    --bg:          #070b14;
    --surface:     rgba(255,255,255,0.04);
    --surface2:    rgba(255,255,255,0.08);
    --border:      rgba(66,165,245,0.18);
    --text:        #e8edf4;
    --muted:       rgba(232,237,244,0.55);
    --grad:        linear-gradient(90deg, #42a5f5 0%, #ff9800 50%, #42a5f5 100%);
    --glow-b:      rgba(66,165,245,.18);
    --glow-o:      rgba(255,152,0,.18);
    --radius:      16px;
    --radius-sm:   10px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

 body {
    font-family: 'Inter', system-ui, sans-serif;
    background: var(--bg);
    background-image:
        radial-gradient(ellipse 1400px 800px at 5%  -5%,  var(--glow-b), transparent 65%),
        radial-gradient(ellipse 1000px 700px at 100% 15%, var(--glow-o), transparent 55%);
    color: var(--text);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

 /* Star field */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    background-image:
        radial-gradient(1px 1px at 15%  22%, rgba(66,165,245,.25), transparent),
        radial-gradient(1px 1px at 70%  55%, rgba(255,152,0,.18), transparent),
        radial-gradient(1px 1px at 40%  78%, rgba(66,165,245,.15), transparent),
        radial-gradient(1px 1px at 85%  10%, rgba(255,255,255,.12), transparent),
        radial-gradient(1px 1px at 28%  90%, rgba(255,152,0,.10), transparent);
    background-repeat: repeat;
    background-size: 260px 200px;
    animation: stars 40s linear infinite;
    pointer-events: none;
    z-index: 0;
}

body > * { position: relative; z-index: 1; }

@keyframes stars {
    from { transform: translateY(0); }
    to   { transform: translateY(-200px); }
}

@keyframes shimmer {
    0%   { background-position: 0%   50%; }
    50%  { background-position: 100% 50%; }
    100% { background-position: 0%   50%; }
}

 @keyframes fadeUp {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ── Header ──────────────────────────────────────────────── */
header {
    position: sticky; top: 0; z-index: 100;
    background: rgba(7, 11, 20, 0.75);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    box-shadow: 0 4px 32px rgba(0,0,0,.4);
}

.header-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 14px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.brand img {
    height: 40px;
    width: auto;
    filter: drop-shadow(0 3px 12px rgba(0,0,0,.45));
}

.brand-text h2 {
    font-family: 'Orbitron', monospace;
    font-size: 1.1rem;
    font-weight: 900;
    letter-spacing: .08em;
    background: var(--grad);
    background-size: 300% 100%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: shimmer 5s ease infinite;
}

.brand-text p {
    font-size: .72rem;
    color: var(--muted);
    letter-spacing: .12em;
    text-transform: uppercase;
}

.nav {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.nav a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 50px;
    font-size: .82rem;
    font-weight: 600;
    color: var(--text);
    text-decoration: none;
    background: var(--surface);
    border: 1px solid var(--border);
    transition: all .2s ease;
}

.nav a:hover {
    background: rgba(66,165,245,.12);
    border-color: rgba(66,165,245,.4);
    transform: translateY(-2px);
}

.nav a.cta {
    background: linear-gradient(135deg, var(--blue), var(--blue-dark));
    border-color: transparent;
    color: #fff;
    box-shadow: 0 5px 20px rgba(66,165,245,.32);
}

.nav a.cta:hover {
    background: linear-gradient(135deg, var(--blue-dark), var(--blue));
    box-shadow: 0 8px 28px rgba(66,165,245,.5);
}

/* ── Main ────────────────────────────────────────────────── */
main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2.5rem 1.25rem 4rem;
    flex: 1;
    width: 100%;
}

/* ── Hero ────────────────────────────────────────────────── */
.hero {
    text-align: center;
    margin-bottom: 2.5rem;
    animation: fadeUp .7s ease-out both;
}

.hero .logo {
    height: 120px;
    width: auto;
    margin-bottom: 20px;
    filter: drop-shadow(0 8px 24px rgba(0,0,0,.45));
    animation: floatY 6s ease-in-out infinite;
}

@keyframes floatY {
    0%, 100% { transform: translateY(0); }
    50%       { transform: translateY(-7px); }
}

.hero h1 {
    font-family: 'Orbitron', monospace;
    font-size: clamp(2rem, 6vw, 3.6rem);
    font-weight: 900;
    letter-spacing: .06em;
    background: var(--grad);
    background-size: 300% 100%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: shimmer 5s ease infinite;
    line-height: 1.1;
    margin-bottom: 12px;
}

.hero .subtitle {
    color: var(--muted);
    font-size: clamp(.9rem, 2vw, 1.05rem);
    max-width: 640px;
    margin: 0 auto;
    line-height: 1.6;
}

.hero .subtitle strong { color: var(--blue); }

/* ── Feature cards ───────────────────────────────────────── */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 20px;
    margin-bottom: 2.5rem;
}

.feature-grid .card { grid-column: span 2; }
.feature-grid .card:nth-child(4) { grid-column: 2 / span 2; }
.feature-grid .card:nth-child(5) { grid-column: 4 / span 2; }

.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px 22px;
    text-decoration: none;
    color: var(--text);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    transition: transform .22s ease, background .22s ease, border-color .22s ease, box-shadow .22s ease;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 10px;
}

.card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: var(--radius);
    background: linear-gradient(135deg, var(--glow-b), transparent 60%);
    opacity: 0;
    transition: opacity .25s ease;
    pointer-events: none;
}

.card:hover {
    transform: translateY(-4px);
    background: rgba(66,165,245,.08);
    border-color: rgba(66,165,245,.4);
    box-shadow: 0 12px 36px rgba(0,0,0,.45);
}

.card:hover::before { opacity: 1; }

.card .icon { font-size: 2rem; line-height: 1; }

.card h3 {
    font-family: 'Orbitron', monospace;
    font-size: .95rem;
    font-weight: 900;
    letter-spacing: .05em;
    text-transform: uppercase;
    background: var(--grad);
    background-size: 300% 100%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: shimmer 6s ease infinite;
}

.card p {
    color: var(--muted);
    font-size: .85rem;
    line-height: 1.5;
}

.card .arrow {
    margin-top: auto;
    color: var(--blue);
    font-size: .9rem;
    font-weight: 600;
    opacity: 0;
    transform: translateX(-6px);
    transition: all .2s ease;
}

.card:hover .arrow {
    opacity: 1;
    transform: translateX(0);
}

/* ── CTA buttons ─────────────────────────────────────────── */
.cta-row {
    display: flex;
    justify-content: center;
    gap: 14px;
    flex-wrap: wrap;
    margin-bottom: 2.5rem;
}

.px-btn {
    position: relative;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: 50px;
    border: none;
    cursor: pointer;
    text-decoration: none;
    color: #fff;
    font-family: 'Inter', sans-serif;
    font-size: .85rem;
    font-weight: 600;
    letter-spacing: .04em;
    white-space: nowrap;
    transition: transform .2s ease, box-shadow .2s ease;
}

.px-btn::after {
    content: '';
    position: absolute;
    top: 0; left: -100%;
    width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,.22), transparent);
    transition: left .42s ease;
}

.px-btn:hover::after { left: 100%; }
.px-btn:hover { transform: translateY(-3px); box-shadow: 0 12px 30px rgba(0,0,0,.35); }
.px-btn:active { transform: translateY(-1px); }

.px-btn-blue   { background: linear-gradient(135deg, var(--blue), var(--blue-dark)); box-shadow: 0 5px 20px rgba(66,165,245,.32); }
.px-btn-orange { background: linear-gradient(135deg, var(--orange), var(--orange-dark)); box-shadow: 0 5px 20px rgba(255,152,0,.32); }
.px-btn-ghost  { background: var(--surface); border: 1px solid var(--border); color: var(--text); }
.px-btn-ghost:hover { background: rgba(66,165,245,.12); border-color: rgba(66,165,245,.4); }

/* ── Footer ──────────────────────────────────────────────── */
footer {
    margin-top: auto;
    padding: 24px 0;
    border-top: 1px solid var(--border);
    text-align: center;
    font-size: .78rem;
    color: var(--muted);
}

footer a { color: var(--blue); text-decoration: none; }
footer a:hover { opacity: .7; }

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 600px) {
    .header-inner { flex-direction: column; text-align: center; }
    .nav { justify-content: center; }
    .hero .logo { height: 90px; }
    .feature-grid { grid-template-columns: 1fr; }
    .feature-grid .card,
    .feature-grid .card:nth-child(4),
    .feature-grid .card:nth-child(5) { grid-column: 1; }
}

@media (min-width: 601px) and (max-width: 900px) {
    .feature-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .feature-grid .card,
    .feature-grid .card:nth-child(4),
    .feature-grid .card:nth-child(5) { grid-column: span 1; }
    .feature-grid .card:nth-child(5) {
        grid-column: 1 / -1;
        width: calc(50% - 10px);
        justify-self: center;
    }
}