/* ==========================================================================
   OVLINK Consult Ltd — base.css
   Shared across every page: tokens, header, navigation, footer, buttons.
   Page-specific styles live in index.css, about.css, services.css, etc.
   Load this FIRST, then the page stylesheet.
   ========================================================================== */

*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #1a3a5f;
    --primary-light: #2c5282;
    --accent: #e67e22;
    --accent-dark: #d35400;
    --light: #f8f9fa;
    --dark: #2c3e50;
    --text: #333333;
    --muted: #5b6b7c;
    --line: rgba(26, 58, 95, 0.12);
    --transition: all 0.25s ease;
    --container: min(1180px, 92vw);
    --section-padding: clamp(3rem, 6vw, 5.5rem);
    --gutter: clamp(1rem, 3vw, 1.5rem);
    --radius: 10px;
    --header-h: 66px;
    --font: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

html { scroll-behavior: smooth; }

body {
    font-family: var(--font);
    background-color: #ffffff;
    color: var(--text);
    line-height: 1.65;
    overflow-x: hidden;
    font-size: clamp(15px, 1.4vw, 16.5px);
    -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; }

.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    background: var(--primary);
    color: #fff;
    padding: 0.75rem 1.25rem;
    z-index: 2000;
    text-decoration: none;
}
.skip-link:focus { left: 0; }

/* ============================= HEADER ============================= */

header {
    background-color: #fff;
    box-shadow: 0 1px 0 var(--line);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-container {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0.7rem var(--gutter);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    flex-shrink: 0;
    z-index: 1002;
    text-decoration: none;
    color: inherit;
}

/* The logo mark is a transparent PNG of the OVLINK ring — no circle
   background or letter behind it. */
.logo-icon {
    width: 44px;
    height: 44px;
    flex-shrink: 0;
    object-fit: contain;
}

.logo-text {
    font-weight: 700;
    font-size: clamp(0.95rem, 1.8vw, 1.15rem);
    color: var(--primary);
    line-height: 1.2;
}

.logo-tagline {
    font-size: 0.68rem;
    color: var(--accent);
}

.menu-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    background: none;
    border: none;
    width: 44px;
    height: 44px;
    justify-content: center;
    align-items: center;
    z-index: 1001;
}

.menu-toggle span {
    width: 22px;
    height: 2px;
    background-color: var(--dark);
    margin: 2.5px 0;
    transition: var(--transition);
    transform-origin: center;
}

.menu-toggle.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.menu-toggle.active span:nth-child(2) { opacity: 0; }
.menu-toggle.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

#mainNav ul {
    display: flex;
    list-style: none;
    gap: clamp(0.9rem, 2vw, 1.6rem);
}

#mainNav a {
    text-decoration: none;
    color: var(--dark);
    font-weight: 500;
    font-size: clamp(0.88rem, 1.25vw, 0.95rem);
    padding: 0.4rem 0;
    position: relative;
    white-space: nowrap;
    transition: var(--transition);
}

#mainNav a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: var(--accent);
    transition: width 0.25s ease;
}

#mainNav a:hover, #mainNav a:focus { color: var(--accent); outline: none; }
#mainNav a:hover::after, #mainNav a:focus::after { width: 100%; }
#mainNav a.active { color: var(--accent); font-weight: 600; }
#mainNav a.active::after { width: 100%; }

.menu-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 998;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}
.menu-overlay.active { opacity: 1; visibility: visible; }

.mobile-only { display: none; }

/* ============================= BUTTONS ============================= */

.cta-button {
    background-color: var(--accent);
    color: #fff;
    border: none;
    padding: 0.6rem 1.1rem;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: clamp(0.88rem, 1.25vw, 0.95rem);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    min-height: 42px;
    text-decoration: none;
    white-space: nowrap;
    flex-shrink: 0;
    transition: var(--transition);
}
.cta-button:hover, .cta-button:focus { background-color: var(--accent-dark); outline: none; }

.cta-primary {
    background: var(--accent);
    color: #fff;
    border: none;
    padding: 0.9rem 1.75rem;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    min-height: 52px;
    text-decoration: none;
    transition: var(--transition);
}
.cta-primary:hover, .cta-primary:focus { background: var(--accent-dark); outline: none; }

.cta-secondary {
    background: transparent;
    color: #fff;
    border: 2px solid rgba(255, 255, 255, 0.35);
    padding: 0.9rem 1.75rem;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    min-height: 52px;
    text-decoration: none;
    transition: var(--transition);
}
.cta-secondary:hover, .cta-secondary:focus {
    border-color: #fff;
    background: rgba(255, 255, 255, 0.08);
    outline: none;
}

/* ======================= SHARED SECTION PARTS ======================= */

section { padding: var(--section-padding) var(--gutter); }

.section-header {
    max-width: var(--container);
    margin: 0 auto clamp(2rem, 4vw, 3rem);
}

.section-header h2 {
    font-size: clamp(1.5rem, 3.2vw, 2.15rem);
    color: var(--primary);
    line-height: 1.25;
    max-width: 22ch;
    margin-bottom: 0.85rem;
}

.section-header p {
    color: var(--muted);
    font-size: clamp(0.98rem, 1.7vw, 1.08rem);
    max-width: 66ch;
}

/* Inner page hero (every page except the home page) */
.page-hero {
    background: var(--primary);
    color: #fff;
    padding: clamp(3rem, 6vw, 4.5rem) var(--gutter);
    border-bottom: 3px solid var(--accent);
}

