:root {
    --bg: #0b1220;
    --bg-alt: #0f1728;
    --surface: #111b2e;
    --surface-soft: #16233a;
    --text: #e8eef8;
    --muted: #a8b4c8;
    --line: rgba(255, 255, 255, 0.08);
    --accent: #58c8a3;
    --accent-hover: #49b692;
    --shadow: 0 12px 32px rgba(0, 0, 0, 0.22);
    --radius: 14px;
    --container: 1100px;
    --header-height: 72px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.65;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    max-width: 100%;
    display: block;
}

.container {
    width: min(var(--container), calc(100% - 40px));
    margin: 0 auto;
}

.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    min-height: var(--header-height);
    background: rgba(11, 18, 32, 0.88);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--line);
    z-index: 1000;
}

.header-container {
    min-height: var(--header-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.logo {
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 1px;
    white-space: nowrap;
}

.nav {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.nav a {
    color: var(--muted);
    font-size: 14px;
    transition: color 0.2s ease;
}

.nav a:hover {
    color: var(--text);
}

main {
    overflow: hidden;
}

.hero {
    position: relative;
    min-height: 68vh;
    display: flex;
    align-items: center;
    padding-top: calc(var(--header-height) + 32px);
    background: url('/img/hero-ship.png') center center / cover no-repeat;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(
            90deg,
          rgba(11, 18, 32, 0.85) 0%,
          rgba(11, 18, 32, 0.65) 40%,
          rgba(11, 18, 32, 0.35) 70%,
          rgba(11, 18, 32, 0.18) 100%
        );
}


.hero-content {
    position: relative;
    z-index: 1;
    padding: 56px 0 72px;
}

.hero-text {
    max-width: 720px;
}

.hero-label,
.section-label {
    display: inline-block;
    margin-bottom: 16px;
    padding: 6px 12px;
    border-radius: 999px;
    border: 1px solid rgba(88, 200, 163, 0.24);
    background: rgba(88, 200, 163, 0.10);
    color: var(--accent);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.2px;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.6);
}

.hero h1 {
    margin: 0 0 18px;
    max-width: 820px;
    font-size: clamp(30px, 5.3vw, 40px);
    line-height: 1.08;
    font-weight: 700;
    text-shadow: 0 6px 30px rgba(0, 0, 0, 0.55);
}

.hero-description {
    margin: 0;
    max-width: 700px;
    color: rgba(255, 255, 255, 0.92);
    font-size: 18px;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 30px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 20px;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 700;
    transition: all 0.2s ease;
}

.btn-primary {
    background: var(--accent);
    color: #07111d;
}

.btn-primary:hover {
    background: var(--accent-hover);
    transform: translateY(-1px);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--line);
    color: var(--text);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.07);
}

.section {
    padding: 56px 0;
}

.section-dark {
    background: var(--bg-alt);
}

.section-heading {
    margin-bottom: 20px;
}

.section-heading h2 {
    margin: 0;
    max-width: 760px;
    font-size: clamp(26px, 4vw, 38px);
    line-height: 1.18;
}

.about-grid,
.cards-grid,
.software-grid {
    display: grid;
    gap: 16px;
}

.about-grid {
    grid-template-columns: 1.25fr 0.85fr;
}

.cards-grid,
.software-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow);
}

.card h3 {
    margin: 0 0 12px;
    font-size: 20px;
    line-height: 1.25;
}

.card p {
    margin: 0 0 14px;
}

.card p:last-child {
    margin-bottom: 0;
}

.feature-list {
    margin: 0;
    padding-left: 20px;
    color: var(--muted);
}

.feature-list li + li {
    margin-top: 8px;
}

.service-card,
.software-item {
    transition: border-color 0.2s ease, transform 0.2s ease;
}

.service-card:hover,
.software-item:hover {
    border-color: rgba(88, 200, 163, 0.22);
    transform: translateY(-2px);
}

.software-card {
    padding: 24px;
}

.software-grid {
    margin-top: 20px;
}

.software-item {
    background: var(--surface-soft);
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 20px;
}

.software-item h3 {
    font-size: 18px;
    margin-bottom: 10px;
}

.contacts-list p {
    margin: 8px 0;
}

.footer {
    border-top: 1px solid var(--line);
    background: #0a101c;
}

