/* GoNextCountry — light, modern theme. */
:root {
    --bg: #f7f8fc;
    --surface: #ffffff;
    --surface-soft: #f1f4fb;
    --border: #e3e8f2;
    --border-strong: #cfd7e6;
    --text: #0f172a;
    --text-soft: #334155;
    --muted: #64748b;
    --accent: #4f46e5;
    --accent-2: #9333ea;
    --accent-soft: #eef0ff;
    --accent-ink: #3730a3;
    --gradient: linear-gradient(135deg, #4f46e5 0%, #7c3aed 55%, #db2777 100%);
    --success: #0f9f6e;
    --success-soft: #e6f8f1;
    --warning: #b45309;
    --warning-soft: #fff4e5;
    --danger: #dc2626;
    --radius: 16px;
    --radius-sm: 10px;
    --shadow-sm: 0 1px 2px rgba(15, 23, 42, .05);
    --shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 8px 24px rgba(15, 23, 42, .06);
    --shadow-lg: 0 2px 4px rgba(15, 23, 42, .04), 0 18px 40px rgba(79, 70, 229, .12);
    --max-width: 1160px;
    --font: Inter, "Segoe UI Variable", "Segoe UI", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
            Roboto, "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji";
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font);
    font-size: 16px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}
main { flex: 1; }
img { max-width: 100%; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-ink); text-decoration: underline; text-underline-offset: 3px; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4 { line-height: 1.2; letter-spacing: -.02em; color: var(--text); }
h1 { font-size: clamp(1.9rem, 3.6vw, 2.6rem); font-weight: 800; margin: .2em 0 .35em; }
h2 { font-size: 1.35rem; font-weight: 750; margin: 1.6em 0 .6em; }
h3 { font-size: 1.08rem; font-weight: 700; margin: 1.3em 0 .4em; }
:focus-visible { outline: 3px solid rgba(79, 70, 229, .45); outline-offset: 2px; border-radius: 6px; }

.container { width: min(calc(100% - 40px), var(--max-width)); margin: 0 auto; }
.narrow { max-width: 860px; }
.container.narrow { width: min(calc(100% - 40px), 860px); }
.page { padding-block: 36px 72px; }
.lead, .page-lead { font-size: 1.12rem; color: var(--text-soft); max-width: 62ch; }
.muted, .job-muted, .card-meta { color: var(--muted); }
.small { font-size: .9rem; }

