:root {
    --cream: #f3eee2;
    --navy: #1b2a41;
    --navy-soft: #30415d;
    --navy-muted: #647084;

    --light-text: rgba(243, 238, 226, 0.78);
    --light-text-strong: #f3eee2;

    --border: rgba(27, 42, 65, 0.18);
    --border-strong: rgba(27, 42, 65, 0.34);
    --border-light: rgba(243, 238, 226, 0.16);

    --container: 1180px;
    --section-spacing: 96px;

    --font-family:
        "Poppins",
        Arial,
        Helvetica,
        sans-serif;
}

/* Reset */

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

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--cream);
    color: var(--navy);
    font-family: var(--font-family);
    font-size: 16px;
    font-weight: 400;
    line-height: 1.65;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

a {
    color: inherit;
}

button,
input,
textarea,
select {
    font: inherit;
}

ul {
    margin-top: 0;
}

/* Accessibility */

.skip-link {
    position: fixed;
    top: 16px;
    left: 16px;
    z-index: 1000;
    padding: 12px 16px;
    background: var(--navy);
    color: var(--cream);
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    transform: translateY(-200%);
    transition: transform 180ms ease;
}

.skip-link:focus {
    transform: translateY(0);
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 4px;
}

/* Shared layout */

.container {
    width: min(calc(100% - 48px), var(--container));
    margin-inline: auto;
}

.section {
    margin: 0;
    padding: var(--section-spacing) 0;
    border: 0;
    scroll-margin-top: 96px;
}

.section-light {
    background: var(--cream);
    color: var(--navy);
}

.section-dark {
    background: var(--navy);
    color: var(--cream);
}

.section-dark h1,
.section-dark h2,
.section-dark h3,
.section-dark li,
.section-dark a {
    color: var(--cream);
}

.section-dark .section-intro,
.section-dark .service-card > p,
.section-dark .about-copy p {
    color: var(--light-text);
}

.section-dark .about-copy .lead {
    color: var(--light-text-strong);
}

.section-heading {
    max-width: 1050px;
    margin-bottom: 52px;
}

.section-heading h2 {
    max-width: 1000px;
}

.section-heading .section-intro {
    max-width: 780px;
}

.section-label {
    margin: 0;
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    line-height: 1.4;
    text-transform: uppercase;
}

.section-label-light {
    color: rgba(243, 238, 226, 0.72);
}

.section-intro {
    margin: 22px 0 0;
    color: var(--navy-muted);
    font-size: 1.05rem;
    line-height: 1.75;
}

/* Typography */

h1,
h2,
h3,
p {
    overflow-wrap: break-word;
}

h1,
h2,
h3 {
    margin-top: 0;
    color: inherit;
}

h1 {
    max-width: 920px;
    margin-bottom: 28px;
    font-size: clamp(3.2rem, 7vw, 6.7rem);
    font-weight: 600;
    letter-spacing: -0.055em;
    line-height: 0.97;
}

h2 {
    max-width: 850px;
    margin-bottom: 0;
    font-size: clamp(2.2rem, 4.5vw, 4.4rem);
    font-weight: 600;
    letter-spacing: -0.045em;
    line-height: 1.06;
}

h3 {
    margin-bottom: 14px;
    font-size: 1.3rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    line-height: 1.35;
}

p {
    margin-top: 0;
}