.footer-container {
    min-height: 74px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--muted);
    font-size: 14px;
    text-align: center;
}

@media (max-width: 960px) {
    .about-grid,
    .cards-grid,
    .software-grid {
        grid-template-columns: 1fr;
    }

    .header-container {
        min-height: auto;
        padding: 14px 0;
        align-items: flex-start;
        flex-direction: column;
    }

    .nav {
        gap: 12px 16px;
    }

    .hero {
        min-height: auto;
        background-position: center right;
    }

    .hero-content {
        padding: 44px 0 48px;
    }
}

@media (max-width: 640px) {
    .container {
        width: min(var(--container), calc(100% - 24px));
    }

    .section {
        padding: 58px 0;
    }

    .hero {
        padding-top: calc(var(--header-height) + 22px);
    }

    .hero h1 {
        font-size: 32px;
    }

    .hero-description {
        font-size: 16px;
    }

    .btn {
        width: 100%;
    }

    .card,
    .software-card,
    .software-item {
        padding: 16px;
    }

    .clients-grid {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
        margin-top: 18px;
    }

    .client-chip {
        padding: 14px 16px;
        border: 1px solid var(--line);
        border-radius: 12px;
        background: rgba(255, 255, 255, 0.04);
        font-weight: 600;
        line-height: 1.4;
    }

    .clients-note {
        margin-top: 16px;
        color: var(--muted);
    }

    @media (max-width: 640px) {
        .clients-grid {
            grid-template-columns: 1fr;
        }
    }

    .contacts-list a {
        color: inherit;
        text-decoration: none;
        border-bottom: 1px dashed rgba(255, 255, 255, 0.25);
    }

    .contacts-list a:hover {
        border-bottom-color: currentColor;
    }
}

/* ===== Documents and calculations pages ===== */

.documents-section,
.calculations-section {
    padding: 90px 0;
    color: #ffffff;
}

.documents-section h1,
.calculations-section h1 {
    margin-bottom: 32px;
    font-size: 42px;
    line-height: 1.15;
    color: #ffffff;
}

.section-description {
    max-width: 760px;
    margin-bottom: 32px;
    color: rgba(255, 255, 255, 0.78);
    font-size: 18px;
    line-height: 1.6;
}

.documents-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
}

.document-card,
.calculation-card {
    padding: 32px;
    border-radius: 24px;
    background: #ffffff;
    color: #111827;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.18);
}

.document-card h2,
.calculation-card h2 {
    margin: 0 0 10px;
    color: #111827;
    font-size: 26px;
    line-height: 1.25;
}

.document-card h3 {
    margin: 0 0 16px;
    color: #374151;
    font-size: 17px;
    font-weight: 600;
    line-height: 1.4;
}

.document-card p,
.calculation-card p {
    color: #4b5563;
    line-height: 1.6;
}

.document-actions {
    display: flex;
    gap: 12px;
    margin-top: 24px;
    flex-wrap: wrap;
}

.form-group {
    margin-bottom: 24px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #111827;
    font-weight: 700;
}

.form-group input {
    width: 100%;
    max-width: 420px;
    box-sizing: border-box;
    padding: 13px 15px;
    border: 1px solid #cbd5e1;
    border-radius: 12px;
    background: #ffffff;
    color: #111827;
    font-size: 16px;
}

.form-group input:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.hint {
    color: #6b7280 !important;
    font-size: 14px;
}

.warning {
    color: #b45309 !important;
    font-weight: 700;
}

.calculation-result {
    margin-top: 28px;
    padding: 24px;
    border-radius: 18px;
    background: #f8fafc;
    border: 1px solid #e5e7eb;
}

.calculation-result h3 {
    margin-top: 0;
    color: #111827;
}

.calculation-result strong {
    color: #111827;
}

.calculation-card button,
.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 20px;
    border: none;
    border-radius: 12px;
    background: #2563eb;
    color: #ffffff !important;
    font-size: 15px;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
}

.button-secondary {
    background: #e5e7eb;
    color: #111827 !important;
}

.calculation-card button:hover,
.button:hover {
    opacity: 0.9;
}

@media (max-width: 768px) {
    .documents-section,
    .calculations-section {
        padding: 56px 0;
    }

    .documents-section h1,
    .calculations-section h1 {
        font-size: 34px;
    }

    .documents-grid {
        grid-template-columns: 1fr;
    }

    .document-card,
    .calculation-card {
        padding: 24px;
        border-radius: 20px;
    }
}