.page-hero .hero-content {
    max-width: var(--container);
    margin: 0 auto;
}

.page-hero h1 {
    font-size: clamp(1.8rem, 4vw, 2.6rem);
    line-height: 1.2;
    font-weight: 700;
    max-width: 20ch;
    margin-bottom: 0.9rem;
}

.page-hero p {
    font-size: clamp(1rem, 1.8vw, 1.12rem);
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.85);
    max-width: 62ch;
}

/* =========================== FINAL CTA =========================== */

.final-cta {
    background: var(--primary);
    color: #fff;
    padding: clamp(3.5rem, 7vw, 5.5rem) var(--gutter);
}

.final-cta-content {
    max-width: var(--container);
    margin: 0 auto;
}

.final-cta h2 {
    font-size: clamp(1.6rem, 3.5vw, 2.3rem);
    margin-bottom: 1rem;
    line-height: 1.25;
    max-width: 20ch;
}

.final-cta p {
    font-size: clamp(1rem, 1.8vw, 1.1rem);
    line-height: 1.7;
    margin-bottom: 2.25rem;
    color: rgba(255, 255, 255, 0.85);
    max-width: 62ch;
}

.final-cta-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

/* ============================= FOOTER ============================= */

.footer {
    background-color: var(--dark);
    color: #fff;
    padding: clamp(2.75rem, 5vw, 3.75rem) var(--gutter) 1.5rem;
}

.footer-content {
    max-width: var(--container);
    margin: 0 auto 2.5rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(230px, 100%), 1fr));
    gap: clamp(1.75rem, 3vw, 2.5rem);
}

.footer-brand { display: flex; flex-direction: column; gap: 0.85rem; }

.footer-logo { display: flex; align-items: center; gap: 0.6rem; }

/* White silhouette of the mark. The logo's royal blue only reaches 1.3:1
   against the footer background, so the full-colour version is not used here. */
.footer-logo-icon {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    object-fit: contain;
}

.footer-logo-text { font-weight: 700; font-size: 1.05rem; color: #fff; }
.footer-tagline { font-size: 0.68rem; color: var(--accent); }

.footer-description {
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.6;
    font-size: 0.86rem;
    max-width: 40ch;
}

.footer-contact h3,
.footer-links h3,
.footer-social h3 {
    margin-bottom: 1.1rem;
    color: #fff;
    font-size: 1rem;
    font-weight: 600;
}

.contact-list, .footer-links ul { list-style: none; }

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    margin-bottom: 0.85rem;
}

.contact-item i {
    color: var(--accent);
    margin-top: 0.28rem;
    flex-shrink: 0;
    width: 14px;
}

.contact-text {
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.55;
    font-size: 0.86rem;
}

.contact-text a { color: inherit; text-decoration: none; }
.contact-text a:hover, .contact-text a:focus { color: var(--accent); outline: none; }

.contact-text small {
    display: block;
    margin-top: 0.35rem;
    font-size: 0.78rem;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.55);
}

.footer-links li { margin-bottom: 0.6rem; }

.footer-links a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-size: 0.9rem;
    transition: var(--transition);
}
.footer-links a:hover, .footer-links a:focus { color: var(--accent); outline: none; }

.reg-list { list-style: none; }

.reg-list li {
    font-size: 0.84rem;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.5;
    margin-bottom: 0.7rem;
}

.reg-list li span {
    display: block;
    font-size: 0.72rem;
    color: rgba(255, 255, 255, 0.45);
}

.footer-bottom {
    max-width: var(--container);
    margin: 0 auto;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.copyright, .footer-legal a {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.82rem;
    text-decoration: none;
}
.footer-legal a:hover, .footer-legal a:focus { color: var(--accent); outline: none; }

/* =========================== RESPONSIVE =========================== */

@media (max-width: 900px) {
    .menu-toggle { display: flex; }

    #mainNav {
        position: fixed;
        top: 0;
        left: -100%;
        width: 290px;
        max-width: 85vw;
        height: 100vh;
        background-color: #fff;
        box-shadow: 2px 0 24px rgba(0, 0, 0, 0.12);
        padding: 5.5rem 1.75rem 2rem;
        transition: left 0.3s ease;
        z-index: 999;
        overflow-y: auto;
    }

    #mainNav.active { left: 0; }
    #mainNav ul { flex-direction: column; gap: 0; }
    #mainNav li { border-bottom: 1px solid var(--line); }
    #mainNav a { display: block; padding: 1rem 0; font-size: 1.05rem; }
    #mainNav a::after { display: none; }

    .mobile-only { display: block; }
    .desktop-only { display: none; }

    .mobile-cta-container {
        margin-top: 1.75rem;
        padding-top: 1.75rem;
        border-top: 1px solid var(--line);
    }

    .mobile-cta-container .cta-button {
        width: 100%;
        justify-content: center;
        min-height: 50px;
    }
}

@media (max-width: 560px) {
    .final-cta-buttons { flex-direction: column; align-items: stretch; }
    .cta-primary, .cta-secondary { justify-content: center; }
    .footer-bottom { flex-direction: column; text-align: center; }
}

/* ======================== ACCESSIBILITY ========================= */

a:focus-visible,
button:focus-visible {
    outline: 3px solid var(--accent);
    outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
    html { scroll-behavior: auto; }
}

@media print {
    header, .footer, .final-cta { display: none !important; }
    * { background: transparent !important; color: #000 !important; }
}