/* ==========================================================================
   Observare — Shared Styles
   All pages link to this file. Page-specific styles remain inline.
   ========================================================================== */

/* --------------------------------------------------------------------------
   Variables
   -------------------------------------------------------------------------- */

:root {
    --bg-primary: #0a0a0b;
    --bg-secondary: #121214;
    --bg-tertiary: #1a1a1e;
    --bg-card: #16161a;
    --text-primary: #f5f5f7;
    --text-secondary: #a1a1aa;
    --text-muted: #71717a;
    --accent: #e8e8e8;
    --accent-hover: #ffffff;
    --border: #27272a;
    --border-subtle: #1f1f23;
    --success: #22c55e;
    --colour-green: #22c55e;
    --colour-amber: #f59e0b;
    --colour-red: #ef4444;
}

/* --------------------------------------------------------------------------
   Reset & Base
   -------------------------------------------------------------------------- */

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

body {
    font-family: 'JetBrains Mono', monospace;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
}

html {
    scroll-behavior: smooth;
}

::selection {
    background: rgba(255,255,255,0.2);
    color: var(--text-primary);
}

/* --------------------------------------------------------------------------
   Navigation
   -------------------------------------------------------------------------- */

nav {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(10, 10, 11, 0.8);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    z-index: 1000;
    padding: 1rem 0;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
}

.logo .pulse-logo,
.logo img {
    width: 48px;
    height: 48px;
}

.logo .pulse-logo img {
    width: 100%;
    height: 100%;
}

.logo .pulse-logo {
    margin-top: -4px;
}

.logo-text {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 1.75rem;
    color: var(--text-primary);
    letter-spacing: -0.02em;
    line-height: 1;
    display: flex;
    align-items: center;
}

.nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.875rem;
    transition: color 0.2s;
}

.nav-links a:hover {
    color: var(--text-primary);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.nav-login {
    color: var(--text-primary);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    padding: 0.5rem 1.25rem;
    border: 1px solid var(--border);
    border-radius: 4px;
    transition: border-color 0.2s, background 0.2s;
}

.nav-login:hover {
    border-color: var(--text-secondary);
    background: var(--bg-tertiary);
}

.nav-cta {
    background: var(--text-primary);
    color: var(--bg-primary);
    padding: 0.5rem 1.25rem;
    border-radius: 4px;
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 600;
    transition: all 0.2s;
}

.nav-cta:hover {
    background: var(--accent-hover);
}

/* Hamburger menu */
.nav-hamburger {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.25rem;
    margin-right: 1rem;
}

.nav-hamburger span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--text-primary);
    margin: 5px 0;
    transition: transform 0.3s, opacity 0.3s;
}

.nav-hamburger.is-open span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.nav-hamburger.is-open span:nth-child(2) {
    opacity: 0;
}

.nav-hamburger.is-open span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

.nav-mobile-menu {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(10, 10, 11, 0.97);
    z-index: 999;
    padding: 6rem 2rem 2rem;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.nav-mobile-menu.is-open {
    display: flex;
}

.nav-mobile-menu a {
    color: var(--text-primary);
    text-decoration: none;
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    font-size: 1.25rem;
    padding: 0.75rem 0;
    transition: color 0.2s;
}

.nav-mobile-menu a:hover {
    color: var(--text-secondary);
}

.nav-mobile-menu .mobile-divider {
    width: 60px;
    height: 1px;
    background: var(--border);
    margin: 0.5rem 0;
}

/* --------------------------------------------------------------------------
   Pulse Logo Animation
   -------------------------------------------------------------------------- */

.pulse-logo {
    position: relative;
    display: inline-block;
}

.pulse-logo img {
    display: block;
}

.pulse-logo .pulse-logo-green {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    animation: logoPulse 2s ease-in-out infinite;
}

@keyframes logoPulse {
    0%, 100% { opacity: 0; }
    50%      { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
    .pulse-logo .pulse-logo-green {
        animation: none;
    }
}

/* --------------------------------------------------------------------------
   Page Header (content pages with video background)
   -------------------------------------------------------------------------- */

.page-header {
    padding: 10rem 2rem 4rem;
    border-bottom: 1px solid var(--border);
    background: var(--bg-secondary);
    position: relative;
    overflow: hidden;
    text-align: center;
}

.page-header-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
}

.page-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(rgba(10,10,11,0.72), rgba(10,10,11,0.82));
    z-index: 1;
    pointer-events: none;
}

