/* =====================================================
   Montage.com — Base stylesheet
   Mobile-first, system font, warm cream/navy B2B palette (Sep 2026, ref. babyletto.com).
   Soft cornflower #5b86e5 + warm dark #252627 + warm cream #fbf9f7.
   No external fonts. No CSS frameworks. Plain CSS only.
   ===================================================== */

:root {
    /* Primary (warm brown — R>>B so it reads as brown on monitors, not blue) */
    --color-navy: #3a2a20;
    --color-navy-dark: #2a1c14;
    /* Accent (soft cornflower — replaces harsh royal blue) */
    --color-accent: #5b86e5;
    --color-accent-dark: #4a6dc7;
    /* Sparing secondary (terracotta) */
    --color-accent-warm: #853a2d;
    /* Text scale (warm grays) */
    --color-dark: #1a1716;
    --color-text: #4c4543;
    --color-muted: #6b6560;
    /* Surfaces (warm cream replaces cold #f8fafc) */
    --color-light: #fbf9f7;
    --color-border: #e8e4dd;
    --color-white: #ffffff;
    --color-header-bg: #f5f4f0;  /* matches montage-logo.png BG exactly */
    /* Functional */
    --color-success: #059669;
    --color-error: #dc2626;

    --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial,
        "Microsoft JhengHei", "PingFang TC", "PingFang SC", "Hiragino Sans GB",
        "Noto Sans CJK TC", "Noto Sans CJK SC", sans-serif;

    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;

    --shadow-sm: 0 1px 2px rgba(37, 38, 39, 0.06);
    --shadow-md: 0 4px 12px rgba(37, 38, 39, 0.08);
    --shadow-lg: 0 12px 32px rgba(37, 38, 39, 0.12);

    --container: 1200px;
    --header-h: 72px;
}

/* ---------- Reset / base ---------- */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
    font-family: var(--font-sans);
    font-size: 16px;
    line-height: 1.6;
    color: var(--color-text);
    background: var(--color-white);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}
img, svg { max-width: 100%; height: auto; display: block; }
a { color: var(--color-accent); text-decoration: none; transition: color .15s; }
a:hover { color: var(--color-accent-dark); }
h1, h2, h3, h4, h5, h6 { color: var(--color-dark); margin: 0 0 .5em; line-height: 1.25; font-weight: 700; }
h1 { font-size: clamp(1.875rem, 4vw, 2.75rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); }
h3 { font-size: clamp(1.125rem, 2vw, 1.375rem); }
p { margin: 0 0 1em; }

/* ---------- Layout ---------- */
.container {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 16px;
}
@media (min-width: 768px) { .container { padding: 0 24px; } }
.section { padding: 40px 0; }
@media (min-width: 768px) { .section { padding: 64px 0; } }
.section--light { background: var(--color-light); }
.section--dark { background: var(--color-navy-dark); color: var(--color-white); }
.section--dark h1, .section--dark h2, .section--dark h3 { color: var(--color-white); }

.section-eyebrow {
    display: inline-block;
    font-size: .8125rem;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--color-accent);
    margin-bottom: 12px;
}
.section-title { margin-bottom: 12px; }
.section-subtitle { color: var(--color-muted); font-size: 1.0625rem; margin-bottom: 36px; max-width: 720px; }
.section--dark .section-subtitle { color: rgba(255,255,255,.85); }
.text-center { text-align: center; }
.text-center .section-subtitle { margin-left: auto; margin-right: auto; }

