/* MaTV theme — light surfaces with the navy → blue → cyan brand gradient.
   Shared by every page; home-page sections live in service-layout.css. */

/* Outfit is self-hosted so no visitor data is sent to Google Fonts. */
@font-face {
    font-family: 'Outfit';
    font-style: normal;
    font-display: swap;
    font-weight: 100 900;
    src: url('../fonts/outfit-latin-ext-wght-normal.woff2') format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
    font-family: 'Outfit';
    font-style: normal;
    font-display: swap;
    font-weight: 100 900;
    src: url('../fonts/outfit-latin-wght-normal.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
    /* Palette sampled from the client's reference design */
    --matv-navy-950: #04003d;
    --matv-navy-900: #06024d;
    --matv-navy-800: #080873;
    --matv-blue-700: #0a3d9e;
    --matv-blue-600: #065db1;
    --matv-sky-500: #0281c9;
    --matv-cyan-400: #04c9f8;
    --matv-blue-50: #dbeafe;
    --matv-blue-25: #eef4ff;

    /* Surfaces & text */
    --matv-bg: #f9fafc;
    --matv-surface: #ffffff;
    --matv-ink: #0a0b24;
    --matv-text: #4a5268;
    --matv-muted: #6b7386;
    --matv-border: #e5e9f2;

    /* Gradients */
    --gradient-brand: linear-gradient(135deg, #04003d 0%, #080873 42%, #2a62b4 76%, #0fb6ec 100%);
    --gradient-button: linear-gradient(90deg, #04003d 0%, #0a1a8a 45%, #0a63c4 80%, #0894d6 100%);
    --gradient-text: linear-gradient(90deg, #04003d 0%, #065db1 55%, #00b8ea 100%);
    --gradient-text-light: linear-gradient(90deg, #8fd0ff 0%, #4fe0fb 100%);

    /* Finishes */
    --radius-card: 18px;
    --radius-btn: 10px;
    --shadow-card: 0 14px 34px -16px rgba(8, 8, 115, 0.22), 0 2px 6px rgba(10, 11, 36, 0.04);
    --shadow-panel: 0 30px 60px -28px rgba(4, 0, 61, 0.55);
    --header-offset: 110px;

    /* Bootstrap overrides */
    --bs-primary: #065db1;
    --bs-primary-rgb: 6, 93, 177;
    --bs-body-font-family: 'Outfit', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    --bs-body-color: var(--matv-text);
    --bs-body-bg: var(--matv-bg);
    --bs-link-color: var(--matv-blue-600);
    --bs-link-hover-color: var(--matv-navy-800);
}

/* ------------------
   BASE
   ------------------ */
html { scroll-behavior: smooth; scroll-padding-top: var(--header-offset); }

body {
    font-family: var(--bs-body-font-family);
    font-size: 1rem;
    line-height: 1.65;
    color: var(--matv-text);
    background-color: var(--matv-bg);
    /* Faint dot grid, as on the reference */
    background-image: radial-gradient(circle at 1px 1px, rgba(8, 8, 115, 0.07) 1px, transparent 0);
    background-size: 28px 28px;
    overflow-x: clip;
}

h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6 {
    font-family: var(--bs-body-font-family);
    color: var(--matv-ink);
    font-weight: 700;
    letter-spacing: -0.02em;
}

a { color: var(--matv-blue-600); }
a:hover { color: var(--matv-navy-800); }
a:focus-visible,
button:focus-visible,
summary:focus-visible {
    outline: 2px solid var(--matv-sky-500);
    outline-offset: 3px;
    border-radius: 4px;
}

.text-gradient {
    background: var(--gradient-text);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

.skip-link {
    position: absolute;
    left: 16px;
    top: -60px;
    z-index: 2000;
    background: var(--matv-navy-900);
    color: #fff;
    padding: 10px 16px;
    border-radius: 8px;
    text-decoration: none;
}
.skip-link:focus { top: 12px; color: #fff; }

/* ------------------
   HEADER
   ------------------ */
.main-header {
    z-index: 1030;
    padding-top: 14px;
    transition: padding 0.3s ease;
}

.main-header .container {
    max-width: 1180px;
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.82);
    -webkit-backdrop-filter: blur(14px) saturate(160%);
    backdrop-filter: blur(14px) saturate(160%);
    border: 1px solid rgba(8, 8, 115, 0.08);
    border-radius: 16px;
    box-shadow: 0 12px 30px -16px rgba(8, 8, 115, 0.25);
    transition: background 0.3s ease, box-shadow 0.3s ease;
}

.main-header.scrolled { padding-top: 8px; }
.main-header.scrolled .container {
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 16px 40px -18px rgba(8, 8, 115, 0.35);
}

.main-header .navbar { flex-wrap: nowrap; gap: 22px; }

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}
.brand img { width: 36px; height: 36px; flex-shrink: 0; }
.brand-name {
    font-size: 1.7rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1;
    color: var(--matv-navy-900);
}
.brand-name span {
    background: var(--gradient-text);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
/* White tile so the logo's dark facets stay visible on the navy footer */
.brand-light img { width: 40px; height: 40px; padding: 6px; background: #fff; border-radius: 10px; }
.brand-light .brand-name { color: #fff; }
.brand-light .brand-name span { background-image: var(--gradient-text-light); }

.service-nav { align-items: center; gap: 28px; margin-inline: auto; }
.service-nav a {
    color: var(--matv-ink);
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
}
.service-nav a:hover { color: var(--matv-blue-600); }

.header-social-links { align-items: center; gap: 10px; }
.header-cta { min-height: 42px; padding: 0.6rem 1.2rem; font-size: 0.95rem; white-space: nowrap; }
.social-link {
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: var(--matv-blue-25);
    color: var(--matv-navy-800);
    font-size: 1.05rem;
    text-decoration: none;
    transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
}
.social-link:hover {
    background: var(--gradient-button);
    color: #fff;
    transform: translateY(-2px);
}

/* ------------------
   BUTTONS
   ------------------ */
.primary-btn,
.btn-white,
.btn-ghost {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 48px;
    padding: 0.8rem 1.6rem;
    border-radius: var(--radius-btn);
    font-weight: 600;
    font-size: 1rem;
    line-height: 1.2;
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease, background 0.2s ease;
}

.primary-btn {
    background: var(--gradient-button) !important;
    color: #fff !important;
    border: 0;
    box-shadow: 0 12px 26px -12px rgba(6, 93, 177, 0.7);
}
.primary-btn::before { display: none; }
.primary-btn:hover {
    color: #fff;
    filter: brightness(1.12);
    transform: translateY(-2px);
    box-shadow: 0 16px 32px -12px rgba(6, 93, 177, 0.8);
}

.btn-white {
    background: #fff;
    color: var(--matv-navy-900);
    border: 0;
    box-shadow: 0 12px 26px -14px rgba(0, 0, 0, 0.5);
}
.btn-white:hover { color: var(--matv-blue-600); transform: translateY(-2px); }

.btn-ghost {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.35);
}
.btn-ghost:hover { background: rgba(255, 255, 255, 0.16); color: #fff; transform: translateY(-2px); }

/* ------------------
   SECTION HEADINGS (badge + title + subtitle, as on the reference)
   ------------------ */
.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 5px 14px;
    border-radius: 999px;
    background: var(--gradient-button);
    color: #fff;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.01em;
}
.eyebrow::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
}
.eyebrow-light {
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.28);
}

.section-heading {
    max-width: 780px;
    margin: 0 auto clamp(32px, 5vw, 52px);
    text-align: center;
}
.section-heading h2 {
    margin: 14px 0 12px;
    font-size: clamp(1.9rem, 3.4vw, 2.7rem);
    font-weight: 800;
    line-height: 1.15;
    text-wrap: balance;
}
.section-heading p { margin: 0; font-size: 1.05rem; color: var(--matv-text); }

/* ------------------
   FOOTER
   ------------------ */
.footer-section {
    background: linear-gradient(160deg, #04003d 0%, #06024d 55%, #0a1a7a 100%);
    color: rgba(255, 255, 255, 0.72);
}
.footer-top { padding: clamp(56px, 7vw, 80px) 0 24px; }
.footer-about p { margin: 18px 0 22px; max-width: 340px; }

.footer-widget { margin-bottom: 32px; }
.footer-widget .widget-title {
    position: relative;
    margin-bottom: 30px;
    font-size: 1.05rem;
    font-weight: 700;
    color: #fff;
}
.footer-widget .widget-title::before {
    content: '';
    position: absolute;
    left: 0;
    bottom: -12px;
    width: 40px;
    height: 3px;
    border-radius: 3px;
    background: linear-gradient(90deg, var(--matv-sky-500), var(--matv-cyan-400));
}
.footer-widget .footer-nav li + li { margin-top: 10px; }
.footer-widget .footer-nav li a,
.footer-contact li a {
    color: rgba(255, 255, 255, 0.72);
    font-size: 0.95rem;
    text-decoration: none;
    transition: color 0.2s ease;
}
.footer-widget .footer-nav li a:hover,
.footer-contact li a:hover { color: #fff; padding-left: 0; }

.footer-contact li {
    display: flex;
    align-items: baseline;
    gap: 10px;
    font-size: 0.95rem;
}
.footer-contact li + li { margin-top: 10px; }
.footer-contact i { width: 16px; color: var(--matv-cyan-400); text-align: center; }

.footer-social-links { display: flex; gap: 10px; }
.footer-social-links a {
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.14);
    color: #fff;
    text-decoration: none;
    transition: background 0.2s ease, transform 0.2s ease;
}
.footer-social-links a:hover {
    background: linear-gradient(135deg, var(--matv-sky-500), var(--matv-cyan-400));
    color: #fff;
    transform: translateY(-2px);
}

.footer-copyright {
    padding: 20px 0;
    background: rgba(0, 0, 0, 0.18);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.footer-copyright p { font-size: 0.88rem; color: rgba(255, 255, 255, 0.6); }
.footer-copyright a { color: rgba(255, 255, 255, 0.75); text-decoration: none; }
.footer-copyright a:hover { color: #fff; }

/* ------------------
   LEGAL PAGES
   ------------------ */
.page-hero { padding-top: calc(var(--header-offset) + 8px); }
.page-hero-panel {
    position: relative;
    overflow: hidden;
    padding: clamp(36px, 5vw, 56px) clamp(22px, 5vw, 56px);
    border-radius: 24px;
    background: var(--gradient-brand);
    box-shadow: var(--shadow-panel);
    color: rgba(255, 255, 255, 0.82);
}
.page-hero-panel::after {
    content: '';
    position: absolute;
    top: 22px;
    right: 24px;
    width: 34px;
    height: 34px;
    background-image: radial-gradient(circle, rgba(255, 255, 255, 0.4) 2px, transparent 2.5px);
    background-size: 12px 12px;
}
.page-hero-panel h1 {
    margin: 12px 0 8px;
    color: #fff;
    font-size: clamp(2rem, 4.4vw, 3rem);
    font-weight: 800;
}
.page-hero-panel p { margin: 0; }
.breadcrumb-nav { font-size: 0.9rem; }
.breadcrumb-nav a { color: rgba(255, 255, 255, 0.85); }
.breadcrumb-nav a:hover { color: #fff; }

.legal-section { padding: clamp(28px, 4vw, 48px) 0 clamp(56px, 7vw, 88px); }

.legal-toc {
    position: sticky;
    top: var(--header-offset);
    padding: 22px;
    background: var(--matv-surface);
    border: 1px solid var(--matv-border);
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-card);
}
.legal-toc p {
    margin-bottom: 10px;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--matv-muted);
}
.legal-toc ol { margin: 0; padding-left: 1.1rem; }
.legal-toc li { padding: 4px 0; font-size: 0.92rem; }
.legal-toc a { color: var(--matv-text); text-decoration: none; }
.legal-toc a:hover { color: var(--matv-blue-600); }

.legal-content {
    padding: clamp(24px, 4.5vw, 52px);
    background: var(--matv-surface);
    border: 1px solid var(--matv-border);
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-card);
    color: var(--matv-text);
}
.legal-content h2 {
    margin: 2.4rem 0 0.9rem;
    font-size: 1.35rem;
    font-weight: 700;
    scroll-margin-top: var(--header-offset);
}
.legal-content h2:first-child { margin-top: 0; }
.legal-content h3 { margin: 1.5rem 0 0.6rem; font-size: 1.08rem; font-weight: 700; }
.legal-content p,
.legal-content li { line-height: 1.75; }
.legal-content ul,
.legal-content ol { padding-left: 1.25rem; }
.legal-content li + li { margin-top: 4px; }
.legal-content dl { display: grid; grid-template-columns: minmax(150px, 220px) 1fr; gap: 8px 20px; margin: 0; }
.legal-content dt { font-weight: 600; color: var(--matv-ink); }
.legal-content dd { margin: 0; }

.table-wrap { overflow-x: auto; margin: 1rem 0 1.25rem; }
.legal-content table { width: 100%; min-width: 560px; border-collapse: collapse; font-size: 0.95rem; }
.legal-content th,
.legal-content td { padding: 10px 14px; border: 1px solid var(--matv-border); vertical-align: top; text-align: left; }
.legal-content th { background: var(--matv-blue-25); color: var(--matv-ink); font-weight: 600; }

.legal-form {
    margin-top: 1rem;
    padding: 20px 22px;
    border: 1px dashed #b9c4dd;
    border-radius: 12px;
    background: #fbfcff;
}

@media (max-width: 991px) {
    .legal-toc { position: static; margin-bottom: 20px; }
}

@media (max-width: 767px) {
    :root { --header-offset: 92px; }
    .main-header { padding-top: 10px; }
    .main-header .container {
        width: calc(100% - 24px);
        margin-inline: 12px;
        padding: 8px 12px;
    }
    .main-header .navbar { gap: 10px; }
    .brand img { width: 30px; height: 30px; }
    .brand-name { font-size: 1.45rem; }
    .header-cta { margin-left: auto; min-height: 40px; padding: 0.5rem 0.95rem; font-size: 0.88rem; }
    .legal-content dl { grid-template-columns: 1fr; gap: 2px; }
    .legal-content dd { margin-bottom: 10px; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { transition: none !important; }
}
