/* ============================================
   perfectStore.app — Shared Design System
   ============================================ */

:root {
    --black: #000000;
    --black-soft: #0a0a0a;
    --black-card: #111111;
    --orange: #ff6600;
    --orange-light: #ff8533;
    --orange-dark: #cc5200;
    --green: #22c55e;
    --purple: #8b5cf6;
    --red: #ef4444;
    --white: #ffffff;
    --gray-50: #fafafa;
    --gray-100: #f8fafc;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e1;
    --gray-400: #94a3b8;
    --gray-500: #64748b;
    --gray-600: #475569;
    --gray-700: #334155;
    --gray-800: #1e293b;
    --gray-900: #0f172a;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

html { scroll-behavior: smooth; }

body {
    background: var(--white);
    color: var(--gray-900);
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

/* ---- NAV ---- */
.ps-nav {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 100;
    backdrop-filter: blur(12px);
    background: rgba(255,255,255,0.95);
    border-bottom: 1px solid rgba(0,0,0,0.08);
}

.ps-nav-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.ps-logo {
    font-size: 20px;
    font-weight: 800;
    color: var(--black);
    text-decoration: none;
    letter-spacing: -0.5px;
}

.ps-logo span { color: var(--orange); }

.ps-nav-links {
    display: flex;
    align-items: center;
    gap: 32px;
}

.ps-nav-links a {
    font-size: 14px;
    font-weight: 500;
    color: var(--gray-600);
    text-decoration: none;
    transition: color 0.2s;
}

.ps-nav-links a:hover { color: var(--black); }

.ps-nav-links a.active {
    color: var(--orange);
    font-weight: 600;
}

.ps-nav-cta {
    display: flex;
    align-items: center;
    gap: 12px;
}

.ps-nav-cta .btn-ghost {
    font-size: 14px;
    font-weight: 600;
    color: var(--black);
    text-decoration: none;
    padding: 8px 16px;
    border: 2px solid var(--black);
    border-radius: 8px;
    transition: all 0.2s;
}

.ps-nav-cta .btn-ghost:hover {
    background: var(--black);
    color: var(--white);
}

/* Mobile nav */
.ps-mobile-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

.ps-mobile-toggle svg { width: 24px; height: 24px; }

.ps-mobile-menu {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 200;
    background: var(--white);
    padding: 24px;
    flex-direction: column;
}

.ps-mobile-menu.open { display: flex; }

.ps-mobile-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 48px;
}

.ps-mobile-menu-close {
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

.ps-mobile-menu-close svg { width: 24px; height: 24px; }

.ps-mobile-menu-links {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.ps-mobile-menu-links a {
    font-size: 18px;
    font-weight: 600;
    color: var(--gray-700);
    text-decoration: none;
    padding: 16px 0;
    border-bottom: 1px solid var(--gray-200);
    transition: color 0.2s;
}

.ps-mobile-menu-links a:hover { color: var(--orange); }

.ps-mobile-menu-cta {
    margin-top: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding-top: 32px;
}

@media (max-width: 768px) {
    .ps-nav-links, .ps-nav-cta { display: none; }
    .ps-mobile-toggle { display: block; }
}

/* ---- BUTTONS ---- */
.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: var(--orange);
    color: var(--white);
    font-size: 16px;
    font-weight: 700;
    padding: 14px 28px;
    border-radius: 10px;
    border: none;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.25s;
}

.btn-primary:hover {
    background: var(--orange-dark);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(255,102,0,0.3);
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: transparent;
    color: var(--black);
    font-size: 16px;
    font-weight: 700;
    padding: 14px 28px;
    border-radius: 10px;
    border: 2px solid var(--black);
    cursor: pointer;
    text-decoration: none;
    transition: all 0.25s;
}

.btn-secondary:hover {
    background: var(--black);
    color: var(--white);
}

.btn-white {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: var(--white);
    color: var(--black);
    font-size: 16px;
    font-weight: 700;
    padding: 14px 28px;
    border-radius: 10px;
    border: none;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.25s;
}

.btn-white:hover {
    background: var(--gray-100);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
}

/* ---- SECTIONS ---- */
.section { padding: 96px 24px; }
.section-dark { background: var(--black-soft); color: var(--white); }
.section-light { background: var(--gray-50); }
.section-orange { background: var(--orange); color: var(--white); }

.container { max-width: 1200px; margin: 0 auto; }
.container-sm { max-width: 800px; margin: 0 auto; }

/* ---- TYPOGRAPHY ---- */
.heading-xl {
    font-size: clamp(40px, 7vw, 72px);
    font-weight: 800;
    line-height: 1.05;
    letter-spacing: -2px;
}

.heading-lg {
    font-size: clamp(28px, 4vw, 44px);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -1px;
}

.heading-md {
    font-size: clamp(22px, 3vw, 32px);
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.5px;
}

.heading-sm {
    font-size: 20px;
    font-weight: 700;
    line-height: 1.3;
}

.text-lg { font-size: 18px; line-height: 1.6; }
.text-md { font-size: 16px; line-height: 1.6; }
.text-sm { font-size: 14px; line-height: 1.5; }
.text-xs { font-size: 12px; line-height: 1.5; }

.text-orange { color: var(--orange); }
.text-white { color: var(--white); }
.text-muted { color: var(--gray-500); }
.text-muted-light { color: rgba(255,255,255,0.7); }
.text-center { text-align: center; }

.tag {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    padding: 6px 14px;
    border-radius: 6px;
}

.tag-orange {
    background: rgba(255,102,0,0.1);
    color: var(--orange);
}

.tag-orange-solid {
    background: var(--orange);
    color: var(--white);
}

.tag-white {
    background: rgba(255,255,255,0.15);
    color: var(--white);
}

/* ---- CARDS ---- */
.card {
    background: var(--white);
    border-radius: 16px;
    padding: 32px;
    border: 1px solid var(--gray-200);
    transition: all 0.3s;
}

.card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.08);
    border-color: var(--orange);
}

