/* ==========================================================================
   Eyecon shared design system
   Dark glassmorphic base. Loaded by every page; page-specific rules stay
   inline in each document.
   ========================================================================== */

:root {
    --bg:            #070B1A;
    --bg-elev:       #0D1428;
    /* Tinted navy, not white. A white-tinted glass let the glow orbs through
       and dropped body text to 2.9:1 on cards sitting over one. This dims what
       is behind while staying translucent enough to still read as glass. */
    --surface:       rgba(26, 35, 66, 0.62);
    --surface-hi:    rgba(34, 45, 82, 0.72);
    --border:        rgba(255, 255, 255, 0.12);
    --border-hi:     rgba(255, 255, 255, 0.24);
    --text:          #EAF0FF;
    --text-dim:      #AEBAD6;
    --primary:       #4D8DFF;
    --primary-hi:    #7AA9FF;
    --accent:        #22E5C8;
    --violet:        #8B5CF6;
    --hot:           #FF6B4A;
    --success:       #2BD98C;
    /* Button fills are a shade deeper than --primary/--violet so white labels
       clear WCAG AA. The lighter tokens stay for text and glow on the dark bg,
       where they already pass. */
    --btn-from:      #2E6BE6;
    --btn-to:        #7C3AED;
    --on-hot:        #1F0A04;
    --radius:        18px;
    --blur:          blur(18px) saturate(140%);
    --ease:          cubic-bezier(0.22, 1, 0.36, 1);
    /* Measured by main.js. The fixed header stacks to ~230px on phones, so
       page content offsets against this rather than a guessed constant. */
    --header-h:      96px;

    /* Legacy aliases. Older inline rules still reference these names. */
    --primary-light: var(--primary-hi);
    --secondary:     var(--hot);
    --dark:          var(--bg);
    --light:         var(--bg-elev);
    --gray:          var(--border);
}

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

body {
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
    -webkit-font-smoothing: antialiased;
}

/* --------------------------------------------------------------------------
   Background: fixed grid texture plus drifting colour glow
   -------------------------------------------------------------------------- */

body::before {
    content: '';
    position: fixed;
    inset: 0;
    z-index: -3;
    pointer-events: none;
    background-image:
        repeating-linear-gradient(0deg,   rgba(255,255,255,0.035) 0 1px, transparent 1px 64px),
        repeating-linear-gradient(90deg,  rgba(255,255,255,0.035) 0 1px, transparent 1px 64px);
    mask-image: radial-gradient(ellipse 120% 90% at 50% 0%, #000 30%, transparent 85%);
    -webkit-mask-image: radial-gradient(ellipse 120% 90% at 50% 0%, #000 30%, transparent 85%);
}

.bg-glow {
    position: fixed;
    inset: 0;
    z-index: -2;
    overflow: hidden;
    pointer-events: none;
}

.bg-glow .orb {
    position: absolute;
    display: block;
    border-radius: 50%;
    filter: blur(70px);
    will-change: transform;
}

.bg-glow .orb-1 {
    top: -12vh;
    right: -10vw;
    width: 46vw;
    height: 46vw;
    min-width: 380px;
    min-height: 380px;
    background: radial-gradient(circle, rgba(77, 141, 255, 0.70) 0%, rgba(77, 141, 255, 0.18) 45%, transparent 72%);
}

.bg-glow .orb-2 {
    top: 42vh;
    left: -14vw;
    width: 52vw;
    height: 52vw;
    min-width: 420px;
    min-height: 420px;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.60) 0%, rgba(139, 92, 246, 0.16) 45%, transparent 72%);
}

