/* ============================================================
   CSS Reset + Custom Properties
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --navy:      #0B2B40;
    --navy-mid:  #0e3350;
    --navy-lite: #143d5e;
    --orange:    #F28C38;
    --orange-dk: #d4731e;
    --white:     #ffffff;
    --off-white: #f5f7fa;
    --gray-100:  #eef1f5;
    --gray-300:  #c2cbd6;
    --gray-500:  #7e8fa3;
    --gray-700:  #3d4f60;
    --text:      #1a2b3c;

    --font-display: 'Syne', sans-serif;
    --font-body:    'Onest', sans-serif;

    --radius:    12px;
    --radius-lg: 20px;
    --shadow:    0 4px 24px rgba(11,43,64,.10);
    --shadow-lg: 0 12px 48px rgba(11,43,64,.18);

    --container: 1200px;
    --gap:       clamp(1.5rem, 4vw, 3rem);
}

html { scroll-behavior: smooth; }

body {
    font-family: var(--font-body);
    font-size: 1rem;
    line-height: 1.65;
    color: var(--text);
    background: var(--white);
    -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; }
a   { color: inherit; text-decoration: none; }

/* ============================================================
   Utilities
   ============================================================ */
.container {
    max-width: var(--container);
    margin-inline: auto;
    padding-inline: clamp(1rem, 5vw, 2rem);
}

.section { padding-block: clamp(3rem, 8vw, 6rem); }

.tag {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    font-size: .75rem;
    font-weight: 600;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--orange);
    border: 1px solid color-mix(in srgb, var(--orange) 30%, transparent);
    border-radius: 100px;
    padding: .25rem .75rem;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    font-family: var(--font-display);
    font-weight: 700;
    border-radius: var(--radius);
    cursor: pointer;
    transition: transform .15s, box-shadow .15s, background .15s;
    border: none;
    text-decoration: none;
    white-space: nowrap;
}
.btn:hover  { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

.btn-primary {
    background: var(--orange);
    color: var(--white);
    padding: .85rem 2rem;
    font-size: 1rem;
    box-shadow: 0 4px 20px rgba(242,140,56,.35);
}
.btn-primary:hover {
    background: var(--orange-dk);
    box-shadow: 0 8px 28px rgba(242,140,56,.45);
}

.btn-outline {
    background: transparent;
    color: var(--navy);
    padding: .8rem 1.8rem;
    font-size: 1rem;
    border: 2px solid var(--navy);
}
.btn-outline:hover { background: var(--navy); color: var(--white); }

.btn-outline-white {
    background: transparent;
    color: var(--white);
    padding: .8rem 1.8rem;
    font-size: 1rem;
    border: 2px solid rgba(255,255,255,.4);
}
.btn-outline-white:hover { background: rgba(255,255,255,.12); border-color: var(--white); }

.btn-sm { padding: .6rem 1.25rem; font-size: .875rem; border-radius: 8px; }

/* ============================================================
   Header
   ============================================================ */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(11,43,64,.95);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255,255,255,.06);
}

.site-header .container {
    display: flex;
    align-items: center;
    gap: 2rem;
    height: 68px;
}

.logo {
    display: flex;
    align-items: center;
    gap: .5rem;
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--white);
    text-decoration: none;
    flex-shrink: 0;
}
.logo-mark {
    color: var(--orange);
    font-size: 1.4rem;
    line-height: 1;
}
.logo-text em { color: var(--orange); font-style: normal; }

.main-nav {
    display: flex;
    gap: 1.75rem;
    margin-left: auto;
}
.main-nav a {
    font-size: .9rem;
    font-weight: 500;
    color: rgba(255,255,255,.75);
    transition: color .2s;
}
.main-nav a:hover { color: var(--white); }

.burger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: .4rem;
}
.burger span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--white);
    border-radius: 2px;
    transition: all .3s;
}

/* ============================================================
   Hero
   ============================================================ */
.hero {
    background: var(--navy);
    position: relative;
    overflow: hidden;
    padding-block: clamp(4rem, 12vw, 9rem);
}

/* Сетка на фоне */
.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255,255,255,.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,.03) 1px, transparent 1px);
    background-size: 60px 60px;
    pointer-events: none;
}

/* Свечение */
.hero::after {
    content: '';
    position: absolute;
    top: -20%;
    right: -10%;
    width: 60%;
    height: 80%;
    background: radial-gradient(ellipse, rgba(242,140,56,.12) 0%, transparent 70%);
    pointer-events: none;
}

