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

@font-face {
    font-family: 'Instrument Sans';
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url('./fonts/InstrumentSans-600.woff2') format('woff2');
}

@font-face {
    font-family: 'Instrument Sans';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url('./fonts/InstrumentSans-700.woff2') format('woff2');
}

@font-face {
    font-family: 'Unbounded';
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url('./fonts/Unbounded-600.woff2') format('woff2');
}

@font-face {
    font-family: 'Unbounded';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url('./fonts/Unbounded-700.woff2') format('woff2');
}

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

:root {
    --bg: #f3efe6;
    --surface: #fffaf2;
    --ink: #1f2723;
    --ink-soft: #4f5e57;
    --line: rgba(31, 39, 35, 0.14);
    --accent: #0f8f6f;
    --accent-strong: #08674f;
    --sun: #f4a462;
    --shadow: 0 24px 68px rgba(26, 45, 36, 0.16);
    --radius-lg: 26px;
    --radius-md: 16px;
    --content-max: 1140px;
    --page-gutter: 20px;
    --content-width: min(var(--content-max), calc(100% - (var(--page-gutter) * 2)));
}

html {
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    background:
        radial-gradient(circle at 84% 14%, rgba(244, 164, 98, 0.24), transparent 44%),
        radial-gradient(circle at 12% 78%, rgba(15, 143, 111, 0.2), transparent 42%),
        var(--bg);
    color: var(--ink);
    font-family: 'Instrument Sans', sans-serif;
    line-height: 1.55;
    overflow-x: hidden;
    position: relative;
}

.page-noise {
    position: fixed;
    inset: 0;
    pointer-events: none;
    background-image: radial-gradient(rgba(20, 34, 28, 0.08) 0.4px, transparent 0.4px);
    background-size: 3px 3px;
    opacity: 0.2;
    z-index: -2;
}

#bg {
    width: 100%;
    position: fixed;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: -1;
    filter: blur(0.35px);
}

.arrow {
    position: absolute;
    color: rgba(11, 105, 82, 0.32);
    font-family: monospace;
    font-size: 18px;
    pointer-events: none;
    user-select: none;
    will-change: transform;
    transform-origin: 50% 50%;
}

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

.container {
    width: var(--content-width);
    margin: 0 auto;
}

header {
    position: fixed;
    top: 12px;
    left: 0;
    right: 0;
    transform: none;
    z-index: 30;
}

.menu {
    width: var(--content-width);
    margin: 0 auto;
    padding: 14px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border: 1px solid var(--line);
    border-radius: 999px;
    backdrop-filter: blur(10px);
    background: rgba(255, 250, 242, 0.76);
    transition: box-shadow 220ms ease, transform 220ms ease, background-color 220ms ease;
}

header.scrolled .menu {
    box-shadow: 0 12px 28px rgba(26, 45, 36, 0.16);
    transform: translateY(-2px);
    background: rgba(255, 250, 242, 0.94);
}

.brand {
    display: inline-flex;
    align-items: center;
    font: 700 20px/1 'Unbounded', sans-serif;
    letter-spacing: 0.01em;
    color: var(--ink);
}

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

.main-nav a {
    position: relative;
    font-size: 12px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    font-weight: 700;
    color: rgba(31, 39, 35, 0.76);
}

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

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

.mobile-menu-toggle {
    display: none;
    width: 44px;
    height: 40px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: transparent;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 6px;
}

.mobile-menu-toggle-line {
    width: 18px;
    height: 2px;
    border-radius: 2px;
    background: var(--ink);
}

.mobile-drawer-backdrop,
.mobile-drawer {
    display: none;
}

main {
    padding-top: 110px;
}

#work,
#cases,
#assurance,
#companies,
#contact {
    scroll-margin-top: 100px;
}

#hero {
    padding: 56px 0 48px;
}

