/* ZBC — base / global primitives (loaded site-wide)
   Shared design tokens, reset, container, buttons, comet cursor, reveal.
   Page-specific sections live in home.css / offshore.css. */

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

:root {
    --blue-dark: #003798;
    --blue-cyan: #0092DD;
    --purple: #7338E5;
    --navy: #060e1f;
    --navy-light: #0c1a33;
    --gradient-brand: linear-gradient(135deg, var(--blue-dark) 0%, var(--blue-cyan) 50%, var(--purple) 100%);
    --gradient-accent: linear-gradient(90deg, var(--blue-cyan) 0%, var(--purple) 100%);
    --white: #ffffff;
    --gray-50: #f8fafc;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e1;
    --gray-400: #94a3b8;
    --gray-500: #64748b;
    --gray-600: #475569;
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --font-body: 'Figtree', -apple-system, sans-serif;
    --font-display: 'Playfair Display', Georgia, serif;
}

html { scroll-behavior: smooth; }

body {
    font-family: var(--font-body);
    color: var(--text-primary);
    background: var(--white);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

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

/* ===== NAVBAR (global chrome — rendered on every page) ===== */
.navbar {
    position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
    padding: 1.25rem 0;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.navbar.scrolled {
    background: rgba(255,255,255,0.96);
    backdrop-filter: blur(20px);
    box-shadow: 0 1px 0 rgba(0,0,0,0.06);
    padding: 0.7rem 0;
}
.navbar .container { display: flex; align-items: center; justify-content: space-between; }
.logo-link { display: flex; align-items: center; text-decoration: none; }
.logo-img { height: 40px; width: auto; transition: all 0.3s; }
.navbar.scrolled .logo-img { height: 34px; }
/* Logo shows white on the dark navbar (over the hero), full colour when scrolled (white bar). */
.navbar:not(.scrolled) .logo-img { filter: brightness(0) invert(1); }
.nav-links { display: flex; align-items: center; gap: 2.4rem; list-style: none; margin: 0; padding: 0; }
.nav-links li { list-style: none; }
.nav-links a { font-size: 0.88rem; font-weight: 500; color: rgba(255,255,255,0.7); text-decoration: none; transition: color 0.3s; }
.navbar.scrolled .nav-links a { color: var(--gray-500); }
.nav-links a:hover { color: var(--white); }
.navbar.scrolled .nav-links a:hover { color: var(--text-primary); }
.nav-links a.active { color: var(--white); font-weight: 700; }
.navbar.scrolled .nav-links a.active { color: var(--blue-dark); }
.nav-cta {
    display: inline-flex; align-items: center; gap: 0.5rem;
    padding: 0.6rem 1.5rem;
    background: var(--gradient-accent);
    color: var(--white) !important;
    border-radius: 100px; font-weight: 600; font-size: 0.85rem;
    text-decoration: none; transition: all 0.3s;
    box-shadow: 0 2px 16px rgba(0,146,221,0.25);
}
.nav-cta:hover { transform: translateY(-1px); box-shadow: 0 6px 24px rgba(0,146,221,0.35); }
.nav-lang { display: inline-flex; align-items: center; gap: 0.4rem; margin-left: 0.25rem; }
.nav-lang-link { font-size: 0.82rem; font-weight: 600; color: rgba(255,255,255,0.55); text-decoration: none; transition: color 0.3s; }
.nav-lang-link:hover, .nav-lang-link.current { color: var(--white); }
.navbar.scrolled .nav-lang-link { color: var(--gray-400); }
.navbar.scrolled .nav-lang-link:hover, .navbar.scrolled .nav-lang-link.current { color: var(--text-primary); }
.nav-lang-sep { color: rgba(255,255,255,0.25); font-size: 0.8rem; }
.navbar.scrolled .nav-lang-sep { color: var(--gray-300); }
.mobile-toggle { display: none; background: none; border: none; cursor: pointer; padding: 0.5rem; flex-direction: column; gap: 5px; }
.mobile-toggle span { display: block; width: 22px; height: 2px; background: var(--white); border-radius: 2px; transition: all 0.3s; }
.navbar.scrolled .mobile-toggle span { background: var(--navy); }
.nav-links.open {
    display: flex; position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; gap: 1.25rem; padding: 1.5rem 2rem 2rem;
    background: rgba(6,14,31,0.98); backdrop-filter: blur(20px);
}
.navbar.scrolled .nav-links.open { background: rgba(255,255,255,0.98); }
@media (max-width: 768px) {
    .nav-links { display: none; }
    .mobile-toggle { display: flex; }
}

/* ===== FOOTER (global chrome) ===== */
.footer { background: var(--navy); border-top: 1px solid rgba(255,255,255,0.05); padding: 2.75rem 0; }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; }
.footer-left { display: flex; align-items: center; gap: 2rem; }
.footer .logo-img { height: 30px; filter: brightness(0) invert(1); }
.footer-copy { font-size: 0.8rem; color: var(--gray-500); }
.footer-links { display: flex; gap: 1.5rem; list-style: none; margin: 0; padding: 0; }
.footer-links li { list-style: none; }
.footer-links a { font-size: 0.8rem; color: var(--gray-500); text-decoration: none; transition: color 0.3s; }
.footer-links a:hover { color: var(--gray-300); }
@media (max-width: 768px) {
    .footer-inner { flex-direction: column; gap: 1.25rem; text-align: center; }
    .footer-left { flex-direction: column; }
}

/* ===== INTERIOR PAGES (posts, pages without a hero, archives, search, 404) ===== */
.entry-hero { background: var(--navy); padding: 9rem 0 4rem; position: relative; overflow: hidden; }
.entry-hero::before {
    content: ''; position: absolute; inset: 0;
    background-image:
        linear-gradient(rgba(0,146,221,0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0,146,221,0.04) 1px, transparent 1px);
    background-size: 56px 56px;
}
.entry-hero::after {
    content: ''; position: absolute; inset: 0;
    background:
        radial-gradient(ellipse 60% 50% at 20% 0%, rgba(0,55,152,0.3), transparent),
        radial-gradient(ellipse 50% 60% at 85% 100%, rgba(115,56,229,0.12), transparent);
}
.entry-hero .container { position: relative; z-index: 2; }
.entry-hero h1 {
    font-family: var(--font-display);
    font-size: clamp(2rem, 4vw, 2.9rem); font-weight: 600;
    color: var(--white); letter-spacing: -0.02em; line-height: 1.2;
}
.entry-hero .entry-meta { margin-top: 1rem; font-size: 0.85rem; color: var(--gray-400); }
.entry-hero .entry-meta a { color: var(--blue-cyan); text-decoration: none; }

.site-content { padding: 4rem 0 6rem; background: var(--white); }
.prose { max-width: 760px; margin: 0 auto; color: var(--text-secondary); font-size: 1.05rem; line-height: 1.8; }
.prose > * { margin-bottom: 1.25rem; }
.prose > *:last-child { margin-bottom: 0; }
.prose h1, .prose h2, .prose h3, .prose h4 { font-family: var(--font-display); color: var(--text-primary); line-height: 1.25; margin: 2.25rem 0 1rem; }
.prose h2 { font-size: 1.7rem; }
.prose h3 { font-size: 1.35rem; }
.prose a { color: var(--blue-cyan); text-decoration: underline; text-underline-offset: 2px; }
.prose img { max-width: 100%; height: auto; border-radius: 12px; }
.prose ul, .prose ol { padding-left: 1.5rem; }
.prose li { margin-bottom: 0.5rem; }
.prose blockquote { border-left: 3px solid var(--blue-cyan); padding-left: 1.25rem; color: var(--text-primary); font-style: italic; }
.prose code { background: var(--gray-100); padding: 0.15rem 0.4rem; border-radius: 6px; font-size: 0.9em; }
.prose pre { background: var(--navy); color: var(--gray-100); padding: 1.25rem; border-radius: 12px; overflow: auto; }

.post-list { max-width: 820px; margin: 0 auto; display: flex; flex-direction: column; gap: 1.25rem; }
.post-card { padding: 1.75rem 2rem; border: 1px solid var(--gray-200); border-radius: 16px; transition: all 0.3s; }
.post-card:hover { border-color: rgba(0,146,221,0.35); box-shadow: 0 12px 30px rgba(0,55,152,0.06); transform: translateY(-2px); }
.post-card h2 { font-family: var(--font-display); font-size: 1.4rem; margin-bottom: 0.4rem; }
.post-card h2 a { color: var(--text-primary); text-decoration: none; }
.post-card h2 a:hover { color: var(--blue-dark); }
.post-card .post-meta { font-size: 0.78rem; color: var(--gray-500); margin-bottom: 0.6rem; }
.post-card .post-excerpt { color: var(--text-secondary); line-height: 1.7; }
.post-readmore { display: inline-block; margin-top: 0.8rem; color: var(--blue-cyan); font-weight: 600; text-decoration: none; font-size: 0.9rem; }
.entry-pagination { max-width: 820px; margin: 2.5rem auto 0; display: flex; justify-content: space-between; gap: 1rem; }
.entry-pagination a { color: var(--blue-cyan); text-decoration: none; font-weight: 600; }

/* ===== BUTTONS ===== */
.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 1rem 2rem;
    background: var(--gradient-accent);
    color: var(--white);
    font-family: var(--font-body);
    font-size: 0.95rem;
    font-weight: 600;
    border: none;
    border-radius: 100px;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s;
    box-shadow: 0 4px 20px rgba(0,146,221,0.25);
}
.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 32px rgba(0,146,221,0.35);
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 1.75rem;
    background: transparent;
    color: var(--white);
    font-family: var(--font-body);
    font-size: 0.95rem;
    font-weight: 500;
    border: 1px solid rgba(255,255,255,0.18);
    border-radius: 100px;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s;
}
.btn-secondary:hover {
    border-color: rgba(255,255,255,0.4);
    background: rgba(255,255,255,0.05);
}