.hero .container { position: relative; z-index: 1; }

.hero-tag { margin-bottom: 1.5rem; }

.hero h1 {
    font-family: var(--font-display);
    font-size: clamp(2.2rem, 5.5vw, 4rem);
    font-weight: 800;
    line-height: 1.15;
    color: var(--white);
    max-width: 720px;
    margin-bottom: 1.5rem;
}

.hero h1 em {
    font-style: normal;
    color: var(--orange);
}

.hero-sub {
    font-size: clamp(1rem, 2vw, 1.2rem);
    color: rgba(255,255,255,.65);
    max-width: 520px;
    margin-bottom: 2.5rem;
    font-weight: 300;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.hero-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 2.5rem;
    margin-top: 4rem;
    padding-top: 2.5rem;
    border-top: 1px solid rgba(255,255,255,.08);
}

.hero-stat strong {
    display: block;
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 800;
    color: var(--orange);
    line-height: 1;
}

.hero-stat span {
    font-size: .85rem;
    color: rgba(255,255,255,.5);
    margin-top: .25rem;
}

/* ============================================================
   Cards — Why work with us
   ============================================================ */
.why { background: var(--off-white); }

.section-header {
    text-align: center;
    margin-bottom: clamp(2rem, 5vw, 3.5rem);
}

.section-header h2 {
    font-family: var(--font-display);
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    font-weight: 800;
    color: var(--navy);
    line-height: 1.2;
    margin-top: .75rem;
}

.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.5rem;
}

.card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--gray-100);
    transition: transform .2s, box-shadow .2s;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }

.card-icon {
    font-size: 2rem;
    margin-bottom: 1rem;
    display: block;
}

.card h3 {
    font-family: var(--font-display);
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--navy);
    margin-bottom: .5rem;
}

.card p {
    font-size: .9rem;
    color: var(--gray-700);
    line-height: 1.6;
}

/* ============================================================
   Vacancies preview
   ============================================================ */
.vacancies-preview { background: var(--white); }

.vacancy-cards { display: flex; flex-direction: column; gap: 1rem; margin-bottom: 2.5rem; }

.vacancy-card {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    background: var(--white);
    border: 1.5px solid var(--gray-100);
    border-radius: var(--radius);
    padding: 1.5rem 2rem;
    transition: border-color .2s, box-shadow .2s;
    text-decoration: none;
    color: inherit;
}
.vacancy-card:hover {
    border-color: var(--orange);
    box-shadow: 0 4px 20px rgba(242,140,56,.12);
}

.vacancy-card-body { flex: 1; }

.vacancy-card h3 {
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--navy);
    margin-bottom: .35rem;
}

.vacancy-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    align-items: center;
    font-size: .82rem;
    color: var(--gray-500);
}

.vacancy-card-meta .dot { color: var(--gray-300); }

.vacancy-badge {
    font-size: .72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .05em;
    padding: .2rem .65rem;
    border-radius: 100px;
    background: color-mix(in srgb, var(--orange) 12%, transparent);
    color: var(--orange-dk);
}

.vacancy-arrow {
    font-size: 1.5rem;
    color: var(--gray-300);
    transition: color .2s, transform .2s;
    flex-shrink: 0;
}
.vacancy-card:hover .vacancy-arrow { color: var(--orange); transform: translateX(4px); }

.section-footer { text-align: center; }

/* ============================================================
   Hiring steps
   ============================================================ */
.hiring { background: var(--navy); }
.hiring .section-header h2 { color: var(--white); }

.steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2.5rem;
}

.step {
    background: rgba(255,255,255,.05);
    border: 1px solid rgba(255,255,255,.08);
    border-radius: var(--radius-lg);
    padding: 2rem;
    position: relative;
}

.step-num {
    font-family: var(--font-display);
    font-size: 3rem;
    font-weight: 800;
    color: rgba(242,140,56,.2);
    line-height: 1;
    margin-bottom: .75rem;
}

.step h3 {
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 700;
    color: var(--white);
    margin-bottom: .5rem;
}

.step p { font-size: .875rem; color: rgba(255,255,255,.55); line-height: 1.6; }

.hiring-note {
    text-align: center;
    color: rgba(255,255,255,.4);
    font-size: .875rem;
}
.hiring-note strong { color: var(--orange); }

