/* ---------- Fonts (self-hosted Roboto, variable weight, Latin subset) ---------- */
@font-face {
    font-family: "Roboto";
    font-style: normal;
    font-weight: 400 700;
    font-display: swap;
    src: url("../fonts/roboto-latin.woff2") format("woff2");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
    font-family: "Roboto";
    font-style: italic;
    font-weight: 400 700;
    font-display: swap;
    src: url("../fonts/roboto-latin-italic.woff2") format("woff2");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* Arial tuned to Roboto's metrics, so the swap causes no layout shift */
@font-face {
    font-family: "Roboto Fallback";
    src: local("Arial");
    ascent-override: 92.49%;
    descent-override: 24.34%;
    line-gap-override: 0%;
    size-adjust: 100.3%;
}

:root {
    --navy: #2b2d80;
    --navy-dark: #1f2163;
    --blue: #1d4f9e;
    --blue-dark: #163f82;
    --gray: #9b9b9b;
    --text: #1d1d1f;
    --text-soft: #3a3a3c;
    --hero-bg: #eef2f7;
    --white: #ffffff;
    --shadow: 0 10px 30px rgba(31, 33, 99, 0.12);
    --section-y: 96px;
}

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

html {
    scroll-behavior: smooth;
    /* Prevent iOS from inflating text in landscape */
    -webkit-text-size-adjust: 100%;
       -moz-text-size-adjust: 100%;
            text-size-adjust: 100%;
}

body {
    font-family: "Roboto", "Roboto Fallback", Arial, sans-serif;
    color: var(--text);
    background: var(--white);
    line-height: 1.4;
    /* Sticky footer: header on top, footer always at the bottom of the viewport */
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1 0 auto;
    display: flex;
    flex-direction: column;
}

/* The last section absorbs spare height, so no white gap appears above the footer */
main > section:last-child { flex-grow: 1; }

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

.container {
    width: 100%;
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 24px;
}

.btn {
    display: inline-block;
    padding: 14px 32px;
    border-radius: 999px;
    background: var(--navy);
    color: var(--white);
    font-size: 17px;
    font-weight: 500;
    box-shadow: 0 6px 16px rgba(43, 45, 128, 0.25);
    transition: background .2s, transform .2s, box-shadow .2s;
}

.btn:hover {
    background: var(--navy-dark);
    transform: translateY(-2px);
    box-shadow: 0 10px 22px rgba(43, 45, 128, 0.3);
}

/* Section heading: small eyebrow + title + short accent bar */
.section-head {
    text-align: center;
    margin-bottom: 48px;
}

.section-head__eyebrow {
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--navy);
    margin-bottom: 10px;
}

.section-head__title {
    font-size: clamp(28px, 3.6vw, 38px);
    font-weight: 700;
    line-height: 1.2;
    color: var(--text);
}

.section-head__title::after {
    content: "";
    display: block;
    width: 56px;
    height: 4px;
    margin: 18px auto 0;
    border-radius: 2px;
    background: var(--navy);
}

/* ---------- Header ---------- */
.header {
    position: sticky;
    top: 0;
    z-index: 10;
    background: var(--white);
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.06);
}

.header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-height: 96px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 14px;
}

.brand img { height: 64px; width: auto; display: block; }

.brand span {
    font-size: 26px;
    font-weight: 700;
    color: var(--navy);
    letter-spacing: 0.3px;
    white-space: nowrap;
}

.nav {
    display: flex;
    align-items: center;
    font-size: 20px;
    color: var(--text-soft);
}

.nav a { padding: 4px 14px; transition: color .2s; }
.nav a:hover { color: var(--navy); }

.nav a + a { border-left: 1.5px solid var(--text-soft); }

.nav .nav__phone {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    margin-left: 14px;
    border-radius: 50%;
    background: var(--navy);
    color: var(--white);
    transition: background .2s, transform .2s;
    padding: 4px 10px;
}

.nav .nav__phone:hover { background: var(--navy-dark); color: var(--white); transform: scale(1.06); }
.nav__phone svg { width: 20px; height: 20px; }

/* ---------- Hero ---------- */
.hero {
    /* Above .services, so the CTA shadow isn't covered by the next section's background */
    position: relative;
    z-index: 1;
    background: var(--hero-bg);
    padding: 72px 0 0;
    text-align: center;
}

.hero__cta { margin-top: 36px; }

.hero h1 {
    font-size: clamp(32px, 5vw, 52px);
    font-weight: 700;
    line-height: 1.15;
    color: var(--text);
    max-width: 720px;
    margin: 0 auto;
}

.hero h1 .accent { color: var(--navy); }

.hero p {
    font-size: clamp(18px, 2.2vw, 24px);
    color: var(--text-soft);
    max-width: 640px;
    margin: 24px auto 0;
}

/* ---------- Services ---------- */
/* Hero background continues behind the heading and the upper part of the cards;
   the white lower part is painted by .cards::before */
.services {
    position: relative;
    z-index: 0;
    overflow-x: clip;
    padding: var(--section-y) 0;
    background: var(--hero-bg);
}

.cards {
    position: relative;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
}

.cards::before {
    content: "";
    position: absolute;
    z-index: -1;
    top: min(50%, 200px);
    bottom: calc(-1 * var(--section-y));
    left: 50%;
    width: 100vw;
    translate: -50% 0;
    background: var(--white);
}

