:root {
    --brand-navy: #103675;
    --brand-blue: #1d5ca6;
    --brand-cyan: #159bd1;
    --brand-orange: #f59b00;
    --site-ink: #14294b;
    --site-muted: #59677d;
    --site-cyan: var(--brand-cyan);
    --site-blue: var(--brand-blue);
    --site-amber: var(--brand-orange);
    --site-border: #dce5ef;
    --site-surface: #ffffff;
    --site-background: #f6f8fb;
    --site-shadow: 0 16px 40px rgba(16, 54, 117, 0.1);
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 6rem;
}

body {
    color: var(--site-ink);
    font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.currency-control {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
    margin: 0 0 1.5rem;
    color: var(--site-muted);
    font-weight: 600;
}

.currency-control select {
    border: 1px solid var(--site-border);
    border-radius: 0.5rem;
    padding: 0.5rem 0.75rem;
    background: var(--site-surface);
    color: var(--site-ink);
}

.currency-status {
    width: 100%;
    color: var(--site-muted);
    font-size: 0.85rem;
    font-weight: 400;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 3px solid rgba(21, 155, 209, 0.55);
    outline-offset: 3px;
}

.navbar {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(16, 54, 117, 0.97);
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
    backdrop-filter: blur(14px);
}

.nav-content {
    position: relative;
    min-height: 72px;
    max-width: 1200px;
}

.nav-logo {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    color: var(--brand-orange);
    letter-spacing: -0.035em;
}

.brand-logo {
    display: block;
    width: 68px;
    height: 54px;
    object-fit: contain;
}

.nav-links a {
    color: #e8edf5;
    transition: color 160ms ease, background-color 160ms ease;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--brand-orange);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    padding: 10px;
    border-radius: 10px;
    border: 0;
    background: transparent;
    cursor: pointer;
}

.nav-toggle span {
    width: 25px;
    height: 3px;
    border-radius: 3px;
    background: #fff;
    transition: transform 160ms ease;
}

.nav-toggle:hover {
    background: rgba(255, 255, 255, 0.1);
}

#loginDropdownButton {
    background: var(--brand-blue);
}

#loginDropdownMenu a:hover,
#loginDropdownMenu a:focus-visible {
    background-color: var(--brand-blue);
    color: #fff;
}

.hero-section,
.booking-hero,
.portfolio-hero,
.library-hero,
.contact-header {
    color: #fff;
    background: linear-gradient(125deg, var(--brand-navy) 0%, var(--brand-blue) 58%, var(--brand-cyan) 100%);
}

.hero-section h1,
.booking-hero h1,
.portfolio-hero h1,
.library-hero h1,
.contact-header h1 {
    color: #fff;
    letter-spacing: -0.045em;
    line-height: 1.12;
}

.hero-section .subtitle,
.booking-hero .subtitle,
.portfolio-hero .subtitle,
.library-hero .subtitle,
.contact-header p {
    color: rgba(255, 255, 255, 0.84);
}

.hero-section .btn-ghost,
.booking-hero .btn-ghost,
.portfolio-hero .btn-ghost,
.library-hero .btn-ghost,
.contact-header .btn-ghost,
.final-cta .btn-ghost {
    border-color: rgba(255, 255, 255, 0.8);
    color: #fff;
}

.hero-section .btn-ghost:hover,
.booking-hero .btn-ghost:hover,
.portfolio-hero .btn-ghost:hover,
.library-hero .btn-ghost:hover,
.contact-header .btn-ghost:hover,
.final-cta .btn-ghost:hover {
    background: #fff;
    color: var(--site-ink);
}

.section-header h2,
.section-title {
    letter-spacing: -0.035em;
}

.section-header p,
.section-subtitle {
    color: var(--site-muted);
}

.btn-primary {
    background: linear-gradient(135deg, #ffb21a, var(--brand-orange));
    color: #10294f;
    box-shadow: 0 8px 18px rgba(245, 155, 0, 0.2);
}

.btn-primary:hover:not(:disabled) {
    filter: brightness(0.96);
    box-shadow: 0 12px 24px rgba(245, 155, 0, 0.28);
    transform: translateY(-2px);
}

.btn-secondary {
    background: linear-gradient(135deg, var(--brand-blue), var(--brand-navy));
}

.btn-ghost,
.btn-outline {
    border-color: var(--site-cyan);
    color: var(--site-blue);
}

.btn-ghost:hover,
.btn-outline:hover {
    background: var(--site-cyan);
    color: #fff;
}

.card,
.saas-card,
.calculator-box,
.booking-card,
.contact-form,
.contact-info,
.article-card,
.project-card {
    border: 1px solid var(--site-border);
    border-radius: 18px;
    box-shadow: var(--site-shadow);
}

.form-group input,
.form-group textarea,
.form-group select,
.calculator-box select,
.calculator-box input:not([type="range"]) {
    border: 1px solid #cbd4df;
    border-radius: 10px;
    background: var(--site-surface);
    color: var(--site-ink);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus,
.calculator-box select:focus {
    border-color: var(--site-cyan);
    box-shadow: 0 0 0 3px rgba(21, 155, 209, 0.14);
}

footer {
    background: var(--brand-navy);
    color: #d6deea;
}

footer .footer-grid {
    padding-bottom: 2rem;
}

footer .footer-links a:hover {
    color: var(--brand-orange);
}

/* Keep interactive cards consistent with the brand mark across public pages. */
.booking-card,
.article-card,
.project-card,
.quick-link-card,
#services-grid > .card {
    border-color: var(--site-border);
    transition: transform 220ms ease, box-shadow 220ms ease, border-color 220ms ease;
}

.booking-card:hover,
.article-card:hover,
.project-card:hover,
.quick-link-card:hover,
#services-grid > .card:hover,
.booking-card:focus-within,
.article-card:focus-within,
.project-card:focus-within,
.quick-link-card:focus-within,
#services-grid > .card:focus-within {
    border-color: rgba(21, 155, 209, 0.65);
    box-shadow: 0 20px 46px rgba(16, 54, 117, 0.16);
    transform: translateY(-6px);
}

