/* ===========================================================
   HARBOR DISPATCH — base system
   A cross-border operations identity built from manifests,
   departure boards, route tables and hard working rules.
   =========================================================== */

@import url('https://fonts.googleapis.com/css2?family=Archivo:wght@400;500;600;700;800&family=Noto+Sans+SC:wght@300;400;500;600;700&display=swap');

@font-face {
    font-family: 'Smiley Sans';
    src: url('../fonts/SmileySans-Oblique.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

:root {
    --hull: #0C2A2D;
    --hull-deep: #071E20;
    --hull-soft: #173B3F;
    --bone: #F2EDE2;
    --bone-bright: #FAF7EF;
    --dune: #E4DCCA;
    --signal: #F0542C;
    --signal-deep: #C23C18;
    --sea: #A8C6BE;
    --muted: #5E6E6A;
    --line: rgba(12, 42, 45, 0.18);
    --line-strong: rgba(12, 42, 45, 0.46);
    --line-light: rgba(242, 237, 226, 0.18);

    --font-display: 'Smiley Sans', 'Noto Sans SC', 'PingFang SC', sans-serif;
    --font-body: 'Archivo', 'Noto Sans SC', -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Microsoft YaHei', sans-serif;
    --font-latin: 'Archivo', 'Noto Sans SC', sans-serif;

    --max-w: 1320px;
    --gutter: clamp(20px, 4vw, 48px);
    --nav-h: 68px;

    --ease: cubic-bezier(0.22, 1, 0.36, 1);
    --fast: 0.25s var(--ease);
    --slow: 0.6s var(--ease);
}

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    scroll-behavior: smooth;
    scroll-padding-top: calc(var(--nav-h) + 24px);
}

body {
    font-family: var(--font-body);
    color: var(--hull);
    background: var(--bone);
    line-height: 1.7;
    letter-spacing: 0.01em;
    min-height: 100vh;
    overflow-x: hidden;
    font-synthesis: none;
}

img {
    max-width: 100%;
    display: block;
}

ul,
ol {
    list-style: none;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input {
    font: inherit;
    color: inherit;
}

button {
    border: 0;
    background: none;
    cursor: pointer;
}

::selection {
    background: var(--signal);
    color: var(--bone-bright);
}

:focus-visible {
    outline: 2px solid var(--signal);
    outline-offset: 3px;
}

/* ---------- TYPE ---------- */

h1,
h2 {
    font-family: var(--font-display);
    font-weight: 400;
    line-height: 0.96;
    letter-spacing: 0.01em;
    text-wrap: balance;
    color: var(--hull);
}

h1 {
    font-size: clamp(3.4rem, 8vw, 7.4rem);
}

h2 {
    font-size: clamp(2.4rem, 4.8vw, 4.2rem);
}

h3,
h4,
h5,
h6 {
    font-family: var(--font-body);
    font-weight: 500;
    line-height: 1.3;
    letter-spacing: 0;
    color: var(--hull);
    text-wrap: balance;
}

h3 {
    font-size: clamp(1.15rem, 1.7vw, 1.4rem);
}

h4 {
    font-size: 1rem;
}

p {
    font-size: clamp(0.95rem, 1.02vw, 1.05rem);
    line-height: 1.9;
    color: var(--muted);
    font-weight: 400;
}

.on-hull h1,
.on-hull h2,
.on-hull h3,
.on-hull h4,
footer h3,
footer h4 {
    color: var(--bone);
}

.on-hull p {
    color: rgba(242, 237, 226, 0.62);
}

/* ---------- LAYOUT ---------- */

.shell {
    width: 100%;
    max-width: var(--max-w);
    margin-inline: auto;
    padding-inline: var(--gutter);
}

.section {
    padding-block: clamp(72px, 9vw, 128px);
}

.on-hull {
    background: var(--hull);
    color: var(--bone);
}

.rule {
    border: 0;
    height: 1px;
    background: var(--line);
}

.on-hull .rule {
    background: var(--line-light);
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ---------- SMALL TYPE / CODES ---------- */

.code,
.kicker,
.meta,
.stat-label,
.spec dt,
.module-code,
.chapter-count,
.node-type,
.faq-num,
.entry-num,
.clause-index,
.invoice-no,
.board-time {
    font-family: var(--font-latin);
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.045em;
}

.kicker {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 0.72rem;
    font-weight: 500;
    color: var(--muted);
    line-height: 1.4;
}

.on-hull .kicker {
    color: rgba(242, 237, 226, 0.52);
}

.kicker::before {
    content: "";
    display: inline-block;
    width: 18px;
    height: 1px;
    background: var(--signal);
    flex-shrink: 0;
}

.meta {
    font-size: 0.7rem;
    color: var(--muted);
}

.tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 7px;
    border: 1px solid var(--line);
    font-family: var(--font-latin);
    font-size: 0.62rem;
    line-height: 1.2;
    color: var(--muted);
    white-space: nowrap;
}

.on-hull .tag {
    border-color: var(--line-light);
    color: rgba(242, 237, 226, 0.6);
}

/* ---------- BLOCK HEADS ---------- */

.block-head {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: var(--gutter);
    align-items: start;
    border-top: 1px solid var(--line-strong);
    padding-top: 16px;
    margin-bottom: clamp(36px, 5vw, 64px);
}

.block-head .block-code {
    grid-column: 1 / 3;
    display: flex;
    align-items: baseline;
    gap: 10px;
    font-family: var(--font-latin);
    font-size: 0.7rem;
    letter-spacing: 0.06em;
    color: var(--muted);
    padding-top: 6px;
}

.block-head .block-code strong {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--signal);
}

.block-head h2 {
    grid-column: 3 / 9;
    font-size: clamp(2rem, 3.8vw, 3.6rem);
    max-width: 18ch;
}

.block-head h2 span,
.promises-title h2 span,
.faq-intro h2 span {
    display: block;
}

.block-head .block-note {
    grid-column: 9 / 13;
    justify-self: end;
    text-align: right;
    max-width: 32ch;
    font-size: 0.8rem;
    line-height: 1.7;
    color: var(--muted);
    padding-top: 6px;
}

.on-hull .block-head {
    border-top-color: var(--line-light);
}

.on-hull .block-head .block-code,
.on-hull .block-head .block-note {
    color: rgba(242, 237, 226, 0.5);
}

/* ---------- BUTTONS / LINKS ---------- */

.btn {
    display: inline-flex;
    align-items: center;
    gap: 18px;
    min-height: 48px;
    padding: 6px 6px 6px 20px;
    border: 1px solid var(--line-strong);
    background: transparent;
    color: var(--hull);
    font-family: var(--font-body);
    font-size: 0.86rem;
    font-weight: 500;
    line-height: 1.2;
    letter-spacing: 0.01em;
    transition: background var(--fast), color var(--fast), border-color var(--fast);
}

.btn .btn-arrow {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    background: var(--hull);
    color: var(--bone);
    font-size: 0.72rem;
    transition: transform var(--fast), background var(--fast), color var(--fast);
}

.btn:hover {
    background: var(--hull);
    color: var(--bone);
    border-color: var(--hull);
}

.btn:hover .btn-arrow {
    background: var(--signal);
    color: var(--hull-deep);
    transform: translate(2px, -2px);
}

.btn-fill {
    background: var(--signal);
    border-color: var(--signal);
    color: var(--hull-deep);
}

.btn-fill .btn-arrow {
    background: var(--hull);
    color: var(--bone);
}

.btn-fill:hover {
    background: var(--signal-deep);
    border-color: var(--signal-deep);
    color: var(--bone-bright);
}

.btn-fill:hover .btn-arrow {
    background: var(--bone-bright);
    color: var(--hull-deep);
}

.on-hull .btn {
    border-color: rgba(242, 237, 226, 0.38);
    color: var(--bone);
}

.on-hull .btn .btn-arrow {
    background: var(--bone);
    color: var(--hull);
}

.on-hull .btn:hover {
    background: var(--bone);
    color: var(--hull);
    border-color: var(--bone);
}

.on-hull .btn:hover .btn-arrow {
    background: var(--signal);
    color: var(--hull-deep);
}

.btn-ghost .btn-arrow {
    background: transparent;
    border: 1px solid currentColor;
}

.text-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--hull);
    border-bottom: 1px solid var(--line-strong);
    padding-bottom: 5px;
    transition: color var(--fast), border-color var(--fast);
}