.btn-outline {
    display: inline-flex; align-items: center; gap: 0.6rem;
    padding: 0.8rem 1.7rem;
    background: transparent; color: var(--blue-dark);
    font-family: var(--font-body); font-size: 0.92rem; font-weight: 600;
    text-decoration: none; border: 1.5px solid var(--blue-dark);
    border-radius: 100px; cursor: pointer; transition: all 0.3s;
}
.btn-outline:hover { background: var(--blue-dark); color: var(--white); transform: translateY(-2px); }

/* ===== SHARED KEYFRAMES ===== */
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ===== SCROLL REVEAL ===== */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal.visible { opacity: 1; transform: translateY(0); }
@media (prefers-reduced-motion: reduce) {
    .reveal { opacity: 1; transform: none; transition: none; }
}

/* ===== COMET CURSOR (shared chrome, rendered in footer.php) ===== */
.cursor-comet {
    position: fixed; top: 0; left: 0;
    width: 5px; height: 5px;
    border-radius: 50%;
    background: #fff;
    pointer-events: none;
    z-index: 9999;
    transform: translate(-50%, -50%);
    opacity: 0;
    transition: opacity 0.4s, width 0.25s, height 0.25s, box-shadow 0.25s;
    box-shadow: 0 0 3px rgba(255,255,255,0.9), 0 0 8px rgba(0,146,221,0.5);
}
.cursor-comet.visible { opacity: 1; }
.cursor-comet.hovering {
    width: 8px; height: 8px;
    box-shadow: 0 0 6px rgba(255,255,255,1), 0 0 18px rgba(115,56,229,0.8), 0 0 40px rgba(115,56,229,0.3);
}
.cursor-coma {
    position: fixed; top: 0; left: 0;
    width: 30px; height: 30px;
    border-radius: 50%;
    pointer-events: none;
    z-index: 9997;
    transform: translate(-50%, -50%);
    opacity: 0;
    transition: opacity 0.4s, width 0.3s, height 0.3s, filter 0.3s;
    background: radial-gradient(circle, rgba(0,146,221,0.15) 0%, rgba(115,56,229,0.05) 50%, transparent 70%);
    filter: blur(6px);
}
.cursor-coma.visible { opacity: 1; }
.cursor-coma.hovering {
    width: 50px; height: 50px;
    background: radial-gradient(circle, rgba(115,56,229,0.25) 0%, rgba(0,146,221,0.1) 40%, transparent 70%);
    filter: blur(10px);
}
.cursor-trail-dot {
    position: fixed; top: 0; left: 0;
    border-radius: 50%;
    pointer-events: none;
    z-index: 9998;
    transform: translate(-50%, -50%);
    opacity: 0;
    transition: opacity 0.4s;
}
.cursor-trail-dot.visible { opacity: 1; }
@media (hover: none) {
    .cursor-comet, .cursor-trail-dot, .cursor-coma { display: none !important; }
}