.article-card::before,
.project-card::before {
    background: linear-gradient(90deg, var(--brand-cyan), var(--brand-orange)) !important;
}

.article-category,
.filter-btn.active {
    background: linear-gradient(135deg, var(--brand-blue), var(--brand-navy)) !important;
    border-color: var(--brand-blue) !important;
    color: #fff !important;
}

.filter-btn:hover {
    border-color: var(--brand-cyan) !important;
    color: var(--brand-blue) !important;
}

#services-grid > .card {
    display: flex;
    flex-direction: column;
}

#services-grid .service-tag {
    color: var(--brand-blue);
    border-color: rgba(21, 155, 209, 0.35);
}

#services-grid .service-feature::before {
    color: var(--brand-cyan);
}

#services-grid .service-cta {
    align-self: flex-end;
    margin-top: auto;
    padding: 10px 0 0 12px;
    color: var(--brand-blue);
    opacity: 0;
    pointer-events: none;
    transform: translateX(10px);
    transition: opacity 180ms ease, transform 180ms ease, color 180ms ease;
}

#services-grid > .card:hover .service-cta,
#services-grid > .card:focus-within .service-cta {
    color: var(--brand-blue);
    opacity: 1;
    pointer-events: auto;
    transform: translateX(0);
}

#services-grid .service-cta span {
    color: var(--brand-orange);
}

#home-services-grid > .card,
.home-process-grid > .card,
.home-saas-grid > .saas-card,
.home-cta-grid > .cta-card {
    transition: transform 220ms ease, box-shadow 220ms ease, border-color 220ms ease;
}

#home-services-grid > .card:hover,
#home-services-grid > .card:focus-within,
.home-process-grid > .card:hover,
.home-process-grid > .card:focus-within,
.home-saas-grid > .saas-card:hover,
.home-saas-grid > .saas-card:focus-within,
.home-cta-grid > .cta-card:hover,
.home-cta-grid > .cta-card:focus-within {
    border-color: rgba(21, 155, 209, 0.65);
    box-shadow: 0 20px 46px rgba(16, 54, 117, 0.16);
    transform: translateY(-6px);
}

#home-services-grid > .card {
    border-color: var(--site-border);
}

#home-services-grid .card-link {
    align-self: flex-end;
    color: var(--brand-blue);
    opacity: 0;
    pointer-events: none;
    transform: translateX(10px);
    transition: opacity 180ms ease, transform 180ms ease, color 180ms ease;
}

#home-services-grid > .card:hover .card-link,
#home-services-grid > .card:focus-within .card-link {
    opacity: 1;
    pointer-events: auto;
    transform: translateX(0);
}

#home-services-grid .card-link:hover {
    color: var(--brand-cyan);
}

@media (hover: none), (max-width: 640px) {
    #services-grid .service-cta {
        opacity: 1;
        pointer-events: auto;
        transform: none;
    }

    #home-services-grid .card-link {
        opacity: 1;
        pointer-events: auto;
        transform: none;
    }

    .booking-card:hover,
    .article-card:hover,
    .project-card:hover,
    .quick-link-card:hover,
    #services-grid > .card:hover,
    #home-services-grid > .card:hover,
    .home-process-grid > .card:hover,
    .home-saas-grid > .saas-card:hover,
    .home-cta-grid > .cta-card:hover {
        transform: none;
    }
}

@media (max-width: 980px) {
    .nav-toggle {
        display: flex;
    }

    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        transform: none;
        flex-direction: column;
        align-items: stretch;
        gap: 4px;
        padding: 14px 20px 20px;
        background: var(--brand-navy);
        border-top: 1px solid rgba(255, 255, 255, 0.1);
        box-shadow: 0 18px 26px rgba(15, 23, 42, 0.18);
    }

    .nav-links.active {
        display: flex;
    }

    .nav-links > li {
        width: 100%;
    }

    .nav-links > li > a,
    #loginDropdownButton {
        display: flex;
        width: 100%;
        justify-content: flex-start;
        padding: 12px 14px;
    }

    #loginDropdownMenu {
        position: static;
        width: 100%;
        margin: 4px 0 0;
    }

    .contact-grid {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (max-width: 640px) {
    .container {
        padding-right: 18px;
        padding-left: 18px;
    }

    .hero-section,
    .booking-hero,
    .portfolio-hero,
    .library-hero,
    .contact-header {
        padding-top: 56px;
        padding-bottom: 56px;
    }

    .hero-section h1,
    .booking-hero h1,
    .portfolio-hero h1,
    .library-hero h1,
    .contact-header h1 {
        font-size: clamp(2rem, 9vw, 2.8rem);
    }

    .section {
        padding-top: 56px;
        padding-bottom: 56px;
    }

    .calculator-actions,
    .cta-actions,
    .cta-buttons {
        align-items: stretch;
    }

    .testimonial-card {
        flex-basis: min(82vw, 350px);
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