.card-dark {
    background: var(--black-card);
    border-radius: 16px;
    padding: 32px;
    border: 1px solid rgba(255,255,255,0.06);
    transition: all 0.3s;
}

.card-dark:hover {
    border-color: rgba(255,102,0,0.3);
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
}

.card-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    font-size: 20px;
}

.card-icon-orange { background: rgba(255,102,0,0.1); color: var(--orange); }
.card-icon-red { background: rgba(239,68,68,0.1); color: var(--red); }
.card-icon-green { background: rgba(34,197,94,0.1); color: var(--green); }
.card-icon-purple { background: rgba(139,92,246,0.1); color: var(--purple); }
.card-icon-orange-dark { background: rgba(255,102,0,0.15); color: var(--orange); }

/* ---- GRID ---- */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }

@media (max-width: 1024px) {
    .grid-4 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
    .section { padding: 64px 20px; }
}

/* ---- FOOTER ---- */
.ps-footer {
    background: var(--gray-900);
    color: var(--white);
    padding: 64px 24px 32px;
}

.ps-footer-inner {
    max-width: 1200px;
    margin: 0 auto;
}

.ps-footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 48px;
    margin-bottom: 48px;
}

.ps-footer-brand {
    font-size: 22px;
    font-weight: 800;
    margin-bottom: 12px;
}

.ps-footer-brand span { color: var(--orange); }

.ps-footer-desc {
    color: var(--gray-400);
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 16px;
}

.ps-footer-col h4 {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--gray-400);
    margin-bottom: 16px;
}

.ps-footer-col a {
    display: block;
    font-size: 14px;
    color: var(--gray-400);
    text-decoration: none;
    padding: 4px 0;
    transition: color 0.2s;
}

.ps-footer-col a:hover { color: var(--white); }

.ps-footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.08);
    padding-top: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
}