/* ---------- Buttons ---------- */
.btn {
    display: inline-block;
    padding: 12px 24px;
    font-size: .9375rem;
    font-weight: 600;
    border-radius: var(--radius-md);
    border: 1px solid transparent;
    cursor: pointer;
    transition: all .15s;
    text-align: center;
    line-height: 1.4;
    white-space: nowrap;
}
.btn-primary {
    background: var(--color-navy);
    color: var(--color-white);
    border-color: var(--color-navy);
}
.btn-primary:hover {
    background: var(--color-navy-dark);
    border-color: var(--color-navy-dark);
    color: var(--color-white);
}
.btn-secondary {
    background: var(--color-white);
    color: var(--color-navy);
    border-color: rgba(255,255,255,.4);
}
.btn-secondary:hover {
    background: var(--color-light);
    color: var(--color-navy-dark);
}
.btn-ghost {
    background: transparent;
    color: var(--color-navy);
    border-color: var(--color-border);
}
.btn-ghost:hover {
    background: var(--color-light);
    border-color: var(--color-navy);
    color: var(--color-navy);
}
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- Header / Nav ---------- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--color-header-bg);
    border-bottom: 1px solid var(--color-border);
    height: var(--header-h);
    display: flex;
    align-items: center;
}
.site-header .container {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}
.site-logo {
    font-size: 1.375rem;
    font-weight: 800;
    color: var(--color-navy);
    letter-spacing: -.5px;
}
.site-logo:hover { color: var(--color-navy-dark); }
.site-logo small {
    display: block;
    font-size: .6875rem;
    font-weight: 500;
    color: var(--color-muted);
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-top: -2px;
}
.site-logo img { height: 56px; width: auto; display: block; }
.site-footer .site-logo img { height: 56px; width: auto; }
.site-nav {
    display: none;
    gap: 28px;
    align-items: center;
}
.site-nav a {
    color: var(--color-text);
    font-size: .9375rem;
    font-weight: 500;
    padding: 6px 0;
    border-bottom: 2px solid transparent;
    transition: all .15s;
}
.site-nav a:hover,
.site-nav a.active {
    color: var(--color-navy);
    border-bottom-color: var(--color-navy);
}
.nav-actions { display: flex; align-items: center; gap: 12px; }

/* Language switcher */
.lang-switch {
    position: relative;
}
.lang-switch-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    font-size: .8125rem;
    font-weight: 600;
    color: var(--color-text);
    background: var(--color-light);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all .15s;
}
.lang-switch-btn:hover { border-color: var(--color-navy); color: var(--color-navy); }
.lang-switch-btn::after {
    content: "";
    width: 8px;
    height: 8px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg);
    margin-left: 2px;
    margin-top: -3px;
}
.lang-switch-menu {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    min-width: 180px;
    background: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    padding: 6px;
    display: none;
    z-index: 110;
}
.lang-switch-menu.open { display: block; }
.lang-switch-menu a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    color: var(--color-text);
    font-size: .875rem;
    border-radius: var(--radius-sm);
    border-bottom: none;
}
.lang-switch-menu a:hover { background: var(--color-light); color: var(--color-navy); }
.lang-switch-menu a.active { color: var(--color-navy); font-weight: 700; background: var(--color-light); }
.lang-switch-menu .lang-code {
    display: inline-block;
    width: 28px;
    font-size: .6875rem;
    font-weight: 700;
    color: var(--color-muted);
    text-transform: uppercase;
}

/* Mobile menu toggle */
.menu-toggle {
    display: flex;
    flex-direction: column;
    gap: 5px;
    width: 36px;
    height: 36px;
    padding: 8px;
    background: transparent;
    border: 0;
    cursor: pointer;
    align-items: center;
    justify-content: center;
}
.menu-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    background: var(--color-navy);
    border-radius: 2px;
    transition: all .2s;
}
.menu-toggle.open span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.menu-toggle.open span:nth-child(2) { opacity: 0; }
.menu-toggle.open span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* ---------- Hero ---------- */
.hero {
    background: linear-gradient(135deg, var(--color-navy-dark) 0%, var(--color-navy) 60%, var(--color-accent-warm) 100%);
    color: var(--color-white);
    padding: 48px 0 56px;
    position: relative;
    overflow: hidden;
}
@media (min-width: 768px) {
    .hero { padding: 48px 0 56px; }
}
.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 20% 30%, rgba(255,255,255,.08) 0, transparent 40%),
        radial-gradient(circle at 80% 70%, rgba(255,255,255,.06) 0, transparent 40%);
    pointer-events: none;
}
.hero .container {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 16px;
}
@media (min-width: 900px) {
    .hero .container {
        display: grid;
        grid-template-columns: 1.05fr 1fr;
        gap: 48px;
        align-items: center;
    }
}
.hero-text {
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.hero-text > * { margin: 0; }
.hero-text .btn-row { margin-top: 8px; }
.hero-eyebrow {
    display: inline-block;
    font-size: .8125rem;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: rgba(255,255,255,.85);
    background: rgba(255,255,255,.08);
    padding: 6px 14px;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,.15);
    margin-bottom: 20px;
}
.hero h1 {
    color: var(--color-white);
    font-size: clamp(1.875rem, 3.6vw, 2.75rem);
    max-width: 820px;
    line-height: 1.18;
    margin-bottom: 0;
}
.hero-subtitle {
    font-size: clamp(1rem, 1.4vw, 1.125rem);
    color: rgba(255,255,255,.92);
    max-width: 720px;
    margin-bottom: 0;
}
.hero .btn-secondary {
    background: transparent;
    color: var(--color-white);
    border-color: rgba(255,255,255,.5);
}
.hero .btn-secondary:hover {
    background: rgba(255,255,255,.12);
    color: var(--color-white);
    border-color: var(--color-white);
}

