*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --bg:        #0d1117;
    --surface:   #161b22;
    --border:    #21262d;
    --accent:    #e85d04;
    --accent2:   #f48c06;
    --text:      #e6edf3;
    --muted:     #8b949e;
    --radius:    14px;
    --shadow:    0 8px 32px rgba(0,0,0,.55);
}

html, body {
    height: 100%;
    background: var(--bg);
    color: var(--text);
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
}

/* ── BACKGROUND ANIMAT ───────────────────────────────── */

/* Strat 1: gradient de bază care se mișcă lent */
body::before {
    content: '';
    position: fixed;
    inset: -20%;          /* puțin mai mare ca să acopere și la scale */
    background:
        linear-gradient(
            125deg,
            #0d1117 0%,
            #180a00 30%,
            #0a0d18 60%,
            #12060a 85%,
            #0d1117 100%
        );
    background-size: 350% 350%;
    animation: bgFlow 18s ease infinite;
    pointer-events: none;
    z-index: 0;
}

/* Strat 2: orbe de culoare care pulsează și plutesc */
body::after {
    content: '';
    position: fixed;
    inset: 0;
    background-image:
        radial-gradient(ellipse 65% 55% at 15% 30%, rgba(232,93,4,.18) 0%, transparent 58%),
        radial-gradient(ellipse 50% 45% at 88% 75%, rgba(33,110,210,.13) 0%, transparent 52%),
        radial-gradient(ellipse 38% 32% at 55% 5%,  rgba(244,140,6,.09) 0%, transparent 48%),
        radial-gradient(ellipse 30% 28% at 10% 90%, rgba(232,93,4,.07) 0%, transparent 45%);
    animation: orbPulse 9s ease-in-out infinite alternate;
    pointer-events: none;
    z-index: 0;
}

@keyframes bgFlow {
    0%   { background-position:   0%   0%; }
    25%  { background-position: 100%  30%; }
    50%  { background-position:  60% 100%; }
    75%  { background-position:   0%  70%; }
    100% { background-position:   0%   0%; }
}

@keyframes orbPulse {
    0%   { opacity: .65; transform: scale(1)    translate(0,    0); }
    33%  { opacity: .90; transform: scale(1.06) translate(1.5%, 2%); }
    66%  { opacity: .80; transform: scale(1.02) translate(-1%,  1%); }
    100% { opacity: 1;   transform: scale(1.09) translate(2%,  -1.5%); }
}

/* ── HEADER ─────────────────────────────────────────── */
header {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 22px 36px;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 10;
    isolation: isolate;
}

header img {
    height: 56px;
    width: auto;
    object-fit: contain;
    flex-shrink: 0;
}

header .tagline {
    font-size: .85rem;
    color: var(--muted);
    letter-spacing: .04em;
    text-transform: uppercase;
}

/* ── MAIN ────────────────────────────────────────────── */
main {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 101px);
    padding: 40px 20px;
    position: relative;
    z-index: 1;
}

/* ── GRID ────────────────────────────────────────────── */
.grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
    width: 100%;
    max-width: 920px;
}

/* ── CARD ────────────────────────────────────────────── */
.card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 44px 28px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    text-decoration: none;
    color: var(--text);
    transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(232,93,4,.08) 0%, transparent 60%);
    opacity: 0;
    transition: opacity .25s ease;
}

.card:hover::before { opacity: 1; }

.card:hover {
    transform: translateY(-6px);
    border-color: var(--accent);
    box-shadow: 0 16px 48px rgba(232,93,4,.25);
}

.card:active { transform: translateY(-2px); }

.card-icon {
    font-size: 3rem;
    line-height: 1;
}

.card-label {
    font-size: 1.4rem;
    font-weight: 700;
    letter-spacing: .02em;
}

.card-desc {
    font-size: .82rem;
    color: var(--muted);
    text-align: center;
}

.card-badge {
    position: absolute;
    top: 14px;
    right: 14px;
    font-size: .65rem;
    padding: 3px 8px;
    border-radius: 20px;
    font-weight: 600;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.badge-mobile {
    background: rgba(232,93,4,.18);
    color: var(--accent2);
    border: 1px solid rgba(232,93,4,.35);
}

.badge-desktop {
    background: rgba(33,110,210,.15);
    color: #79b8ff;
    border: 1px solid rgba(33,110,210,.3);
}

/* ── ACCENT BAR ──────────────────────────────────────── */
.card-bar {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent), var(--accent2));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform .25s ease;
}

.card:hover .card-bar { transform: scaleX(1); }

/* ── FOOTER ──────────────────────────────────────────── */
footer {
    text-align: center;
    padding: 18px;
    font-size: .75rem;
    color: var(--muted);
    border-top: 1px solid var(--border);
    position: relative;
    z-index: 1;
}

/* ── RESPONSIVE ──────────────────────────────────────── */
@media (max-width: 700px) {
    header { padding: 16px 20px; gap: 14px; }
    header img { height: 42px; }

    .grid {
        grid-template-columns: 1fr;
        gap: 18px;
        max-width: 400px;
    }

    .card { padding: 32px 24px; flex-direction: row; justify-content: flex-start; }
    .card-icon { font-size: 2.2rem; }
    .card-label { font-size: 1.2rem; }
}

@media (min-width: 701px) and (max-width: 900px) {
    .grid { grid-template-columns: 1fr 1fr; }
    .grid .card:last-child { grid-column: 1 / -1; max-width: 340px; margin: 0 auto; width: 100%; }
}