/* ============================================================
   CTA Banner
   ============================================================ */
.cta-banner {
    background: linear-gradient(135deg, var(--orange) 0%, var(--orange-dk) 100%);
    padding-block: clamp(3rem, 6vw, 5rem);
    text-align: center;
}

.cta-banner h2 {
    font-family: var(--font-display);
    font-size: clamp(1.6rem, 4vw, 2.5rem);
    font-weight: 800;
    color: var(--white);
    margin-bottom: 1rem;
}

.cta-banner p { color: rgba(255,255,255,.8); margin-bottom: 2rem; font-size: 1.05rem; }

/* ============================================================
   Footer
   ============================================================ */
.site-footer {
    background: var(--navy);
    padding-block: clamp(2.5rem, 6vw, 4rem) 1.5rem;
    color: rgba(255,255,255,.55);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 2.5rem;
    margin-bottom: 2.5rem;
}

.footer-brand p { font-size: .875rem; margin-top: 1rem; line-height: 1.7; }

.footer-links h4 {
    font-family: var(--font-display);
    font-size: .8rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: rgba(255,255,255,.3);
    margin-bottom: 1rem;
}

.footer-links a {
    display: block;
    font-size: .875rem;
    color: rgba(255,255,255,.55);
    margin-bottom: .6rem;
    transition: color .2s;
}
.footer-links a:hover { color: var(--white); }

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255,255,255,.07);
    font-size: .8rem;
}

.footer-bottom a { color: rgba(255,255,255,.35); transition: color .2s; }
.footer-bottom a:hover { color: rgba(255,255,255,.7); }

/* ============================================================
   Forms
   ============================================================ */
.form-group { margin-bottom: 1.25rem; }

.form-group label {
    display: block;
    font-size: .875rem;
    font-weight: 600;
    color: var(--navy);
    margin-bottom: .4rem;
}

.form-group label .req { color: var(--orange); margin-left: .2rem; }

.form-control {
    width: 100%;
    font-family: var(--font-body);
    font-size: .95rem;
    color: var(--text);
    background: var(--white);
    border: 1.5px solid var(--gray-300);
    border-radius: var(--radius);
    padding: .75rem 1rem;
    outline: none;
    transition: border-color .2s, box-shadow .2s;
}

.form-control:focus {
    border-color: var(--orange);
    box-shadow: 0 0 0 3px rgba(242,140,56,.12);
}

textarea.form-control { resize: vertical; min-height: 100px; }

.form-check {
    display: flex;
    gap: .75rem;
    align-items: flex-start;
    font-size: .875rem;
    color: var(--gray-700);
}

.form-check input[type=checkbox] { margin-top: .2rem; accent-color: var(--orange); flex-shrink: 0; }

/* Honeypot */
.hp-field { position: absolute; left: -9999px; visibility: hidden; }

.form-errors {
    background: #fff0f0;
    border: 1.5px solid #f5c2c2;
    border-radius: var(--radius);
    padding: 1rem 1.25rem;
    margin-bottom: 1.5rem;
    font-size: .9rem;
    color: #b91c1c;
}
.form-errors ul { padding-left: 1.25rem; }

.alert-success {
    background: #f0fdf4;
    border: 1.5px solid #86efac;
    border-radius: var(--radius);
    padding: 1.25rem 1.5rem;
    color: #15803d;
    font-weight: 500;
    margin-bottom: 1.5rem;
}

/* ============================================================
   Page Hero (inner pages)
   ============================================================ */
.page-hero {
    background: var(--navy);
    padding-block: clamp(3rem, 7vw, 5rem);
    position: relative;
    overflow: hidden;
}

.page-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px);
    background-size: 60px 60px;
    pointer-events: none;
}

.page-hero .container { position: relative; z-index: 1; }

.page-hero h1 {
    font-family: var(--font-display);
    font-size: clamp(1.8rem, 4vw, 3rem);
    font-weight: 800;
    color: var(--white);
    margin-top: .75rem;
}

.page-hero p {
    color: rgba(255,255,255,.6);
    margin-top: .75rem;
    font-size: 1.05rem;
    max-width: 540px;
}

/* ============================================================
   Vacancy filters
   ============================================================ */
.filters {
    display: flex;
    flex-wrap: wrap;
    gap: .75rem;
    margin-bottom: 2rem;
}