/* Header */
.site-header {
    position: sticky; top: 0; z-index: 20;
    background: rgba(255, 255, 255, .82);
    backdrop-filter: saturate(180%) blur(14px);
    -webkit-backdrop-filter: saturate(180%) blur(14px);
    border-bottom: 1px solid var(--border);
}
.nav-container { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 66px; }
.brand { font-size: 1.32rem; font-weight: 850; letter-spacing: -.035em; color: var(--text); }
.brand:hover { text-decoration: none; color: var(--text); }
.brand span { background: var(--gradient); -webkit-background-clip: text; background-clip: text; color: transparent; }
.nav { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.nav > a { color: var(--text-soft); font-weight: 600; font-size: .95rem; padding: 8px 12px; border-radius: 999px; }
.nav > a:hover { background: var(--surface-soft); color: var(--text); text-decoration: none; }
.nav > a.nav-extra { background: var(--text); color: #fff; }
.nav > a.nav-extra:hover { background: var(--accent); color: #fff; }
.language-links { display: inline-flex; align-items: center; gap: 4px; margin-right: 6px; font-size: .82rem;
                  color: var(--muted); border: 1px solid var(--border); border-radius: 999px; padding: 4px 10px; }
.language-links a { color: var(--muted); font-weight: 600; }
.language-links strong { color: var(--text); }

/* Hero */
.hero, .page-hero {
    position: relative; overflow: hidden;
    background:
        radial-gradient(40rem 22rem at 8% -10%, rgba(99, 102, 241, .18), transparent 70%),
        radial-gradient(34rem 20rem at 92% 0%, rgba(236, 72, 153, .14), transparent 70%),
        radial-gradient(30rem 18rem at 60% 110%, rgba(20, 184, 166, .12), transparent 70%),
        var(--bg);
    border-bottom: 1px solid var(--border);
}
.hero { padding-block: 72px 64px; }
.page-hero { padding-block: 40px 34px; }
.page-hero-compact h1 { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.hero h1 { font-size: clamp(2.2rem, 5.2vw, 3.6rem); max-width: 18ch; letter-spacing: -.035em; }
.hero h1 em { font-style: normal; background: var(--gradient); -webkit-background-clip: text; background-clip: text; color: transparent; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; margin: 0; padding: 6px 12px; border-radius: 999px;
           background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-sm);
           font-size: .82rem; font-weight: 650; color: var(--accent-ink); }
.hero-description { font-size: 1.15rem; color: var(--text-soft); max-width: 60ch; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 24px; }
.hero-search { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 28px; padding: 10px; max-width: 760px;
               background: var(--surface); border: 1px solid var(--border); border-radius: 18px; box-shadow: var(--shadow-lg); }
.hero-search input[type="search"], .hero-search select { flex: 1 1 200px; min-width: 0; border: 0; background: transparent; padding: 12px 14px;
                                          font-size: 1rem; outline: none; }
.hero-search select { flex: 0 1 220px; border-left: 1px solid var(--border); }
.crumbs { margin: 0 0 6px; font-size: .9rem; color: var(--muted); }
.flag-img { display: inline-block; vertical-align: -0.15em; width: 1.35em; height: auto; aspect-ratio: 4 / 3;
            border-radius: 3px; box-shadow: 0 0 0 1px rgba(15, 23, 42, .1); object-fit: cover; }
.flag-lg { width: 2.1rem; vertical-align: middle; }
.flag-xl { width: 2.6rem; vertical-align: middle; border-radius: 5px; }

/* Home: from / to */
.hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 40px; align-items: end; }
.route-form { display: flex; align-items: end; gap: 12px; flex-wrap: wrap; margin-top: 28px; padding: 16px; max-width: 820px;
              background: var(--surface); border: 1px solid var(--border); border-radius: 20px; box-shadow: var(--shadow-lg); }
.route-form label { display: flex; flex-direction: column; gap: 6px; flex: 1 1 220px; min-width: 0; }
.route-form label span { font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.route-form select { width: 100%; padding: 12px; font-size: 1rem; }
.route-form .button { padding-block: 13px; }
.route-arrow { align-self: center; margin-top: 18px; font-size: 1.4rem; color: var(--accent); font-weight: 800; }
.hero-alt { margin-top: 14px; font-weight: 600; }
.stat-stack { display: flex; flex-direction: column; gap: 12px; }
.stat-stack .stat { min-width: 0; }
.origin-form { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 10px; font-weight: 600; }
.origin-form select { max-width: 260px; }

/* Buttons */
.button {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 12px 20px; border: 0; border-radius: 12px; cursor: pointer;
    background: var(--gradient); color: #fff; font-weight: 700; font-size: .98rem;
    box-shadow: 0 6px 18px rgba(79, 70, 229, .28); transition: transform .15s ease, box-shadow .15s ease;
}
.button:hover { color: #fff; text-decoration: none; transform: translateY(-1px); box-shadow: 0 10px 24px rgba(79, 70, 229, .34); }
.button-secondary { background: var(--surface); color: var(--text); border: 1px solid var(--border-strong); box-shadow: var(--shadow-sm); }
.button-secondary:hover { color: var(--accent); box-shadow: var(--shadow); }
.button-small { padding: 9px 16px; font-size: .92rem; }

/* Stats */
.stat-row { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 30px; }
.stat { display: flex; flex-direction: column; padding: 14px 20px; border-radius: var(--radius); background: rgba(255, 255, 255, .78);
        border: 1px solid var(--border); box-shadow: var(--shadow-sm); min-width: 150px; }
.stat strong { font-size: 1.7rem; font-weight: 800; letter-spacing: -.03em; }
.stat span { color: var(--muted); font-size: .9rem; }

/* Sections */
.section { padding-block: 48px; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.section-head h2 { margin: 0; font-size: 1.6rem; }
.section-head p { margin: 4px 0 0; color: var(--muted); }

/* Chips and badges */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border-radius: 999px;
        background: var(--surface); border: 1px solid var(--border); color: var(--text-soft); font-weight: 600; font-size: .92rem;
        box-shadow: var(--shadow-sm); transition: border-color .15s, color .15s, transform .15s; }
.chip:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; transform: translateY(-1px); }
.badges { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.badge { display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 999px; font-size: .78rem; font-weight: 700;
         background: var(--surface-soft); color: var(--text-soft); border: 1px solid var(--border); }
.badge-yes { background: var(--success-soft); color: #047857; border-color: #bfeedd; }
.badge-yes::before { content: "✓"; margin-right: 5px; }

/* Cards */
.card-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.card, .panel, .dashboard-card {
    display: block; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
    padding: 20px 22px; box-shadow: var(--shadow); color: var(--text);
}
a.card { transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease; }
a.card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); border-color: #c7cdfb; text-decoration: none; color: var(--text); }
.card h3 { margin: 0 0 4px; font-size: 1.05rem; }
.card p { margin: 4px 0; }
.card-head { display: flex; gap: 14px; align-items: flex-start; }
.company-logo { width: 44px; height: 44px; object-fit: contain; border-radius: 12px; background: #fff; border: 1px solid var(--border); padding: 4px; flex: none; }
.company-logo-large { width: 72px; height: 72px; border-radius: 18px; }
.panel { margin: 18px 0; padding: 24px; }
.panel h2 { margin-top: 0; font-size: 1.2rem; }
.panel-accent { border: 1px solid #d9dcfd; background: linear-gradient(180deg, #ffffff 0%, #f6f6ff 100%); }

/* Country cards (relocation plans) */
.country-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; }
.country-card { display: flex; align-items: center; gap: 12px; padding: 14px 16px; background: var(--surface); border: 1px solid var(--border);
                border-radius: 14px; box-shadow: var(--shadow-sm); color: var(--text); font-weight: 650;
                transition: transform .15s, box-shadow .15s, border-color .15s; }
.country-card-text { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.country-card-text small { color: var(--muted); font-weight: 500; font-size: .85rem; }
.country-grid-wide { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.country-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); border-color: #c7cdfb; text-decoration: none; color: var(--text); }


/* Feature tiles */
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.feature { padding: 22px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-sm); }
.feature .icon { display: inline-grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; background: var(--accent-soft);
                 font-size: 1.3rem; margin-bottom: 10px; }
.feature h3 { margin: 0 0 6px; }
.feature p { margin: 0; color: var(--muted); }

/* Forms */
.filters { display: flex; flex-wrap: wrap; gap: 12px; align-items: end; padding: 16px; margin: 20px 0;
           background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.filters label { display: flex; flex-direction: column; gap: 6px; font-size: .85rem; font-weight: 650; color: var(--text-soft); }
.filters label.check { flex-direction: row; align-items: center; gap: 8px; padding-bottom: 10px; }
input[type="text"], input[type="number"], input[type="email"], input[type="search"], select, textarea {
    padding: 10px 12px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); background: #fff; min-width: 0;
}
input:focus, select:focus, textarea:focus { border-color: var(--accent); outline: 3px solid rgba(79, 70, 229, .15); }
input[type="checkbox"], input[type="radio"] { accent-color: var(--accent); width: 1.05em; height: 1.05em; }
.field { margin: 0 0 16px; max-width: 340px; }
.field label, .sim-field label { display: block; margin-bottom: 6px; font-weight: 650; font-size: .92rem; }
.field input, .sim-field input, .sim-field select { width: 100%; }
.field small, .sim-field small { display: block; margin-top: 6px; color: var(--muted); }
.errorlist { color: var(--danger); margin: 6px 0 0; padding: 0; list-style: none; font-size: .9rem; }
.form-error { color: var(--danger); font-weight: 600; }
fieldset { border: 0; padding: 0; margin: 0; }
legend { font-weight: 700; margin-bottom: 8px; padding: 0; }
.pills { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.pills legend { width: 100%; }
.pill { position: relative; cursor: pointer; }
.pill input { position: absolute; opacity: 0; pointer-events: none; }
.pill span { display: inline-block; padding: 9px 16px; border-radius: 999px; border: 1px solid var(--border-strong); background: #fff;
             font-weight: 600; font-size: .94rem; transition: all .15s; }
.pill input:checked + span { background: var(--accent); border-color: var(--accent); color: #fff; box-shadow: 0 4px 12px rgba(79, 70, 229, .25); }
.pill input:focus-visible + span { outline: 3px solid rgba(79, 70, 229, .4); outline-offset: 2px; }

/* Messages */
.site-messages { margin-top: 16px; }
.site-message { padding: 12px 16px; border-radius: var(--radius-sm); background: var(--accent-soft); color: var(--accent-ink); border: 1px solid #d9dcfd; }
.site-message-error { background: #fef2f2; color: #991b1b; border-color: #fecaca; }

/* Lists of vacancies, companies */
.pagination { display: flex; gap: 14px; align-items: center; justify-content: center; margin-top: 28px; }
.pagination a { padding: 8px 14px; border-radius: 999px; background: var(--surface); border: 1px solid var(--border); font-weight: 600; }
.country-group { margin-top: 28px; }
.evidence { margin: 10px 0; padding: 12px 16px; border-left: 3px solid var(--success); background: var(--success-soft); border-radius: 0 10px 10px 0; color: var(--text-soft); }

/* Job page */
.job-page { padding-block: 32px 72px; max-width: 900px; }
.job-panel { margin: 18px 0; padding: 22px 24px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.job-panel h2 { margin-top: 0; font-size: 1.1rem; }
.job-panel-accent { border-color: #d9dcfd; background: linear-gradient(180deg, #ffffff 0%, #f6f6ff 100%); }
.job-salary { font-size: 1.35rem; font-weight: 800; letter-spacing: -.02em; margin: 6px 0; }
.techmatch-job-description { overflow-wrap: anywhere; line-height: 1.7; max-width: 80ch; color: var(--text-soft); }
.techmatch-job-description p { margin: .85em 0; }
.techmatch-job-description h2, .techmatch-job-description h3, .techmatch-job-description h4 { margin: 1.3em 0 .5em; }
.techmatch-job-description ul, .techmatch-job-description ol { padding-left: 1.6rem; margin: .8em 0; }
.techmatch-job-description li { margin: .3em 0; }
.techmatch-job-description a { text-decoration: underline; }
.techmatch-job-description blockquote { border-left: 3px solid var(--border); padding-left: 1em; color: var(--muted); }

/* Relocation plans */
.plan-page { padding-block: 26px 72px; }
.plan-summary { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; }
.plan-summary .panel { margin: 0; }
.plan-form { display: block; }
.big-number { font-size: 2.3rem; font-weight: 850; letter-spacing: -.04em; margin: 4px 0 8px; line-height: 1.1;
              background: var(--gradient); -webkit-background-clip: text; background-clip: text; color: transparent; }
.big-number span { display: block; font-size: .95rem; font-weight: 600; letter-spacing: 0; color: var(--muted); -webkit-text-fill-color: var(--muted); }
.ok { color: #047857; font-weight: 650; padding: 10px 14px; background: var(--success-soft); border-radius: var(--radius-sm); }
.ok::before { content: "✓ "; }
.warn { color: var(--warning); font-weight: 650; padding: 10px 14px; background: var(--warning-soft); border-radius: var(--radius-sm); }
.levels { padding-left: 1.2rem; }
.levels li { margin: 6px 0; }

.partner-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px 24px; }
.partner-grid h3 { margin: 6px 0; font-size: .95rem; }
.partner-grid ul { list-style: none; padding: 0; margin: 0; }
.partner-grid li { margin: 0 0 10px; }

/* Long-form text (guides, plans, legal) */
.prose { line-height: 1.75; color: var(--text-soft); }
.prose h2 { margin-top: 2em; padding-top: .2em; font-size: 1.45rem; }
.prose h3 { color: var(--text); }
.prose ul, .prose ol { padding-left: 1.4rem; }
.prose li { margin: 8px 0; }
.prose li::marker { color: var(--accent); font-weight: 700; }
.prose strong { color: var(--text); }
.prose a { text-decoration: underline; text-decoration-color: rgba(79, 70, 229, .35); text-underline-offset: 3px; }
.plan-body > h2 { display: flex; align-items: center; gap: 10px; }
.plan-body > h2::before { content: ""; width: 6px; height: 1.1em; border-radius: 3px; background: var(--gradient); }
.plan-body ol { counter-reset: step; list-style: none; padding-left: 0; }
.plan-body ol > li { counter-increment: step; position: relative; padding: 12px 16px 12px 54px; margin: 10px 0;
                     background: var(--surface); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow-sm); }
.plan-body ol > li::before { content: counter(step); position: absolute; left: 14px; top: 12px; width: 28px; height: 28px;
                             display: grid; place-items: center; border-radius: 50%; background: var(--accent-soft);
                             color: var(--accent-ink); font-weight: 800; font-size: .88rem; }

/* Relocation centre (legacy class names kept by the guide and simulator pages) */
.dashboard-section { padding-block: 32px 72px; }
.relocation-page { max-width: 900px; }
.relocation-page .dashboard-card { margin: 18px 0; }
.guide-body { line-height: 1.75; color: var(--text-soft); }
.guide-body h2 { margin-top: 1.8em; font-size: 1.3rem; }
.guide-body li { margin: 7px 0; }
.guide-body a { text-decoration: underline; }
.guide-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.guide-card, .tool-card { display: block; color: var(--text); }
a.guide-card:hover, a.tool-card:hover { text-decoration: none; color: var(--text); box-shadow: var(--shadow-lg); transform: translateY(-2px); }
.guide-card h3 { margin: 0 0 6px; font-size: 1.02rem; }
.guide-card p, .tool-card p { margin: 0; color: var(--muted); }
.tool-card { border: 1px solid #d9dcfd; background: linear-gradient(135deg, #ffffff 0%, #f3f2ff 100%); transition: transform .15s, box-shadow .15s; }
.tool-card h2 { margin-top: 0; }
.tool-card span { font-weight: 700; color: var(--accent); }
.sim-form fieldset { border: 1px solid var(--border); border-radius: 14px; padding: 16px; margin: 0 0 16px;
                     display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.sim-form legend { padding: 0 6px; }
.sim-result table { width: 100%; border-collapse: collapse; }
.sim-result th, .sim-result td { padding: 10px 6px; border-bottom: 1px solid var(--border); text-align: left; }
.sim-result td { text-align: right; font-weight: 650; }
.sim-total th, .sim-total td { font-size: 1.1rem; font-weight: 800; border-bottom: 0; }
.sim-diff { padding: 12px 14px; background: var(--accent-soft); border-radius: var(--radius-sm); color: var(--accent-ink); }

/* Legal pages */
.legal-page { max-width: 820px; line-height: 1.7; color: var(--text-soft); }
.legal-page h2 { font-size: 1.2rem; margin-top: 1.8em; }

/* Footer */
.site-footer { margin-top: 40px; border-top: 1px solid var(--border); background: var(--surface); }
.footer-inner { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-block: 26px; color: var(--muted); font-size: .9rem; }
.footer-inner a { color: var(--text-soft); }

@media (max-width: 900px) {
    .hero-grid { grid-template-columns: 1fr; }
    .stat-stack { flex-direction: row; flex-wrap: wrap; }
    .route-arrow { display: none; }
}
@media (max-width: 720px) {
    .nav-container { flex-wrap: wrap; padding-block: 10px; }
    .nav > a { padding: 7px 10px; font-size: .9rem; }
    .hero { padding-block: 44px 40px; }
    .hero-search select { border-left: 0; border-top: 1px solid var(--border); flex-basis: 100%; }
    .sim-form fieldset { grid-template-columns: 1fr; }
    .plan-body ol > li { padding-left: 48px; }
    .big-number { font-size: 2rem; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; }
}