.hero-content {
    padding: 74px 56px 60px;
    border-radius: var(--radius-lg);
    border: 1px solid rgba(31, 39, 35, 0.16);
    background:
        linear-gradient(120deg, rgba(255, 250, 242, 0.94), rgba(255, 250, 242, 0.86)),
        radial-gradient(circle at 82% 16%, rgba(244, 164, 98, 0.22), transparent 40%);
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
}

.hero-content::before {
    content: '';
    position: absolute;
    width: 220px;
    height: 220px;
    border-radius: 50%;
    right: -80px;
    top: -80px;
    border: 1px solid rgba(8, 103, 79, 0.3);
}

.hero-kicker {
    width: fit-content;
    padding: 8px 14px;
    border-radius: 999px;
    border: 1px solid rgba(15, 143, 111, 0.28);
    color: var(--accent-strong);
    font-size: 12px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-weight: 700;
}

h1 {
    margin-top: 24px;
    max-width: 900px;
    font: 700 clamp(2.1rem, 5vw, 4.35rem)/1.05 'Unbounded', sans-serif;
    letter-spacing: -0.02em;
}

h1 span {
    color: var(--accent-strong);
    text-shadow: 0 12px 28px rgba(8, 103, 79, 0.2);
}

.subtitle {
    max-width: 760px;
    margin-top: 24px;
    color: var(--ink-soft);
    font-size: clamp(1.03rem, 2vw, 1.18rem);
}

.hero-action {
    margin-top: 32px;
}

.hero-action small {
    display: inline-block;
    margin-top: 14px;
    color: rgba(31, 39, 35, 0.7);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 15px 24px;
    border-radius: 12px;
    border: none;
    background: linear-gradient(135deg, var(--accent), var(--accent-strong));
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0.02em;
    box-shadow: 0 14px 28px rgba(8, 103, 79, 0.25);
    transition: transform 180ms ease, box-shadow 180ms ease;
}

.btn:hover,
.btn:focus-visible {
    transform: translateY(-2px);
    box-shadow: 0 20px 32px rgba(8, 103, 79, 0.33);
}

.hero-metrics {
    margin-top: 34px;
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.hero-metrics article {
    padding: 18px 16px;
    border-radius: 14px;
    border: 1px solid rgba(31, 39, 35, 0.12);
    background: rgba(255, 250, 242, 0.72);
}

.metric-value {
    font: 700 1.15rem/1.1 'Unbounded', sans-serif;
}

.metric-label {
    margin-top: 8px;
    font-size: 0.9rem;
    color: rgba(31, 39, 35, 0.76);
}

.section-wrap {
    padding: 22px 0 8px;
}

.section-title {
    margin: 0 0 24px;
    font: 700 clamp(1.55rem, 2.8vw, 2.45rem)/1.1 'Unbounded', sans-serif;
}

.cases {
    display: grid;
    gap: 18px;
    grid-template-columns: repeat(12, minmax(0, 1fr));
}

.case-card,
.contact-panel {
    border-radius: var(--radius-md);
    border: 1px solid rgba(31, 39, 35, 0.13);
    background: rgba(255, 250, 242, 0.86);
    box-shadow: 0 8px 24px rgba(26, 45, 36, 0.07);
}

.case-card h3 {
    margin-top: 12px;
    font: 600 1.2rem/1.2 'Unbounded', sans-serif;
}

.case-card p {
    margin-top: 12px;
    color: var(--ink-soft);
}

#work .container {
    position: relative;
}

.timeline {
    position: relative;
    display: grid;
    gap: 26px;
    padding: 6px 0;
}

.timeline::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 2px;
    transform: translateX(-50%);
    background: linear-gradient(
        to bottom,
        rgba(8, 103, 79, 0.12) 0%,
        rgba(8, 103, 79, 0.48) 18%,
        rgba(8, 103, 79, 0.48) 82%,
        rgba(8, 103, 79, 0.12) 100%
    );
}

.timeline-item {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: center;
}

.timeline-content {
    position: relative;
    width: calc(100% - 38px);
    padding: 24px 24px 22px;
    border-radius: var(--radius-md);
    border: 1px solid rgba(31, 39, 35, 0.13);
    background: rgba(255, 250, 242, 0.86);
    box-shadow: 0 8px 24px rgba(26, 45, 36, 0.07);
}