/* ---------- Page hero (sub-pages) ---------- */
.page-hero {
    background: linear-gradient(135deg, var(--color-navy) 0%, var(--color-accent-warm) 100%);
    color: var(--color-white);
    padding: 40px 0 36px;
}
.page-hero .container {
    display: flex;
    flex-direction: column;
    gap: 16px;
}
@media (min-width: 900px) {
    .page-hero .container {
        display: grid;
        grid-template-columns: 1.05fr 1fr;
        gap: 48px;
        align-items: center;
    }
}
.page-hero-text {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.page-hero-text > * { margin: 0; }
.page-hero h1 { color: var(--color-white); margin-bottom: 0; font-size: clamp(1.875rem, 3.6vw, 2.5rem); }
.page-hero-lead { font-size: 1.0625rem; color: rgba(255,255,255,.92); max-width: 720px; margin-bottom: 0; }

/* ---------- Hero / page-hero images ---------- */
.hero-image {
    margin-top: 8px;
    text-align: center;
}
@media (min-width: 900px) {
    .hero-image {
        grid-column: 2;
        grid-row: 1 / -1;
        align-self: center;
        margin-top: 0;
    }
}
.hero-image img {
    max-width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    border-radius: 14px;
    box-shadow: 0 16px 40px -12px rgba(0,0,0,.35);
    background: rgba(255,255,255,.04);
    padding: 6px;
}
.page-hero-image {
    margin-top: 8px;
    text-align: center;
}
@media (min-width: 900px) {
    .page-hero-image {
        grid-column: 2;
        grid-row: 1 / -1;
        align-self: center;
        margin-top: 0;
    }
}
.page-hero-image img {
    max-width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    border-radius: 12px;
    box-shadow: 0 12px 32px -10px rgba(0,0,0,.25);
    background: rgba(255,255,255,.06);
    padding: 6px;
}
@media (max-width: 640px) {
    .hero-image { margin-top: 24px; }
    .hero-image img { width: 100%; padding: 4px; }
    .page-hero-image { margin-top: 20px; }
    .page-hero-image img { padding: 4px; }
}
.footer-pattern { display:block; width:100%; height: 120px; overflow:hidden; position:relative; }
.footer-pattern img { display:block; width:100%; height:100%; object-fit:cover; object-position:center; opacity:0.85; }
.site-footer { position:relative; }
.site-footer > .container {
    position:relative;
    z-index:1;
    padding-top: 48px;
    padding-left: 24px;
    padding-right: 24px;
}
@media (min-width: 768px) {
    .site-footer > .container {
        padding-top: 64px;
        padding-left: 48px;
        padding-right: 48px;
    }
}

/* ---------- Grid (mobile-first: 1-col, then 2-col @640, then full @900) ---------- */
.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: 1fr; }
.grid-3 { grid-template-columns: 1fr; }
.grid-4 { grid-template-columns: 1fr; }
.grid-6 { grid-template-columns: 1fr; }