/* ===== CONTACT (shared: home + offshore) ===== */
.contact-section { background: var(--white); padding: 6rem 0 7rem; }
.contact-box {
    background: var(--navy);
    border-radius: 24px;
    padding: 3.5rem 4rem;
    position: relative;
    overflow: hidden;
    display: grid;
    grid-template-columns: 0.9fr 1.1fr;
    gap: 3.5rem;
    align-items: center;
}
.contact-box::before {
    content: '';
    position: absolute; inset: 0;
    background:
        radial-gradient(ellipse 50% 60% at 90% 10%, rgba(115,56,229,0.15), transparent),
        radial-gradient(ellipse 50% 60% at 5% 95%, rgba(0,55,152,0.3), transparent);
}
.contact-left, .contact-form { position: relative; z-index: 2; }
.contact-left h2 {
    font-family: var(--font-display);
    font-size: clamp(1.7rem, 2.8vw, 2.3rem);
    font-weight: 600; color: var(--white);
    line-height: 1.25;
    margin-bottom: 1rem;
}
.contact-left p {
    font-size: 0.95rem; color: var(--gray-400); line-height: 1.7;
    margin-bottom: 1.75rem;
}
.contact-info { display: flex; flex-direction: column; gap: 0.8rem; }
.contact-info-item {
    display: flex; align-items: center; gap: 0.65rem;
    font-size: 0.88rem; color: rgba(255,255,255,0.8);
    text-decoration: none;
    transition: color 0.25s;
}
.contact-info-item:hover { color: var(--blue-cyan); }
.contact-info-item svg { width: 15px; height: 15px; stroke: var(--blue-cyan); fill: none; stroke-width: 2; flex-shrink: 0; }
.contact-form { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-field { display: flex; flex-direction: column; gap: 0.35rem; }
.form-field.full { grid-column: 1 / -1; }
.form-field label {
    font-size: 0.74rem; font-weight: 600;
    color: rgba(255,255,255,0.6);
    letter-spacing: 0.04em;
}
.form-field input, .form-field select, .form-field textarea {
    padding: 0.7rem 0.9rem;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 10px;
    font-family: var(--font-body);
    font-size: 0.88rem;
    color: var(--white);
    outline: none;
    transition: border-color 0.25s, background 0.25s;
}
.form-field input::placeholder, .form-field textarea::placeholder { color: rgba(255,255,255,0.3); }
.form-field input:focus, .form-field select:focus, .form-field textarea:focus {
    border-color: var(--blue-cyan);
    background: rgba(255,255,255,0.07);
}
.form-field select { cursor: pointer; appearance: none; }
.form-field select option { background: var(--navy-light); color: var(--white); }
.form-field textarea { resize: vertical; min-height: 80px; }
.form-submit { grid-column: 1 / -1; justify-self: start; margin-top: 0.25rem; }

.form-feedback { grid-column: 1 / -1; font-size: 0.85rem; padding: 0.6rem 0.9rem; border-radius: 8px; }
.form-feedback.success { background: rgba(52,211,153,0.12); color: #6ee7b7; }
.form-feedback.error { background: rgba(248,113,113,0.12); color: #fca5a5; }

@media (max-width: 1024px) {
    .contact-box { grid-template-columns: 1fr; padding: 2.75rem 2.5rem; }
}
@media (max-width: 768px) {
    .contact-form { grid-template-columns: 1fr; }
    .contact-box { padding: 2.25rem 1.5rem; }
}