.bg-glow .orb-3 {
    top: 88vh;
    right: 12vw;
    width: 34vw;
    height: 34vw;
    min-width: 300px;
    min-height: 300px;
    background: radial-gradient(circle, rgba(34, 229, 200, 0.45) 0%, rgba(34, 229, 200, 0.12) 45%, transparent 72%);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* --------------------------------------------------------------------------
   Scroll reveals
   The hidden state is gated on .js so a failed script leaves content visible.
   -------------------------------------------------------------------------- */

.js [data-reveal] {
    opacity: 0;
    transition:
        opacity 0.6s var(--ease),
        transform 0.6s var(--ease),
        filter 0.6s var(--ease);
    transition-delay: calc(var(--i, 0) * 70ms);
}

.js [data-reveal="up"],
.js [data-reveal=""] { transform: translateY(24px); }
.js [data-reveal="zoom"] { transform: translateY(20px) scale(0.94); }
.js [data-reveal="blur"] { transform: translateY(16px); filter: blur(8px); }

.js [data-reveal].revealed {
    opacity: 1;
    transform: none;
    filter: none;
}

/* --------------------------------------------------------------------------
   Header
   -------------------------------------------------------------------------- */

header {
    padding: 1.2rem 0;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(8, 13, 28, 0.72);
    backdrop-filter: var(--blur);
    -webkit-backdrop-filter: var(--blur);
    border-bottom: 1px solid var(--border);
    transition: padding 0.3s ease, background 0.3s ease, border-color 0.3s ease;
}

header.scrolled {
    padding: 0.8rem 0;
    background: rgba(8, 13, 28, 0.88);
    border-bottom-color: var(--border-hi);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.brand {
    display: flex;
    align-items: center;
}

.logo {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text);
    text-decoration: none;
    display: flex;
    align-items: center;
    margin-right: 8px;
}

.logo span {
    background: linear-gradient(120deg, var(--primary-hi), var(--accent));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.brand-by {
    font-size: 1.8rem;
    font-weight: 500;
    margin-right: 4px;
    color: var(--text-dim);
}

.brand-pcs {
    text-decoration: none;
    color: var(--text);
    font-weight: 600;
    font-size: 1.8rem;
}

.brand-pcs:hover { color: var(--primary-hi); }

.nav-container {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.nav-row {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.nav-row a {
    color: var(--text-dim);
    text-decoration: none;
    font-weight: 500;
    position: relative;
    padding: 0.3rem 0;
    transition: color 0.3s ease;
    font-size: 0.95rem;
}

.nav-row a.active,
.nav-row a:hover { color: var(--text); }

.nav-row a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    border-radius: 2px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    transition: width 0.3s var(--ease);
}

.nav-row a.active::after,
.nav-row a:hover::after { width: 100%; }

.header-actions {
    display: flex;
    gap: 0.5rem;
}

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */

.cta-button {
    position: relative;
    background: linear-gradient(120deg, var(--btn-from) 0%, var(--btn-to) 100%);
    color: #fff;
    border: none;
    padding: 0.7rem 1.5rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    box-shadow: 0 4px 18px rgba(77, 141, 255, 0.35);
    transition: transform 0.25s var(--ease), box-shadow 0.25s ease, filter 0.25s ease;
}

.cta-button:hover {
    transform: translateY(-3px);
    filter: brightness(1.12);
    box-shadow: 0 10px 28px rgba(77, 141, 255, 0.5);
}

.cta-button:active {
    transform: translateY(-1px) scale(0.985);
    box-shadow: 0 4px 14px rgba(77, 141, 255, 0.4);
}

.cta-button.secondary {
    background: linear-gradient(120deg, var(--hot) 0%, #FF9A3D 100%);
    /* Near-black on bright orange reads far better than white, and keeps the
       fill vivid instead of darkening it to carry a white label. */
    color: var(--on-hot);
    font-weight: 700;
    box-shadow: 0 4px 18px rgba(255, 107, 74, 0.35);
}

.cta-button.secondary:hover { box-shadow: 0 10px 28px rgba(255, 107, 74, 0.5); }
.cta-button.secondary:active { box-shadow: 0 4px 14px rgba(255, 107, 74, 0.4); }

.cta-button.ghost {
    background: var(--surface);
    border: 1px solid var(--border-hi);
    box-shadow: none;
    backdrop-filter: var(--blur);
    -webkit-backdrop-filter: var(--blur);
}

.cta-button.ghost:hover {
    background: var(--surface-hi);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35);
}

a:focus-visible,
button:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
    border-radius: 6px;
}

/* --------------------------------------------------------------------------
   Glass surface
   -------------------------------------------------------------------------- */

.glass {
    position: relative;
    background: var(--surface);
    backdrop-filter: var(--blur);
    -webkit-backdrop-filter: var(--blur);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.35),
        inset 0 1px 0 rgba(255, 255, 255, 0.14);
    transition:
        transform 0.35s var(--ease),
        border-color 0.35s ease,
        background 0.35s ease,
        box-shadow 0.35s ease;
}

.glass:hover {
    transform: translateY(-6px);
    background: var(--surface-hi);
    border-color: var(--border-hi);
    box-shadow:
        0 18px 48px rgba(0, 0, 0, 0.45),
        0 0 0 1px rgba(77, 141, 255, 0.18),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

/* Cursor-tracked sheen. Coordinates are written by main.js. */
.glass::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: radial-gradient(
        260px circle at var(--mx, 50%) var(--my, 0%),
        rgba(255, 255, 255, 0.10),
        transparent 62%
    );
    opacity: 0;
    transition: opacity 0.35s ease;
    pointer-events: none;
}

.glass:hover::after { opacity: 1; }

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
    .glass { background: rgba(16, 24, 44, 0.92); }
    .glass:hover { background: rgba(22, 32, 56, 0.95); }
    header { background: rgba(8, 13, 28, 0.97); }
}

