/* ===================================================
   CELESDEV SOLUTIONS — SHARED STYLESHEET
   Extracted common styles used across all pages.
   Page-specific styles remain in each HTML file.
   =================================================== */

/* ===== CSS CUSTOM PROPERTIES ===== */
:root {
    --color-bg: #0a0b0f;
    --color-bg-alt: #101219;
    --color-bg-card: #14161e;
    --color-bg-elevated: #1a1d28;
    --color-surface: #1e2130;
    --color-border: rgba(255,255,255,0.06);
    --color-border-hover: rgba(255,255,255,0.12);
    --color-text: #e8e9ed;
    --color-text-muted: #8b8fa3;
    --color-text-dim: #5c6077;
    --color-accent: #4f7df5;
    --color-accent-light: #6b93ff;
    --color-accent-glow: rgba(79,125,245,0.15);
    --color-accent-secondary: #00d4aa;
    --color-accent-warm: #f5a623;
    --color-gradient-start: #4f7df5;
    --color-gradient-end: #00d4aa;
    --font-display: 'Instrument Serif', Georgia, serif;
    --font-body: 'DM Sans', system-ui, sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
    --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-out-quart: cubic-bezier(0.25, 1, 0.5, 1);
    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-xl: 28px;
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
    font-size: 16px;
}

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

::selection { background: var(--color-accent); color: white; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }

/* ===== LAYOUT ===== */
.container { max-width: 1280px; margin: 0 auto; padding: 0 clamp(1.25rem, 4vw, 3rem); }
.container--narrow { max-width: 960px; }
.container--wide { max-width: 1440px; }

/* ===== SECTION UTILITIES ===== */
.section-label {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    font-weight: 500;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--color-accent);
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 1.25rem;
}
.section-label::before {
    content: '';
    width: 28px;
    height: 1px;
    background: var(--color-accent);
}

.section-title {
    font-family: var(--font-display);
    font-size: clamp(2.2rem, 5vw, 3.8rem);
    font-weight: 400;
    line-height: 1.15;
    color: var(--color-text);
    margin-bottom: 1.5rem;
}
.section-title em {
    font-style: italic;
    background: linear-gradient(135deg, var(--color-gradient-start), var(--color-gradient-end));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-subtitle {
    font-size: 1.1rem;
    color: var(--color-text-muted);
    max-width: 640px;
    line-height: 1.8;
}

.section-padding { padding: clamp(5rem, 10vw, 8rem) 0; }

.gradient-line {
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--color-accent), var(--color-accent-secondary), transparent);
    opacity: 0.3;
}

/* ===== SCROLL REVEAL ===== */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.9s var(--ease-out-expo), transform 0.9s var(--ease-out-expo);
}
.reveal.visible { opacity: 1; transform: translateY(0); }
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }
.reveal-delay-5 { transition-delay: 0.5s; }

/* ===== NAVIGATION ===== */
/* Sub-pages: navbar is always opaque.
   index.html overrides this to start transparent and
   transitions to opaque on scroll via the .scrolled class. */
.navbar {
    position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
    background: rgba(10, 11, 15, 0.85);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    box-shadow: 0 1px 0 var(--color-border);
    padding: 0 clamp(1.25rem, 4vw, 3rem);
}
.navbar__inner {
    max-width: 1440px; margin: 0 auto;
    display: flex; align-items: center; justify-content: space-between; height: 76px;
}
.navbar__logo {
    display: flex; align-items: center; gap: 10px;
    font-weight: 700; font-size: 1.2rem; letter-spacing: -0.02em;
}
.navbar__logo img { height: 36px; width: auto; }
.navbar__logo-mark {
    width: 36px; height: 36px; border-radius: 10px;
    background: linear-gradient(135deg, var(--color-gradient-start), var(--color-gradient-end));
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 0.85rem; color: white;
}
.navbar__links {
    display: flex; align-items: center; gap: 2rem; list-style: none;
}
.navbar__links a {
    font-size: 0.85rem; font-weight: 500; color: var(--color-text-muted);
    transition: color 0.3s;
}
.navbar__links a:hover, .navbar__links a.active { color: var(--color-text); }
.navbar__dropdown { position: relative; }
.navbar__dropdown-toggle {
    display: flex; align-items: center; gap: 5px;
    font-size: 0.85rem; font-weight: 500; color: var(--color-text-muted);
    background: none; border: none; cursor: pointer;
    font-family: var(--font-body); transition: color 0.3s; padding: 0;
}
.navbar__dropdown-toggle:hover { color: var(--color-text); }
.navbar__dropdown-toggle svg { transition: transform 0.25s var(--ease-out-expo); }
.navbar__dropdown.open .navbar__dropdown-toggle { color: var(--color-text); }
.navbar__dropdown.open .navbar__dropdown-toggle svg { transform: rotate(180deg); }
.navbar__dropdown-menu {
    position: absolute; top: calc(100% + 14px); left: 50%;
    transform: translateX(-50%) translateY(6px);
    min-width: 170px; background: rgba(18,20,28,0.97);
    backdrop-filter: blur(16px); border: 1px solid rgba(255,255,255,0.07);
    border-radius: 12px; padding: 6px;
    opacity: 0; pointer-events: none;
    transition: opacity 0.2s, transform 0.2s var(--ease-out-expo);
    z-index: 100;
}
.navbar__dropdown.open .navbar__dropdown-menu {
    opacity: 1; pointer-events: auto; transform: translateX(-50%) translateY(0);
}
.navbar__dropdown-menu a {
    display: block; padding: 9px 14px; border-radius: 8px;
    font-size: 0.82rem; color: var(--color-text-muted);
    transition: background 0.15s, color 0.15s; white-space: nowrap;
}
.navbar__dropdown-menu a:hover { background: rgba(79,125,245,0.12); color: var(--color-text); }
.navbar__cta {
    font-size: 0.82rem; font-weight: 600; padding: 10px 24px; border-radius: 100px;
    background: var(--color-accent); color: white;
    transition: transform 0.3s var(--ease-out-expo), box-shadow 0.3s;
}
.navbar__cta:hover { transform: translateY(-1px); box-shadow: 0 8px 30px rgba(79,125,245,0.3); }

