/* =============================================
   PARALLAK — CHARTE GRAPHIQUE DESIGN SYSTEM
   ============================================= */

:root {
    /* ── Brand Colors ── */
    --brand: #0005F8;
    --brand-dark: #0000CC;
    --brand-light: #4D51FF;

    /* ── Theme: Dark (Default) ── */
    --bg: #0A0A0A;
    --surface: #141414;
    --surface-glass: rgba(20, 20, 20, 0.6);
    --text: #F2F2F2;
    --text-muted: #888888;
    --border: rgba(255, 255, 255, 0.08);
    --border-hover: rgba(255, 255, 255, 0.15);

    /* ── Hardcoded ── */
    --dark: #0A0A0A;
    --light: #F2F2F2;

    /* ── Semantic ── */
    --success: #10B981;
    --danger: #EF4444;

    /* ── Typography ── */
    --font-sans: 'Manrope', sans-serif;
    --font-serif: 'Playfair Display', serif;

    /* ── Shadows ── */
    --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.2), 0 4px 6px -2px rgba(0, 0, 0, 0.1);
    --shadow-brand: 0 10px 30px -10px rgba(0, 5, 248, 0.4);
    --blur: blur(16px);
}

/* ── Theme: Light ── */
[data-theme="light"] {
    --bg: #F2F2F2;
    --surface: #FFFFFF;
    --surface-glass: rgba(255, 255, 255, 0.8);
    --text: #0A0A0A;
    --text-muted: #666666;
    --border: rgba(0, 0, 0, 0.08);
    --border-hover: rgba(0, 0, 0, 0.15);
}

/* =============================================
   RESET & BASE
   ============================================= */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
    scroll-behavior: smooth;
    scroll-padding-top: 90px;
}

body {
    background-color: var(--bg);
    color: var(--text);
    font-family: var(--font-sans);
    font-weight: 400;
    line-height: 1.6;
    overflow-x: hidden;
    transition: background-color 0.4s, color 0.4s;
}