.text-link i {
    font-size: 0.68rem;
    transition: transform var(--fast);
}

.text-link:hover {
    color: var(--signal-deep);
    border-color: var(--signal);
}

.text-link:hover i {
    transform: translate(2px, -2px);
}

.on-hull .text-link {
    color: var(--bone);
    border-color: var(--line-light);
}

.on-hull .text-link:hover {
    color: var(--signal);
    border-color: var(--signal);
}

/* ---------- SHARED CLOSING BAND ---------- */

.closing {
    background: var(--signal);
    color: var(--hull-deep);
    padding-block: clamp(56px, 7vw, 88px);
}

.closing-grid {
    display: grid;
    grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
    gap: clamp(36px, 5vw, 80px);
    align-items: end;
}

.closing h2 {
    color: var(--hull-deep);
    font-size: clamp(3.2rem, 7vw, 6.8rem);
    line-height: 0.9;
}

.closing-side p {
    color: rgba(7, 30, 32, 0.72);
    font-size: 0.98rem;
    max-width: 30ch;
}

.closing-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 28px;
}

.closing .btn {
    border-color: var(--hull-deep);
    color: var(--hull-deep);
}

.closing .btn .btn-arrow {
    background: var(--hull-deep);
    color: var(--bone);
}

.closing .btn:hover {
    background: var(--hull-deep);
    color: var(--bone);
}