@media (min-width: 560px) {
    .grid-2 { grid-template-columns: repeat(2, 1fr); }
    .grid-3 { grid-template-columns: repeat(2, 1fr); }
    .grid-4 { grid-template-columns: repeat(2, 1fr); }
    .grid-6 { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 900px) {
    .grid-3 { grid-template-columns: repeat(3, 1fr); }
    .grid-4 { grid-template-columns: repeat(4, 1fr); }
    .grid-6 { grid-template-columns: repeat(6, 1fr); }
}

/* ---------- Cards ---------- */
.card {
    background: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 24px;
    transition: all .15s;
}
.card:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--color-navy);
    transform: translateY(-2px);
}
.card-num {
    display: inline-block;
    font-size: .8125rem;
    font-weight: 700;
    color: var(--color-accent);
    margin-bottom: 8px;
}
.card-title {
    font-size: 1.0625rem;
    font-weight: 700;
    color: var(--color-dark);
    margin-bottom: 8px;
}
.card-desc {
    font-size: .9375rem;
    color: var(--color-muted);
    margin: 0;
    line-height: 1.55;
}
.card-subtitle {
    font-size: .75rem;
    font-weight: 700;
    color: var(--color-accent);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin: -4px 0 10px;
}

/* Country card */
.country-card {
    text-align: center;
    padding: 24px 16px;
}
.country-flag {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--color-navy);
    background: var(--color-light);
    border-radius: 50%;
    width: 56px;
    height: 56px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
    border: 2px solid var(--color-border);
}
.country-name {
    font-size: 1.0625rem;
    font-weight: 700;
    color: var(--color-dark);
    margin-bottom: 4px;
}
.country-tagline {
    font-size: .8125rem;
    color: var(--color-muted);
    margin-bottom: 0;
}

/* Service card */
.service-card { padding: 28px 24px; }
.service-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    background: var(--color-light);
    color: var(--color-navy);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    font-weight: 800;
    margin-bottom: 16px;
}

/* Value card (for why-us / about values) */
.value-card { padding: 24px; }