/* ===== Documents card alignment ===== */
.document-card {
    display: flex;
    flex-direction: column;
}

.document-card p {
    flex-grow: 1;
}

.document-actions {
    margin-top: auto;
    padding-top: 24px;
}

/* ===== About and contacts pages ===== */

.about-page-section,
.contacts-page-section {
    padding: 90px 0;
    color: #ffffff;
}

.about-page-card,
.contacts-page-card {
    padding: 40px;
    border-radius: 28px;
    background: #ffffff;
    color: #111827;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.18);
}

.about-page-card {
    display: grid;
    grid-template-columns: 1.4fr 0.8fr;
    gap: 40px;
    align-items: center;
}

.about-page-card h1,
.contacts-page-card h1 {
    margin: 0 0 20px;
    color: #111827;
    font-size: 42px;
    line-height: 1.15;
}

.about-lead,
.contacts-lead {
    font-size: 20px;
    line-height: 1.6;
    color: #1f2937;
}

.about-page-content p,
.contacts-page-card p {
    color: #4b5563;
    line-height: 1.7;
}

.about-page-photo {
    overflow: hidden;
    border-radius: 24px;
    background: #e5e7eb;
    min-height: 360px;
}

.about-page-photo img {
    width: 100%;
    height: 100%;
    min-height: 360px;
    object-fit: cover;
    display: block;
}

.about-facts {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    margin-top: 32px;
}

.about-fact {
    padding: 18px;
    border-radius: 18px;
    background: #f8fafc;
    border: 1px solid #e5e7eb;
}

.about-fact strong {
    display: block;
    margin-bottom: 6px;
    color: #111827;
    font-size: 18px;
}

.about-fact span {
    color: #6b7280;
    font-size: 14px;
}

.contacts-list {
    display: grid;
    gap: 18px;
    margin-top: 32px;
}

.contact-item {
    padding: 20px;
    border-radius: 18px;
    background: #f8fafc;
    border: 1px solid #e5e7eb;
}

.contact-item span {
    display: block;
    margin-bottom: 8px;
    color: #6b7280;
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.contact-item a {
    color: #2563eb;
    font-size: 20px;
    font-weight: 700;
    text-decoration: none;
}

.contact-item p {
    margin: 0;
    color: #111827;
    font-size: 20px;
    font-weight: 700;
}

@media (max-width: 900px) {
    .about-page-card {
        grid-template-columns: 1fr;
    }

    .about-facts {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .about-page-section,
    .contacts-page-section {
        padding: 56px 0;
    }

    .about-page-card,
    .contacts-page-card {
        padding: 26px;
        border-radius: 22px;
    }

    .about-page-card h1,
    .contacts-page-card h1 {
        font-size: 34px;
    }

    .about-lead,
    .contacts-lead {
        font-size: 18px;
    }
}

/* ===== Contacts page compact fix ===== */

.contacts-page-card {
    max-width: 760px;
}

.contacts-page-card h1 {
    font-size: 36px;
}

.contacts-lead {
    font-size: 17px;
}

.contact-item {
    padding: 16px 18px;
}

.contact-item a,
.contact-item p {
    font-size: 17px;
}

.contact-item span {
    font-size: 12px;
}

/* ===== Footer unified ===== */

.footer {
    padding: 28px 0;
    border-top: 1px solid var(--line);
    background: #0a101c;
}

.footer-container {
    min-height: 74px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: var(--muted);
    font-size: 14px;
    text-align: center;
}

.footer p {
    margin: 0;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.5;
}

.footer a {
    color: rgba(255, 255, 255, 0.82);
    font-size: 14px;
    text-decoration: none;
}

.footer a:hover {
    color: #ffffff;
}

html,
body {
    min-height: 100%;
}

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
}

.about-reference {
    margin-top: 24px;
    padding: 18px 20px;
    border-radius: 18px;
    background: #f8fafc;
    border: 1px solid #e5e7eb;
}

.about-reference p {
    margin: 0 0 10px;
    font-size: 14px;
    line-height: 1.65;
    color: #4b5563;
}

.about-reference p:last-child {
    margin-bottom: 0;
}