.closing .btn:hover .btn-arrow {
    background: var(--bone);
    color: var(--hull-deep);
}

.closing .btn-fill {
    background: var(--hull-deep);
    border-color: var(--hull-deep);
    color: var(--bone);
}

.closing .btn-fill .btn-arrow {
    background: var(--bone);
    color: var(--hull-deep);
}

.closing .btn-fill:hover {
    background: var(--bone);
    border-color: var(--bone);
    color: var(--hull-deep);
}

.closing .btn-fill:hover .btn-arrow {
    background: var(--hull-deep);
    color: var(--bone);
}

.closing-note {
    display: block;
    margin-top: 18px;
    font-family: var(--font-latin);
    font-size: 0.62rem;
    letter-spacing: 0.05em;
    color: rgba(7, 30, 32, 0.55);
}

@media (max-width: 900px) {
    .closing-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }
}

@media (max-width: 640px) {
    .closing h2 {
        font-size: clamp(2.8rem, 13vw, 4.4rem);
    }
}

/* ---------- PAGE LOAD MOTION ---------- */

@keyframes rise {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-title,
.hero-sub,
.hero-actions,
.ops-board,
.catalog-head h1,
.manual-head h1,
.price-head h1,
.dossier-head h1,
.privacy-head h1 {
    animation: rise 0.9s var(--ease) both;
}

.hero-sub,
.catalog-head h1,
.manual-head h1,
.price-head h1,
.dossier-head h1,
.privacy-head h1 {
    animation-delay: 0.08s;
}

.hero-actions,
.hero-sub {
    animation-delay: 0.16s;
}

.ops-board {
    animation-delay: 0.22s;
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ---------- ENGLISH TYPE ADJUSTMENTS ---------- */

html[lang="en"] h1 {
    letter-spacing: 0.005em;
}

html[lang="en"] .hero-title {
    font-size: clamp(2.9rem, 6.2vw, 6rem);
    line-height: 0.9;
}

html[lang="en"] .catalog-head h1,
html[lang="en"] .manual-head h1,
html[lang="en"] .privacy-head h1 {
    font-size: clamp(3rem, 7vw, 6.2rem);
}

html[lang="en"] .price-head h1 {
    font-size: clamp(2.6rem, 5.4vw, 5rem);
}

html[lang="en"] .dossier-head h1 {
    font-size: clamp(2.2rem, 4vw, 3.6rem);
    line-height: 1;
    max-width: 20ch;
}

/* ---------- RESPONSIVE BASE ---------- */

@media (max-width: 1024px) {
    .block-head {
        grid-template-columns: repeat(6, minmax(0, 1fr));
    }

    .block-head .block-code {
        grid-column: 1 / 2;
    }

    .block-head h2 {
        grid-column: 2 / 6;
    }

    .block-head .block-note {
        grid-column: 6 / 7;
        max-width: 18ch;
    }
}

@media (max-width: 768px) {
    .block-head {
        display: block;
    }

    .block-head .block-code {
        margin-bottom: 14px;
    }

    .block-head h2 {
        margin-bottom: 14px;
    }

    .block-head .block-note {
        text-align: left;
        max-width: 40ch;
        width: 100%;
        grid-column: 1 / -1;
        justify-self: start;
    }

    .btn {
        min-height: 46px;
        gap: 14px;
        padding-left: 16px;
    }

    .btn .btn-arrow {
        width: 32px;
        height: 32px;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
}