.card {
    background: var(--white);
    border-radius: 10px;
    box-shadow: var(--shadow);
    border-bottom: 6px solid var(--navy);
    padding: 36px 28px 32px;
    text-align: center;
    transition: transform .25s, box-shadow .25s;
}

.card:hover {
    transform: translateY(-6px);
    box-shadow: 0 18px 40px rgba(31, 33, 99, 0.18);
}

.card__icon { width: 120px; height: 120px; margin: 0 auto 28px; }

.card h3 {
    font-size: 24px;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 18px;
}

.card p { font-size: 19px; color: var(--text-soft); }

/* ---------- Additional trade categories ---------- */
.trade {
    padding: var(--section-y) 0;
    background: var(--hero-bg);
}

.trade__list {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 16px;
    max-width: 960px;
    margin: 0 auto;
}

.trade__list li {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 22px;
    background: var(--white);
    border-radius: 24px;
    box-shadow: 0 2px 8px rgba(31, 33, 99, 0.08);
    font-size: 17px;
    font-weight: 500;
    color: var(--text);
}

.trade__list li::before {
    content: "";
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--navy);
    flex-shrink: 0;
}

.trade__list .trade__etc {
    background: transparent;
    box-shadow: none;
    color: var(--text-soft);
    font-style: italic;
}

.trade__list .trade__etc::before { display: none; }

/* ---------- Footer ---------- */
.footer {
    background: linear-gradient(180deg, var(--blue) 0%, var(--blue-dark) 100%);
    color: var(--white);
    padding: 48px 0;
}

.footer__inner {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 32px;
    align-items: end;
}

.footer__brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.footer__brand img { height: 48px; width: auto; display: block; }

.footer__brand span {
    font-size: 22px;
    font-weight: 700;
    letter-spacing: 0.3px;
}

.footer address {
    font-style: normal;
    font-size: 18px;
    font-weight: 500;
    line-height: 1.45;
}

.footer__list { list-style: none; display: grid; gap: 10px; }

.footer__list a {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 19px;
    font-weight: 500;
    transition: opacity .2s;
}

.footer__list a:hover { opacity: .8; text-decoration: underline; }
.footer__list svg { width: 18px; height: 18px; flex-shrink: 0; }


.footer__copy {
    margin-top: 36px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    font-size: 14px;
    opacity: .8;
    text-align: center;
}

/* ---------- Animations (CSS only) ---------- */
/* Keyframes use the `translate` property, so they don't clash with `transform` on :hover */
@keyframes fade-up {
    from { opacity: 0; translate: 0 24px; }
    to   { opacity: 1; translate: 0 0; }
}

@keyframes pulse-ring {
    0%   { box-shadow: 0 0 0 0 rgba(43, 45, 128, 0.45); }
    70%  { box-shadow: 0 0 0 12px rgba(43, 45, 128, 0); }
    100% { box-shadow: 0 0 0 0 rgba(43, 45, 128, 0); }
}

@media (prefers-reduced-motion: no-preference) {
    /* Entrance on page load, staggered */
    .hero h1,
    .hero p,
    .hero__cta,
    .services .section-head,
    .card,
    .trade .container {
        animation: fade-up .7s cubic-bezier(.2, .7, .3, 1) both;
    }

    .hero p                 { animation-delay: .15s; }
    .hero__cta              { animation-delay: .25s; }
    .services .section-head { animation-delay: .35s; }
    .card:nth-child(1)      { animation-delay: .45s; }
    .card:nth-child(2)      { animation-delay: .57s; }
    .card:nth-child(3)      { animation-delay: .69s; }
    .trade .container       { animation-delay: .85s; }

    /* Where supported, reveal the trade section as it scrolls into view */
    @supports (animation-timeline: view()) {
        .trade .container {
            animation-delay: 0s;
            animation-timeline: view();
            animation-range-start: entry 0%;
            animation-range-end: entry 60%;
        }
    }

    /* Icon lifts slightly when its card is hovered */
    .card__icon { transition: transform .3s ease; }
    .card:hover .card__icon { transform: scale(1.08) rotate(-3deg); }

    /* Gentle attention pulse on the call button */
    .nav .nav__phone { animation: pulse-ring 2.4s ease-out 1.5s infinite; }
    .nav .nav__phone:hover { animation-play-state: paused; }
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
    .cards { grid-template-columns: 1fr; max-width: 460px; margin: 0 auto; }
}

@media (max-width: 640px) {
    .header__inner { min-height: 72px; }
    .brand img { height: 44px; }
    .brand span { font-size: 19px; }
    .nav { font-size: 16px; }
    .nav a:not(.nav__phone) { display: none; }
    .nav .nav__phone { margin-left: 0; width: 40px; height: 40px; }
    :root { --section-y: 64px; }
    .hero { padding-top: 48px; }
    .section-head { margin-bottom: 36px; }
    .trade__list { gap: 10px; }
    .trade__list li { font-size: 15px; padding: 10px 16px; }
    .footer__inner { grid-template-columns: 1fr; text-align: left; }
}

/* ---------- 404 page ---------- */
.not-found { padding-bottom: 72px; }

.not-found__link { margin-top: 32px; }