.page-header-inner {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.page-header-logo {
    display: block;
    width: 140px;
    height: 140px;
    margin: 0 auto 2rem;
}

.page-header-logo img {
    width: 100%;
    height: 100%;
}

.page-header h1 {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: clamp(2rem, 4vw, 3rem);
    letter-spacing: -0.02em;
    margin-bottom: 1rem;
}

.page-header p {
    color: var(--text-secondary);
    font-size: 1.0625rem;
}

/* --------------------------------------------------------------------------
   Content (legal pages, text-heavy pages)
   -------------------------------------------------------------------------- */

.content {
    padding: 4rem 2rem 6rem;
}

.content-inner {
    max-width: 800px;
    margin: 0 auto;
}

.content h2 {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 1.5rem;
    margin-top: 3rem;
    margin-bottom: 1rem;
    letter-spacing: -0.01em;
}

.content h2:first-child {
    margin-top: 0;
}

.content h3 {
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    font-size: 1.125rem;
    margin-top: 2rem;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

.content p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    font-size: 0.9375rem;
    line-height: 1.7;
}

.content ul {
    list-style: none;
    margin-bottom: 1rem;
    padding-left: 0;
}

.content li {
    color: var(--text-secondary);
    font-size: 0.9375rem;
    line-height: 1.7;
    padding: 0.375rem 0 0.375rem 1.5rem;
    position: relative;
}

.content li::before {
    content: '›';
    color: var(--text-primary);
    font-weight: 600;
    position: absolute;
    left: 0;
}

.content a {
    color: var(--text-primary);
    text-decoration: underline;
    text-underline-offset: 3px;
    text-decoration-color: var(--border);
    transition: text-decoration-color 0.2s;
}

.content a:hover {
    text-decoration-color: var(--text-primary);
}

.content strong {
    color: var(--text-primary);
    font-weight: 600;
}

.callout {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-left: 3px solid var(--text-primary);
    border-radius: 6px;
    padding: 1.25rem 1.5rem;
    margin: 1.5rem 0;
}

.callout p {
    margin-bottom: 0;
    font-size: 0.9375rem;
}

.meta-row {
    display: flex;
    justify-content: space-between;
    padding: 1rem 0;
    border-bottom: 1px solid var(--border);
    font-size: 0.875rem;
}

.meta-row:last-child {
    border-bottom: none;
}

.meta-label {
    color: var(--text-muted);
}

.meta-value {
    color: var(--text-primary);
    font-weight: 500;
}

/* --------------------------------------------------------------------------
   Error Pages (401, 403, 404, 500, 503)
   -------------------------------------------------------------------------- */

.error-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8rem 2rem 4rem;
    position: relative;
    overflow: hidden;
    text-align: center;
}

.error-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
}

.error-page::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(rgba(10,10,11,0.75), rgba(10,10,11,0.85));
    z-index: 1;
    pointer-events: none;
}

.error-inner {
    position: relative;
    z-index: 2;
    max-width: 560px;
}

.error-logo {
    display: block;
    width: 120px;
    height: 120px;
    margin: 0 auto 2rem;
}

.error-logo img {
    width: 100%;
    height: 100%;
}

.error-code {
    font-family: 'Montserrat', sans-serif;
    font-weight: 800;
    font-size: clamp(4rem, 10vw, 7rem);
    line-height: 1;
    color: var(--text-primary);
    letter-spacing: -0.04em;
    margin-bottom: 1rem;
}

.error-title {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 1.5rem;
    margin-bottom: 1rem;
    letter-spacing: -0.01em;
}

.error-message {
    color: var(--text-secondary);
    font-size: 0.9375rem;
    line-height: 1.7;
    margin-bottom: 2.5rem;
}

.error-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

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

.btn-primary {
    background: var(--text-primary);
    color: var(--bg-primary);
    padding: 0.875rem 1.75rem;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9375rem;
    transition: all 0.2s;
    font-family: inherit;
}