.timeline-content h3 {
    font: 600 1.2rem/1.2 'Unbounded', sans-serif;
}

.timeline-content p {
    margin-top: 12px;
    color: var(--ink-soft);
}

.timeline-item.left .timeline-content {
    grid-column: 1;
    justify-self: end;
}

.timeline-item.right .timeline-content {
    grid-column: 2;
    justify-self: start;
}

.timeline-content::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 30px;
    height: 1px;
    background: rgba(8, 103, 79, 0.38);
    transform: translateY(-50%);
}

.timeline-item.left .timeline-content::after {
    right: -30px;
}

.timeline-item.right .timeline-content::after {
    left: -30px;
}

.timeline-node {
    position: absolute;
    top: 50%;
    left: 50%;
    z-index: 2;
    width: 44px;
    height: 44px;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font: 600 0.78rem/1 'Unbounded', sans-serif;
    letter-spacing: 0.08em;
    color: var(--accent-strong);
    background: linear-gradient(145deg, rgba(255, 250, 242, 0.98), rgba(244, 164, 98, 0.34));
    border: 1px solid rgba(8, 103, 79, 0.28);
    box-shadow: 0 10px 22px rgba(8, 103, 79, 0.2);
}

.case-card {
    grid-column: span 4;
    padding: 24px;
}

.case-tag {
    margin: 0;
    width: fit-content;
    padding: 6px 11px;
    border-radius: 999px;
    border: 1px solid rgba(31, 39, 35, 0.16);
    font-size: 11px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(31, 39, 35, 0.76);
}

.logos {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.logos div {
    border: 1px dashed rgba(31, 39, 35, 0.25);
    border-radius: 14px;
    min-height: 76px;
    display: flex;
    align-items: center;
    justify-content: center;
    font: 600 0.96rem/1.1 'Unbounded', sans-serif;
    color: rgba(31, 39, 35, 0.8);
    letter-spacing: 0.03em;
    background: rgba(255, 250, 242, 0.62);
}

.assurance-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}

.assurance-card {
    min-width: 0;
    border-radius: var(--radius-md);
    border: 1px solid rgba(31, 39, 35, 0.13);
    background: rgba(255, 250, 242, 0.88);
    box-shadow: 0 8px 24px rgba(26, 45, 36, 0.07);
    padding: 22px 22px 20px;
}

.assurance-card h3 {
    font: 600 1.08rem/1.25 'Unbounded', sans-serif;
    overflow-wrap: anywhere;
}

.assurance-card p {
    margin-top: 10px;
    color: var(--ink-soft);
    overflow-wrap: anywhere;
}