.filter-btn {
    font-family: var(--font-body);
    font-size: .875rem;
    font-weight: 500;
    padding: .5rem 1.25rem;
    border-radius: 100px;
    border: 1.5px solid var(--gray-300);
    background: var(--white);
    color: var(--gray-700);
    cursor: pointer;
    text-decoration: none;
    transition: all .15s;
}
.filter-btn:hover, .filter-btn.active {
    border-color: var(--orange);
    color: var(--orange);
    background: color-mix(in srgb, var(--orange) 6%, white);
}

/* ============================================================
   Vacancy detail
   ============================================================ */
.vacancy-detail { padding-block: clamp(2.5rem, 6vw, 4.5rem); }

.vacancy-detail-grid {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 3rem;
    align-items: start;
}

.vacancy-section { margin-bottom: 2rem; }

.vacancy-section h2 {
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--navy);
    margin-bottom: .85rem;
    padding-bottom: .5rem;
    border-bottom: 2px solid var(--gray-100);
}

.vacancy-section ul { padding-left: 1.25rem; }
.vacancy-section li { margin-bottom: .4rem; font-size: .95rem; }

.vacancy-sidebar {
    position: sticky;
    top: 88px;
    background: var(--off-white);
    border-radius: var(--radius-lg);
    padding: 1.75rem;
    border: 1.5px solid var(--gray-100);
}

.sidebar-meta { margin-bottom: 1.5rem; }
.sidebar-meta-item {
    display: flex;
    justify-content: space-between;
    padding: .6rem 0;
    border-bottom: 1px solid var(--gray-100);
    font-size: .875rem;
}
.sidebar-meta-item:last-child { border-bottom: none; }
.sidebar-meta-label { color: var(--gray-500); }
.sidebar-meta-value { font-weight: 600; color: var(--navy); }

/* ============================================================
   Admin
   ============================================================ */
.admin-layout {
    display: grid;
    grid-template-columns: 220px 1fr;
    min-height: calc(100vh - 68px);
}

.admin-nav {
    background: var(--off-white);
    border-right: 1px solid var(--gray-100);
    padding: 1.5rem 1rem;
}

.admin-nav a {
    display: block;
    padding: .6rem .85rem;
    border-radius: 8px;
    font-size: .9rem;
    font-weight: 500;
    color: var(--gray-700);
    margin-bottom: .25rem;
    transition: all .15s;
}
.admin-nav a:hover, .admin-nav a.active {
    background: var(--navy);
    color: var(--white);
}

.admin-content { padding: 2rem; }

.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: .875rem;
}
.admin-table th {
    text-align: left;
    padding: .75rem 1rem;
    background: var(--off-white);
    font-weight: 700;
    color: var(--navy);
    border-bottom: 2px solid var(--gray-100);
}
.admin-table td {
    padding: .75rem 1rem;
    border-bottom: 1px solid var(--gray-100);
    vertical-align: middle;
}
.admin-table tr:hover td { background: var(--off-white); }

.status-badge {
    font-size: .72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em;
    padding: .2rem .65rem;
    border-radius: 100px;
}
.status-new      { background: #e0f2fe; color: #0369a1; }
.status-viewed    { background: #fef9c3; color: #854d0e; }
.status-invited   { background: #dcfce7; color: #166534; }
.status-rejected  { background: #fee2e2; color: #991b1b; }

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 900px) {
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .vacancy-detail-grid { grid-template-columns: 1fr; }
    .vacancy-sidebar { position: static; }
    .admin-layout { grid-template-columns: 1fr; }
    .admin-nav { display: flex; flex-wrap: wrap; gap: .5rem; padding: 1rem; }
}

@media (max-width: 640px) {
    .main-nav, .site-header .btn { display: none; }
    .burger { display: flex; margin-left: auto; }
    .footer-grid { grid-template-columns: 1fr; }
    .footer-bottom { flex-direction: column; gap: .5rem; text-align: center; }
    .hero-stats { gap: 1.5rem; }
}

/* Mobile nav open */
body.nav-open .main-nav {
    display: flex;
    flex-direction: column;
    position: fixed;
    inset: 68px 0 0 0;
    background: var(--navy);
    padding: 2rem;
    gap: 1.5rem;
    font-size: 1.25rem;
    z-index: 99;
}
body.nav-open .main-nav a { color: var(--white); }