.btn-primary:hover {
    background: var(--accent-hover);
    transform: translateY(-1px);
}

.btn-ghost {
    color: var(--text-primary);
    padding: 0.875rem 1.75rem;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9375rem;
    border: 1px solid var(--border);
    transition: border-color 0.2s, background 0.2s;
    font-family: inherit;
}

.btn-ghost:hover {
    border-color: var(--text-secondary);
    background: var(--bg-tertiary);
}

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

footer {
    padding: 4rem 2rem 2rem;
    background: var(--bg-primary);
    border-top: 1px solid var(--border);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 4rem;
    max-width: 1200px;
    margin: 0 auto 4rem;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.footer-brand img {
    width: 28px;
    height: 28px;
}

.footer-brand-text {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 1.125rem;
}

.footer-tagline {
    color: var(--text-muted);
    font-size: 0.9375rem;
    max-width: 300px;
}

.footer-links h4 {
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    font-size: 0.875rem;
    margin-bottom: 1.25rem;
    color: var(--text-primary);
}

.footer-links ul {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.75rem;
}

.footer-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9375rem;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: var(--text-primary);
}

.footer-bottom {
    max-width: 1200px;
    margin: 0 auto;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-copyright {
    color: var(--text-muted);
    font-size: 0.875rem;
}

.footer-social {
    display: flex;
    gap: 1.5rem;
}

.footer-social a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.875rem;
    transition: color 0.2s;
}

.footer-social a:hover {
    color: var(--text-primary);
}

/* --------------------------------------------------------------------------
   Responsive — Tablet (≤1024px)
   -------------------------------------------------------------------------- */

@media (max-width: 1024px) {
    .nav-container {
        padding: 0 1.5rem;
    }

    .page-header {
        padding: 9rem 1.5rem 3.5rem;
    }

    .page-header-logo {
        width: 110px;
        height: 110px;
        margin-bottom: 1.5rem;
    }

    .content {
        padding: 3rem 1.5rem 5rem;
    }

    .footer-grid {
        gap: 2.5rem;
    }
}

/* --------------------------------------------------------------------------
   Responsive — Mobile (≤768px)
   -------------------------------------------------------------------------- */

@media (max-width: 768px) {
    .nav-container {
        padding: 0 1rem;
    }

    .nav-links {
        display: none;
    }

    .nav-hamburger {
        display: block;
    }

    .logo .pulse-logo,
    .logo img {
        width: 40px;
        height: 40px;
    }

    .logo-text {
        font-size: 1.375rem;
    }

    .nav-actions {
        gap: 0.75rem;
    }

    .nav-login {
        display: none;
    }

    .nav-cta {
        display: none;
    }

    .page-header {
        padding: 7.5rem 1.25rem 3rem;
    }

    .page-header-logo {
        width: 90px;
        height: 90px;
        margin-bottom: 1.25rem;
    }

    .content {
        padding: 2.5rem 1.25rem 4rem;
    }

    .content h2 {
        font-size: 1.25rem;
        margin-top: 2.5rem;
    }

    .meta-row {
        flex-direction: column;
        gap: 0.25rem;
    }

    .error-page {
        padding: 6rem 1.25rem 3rem;
    }

    .error-logo {
        width: 90px;
        height: 90px;
    }

    .error-title {
        font-size: 1.25rem;
    }

    .error-actions {
        flex-direction: column;
        width: 100%;
        max-width: 280px;
        margin: 0 auto;
    }

    .error-actions a {
        width: 100%;
        text-align: center;
    }

    footer {
        padding: 3rem 1.25rem 1.5rem;
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 2rem;
        margin-bottom: 2.5rem;
    }

    .footer-bottom {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
}

/* --------------------------------------------------------------------------
   Responsive — Small mobile (≤480px)
   -------------------------------------------------------------------------- */

@media (max-width: 480px) {
    .logo .pulse-logo,
    .logo img {
        width: 36px;
        height: 36px;
    }

    .logo-text {
        font-size: 1.25rem;
    }

    .error-logo {
        width: 72px;
        height: 72px;
    }

    .page-header-logo {
        width: 72px;
        height: 72px;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 1.75rem;
    }
}