@media (min-width: 961px) {
    .assurance-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.contact-panel {
    padding: 36px;
    text-align: center;
    background:
        linear-gradient(110deg, rgba(255, 250, 242, 0.9), rgba(243, 239, 230, 0.82)),
        radial-gradient(circle at 12% 0%, rgba(15, 143, 111, 0.12), transparent 42%);
}

.contact-panel h2 {
    font: 700 clamp(1.45rem, 2.8vw, 2.5rem)/1.15 'Unbounded', sans-serif;
}

.contact-panel p {
    margin: 18px auto 24px;
    max-width: 760px;
    color: var(--ink-soft);
}

footer {
    width: var(--content-width);
    margin: 38px auto 32px;
    padding-top: 20px;
    padding-bottom: 20px;
    border-top: 1px solid rgba(31, 39, 35, 0.2);
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: rgba(31, 39, 35, 0.74);
    font-size: 0.9rem;
}

.reveal {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 540ms ease, transform 540ms ease;
}

.reveal.reveal-left {
    transform: translateX(-42px) translateY(8px);
    transition: opacity 520ms ease, transform 620ms cubic-bezier(0.2, 0.74, 0.2, 1);
}

.reveal.reveal-right {
    transform: translateX(42px) translateY(8px);
    transition: opacity 520ms ease, transform 620ms cubic-bezier(0.2, 0.74, 0.2, 1);
}

.reveal.is-visible {
    opacity: 1;
    transform: translateX(0) translateY(0);
}

.delay-1 {
    transition-delay: 90ms;
}

.delay-2 {
    transition-delay: 180ms;
}

.delay-3 {
    transition-delay: 270ms;
}

.delay-4 {
    transition-delay: 360ms;
}

@media (max-width: 960px) {
    .menu {
        justify-content: flex-start;
        gap: 12px;
    }

    .main-nav {
        display: none;
    }

    .mobile-menu-toggle {
        display: inline-flex;
        order: -1;
    }

    .mobile-drawer-backdrop,
    .mobile-drawer {
        display: block;
    }

    .mobile-drawer-backdrop {
        position: fixed;
        inset: 0;
        background: rgba(31, 39, 35, 0.38);
        backdrop-filter: blur(3px);
        opacity: 0;
        pointer-events: none;
        z-index: 31;
        transition: opacity 220ms ease;
    }

    .mobile-drawer {
        position: fixed;
        top: 0;
        left: 0;
        width: min(84vw, 320px);
        height: 100vh;
        background: rgba(255, 250, 242, 0.96);
        border-right: 1px solid var(--line);
        z-index: 32;
        transform: translateX(-105%);
        transition: transform 220ms ease;
        padding: 24px 18px;
    }

    .mobile-drawer-close {
        border: none;
        background: transparent;
        font-size: 30px;
        line-height: 1;
        cursor: pointer;
    }

    .mobile-drawer nav {
        margin-top: 20px;
        display: flex;
        flex-direction: column;
        gap: 16px;
    }

    .mobile-drawer a {
        font-size: 13px;
        letter-spacing: 0.08em;
        text-transform: uppercase;
        font-weight: 700;
        color: rgba(31, 39, 35, 0.76);
    }

    body.menu-open .mobile-drawer {
        transform: translateX(0);
    }

    body.menu-open .mobile-drawer-backdrop {
        opacity: 1;
        pointer-events: auto;
    }

    body.menu-open {
        overflow: hidden;
    }

    .hero-content {
        padding: 52px 28px 38px;
    }

    .hero-metrics {
        grid-template-columns: 1fr;
    }

    .case-card {
        grid-column: span 6;
    }

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

    .timeline::before {
        left: 22px;
        transform: none;
    }

    .timeline-item {
        grid-template-columns: 1fr;
        padding-left: 54px;
    }

    .timeline-item.left .timeline-content,
    .timeline-item.right .timeline-content {
        grid-column: 1;
        justify-self: stretch;
        width: 100%;
    }

    .timeline-node {
        left: 22px;
        transform: translate(-50%, -50%);
        width: 40px;
        height: 40px;
    }

    .timeline-content::after {
        left: -32px;
        width: 32px;
    }
}

@media (max-width: 640px) {
    :root {
        --page-gutter: 12px;
    }

    header {
        top: 8px;
    }

    main {
        padding-top: 92px;
    }

    #work,
    #cases,
    #assurance,
    #companies,
    #contact {
        scroll-margin-top: 98px;
    }

    #hero {
        padding-top: 18px;
    }

    .hero-content {
        padding: 36px 18px 28px;
        border-radius: 20px;
    }

    .subtitle {
        margin-top: 18px;
    }

    .btn {
        width: 100%;
    }

    .section-title {
        margin-bottom: 18px;
    }

    .case-card {
        grid-column: span 12;
    }

    .contact-panel {
        padding: 28px 18px;
    }

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

    footer {
        margin-top: 26px;
        padding-top: 18px;
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 6px;
    }

    .arrow {
        display: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    * {
        animation: none !important;
        transition: none !important;
        scroll-behavior: auto !important;
    }

    .reveal {
        opacity: 1;
        transform: none;
    }

    .reveal.reveal-left,
    .reveal.reveal-right {
        transform: none;
    }
}