::selection { background: var(--brand); color: #fff; }

img { max-width: 100%; display: block; }
a { color: inherit; }
button { font-family: inherit; }

/* =============================================
   UTILITIES
   ============================================= */
.text-brand   { color: var(--brand); }
.text-muted   { color: var(--text-muted); }
.text-center  { text-align: center; }
.text-sm      { font-size: 0.875rem; }
.text-xs      { font-size: 0.75rem; }
.text-xl      { font-size: 1.25rem; }
.font-bold    { font-weight: 700; }
.uppercase    { text-transform: uppercase; }
.mx-auto      { margin-left: auto; margin-right: auto; }
.mb-2         { margin-bottom: 0.5rem; }
.mb-3         { margin-bottom: 1rem; }
.mb-4         { margin-bottom: 2rem; }
.mt-2         { margin-top: 0.5rem; }
.mt-4         { margin-top: 2rem; }
.relative     { position: relative; }
.overflow-hidden { overflow: hidden; }
.z-10         { z-index: 10; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.flex-col     { display: flex; flex-direction: column; align-items: flex-start; }
.gap-3        { gap: 1rem; }

/* =============================================
   BACKGROUNDS & EFFECTS
   ============================================= */
.noise {
    position: fixed; inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.05'/%3E%3C/svg%3E");
    pointer-events: none;
    z-index: 40;
    opacity: 0.3;
}
[data-theme="light"] .noise { opacity: 0.12; }

.blob {
    position: fixed;
    border-radius: 50%;
    filter: blur(100px);
    z-index: -1;
    opacity: 0.12;
    animation: blob-float 20s infinite alternate;
}
.blob-1 { top: -10%; left: -10%; width: 600px; height: 600px; background: var(--brand); }
.blob-2 { bottom: -20%; right: -10%; width: 800px; height: 600px; background: var(--brand-light); animation-delay: -10s; }
.blob-mini { position: absolute; top: -20px; right: -20px; width: 150px; height: 150px; background: var(--brand); filter: blur(40px); border-radius: 50%; opacity: 0.2; }

@keyframes blob-float {
    0%   { transform: translate(0, 0) scale(1); }
    100% { transform: translate(100px, 50px) scale(1.1); }
}

/* =============================================
   LAYOUT
   ============================================= */
.container { width: 100%; max-width: 1100px; margin: 0 auto; padding: 0 2rem; }
.section { padding: 5rem 0; }
.divider { height: 1px; width: 100%; background: linear-gradient(90deg, transparent, var(--border) 50%, transparent); }
.full-width { grid-column: 1 / -1; }

/* =============================================
   GLASS PANELS
   ============================================= */
.glass-panel {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 2.5rem;
    box-shadow: var(--shadow-sm);
    transition: transform 0.3s, box-shadow 0.3s, border-color 0.3s, background 0.4s;
}
.glass-panel:hover {
    border-color: var(--border-hover);
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}
.glass {
    background: var(--surface-glass);
    backdrop-filter: var(--blur);
    -webkit-backdrop-filter: var(--blur);
}

/* =============================================
   HEADER
   ============================================= */
.header {
    position: fixed; top: 0; left: 0; width: 100%; z-index: 100;
    border-bottom: 1px solid var(--border);
    background: transparent;
    transition: background 0.3s, backdrop-filter 0.3s;
}
.header.scrolled {
    background: var(--surface-glass);
    backdrop-filter: var(--blur);
    -webkit-backdrop-filter: var(--blur);
}
.header-inner {
    display: flex; justify-content: space-between; align-items: center;
    height: 70px;
}
.logo-text {
    font-family: var(--font-sans); font-weight: 800; font-size: 1.2rem;
    letter-spacing: -0.5px; text-decoration: none;
    display: flex; align-items: center; gap: 0.75rem;
}
.main-nav { display: flex; gap: 1.5rem; margin-left: auto; margin-right: 1.5rem; }
.nav-link {
    color: var(--text-muted); text-decoration: none;
    font-size: 0.9rem; font-weight: 600;
    transition: color 0.3s; position: relative; padding: 0.5rem 0;
}
.nav-link:hover, .nav-link.active { color: var(--text); }
.nav-link::after {
    content: ''; position: absolute; bottom: 0; left: 50%; transform: translateX(-50%);
    width: 0; height: 2px; background: var(--brand); transition: width 0.3s;
}
.nav-link:hover::after, .nav-link.active::after { width: 100%; }

.scroll-progress-bar { width: 100%; height: 2px; background: transparent; position: absolute; bottom: -1px; left: 0; }
.scroll-progress { height: 100%; background: var(--brand); width: 0%; transition: width 80ms linear; }

/* =============================================
   BADGES
   ============================================= */
.badge {
    display: inline-flex; align-items: center;
    padding: 0.2rem 0.6rem; border-radius: 100px;
    font-size: 0.7rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px;
    background: rgba(0, 5, 248, 0.08); color: var(--brand);
}
.badge-brand { background: rgba(0, 5, 248, 0.12); color: var(--brand); }
.badge-outline { background: transparent; border: 1px solid var(--border); color: var(--text-muted); }
.badge-group { display: flex; gap: 0.4rem; flex-wrap: wrap; }

/* =============================================
   BUTTONS
   ============================================= */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
    padding: 0.8rem 1.8rem; border-radius: 100px;
    font-family: var(--font-sans); font-weight: 600; font-size: 0.95rem;
    cursor: pointer; text-decoration: none;
    transition: all 0.3s cubic-bezier(0.25, 1, 0.5, 1);
    border: none; position: relative; overflow: hidden;
}
.btn-sm { padding: 0.45rem 0.9rem; font-size: 0.8rem; }

.btn-primary {
    background: var(--brand); color: #fff;
    box-shadow: 0 4px 14px -4px rgba(0, 5, 248, 0.4);
}
.btn-primary:hover { background: var(--brand-dark); transform: translateY(-2px); box-shadow: var(--shadow-brand); }

.btn-secondary {
    background: transparent; color: var(--text);
    border: 1px solid var(--border);
}
.btn-secondary:hover { border-color: var(--brand); color: var(--brand); transform: translateY(-2px); }

.btn-outline {
    background: transparent; color: var(--brand);
    border: 1px solid var(--brand);
}
.btn-outline:hover { background: var(--brand); color: #fff; transform: translateY(-2px); }

.btn-icon {
    width: 36px; height: 36px; border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    background: var(--surface); border: 1px solid var(--border);
    color: var(--text); font-size: 1.1rem; transition: all 0.3s; text-decoration: none;
}
.btn-icon:hover { background: var(--brand); color: #fff; border-color: var(--brand); transform: translateY(-2px); }

.link-animated {
    color: var(--text); font-weight: 600; text-decoration: none;
    position: relative; display: inline-block;
}
.link-animated::after {
    content: ''; position: absolute; bottom: -2px; left: 0;
    width: 100%; height: 2px; background: var(--brand);
    transform: scaleX(0); transform-origin: right; transition: transform 0.3s;
}
.link-animated:hover::after { transform: scaleX(1); transform-origin: left; }

/* =============================================
   HERO
   ============================================= */
.hero { padding: 10rem 0 5rem; }
.hero-pill {
    display: inline-block; margin-bottom: 1.5rem;
    padding: 0.5rem 1.25rem; border-radius: 100px;
    font-size: 0.85rem; font-weight: 600; color: var(--brand);
    background: linear-gradient(90deg, rgba(0,5,248,0.05), rgba(0,5,248,0.15) 50%, rgba(0,5,248,0.05));
    background-size: 200% 100%;
    animation: shimmer-pill 6s infinite linear;
    border: 1px solid rgba(0, 5, 248, 0.2);
}
@keyframes shimmer-pill { 100% { background-position: -200% 0; } }

.display-title {
    font-family: var(--font-serif); font-size: clamp(2.5rem, 6vw, 5rem);
    line-height: 1.1; font-weight: 600; margin-bottom: 1.5rem;
}
.subtitle {
    font-size: clamp(1rem, 2vw, 1.2rem); color: var(--text-muted); max-width: 700px;
}

/* =============================================
   SECTIONS
   ============================================= */
.section-header { margin-bottom: 3rem; max-width: 600px; }
.section-title {
    font-family: var(--font-serif); font-size: clamp(1.8rem, 4vw, 2.5rem);
    margin-bottom: 0.5rem;
}
.section-desc { color: var(--text-muted); font-size: 1.05rem; }

/* =============================================
   COLOR GRID
   ============================================= */
.color-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1.25rem; }

.color-card {
    cursor: pointer; border-radius: 20px; overflow: hidden;
    background: var(--surface); border: 1px solid var(--border);
    transition: transform 0.3s, box-shadow 0.3s;
}
.color-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }

.color-swatch {
    height: 130px; width: 100%;
    display: flex; align-items: center; justify-content: center;
    position: relative;
}
.swatch-dark { border-bottom: 1px solid var(--border); }
.swatch-light { border-bottom: 1px solid rgba(0,0,0,0.08); }

.color-meta { padding: 1rem 1.25rem; }
.color-meta h3 { font-size: 0.95rem; margin-bottom: 0.15rem; }
.color-role { font-size: 0.7rem; color: var(--text-muted); display: block; margin-bottom: 0.25rem; }
.hex-code { font-family: 'Courier New', monospace; color: var(--brand-light); font-size: 0.85rem; display: block; }

.copy-hint {
    opacity: 0; transform: translateY(8px);
    background: rgba(0,0,0,0.6); backdrop-filter: blur(4px); color: #fff;
    padding: 0.3rem 0.7rem; border-radius: 100px; font-size: 0.75rem; font-weight: 600;
    transition: all 0.3s; display: flex; align-items: center; gap: 0.3rem;
    position: absolute;
}
.copy-hint-dark { background: rgba(0,0,0,0.7); color: #333; }
.color-card:hover .copy-hint { opacity: 1; transform: translateY(0); }

/* =============================================
   TYPOGRAPHY
   ============================================= */
.typo-overview { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; margin-bottom: 2rem; }
.weights-display {
    display: flex; flex-wrap: wrap; gap: 1rem; font-size: 1rem;
    padding-top: 1rem; border-top: 1px solid var(--border);
}

.typo-scale .scale-row {
    display: flex; align-items: center; gap: 2rem;
    padding: 1.25rem 0; border-bottom: 1px solid var(--border);
}
.typo-scale .scale-row:last-child { border-bottom: none; }
.scale-heading { font-size: 0.8rem; font-weight: 700; color: var(--brand); text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 1rem; }
.scale-label { min-width: 120px; font-weight: 600; flex-shrink: 0; }
.scale-preview { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* =============================================
   UI GRID
   ============================================= */
.ui-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1.5rem; }
.demo-card { padding: 1.25rem; border-radius: 16px; border: 1px solid var(--border); margin-top: 0.75rem; }
.demo-icon {
    width: 44px; height: 44px; border-radius: 12px;
    background: rgba(0,5,248,0.1); color: var(--brand);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.4rem; margin-bottom: 0.75rem;
}

/* ── Form Inputs ── */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
.form-group { display: flex; flex-direction: column; gap: 0.4rem; }
.form-label { font-size: 0.85rem; font-weight: 600; }
.form-input {
    width: 100%; padding: 0.75rem 1rem; border-radius: 12px;
    background: transparent; border: 1px solid var(--border);
    color: var(--text); font-family: var(--font-sans); outline: none;
    transition: border-color 0.3s, box-shadow 0.3s;
}
.form-input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(0,5,248,0.1); }
.form-input:disabled { opacity: 0.5; cursor: not-allowed; }

/* =============================================
   RULES BOX
   ============================================= */
.rules-box { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; }
.rule { display: flex; gap: 0.75rem; align-items: flex-start; }
.rule-icon { font-size: 1.4rem; flex-shrink: 0; margin-top: 2px; }
.rule-icon-ok { color: var(--success); }
.rule-icon-no { color: var(--danger); }

/* =============================================
   LOGOS GRID
   ============================================= */
.logo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1.5rem; }
.logo-card { padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.logo-preview {
    height: 180px; display: flex; align-items: center; justify-content: center;
    padding: 1.5rem;
}
.logo-preview img {
    max-height: 100%; object-fit: contain;
    filter: drop-shadow(0 4px 12px rgba(0,0,0,0.12));
    transition: transform 0.4s;
}
.logo-card:hover .logo-preview img { transform: scale(1.05); }
.logo-sm { max-height: 90px !important; }
.logo-md { max-height: 110px !important; }

.surface-light { background: #fff; }
.surface-dark  { background: #0A0A0A; }
.checkered-bg {
    background-image:
        repeating-linear-gradient(45deg, #eee 25%, transparent 25%, transparent 75%, #eee 75%),
        repeating-linear-gradient(45deg, #eee 25%, #fff 25%, #fff 75%, #eee 75%);
    background-position: 0 0, 10px 10px;
    background-size: 20px 20px;
}
.checkered-dark-bg {
    background-image:
        repeating-linear-gradient(45deg, #1a1a1a 25%, transparent 25%, transparent 75%, #1a1a1a 75%),
        repeating-linear-gradient(45deg, #1a1a1a 25%, #0d0d0d 25%, #0d0d0d 75%, #1a1a1a 75%);
    background-position: 0 0, 10px 10px;
    background-size: 20px 20px;
}

.logo-info { padding: 1.25rem; border-top: 1px solid var(--border); flex-grow: 1; }
.logo-info h3 { font-size: 1rem; }
.logo-info p { font-size: 0.85rem; color: var(--text-muted); margin-top: 0.35rem; }

/* =============================================
   DOWNLOAD ACTIONS
   ============================================= */
.download-actions {
    display: flex; flex-wrap: wrap; gap: 1rem;
    justify-content: center; margin-top: 3rem;
}

/* =============================================
   FOOTER
   ============================================= */
.footer { padding: 4rem 0 3rem; }
.footer-logo { height: 28px; margin: 0 auto 1rem; }
[data-theme="light"] .footer-logo { filter: brightness(0); }

/* =============================================
   TOAST
   ============================================= */
.toast {
    position: fixed; bottom: 2rem; left: 50%;
    background: var(--surface); color: var(--text);
    padding: 0.8rem 1.4rem; border-radius: 12px;
    box-shadow: var(--shadow-md); border: 1px solid var(--border);
    transform: translate(-50%, 80px); opacity: 0;
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    z-index: 1000; font-weight: 600; pointer-events: none;
    display: flex; align-items: center; gap: 0.5rem;
}
.toast .bx { color: var(--success); }
.toast.show { transform: translate(-50%, 0); opacity: 1; }

/* =============================================
   SCROLL ANIMATIONS
   ============================================= */
.section-fade-up {
    opacity: 0; transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}
.section-fade-up.is-visible { opacity: 1; transform: translateY(0); }

/* =============================================
   RESPONSIVE
   ============================================= */
@media (max-width: 768px) {
    .main-nav { display: none; }
    .typo-overview { grid-template-columns: 1fr; }
    .typo-scale .scale-row { flex-direction: column; align-items: flex-start; gap: 0.5rem; }
    .rules-box { grid-template-columns: 1fr; }
    .form-grid { grid-template-columns: 1fr; }
    .hero { padding: 8rem 0 3rem; }
    .download-actions { flex-direction: column; align-items: center; }
}