/* ---------- Stats bar ---------- */
.stats-bar {
    background: var(--color-light);
    border-radius: var(--radius-lg);
    padding: 24px 20px;
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
    margin: 24px 0;
    border: 1px solid var(--color-border);
}
@media (min-width: 560px) {
    .stats-bar { grid-template-columns: repeat(2, 1fr); gap: 20px; padding: 28px 24px; }
}
@media (min-width: 768px) {
    .stats-bar { grid-template-columns: repeat(3, 1fr); padding: 40px 32px; gap: 24px; margin: 32px 0; }
}
.stat-num {
    font-size: clamp(2rem, 4vw, 2.75rem);
    font-weight: 800;
    color: var(--color-navy);
    line-height: 1;
}
.stat-desc {
    font-size: .875rem;
    color: var(--color-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
    margin-top: 4px;
}

/* ---------- CTA block ---------- */
.cta-block {
    background: linear-gradient(135deg, #5c2a18 0%, #853a2d 100%);
    color: var(--color-white);
    border-radius: var(--radius-lg);
    padding: 32px 20px;
    text-align: center;
    margin: 32px 0;
}
@media (min-width: 768px) {
    .cta-block { padding: 48px 32px; margin: 48px 0; }
}
.cta-block h2 { color: var(--color-white); margin-bottom: 12px; }
.cta-block p { color: rgba(255,255,255,.9); max-width: 600px; margin-left: auto; margin-right: auto; }

/* ---------- Forms ---------- */
.contact-form {
    background: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 32px;
    box-shadow: var(--shadow-sm);
}
.form-row { margin-bottom: 20px; }
.form-row label {
    display: block;
    font-size: .875rem;
    font-weight: 600;
    color: var(--color-dark);
    margin-bottom: 6px;
}
.form-row label .req {
    color: var(--color-error);
    margin-left: 4px;
}
.form-row input,
.form-row textarea,
.form-row select {
    width: 100%;
    padding: 10px 14px;
    font-size: 1rem;
    font-family: inherit;
    color: var(--color-text);
    background: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    transition: all .15s;
}
.form-row input:focus,
.form-row textarea:focus,
.form-row select:focus {
    outline: none;
    border-color: var(--color-navy);
    box-shadow: 0 0 0 3px rgba(91, 134, 229, 0.18);
}
.form-row textarea { min-height: 120px; resize: vertical; }
.form-row.has-error input,
.form-row.has-error textarea { border-color: var(--color-error); }
.form-error {
    display: block;
    color: var(--color-error);
    font-size: .8125rem;
    margin-top: 4px;
}
.form-honeypot {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    opacity: 0;
}
.form-message {
    padding: 14px 16px;
    border-radius: var(--radius-md);
    margin-bottom: 20px;
    font-size: .9375rem;
    font-weight: 500;
}
.form-message.success {
    background: #ecfdf5;
    color: var(--color-success);
    border: 1px solid #a7f3d0;
}
.form-message.error {
    background: #fef2f2;
    color: var(--color-error);
    border: 1px solid #fecaca;
}

/* ---------- Office info ---------- */
.office-info {
    background: var(--color-light);
    border-radius: var(--radius-lg);
    padding: 32px;
}
.office-info h3 { margin-bottom: 16px; }
.office-line {
    display: flex;
    flex-direction: column;
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--color-border);
}
.office-line:last-child { border-bottom: 0; padding-bottom: 0; margin-bottom: 0; }
.office-label {
    font-size: .75rem;
    font-weight: 700;
    color: var(--color-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 4px;
}
.office-value {
    font-size: .9375rem;
    color: var(--color-text);
}

/* ---------- Footer ---------- */
.site-footer {
    background: #563a34;
    color: rgba(255,255,255,.8);
    padding: 0 0 56px;
    margin-top: 128px;
}
.site-footer h4 {
    color: var(--color-white);
    font-size: .9375rem;
    margin-bottom: 16px;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 700;
}
.site-footer a { color: rgba(255,255,255,.75); }
.site-footer a:hover { color: var(--color-white); }
.footer-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
    margin-bottom: 48px;
}
@media (min-width: 768px) {
    .footer-grid { grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 40px; }
}
.footer-tagline {
    font-size: .875rem;
    color: rgba(255,255,255,.65);
    line-height: 1.6;
    margin-top: 12px;
}
.footer-list { list-style: none; padding: 0; margin: 0; }
.footer-list li { margin-bottom: 12px; font-size: .875rem; }
.footer-bottom {
    border-top: 1px solid rgba(255,255,255,.1);
    padding-top: 32px;
    font-size: .8125rem;
    color: rgba(255,255,255,.5);
    text-align: center;
}

/* ---------- Mobile menu (off-canvas) ---------- */
.mobile-menu {
    position: fixed;
    inset: var(--header-h) 0 0 0;
    background: var(--color-white);
    z-index: 90;
    padding: 24px;
    display: none;
    overflow-y: auto;
    border-top: 1px solid var(--color-border);
}
.mobile-menu.open { display: block; }
.mobile-menu a {
    display: block;
    padding: 14px 0;
    font-size: 1.0625rem;
    font-weight: 600;
    color: var(--color-text);
    border-bottom: 1px solid var(--color-border);
}
.mobile-menu a.active { color: var(--color-navy); }
.mobile-menu .lang-switch-mobile {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--color-border);
}
.mobile-menu .lang-switch-mobile a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--color-border);
    font-size: 1rem;
    padding: 12px 0;
}
.mobile-menu .lang-switch-mobile a:last-child { border-bottom: 0; }

/* ---------- 404 ---------- */
.notfound {
    text-align: center;
    padding: 96px 24px;
    min-height: 60vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}
.notfound-code {
    font-size: clamp(4rem, 12vw, 8rem);
    font-weight: 800;
    color: var(--color-navy);
    line-height: 1;
    margin-bottom: 16px;
    opacity: .15;
}

/* ---------- Responsive: desktop nav ---------- */
@media (min-width: 900px) {
    .site-nav { display: flex; }
    .menu-toggle { display: none; }
    .mobile-menu { display: none !important; }
}

/* ---------- Utility ---------- */
.mt-0 { margin-top: 0; }
.mt-2 { margin-top: 12px; }
.mt-4 { margin-top: 24px; }
.mb-0 { margin-bottom: 0; }
.text-muted { color: var(--color-muted); }
.lead { font-size: 1.125rem; color: var(--color-muted); }

/* ---------- Print ---------- */
@media print {
    .site-header, .site-footer, .menu-toggle, .lang-switch { display: none; }
}