/* Header */

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    border: 0;
    background: rgba(243, 238, 226, 0.96);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.header-grid {
    min-height: 94px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

.main-nav {
    display: flex;
    gap: 32px;
    align-items: center;
}

.main-nav a {
    position: relative;
    padding: 8px 0;
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.045em;
    text-decoration: none;
}

.main-nav a::after {
    position: absolute;
    right: 0;
    bottom: 2px;
    left: 0;
    height: 1px;
    background: var(--navy);
    content: "";
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 180ms ease;
}

.main-nav a:hover::after,
.main-nav a:focus-visible::after {
    transform: scaleX(1);
    transform-origin: left;
}

/* Hero */

.hero {
    padding: 104px 0 96px;
}

.hero-grid {
    display: grid;
    grid-template-columns:
        minmax(0, 3fr)
        minmax(300px, 1fr);
    gap: 64px;
    align-items: stretch;
}

.hero-copy .section-label {
    margin-bottom: 32px;
}

.hero-intro {
    max-width: 720px;
    margin-bottom: 0;
    color: var(--navy-soft);
    font-size: clamp(1.1rem, 2vw, 1.4rem);
    line-height: 1.65;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 28px;
    align-items: center;
    margin-top: 38px;
}

.button {
    display: inline-flex;
    min-height: 54px;
    align-items: center;
    justify-content: center;
    padding: 14px 24px;
    border: 1px solid var(--navy);
    background: transparent;
    font-size: 0.84rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-decoration: none;
    transition:
        background-color 180ms ease,
        color 180ms ease,
        border-color 180ms ease,
        transform 180ms ease;
}

.button:hover {
    transform: translateY(-1px);
}

.button-primary {
    background: var(--navy);
    color: var(--cream);
}

.button-primary:hover,
.button-primary:focus-visible {
    background: transparent;
    color: var(--navy);
}

.text-link {
    padding-bottom: 3px;
    border-bottom: 1px solid var(--navy);
    font-size: 0.84rem;
    font-weight: 700;
    letter-spacing: 0.025em;
    text-decoration: none;
}

.hero-panel {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
    padding: 38px;
    border: 0;
}

.hero-logo-panel {
    min-height: 100%;
}

.hero-logo {
    display: block;
    width: min(100%, 340px);
    height: auto;
    max-height: 300px;
    object-fit: contain;
}

/* Services */

.service-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    border-top: 1px solid var(--border-light);
    border-left: 1px solid var(--border-light);
}

.service-card {
    display: flex;
    flex-direction: column;
    padding: 34px;
    border-right: 1px solid var(--border-light);
    border-bottom: 1px solid var(--border-light);
    background: rgba(255, 255, 255, 0.04);
    color: var(--cream);
}

.service-card h3 {
    margin-bottom: 16px;
    color: var(--cream);
}

.service-card > p {
    margin-bottom: 0;
    color: var(--light-text);
    font-size: 0.96rem;
}

.service-card ul {
    margin: 26px 0 0;
    padding: 20px 0 0;
    border-top: 1px solid var(--border-light);
    list-style: none;
}

.service-card li {
    padding: 5px 0;
    color: var(--cream);
    font-size: 0.86rem;
    font-weight: 500;
}

.service-card li::before {
    margin-right: 10px;
    content: "—";
}

/* Process */

.process-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    border-top: 1px solid var(--border);
    border-left: 1px solid var(--border);
}

.process-item {
    padding: 34px 30px;
    border-right: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    background: transparent;
    color: var(--navy);
}

.process-item h3 {
    margin-bottom: 16px;
    color: var(--navy);
}

.process-item p {
    margin-bottom: 0;
    color: var(--navy-soft);
    font-size: 0.94rem;
}

/* About */

.about-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 88px;
    align-items: start;
}

.about-grid .section-label {
    margin-bottom: 28px;
}

.about-copy {
    padding-top: 40px;
}

.about-copy p {
    color: var(--light-text);
    font-size: 1rem;
    line-height: 1.8;
}

.about-copy .lead {
    color: var(--cream);
    font-size: 1.35rem;
    font-weight: 600;
    line-height: 1.55;
}

/* Contact */

.contact-section {
    margin: 0;
    border: 0;
    background: var(--cream);
    color: var(--navy);
}

.contact-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 88px;
    align-items: start;
}

.contact-grid .section-label {
    margin-bottom: 28px;
}

.contact-details {
    padding-top: 40px;
}