.ps-footer-bottom p {
    font-size: 13px;
    color: var(--gray-500);
}

.ps-footer-bottom a {
    font-size: 13px;
    color: var(--gray-500);
    text-decoration: none;
    transition: color 0.2s;
}

.ps-footer-bottom a:hover { color: var(--white); }

@media (max-width: 768px) {
    .ps-footer-grid { grid-template-columns: 1fr; gap: 32px; }
    .ps-footer-bottom { flex-direction: column; text-align: center; }
}

/* ---- MODAL ---- */
.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 300;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-box {
    background: var(--white);
    border-radius: 20px;
    width: 100%;
    max-width: 440px;
    max-height: 90vh;
    overflow-y: auto;
    transform: scale(0.9) translateY(16px);
    transition: transform 0.3s;
}

.modal-overlay.active .modal-box {
    transform: scale(1) translateY(0);
}

.modal-header {
    padding: 24px 24px 0;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.modal-header h2 { font-size: 22px; font-weight: 800; }
.modal-header p { font-size: 14px; color: var(--gray-500); margin-top: 4px; }

.modal-close {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--gray-400);
    padding: 4px;
    transition: color 0.2s;
}

.modal-close:hover { color: var(--black); }

.modal-body { padding: 24px; }

.form-group { margin-bottom: 16px; }

.form-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 6px;
}

.form-input {
    width: 100%;
    padding: 12px 14px;
    font-size: 15px;
    border: 2px solid var(--gray-200);
    border-radius: 10px;
    transition: border-color 0.2s;
    outline: none;
    font-family: 'Inter', sans-serif;
}

.form-input:focus { border-color: var(--orange); }

.form-textarea { resize: vertical; min-height: 100px; }

/* ---- PILLAR NAV (for main page) ---- */
.pillar-card {
    background: var(--black-card);
    border-radius: 20px;
    padding: 40px;
    position: relative;
    overflow: hidden;
    transition: all 0.35s;
    text-decoration: none;
    display: block;
    border: 1px solid rgba(255,255,255,0.04);
}

.pillar-card:hover {
    transform: translateY(-8px);
    border-color: rgba(255,255,255,0.1);
}

.pillar-card .pillar-glow {
    position: absolute;
    top: -60%; right: -30%;
    width: 300px; height: 300px;
    border-radius: 50%;
    pointer-events: none;
    transition: opacity 0.35s;
    opacity: 0.5;
}

.pillar-card:hover .pillar-glow { opacity: 1; }

.pillar-card .pillar-bar {
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
}

.pillar-card .pillar-tag {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 16px;
    display: inline-block;
}

.pillar-card h3 {
    font-size: 28px;
    font-weight: 800;
    color: var(--white);
    margin-bottom: 12px;
    letter-spacing: -0.5px;
}

.pillar-card p {
    font-size: 15px;
    color: rgba(255,255,255,0.6);
    line-height: 1.5;
    margin-bottom: 24px;
}

.pillar-card .pillar-cta {
    font-size: 14px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: gap 0.2s;
}

.pillar-card:hover .pillar-cta { gap: 10px; }

/* ---- ANIMATIONS ---- */
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(24px); }
    to { opacity: 1; transform: translateY(0); }
}

.animate-in {
    opacity: 0;
    transform: translateY(24px);
    transition: all 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.animate-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ---- STATS ---- */
.stat-block { text-align: center; }

.stat-number {
    font-size: clamp(36px, 5vw, 56px);
    font-weight: 800;
    letter-spacing: -2px;
    line-height: 1;
    margin-bottom: 8px;
}

.stat-label {
    font-size: 14px;
    line-height: 1.4;
}

/* ---- MISC ---- */
.divider {
    height: 1px;
    background: var(--gray-200);
    margin: 0 auto;
    max-width: 1200px;
}

.spacer-sm { height: 24px; }
.spacer-md { height: 48px; }
.spacer-lg { height: 80px; }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}