/* --------------------------------------------------------------------------
   Shared section furniture
   -------------------------------------------------------------------------- */

.page-header {
    padding: calc(var(--header-h) + 3rem) 0 4rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.page-header h1 {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
    color: var(--text);
}

.page-header p {
    font-size: 1.2rem;
    color: var(--text-dim);
    max-width: 640px;
    margin: 0 auto 2rem;
}

.page-header-content {
    position: relative;
    z-index: 1;
}

.section-title {
    text-align: center;
    margin-bottom: 4rem;
}

.section-title h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
    color: var(--text);
}

.section-title p {
    max-width: 620px;
    margin: 0 auto;
    color: var(--text-dim);
    font-size: 1.1rem;
}

.gradient-text {
    background: linear-gradient(120deg, var(--primary-hi) 0%, var(--accent) 60%, var(--violet) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.band {
    position: relative;
    background: linear-gradient(180deg, transparent, rgba(13, 20, 40, 0.55) 18%, rgba(13, 20, 40, 0.55) 82%, transparent);
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */

.site-footer {
    text-align: center;
    padding: 2.5rem 1.5rem;
    font-size: 0.9rem;
    color: var(--text-dim);
    border-top: 1px solid var(--border);
    position: relative;
    z-index: 1;
}

.site-footer a {
    text-decoration: none;
    color: var(--text-dim);
    font-weight: 500;
    transition: color 0.3s ease;
}

.site-footer a:hover { color: var(--primary-hi); }

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */

@media (max-width: 768px) {
    /* No-JS fallback: the header stacks to roughly this height here. main.js
       sets the exact value inline, which wins over this. */
    :root { --header-h: 240px; }

    .page-header { padding: calc(var(--header-h) + 2rem) 0 3rem; }
    .page-header h1 { font-size: 2.2rem; }
    .section-title h2 { font-size: 2rem; }

    .header-content {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    .nav-container { order: 2; }

    .nav-row {
        justify-content: center;
        gap: 1rem;
    }

    .bg-glow .orb { filter: blur(70px); }
}

@media (max-width: 480px) {
    .nav-row {
        flex-wrap: wrap;
        gap: 0.8rem;
    }

    .nav-row a { font-size: 0.9rem; }

    .logo,
    .brand-by,
    .brand-pcs { font-size: 1.5rem; }
}

/* --------------------------------------------------------------------------
   Reduced motion
   Parallax, pointer tracking and every ambient loop stop. Content still
   appears, it just appears immediately.
   -------------------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
        scroll-behavior: auto !important;
    }

    .js [data-reveal] {
        opacity: 1;
        transform: none;
        filter: none;
        transition-delay: 0ms;
    }

    .glass:hover { transform: none; }
    .glass::after { display: none; }
    .cta-button:hover { transform: none; }
    .bg-glow .orb { will-change: auto; }
}