.contact-details > p:first-child {
    color: var(--navy-soft);
    font-size: 1.05rem;
    line-height: 1.75;
}

.contact-meta {
    margin-top: 30px;
    color: var(--navy-muted);
    font-size: 0.74rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    line-height: 1.6;
    text-transform: uppercase;
}

/* Canal-house illustration */

.canal-illustration {
    margin: 0;
    padding: 0;
    overflow: hidden;
    border: 0;
    background: var(--cream);
    line-height: 0;
}

.canal-illustration img {
    display: block;
    width: 100%;
    height: clamp(320px, 44vw, 620px);
    margin: 0;
    padding: 0;
    border: 0;
    object-fit: cover;
    object-position: center bottom;
}

/* Footer */

.site-footer {
    margin: 0;
    padding: 56px 0;
    border: 0;
    background: var(--navy);
    color: var(--cream);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 48px;
    align-items: start;
}

.footer-logo {
    width: auto;
    height: 48px;
    max-width: 230px;
    object-fit: contain;
    filter:
        brightness(0)
        saturate(100%)
        invert(93%)
        sepia(8%)
        saturate(476%)
        hue-rotate(346deg)
        brightness(103%)
        contrast(90%);
}

.footer-description {
    max-width: 420px;
    margin: 22px 0 0;
    color: rgba(243, 238, 226, 0.64);
    font-size: 0.9rem;
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer-links a {
    width: fit-content;
    color: var(--cream);
    font-size: 0.84rem;
    font-weight: 500;
    text-decoration: none;
}

.footer-links a:hover,
.footer-links a:focus-visible {
    text-decoration: underline;
}

.copyright {
    margin: 0;
    color: rgba(243, 238, 226, 0.55);
    font-size: 0.76rem;
    line-height: 1.6;
}

/* Tablet */

@media (max-width: 900px) {
    :root {
        --section-spacing: 80px;
    }

    .hero-grid,
    .about-grid,
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 48px;
    }

    .service-grid {
        grid-template-columns: 1fr;
    }

    .process-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .hero-logo-panel {
        min-height: 280px;
    }

    .hero-logo {
        width: min(100%, 320px);
        max-height: 230px;
    }

    .about-copy,
    .contact-details {
        padding-top: 0;
    }

    .canal-illustration img {
        height: 430px;
    }

    .footer-grid {
        grid-template-columns: 1.5fr 1fr;
    }

    .copyright {
        grid-column: 1 / -1;
    }
}

/* Mobile */

@media (max-width: 680px) {
    .container {
        width: min(calc(100% - 32px), var(--container));
    }

    .site-header {
        position: relative;
    }

    .header-grid {
        min-height: auto;
        padding: 20px 0;
        justify-content: flex-start;
    }

    .main-nav {
        width: 100%;
        gap: 18px;
        overflow-x: auto;
        padding-bottom: 4px;
        scrollbar-width: none;
    }

    .main-nav::-webkit-scrollbar {
        display: none;
    }

    .main-nav a {
        flex: 0 0 auto;
        white-space: nowrap;
    }

    .hero {
        padding: 72px 0;
    }

    h1 {
        font-size: clamp(3rem, 15vw, 4.9rem);
    }

    h2 {
        font-size: clamp(2.15rem, 11vw, 3.6rem);
    }

    .hero-actions {
        align-items: flex-start;
        flex-direction: column;
    }

    .button {
        width: 100%;
    }

    .text-link {
        width: fit-content;
    }

    .hero-panel,
    .service-card,
    .process-item {
        padding: 30px 26px;
    }

    .hero-logo-panel {
        min-height: 240px;
    }

    .hero-logo {
        width: min(100%, 280px);
        max-height: 200px;
    }

    .process-grid {
        grid-template-columns: 1fr;
    }

    .canal-illustration img {
        height: 290px;
        object-position: center bottom;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 34px;
    }

    .copyright {
        grid-column: auto;
    }
}

/* Reduced motion */

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

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