/* ===== PAGE HERO (sub-pages only) ===== */
.page-hero {
    padding: 140px 0 60px;
    border-bottom: 1px solid var(--color-border);
    position: relative; overflow: hidden;
}
.page-hero__bg { position: absolute; inset: 0; }
.page-hero__content { position: relative; z-index: 1; }
.page-hero__label {
    font-family: var(--font-mono); font-size: 0.7rem; font-weight: 500;
    letter-spacing: 0.2em; text-transform: uppercase; color: var(--color-accent);
    display: flex; align-items: center; gap: 12px; margin-bottom: 1.25rem;
}
.page-hero__label::before { content: ''; width: 28px; height: 1px; background: currentColor; }
.page-hero__title {
    font-family: var(--font-display); font-size: clamp(2.4rem, 5vw, 3.5rem);
    font-weight: 400; line-height: 1.15; margin-bottom: 1.25rem;
}
.page-hero__title em {
    font-style: italic;
    background: linear-gradient(135deg, var(--color-gradient-start), var(--color-gradient-end));
    -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.page-hero__desc {
    font-size: 1.1rem; color: var(--color-text-muted); max-width: 640px; line-height: 1.8;
}

/* ===== SUB-FOOTER ===== */
.sub-footer {
    border-top: 1px solid var(--color-border); padding: 2rem 0;
    display: flex; justify-content: space-between; align-items: center;
    font-size: 0.8rem; color: var(--color-text-dim);
}
.sub-footer a { color: var(--color-text-muted); transition: color 0.3s; }
.sub-footer a:hover { color: var(--color-accent); }

/* ===== MOBILE NAV ===== */
.navbar__mobile-toggle {
    display: none; flex-direction: column; gap: 5px; width: 28px; padding: 4px 0;
}
.navbar__mobile-toggle span {
    display: block; height: 2px; background: var(--color-text);
    border-radius: 2px; transition: transform 0.3s, opacity 0.3s;
}
.mobile-menu {
    display: none; position: fixed; inset: 0; z-index: 999;
    background: rgba(10,11,15,0.97); backdrop-filter: blur(20px);
    flex-direction: column; align-items: center; justify-content: center; gap: 2rem;
}
.mobile-menu.open { display: flex; }
.mobile-menu a {
    font-family: var(--font-display); font-size: 2rem;
    color: var(--color-text-muted); transition: color 0.3s;
}
.mobile-menu a:hover { color: var(--color-text); }
.mobile-menu__close {
    position: absolute; top: 24px; right: 24px;
    font-size: 2rem; color: var(--color-text); background: none; border: none; cursor: pointer;
}

/* ===== RESPONSIVE — MOBILE NAV ===== */
@media (max-width: 768px) {
    .navbar__links { display: none; }
    .navbar__cta { display: none; }
    .navbar__mobile-toggle { display: flex; }
}

/* ===== BREADCRUMB ===== */
.breadcrumb {
    background: rgba(255,255,255,0.03);
    border-bottom: 1px solid rgba(255,255,255,0.07);
    padding: 10px 0;
}
.breadcrumb__list {
    display: flex; align-items: center; gap: 8px;
    list-style: none; margin: 0 auto; padding: 0 40px;
    max-width: 1200px;
    font-family: var(--font-mono); font-size: 0.7rem;
    letter-spacing: 0.05em; color: rgba(255,255,255,0.4);
}
.breadcrumb__list a {
    color: rgba(255,255,255,0.5);
    text-decoration: none;
    transition: color 0.2s;
}
.breadcrumb__list a:hover { color: var(--color-accent); }
.breadcrumb__separator { color: rgba(255,255,255,0.2); user-select: none; }
.breadcrumb__current { color: rgba(255,255,255,0.65); }
@media (max-width: 768px) {
    .breadcrumb__list { padding: 0 20px; font-size: 0.65rem; }
}
