/* ============================================
   1. VARIABLES
============================================ */
:root {
    --ink: #18233b;
    --paper: #f2efe7;
    --white: #fffdf8;
    --blue: #2447d8;
    --coral: #e9573f;
    --sand: #e8c96a;
    --mint: #9fd7c5;
    --line: rgba(24, 35, 59, 0.22);
    --content-width: 1720px;
    --gutter: clamp(1.125rem, 4.2vw, 5rem);
    --section-space: clamp(5.5rem, 10vw, 11rem);

    /* ============================================
       HERO BACKGROUND IMAGE
       Replace this path when using a custom image.
       Recommended dimensions: 2200 × 1500 px.
    ============================================= */
    --hero-image: url("../img/hero-background1.webp");
}

/* ============================================
   2. RESET / BASE
============================================ */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 6rem;
}

body {
    margin: 0;
    min-width: 320px;
    overflow-x: hidden;
    color: var(--ink);
    background: var(--paper);
    font-family: "Avenir Next", Avenir, "Segoe UI", Helvetica, Arial, sans-serif;
    line-height: 1.55;
    text-rendering: optimizeLegibility;
}

body.menu-open {
    overflow: hidden;
}

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

a {
    color: inherit;
}

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

button,
a,
input,
textarea {
    -webkit-tap-highlight-color: transparent;
}

:focus-visible {
    outline: 3px solid var(--coral);
    outline-offset: 4px;
}

::selection {
    color: var(--white);
    background: var(--blue);
}

.skip-link {
    position: fixed;
    z-index: 100;
    top: 0.75rem;
    left: 0.75rem;
    padding: 0.75rem 1rem;
    color: var(--white);
    background: var(--ink);
    transform: translateY(-150%);
}

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

/* ============================================
   3. TYPOGRAPHY
============================================ */
h1,
h2,
h3,
p {
    margin-top: 0;
}

h1,
h2,
h3 {
    line-height: 0.98;
}

h1 {
    margin-bottom: 0;
    max-width: 13ch;
    font-size: clamp(3.35rem, 8.8vw, 10.8rem);
    font-weight: 520;
    letter-spacing: -0.075em;
}

h2 {
    margin-bottom: 1.5rem;
    font-size: clamp(2.5rem, 5.6vw, 6.6rem);
    font-weight: 520;
    letter-spacing: -0.065em;
}

h3 {
    margin-bottom: 0.8rem;
    font-size: clamp(1.5rem, 2.3vw, 2.75rem);
    font-weight: 560;
    letter-spacing: -0.04em;
}

p {
    max-width: 62ch;
}

/* ============================================
   4. HEADER
============================================ */
.site-header {
    position: relative;
    z-index: 30;
    display: grid;
    grid-template-columns: minmax(180px, 1fr) auto minmax(180px, 1fr);
    align-items: center;
    min-height: 86px;
    padding: 1rem var(--gutter);
    border-bottom: 1px solid var(--line);
    background: var(--paper);
}

.site-logo {
    display: inline-flex;
    width: fit-content;
    text-decoration: none;
}

.site-logo img {
    width: 184px;
    height: auto;
}

.site-nav {
    display: flex;
    gap: clamp(1.5rem, 3vw, 3.5rem);
    align-items: center;
}

.site-nav a {
    position: relative;
    padding: 0.5rem 0;
    font-size: 0.88rem;
    font-weight: 650;
    text-decoration: none;
}

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

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

.language-switch {
    display: flex;
    justify-self: end;
    gap: 0.45rem;
    align-items: center;
    font-size: 0.78rem;
    font-weight: 750;
    letter-spacing: 0.08em;
}

.language-switch button {
    padding: 0.35rem;
    border: 0;
    background: transparent;
    cursor: pointer;
    opacity: 0.42;
}

.language-switch button[aria-pressed="true"] {
    opacity: 1;
}

.menu-toggle {
    display: none;
}

/* ============================================
   5. HERO
============================================ */
.hero {
    position: relative;
    isolation: isolate;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-rows: 1fr auto;
    min-height: calc(100svh - 86px);
    padding: clamp(4rem, 8vw, 8rem) var(--gutter) clamp(2rem, 4vw, 4rem);
    overflow: hidden;
    background-color: var(--paper);
    background-image: linear-gradient(rgba(242, 239, 231, 0.86), rgba(242, 239, 231, 0.92)), var(--hero-image);
    background-position: center;
    background-size: cover;
}

.hero::after {
    position: absolute;
    z-index: -2;
    inset: 0;
    background-image: linear-gradient(to right, transparent calc(100% - 1px), var(--line) 1px);
    background-size: clamp(4.5rem, 8vw, 9rem) 100%;
    content: "";
    opacity: 0.35;
}

.hero__copy {
    position: relative;
    z-index: 2;
    align-self: end;
}

.hero__copy > p {
    margin: clamp(2rem, 4vw, 4rem) 0 0 clamp(0rem, 18vw, 19rem);
    max-width: 42rem;
    font-size: clamp(1.1rem, 1.5vw, 1.45rem);
}

.hero-action {
    position: relative;
    z-index: 3;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 2.5rem;
    align-self: end;
    width: clamp(250px, 25vw, 390px);
    margin-bottom: 0.4rem;
    padding: 1.15rem 0;
    border-top: 2px solid var(--ink);
    border-bottom: 2px solid var(--ink);
    font-weight: 700;
    text-decoration: none;
    transition: color 180ms ease, padding 180ms ease;
}

.hero-action__mark {
    transition: transform 180ms ease;
}

.hero-action:hover,
.hero-action:focus-visible {
    color: var(--blue);
    padding-left: 0.75rem;
}

.hero-action:hover .hero-action__mark,
.hero-action:focus-visible .hero-action__mark {
    transform: translateX(-0.75rem);
}

.hero__note {
    grid-column: 1 / -1;
    margin-top: 3rem;
    padding-top: 1rem;
    border-top: 1px solid var(--line);
    font-size: 0.72rem;
    font-weight: 750;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.hero__weave {
    position: absolute;
    z-index: -1;
    top: -7%;
    right: -5%;
    width: min(52vw, 830px);
    height: 72%;
    transform: rotate(-7deg);
}

.weave-line,
.weave-thread,
.weave-knot {
    position: absolute;
    display: block;
}

.weave-line {
    right: -10%;
    left: 2%;
    height: clamp(2.2rem, 4.5vw, 5rem);
    border-radius: 0 999px 999px 0;
    transform-origin: right center;
    animation: shuttle 7s ease-in-out infinite alternate;
}

.weave-line--one {
    top: 14%;
    background: var(--blue);
}

.weave-line--two {
    top: 34%;
    left: 18%;
    background: var(--mint);
    animation-delay: -2s;
}

.weave-line--three {
    top: 54%;
    left: 8%;
    background: var(--coral);
    animation-delay: -4s;
}

.weave-line--four {
    top: 74%;
    left: 28%;
    background: var(--sand);
    animation-delay: -6s;
}

.weave-thread {
    top: 2%;
    bottom: 2%;
    width: clamp(1rem, 1.8vw, 2.2rem);
    background: var(--ink);
    clip-path: polygon(0 0, 100% 0, 100% 43%, 0 48%, 0 64%, 100% 59%, 100% 100%, 0 100%);
}

.weave-thread--one {
    left: 44%;
}

.weave-thread--two {
    left: 58%;
    background: var(--white);
}

.weave-thread--three {
    left: 72%;
}

.weave-knot {
    right: 9%;
    bottom: -3%;
    width: clamp(5rem, 10vw, 10rem);
    aspect-ratio: 1;
    border: clamp(0.9rem, 1.7vw, 1.7rem) solid var(--ink);
    border-radius: 50%;
    background: var(--paper);
}

@keyframes shuttle {
    from {
        transform: translateX(0);
    }

    to {
        transform: translateX(3.5%);
    }
}

/* ============================================
   6. STARTING POINTS
============================================ */
.starting-points {
    display: grid;
    grid-template-columns: minmax(260px, 0.78fr) minmax(0, 1.22fr);
    gap: clamp(4rem, 9vw, 10rem);
    padding: var(--section-space) var(--gutter);
    background: var(--white);
}

.section-heading {
    position: sticky;
    top: 8rem;
    align-self: start;
}

.section-heading h2 {
    font-size: clamp(2.8rem, 5vw, 5.8rem);
}

.section-heading p {
    margin-bottom: 0;
    max-width: 34rem;
    font-size: 1.05rem;
}

.starting-list {
    border-top: 1px solid var(--ink);
}

.starting-list article {
    display: grid;
    grid-template-columns: 3rem minmax(200px, 0.72fr) minmax(220px, 1fr);
    gap: clamp(1rem, 3vw, 3rem);
    padding: clamp(2rem, 4vw, 4rem) 0;
    border-bottom: 1px solid var(--ink);
}

.starting-list article > span {
    font-size: 0.76rem;
    font-weight: 750;
}

.starting-list h3,
.starting-list p {
    margin-bottom: 0;
}

/* ============================================
   7. SERVICES
============================================ */
.services {
    padding: var(--section-space) var(--gutter);
    color: var(--white);
    background: var(--ink);
}

.services__intro {
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(260px, 0.7fr);
    gap: 4rem;
    align-items: end;
    margin-bottom: clamp(4rem, 8vw, 8rem);
}

.services__intro h2 {
    margin-bottom: 0;
    max-width: 12ch;
}

.services__intro p {
    margin: 0;
    font-size: 1.08rem;
}

.service-weave {
    position: relative;
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    min-height: 44rem;
    padding: 2rem 0;
}

.service-weave::before {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 49%;
    width: 2px;
    background: var(--white);
    content: "";
    opacity: 0.65;
}

.service-band {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 3rem 1fr;
    gap: 1rem;
    align-items: center;
    min-height: 10rem;
    padding: 1.5rem clamp(1.25rem, 3vw, 3rem);
    color: var(--ink);
    transition: transform 200ms ease;
}

.service-band:hover {
    transform: translateX(1rem);
}

.service-band > span {
    align-self: start;
    font-size: 0.75rem;
    font-weight: 800;
}

.service-band h3,
.service-band p {
    margin-bottom: 0;
}

.service-band--blue {
    grid-column: 1 / 10;
    background: #8198f0;
}

.service-band--coral {
    grid-column: 4 / 13;
    background: var(--coral);
}

.service-band--sand {
    grid-column: 2 / 11;
    background: var(--sand);
}

.service-band--ink {
    grid-column: 5 / 13;
    color: var(--white);
    border: 2px solid var(--white);
    background: var(--ink);
}

/* ============================================
   8. APPROACH
============================================ */
.approach {
    display: grid;
    grid-template-columns: minmax(280px, 0.9fr) minmax(0, 1.1fr);
    gap: clamp(4rem, 10vw, 12rem);
    padding: var(--section-space) var(--gutter);
    background: var(--mint);
}

.approach__statement {
    align-self: start;
}

.approach__statement h2 {
    max-width: 10ch;
}

.approach__statement p {
    font-size: 1.08rem;
}

.approach__steps {
    margin: 0;
    padding: 0;
    list-style: none;
    counter-reset: approach;
}

.approach__steps li {
    position: relative;
    display: grid;
    grid-template-columns: minmax(150px, 0.7fr) 1fr;
    gap: 2rem;
    padding: 2rem 0 2rem 4.2rem;
    border-top: 2px solid var(--ink);
    counter-increment: approach;
}

.approach__steps li:last-child {
    border-bottom: 2px solid var(--ink);
}

.approach__steps li::before {
    position: absolute;
    top: 2.1rem;
    left: 0;
    content: "0" counter(approach);
    font-size: 0.8rem;
    font-weight: 800;
}

.approach__steps span {
    font-size: clamp(1.65rem, 2.3vw, 2.6rem);
    font-weight: 600;
    letter-spacing: -0.04em;
}

.approach__steps p {
    margin-bottom: 0;
}

/* ============================================
   9. PRINCIPLES
============================================ */
.principles {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    background: var(--coral);
}

.principles p {
    display: flex;
    align-items: flex-end;
    min-height: clamp(16rem, 28vw, 30rem);
    margin: 0;
    padding: clamp(2rem, 4vw, 4.5rem);
    border-right: 1px solid var(--ink);
    font-size: clamp(2rem, 3.8vw, 4.6rem);
    font-weight: 520;
    line-height: 1;
    letter-spacing: -0.055em;
}

.principles p:last-child {
    border-right: 0;
}

/* ============================================
   10. CONTACT
============================================ */
.contact {
    display: grid;
    grid-template-columns: minmax(280px, 0.82fr) minmax(0, 1.18fr);
    gap: clamp(4rem, 10vw, 12rem);
    padding: var(--section-space) var(--gutter);
    color: var(--white);
    background: var(--blue);
}

.contact__intro {
    align-self: start;
}

.contact__intro h2 {
    max-width: 9ch;
}

.contact__intro p {
    font-size: 1.08rem;
}

.contact__intro > a {
    display: inline-block;
    margin-top: 1.5rem;
    font-weight: 700;
    text-underline-offset: 0.4em;
}

.contact-form {
    position: relative;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem 1.5rem;
    align-self: start;
    padding-top: 0.5rem;
}

.form-field {
    display: grid;
    gap: 0.65rem;
}

.form-field--wide {
    grid-column: 1 / -1;
}

.form-field label {
    font-size: 0.8rem;
    font-weight: 750;
}

.form-field input,
.form-field textarea {
    width: 100%;
    border: 0;
    border-bottom: 2px solid var(--white);
    border-radius: 0;
    outline: 0;
    background: transparent;
}

.form-field input {
    min-height: 3rem;
}

.form-field textarea {
    min-height: 9rem;
    padding: 0.75rem 0;
    resize: vertical;
}

.form-field input:focus,
.form-field textarea:focus {
    border-color: var(--sand);
}

.form-consent {
    display: grid;
    grid-template-columns: 1.25rem 1fr;
    gap: 0.85rem;
    align-items: start;
    font-size: 0.86rem;
}

.form-consent input {
    width: 1.15rem;
    height: 1.15rem;
    margin: 0.18rem 0 0;
    accent-color: var(--sand);
}

.form-consent a {
    text-underline-offset: 0.25em;
}

.submit-button {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 2rem;
    width: 100%;
    margin-top: 1rem;
    padding: 1.3rem 0;
    border: 0;
    border-top: 2px solid var(--white);
    border-bottom: 2px solid var(--white);
    color: var(--white);
    background: transparent;
    font-weight: 800;
    text-align: left;
    cursor: pointer;
    transition: padding 180ms ease, color 180ms ease;
}

.submit-button:hover,
.submit-button:focus-visible {
    padding-right: 1rem;
    padding-left: 1rem;
    color: var(--ink);
    background: var(--sand);
}

.submit-button:disabled {
    cursor: wait;
    opacity: 0.6;
}

.honeypot {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
}

.form-status {
    position: absolute;
    z-index: 5;
    inset: -1rem;
    display: grid;
    place-items: center;
    padding: 1rem;
    background: rgba(24, 35, 59, 0.88);
}

.form-status[hidden] {
    display: none;
}

.form-status__panel {
    width: min(100%, 32rem);
    padding: clamp(2rem, 5vw, 4rem);
    color: var(--ink);
    background: var(--sand);
}

.form-status__title {
    margin-bottom: 0.75rem;
    font-size: 1.65rem;
    font-weight: 750;
}

.form-status__message {
    margin-bottom: 2rem;
}

.form-status__close {
    padding: 0.75rem 1.25rem;
    border: 2px solid var(--ink);
    background: transparent;
    font-weight: 750;
    cursor: pointer;
}

/* ============================================
   11. FOOTER
============================================ */
.site-footer {
    display: grid;
    grid-template-columns: 1.3fr 1fr 1fr auto;
    gap: 2rem;
    padding: 3.5rem var(--gutter);
    color: var(--white);
    background: var(--ink);
    font-size: 0.82rem;
}

.site-footer div {
    display: grid;
    gap: 0.25rem;
    align-content: start;
}

.site-footer a {
    width: fit-content;
    text-underline-offset: 0.25em;
}

.site-footer > p {
    margin: 0;
    white-space: nowrap;
}

/* ============================================
   12. PRIVACY / ERROR PAGES
============================================ */
.policy-hero,
.error-page {
    padding: clamp(5rem, 10vw, 10rem) var(--gutter);
    color: var(--white);
    background: var(--ink);
}

.policy-hero h1,
.error-page h1 {
    max-width: 10ch;
    font-size: clamp(3.5rem, 8vw, 8.5rem);
}

.policy-hero p,
.error-page p {
    max-width: 46rem;
    margin: 2rem 0 0;
    font-size: 1.1rem;
}

.policy-layout {
    display: grid;
    grid-template-columns: minmax(220px, 0.4fr) minmax(0, 1fr);
    gap: clamp(3rem, 9vw, 10rem);
    padding: var(--section-space) var(--gutter);
    background: var(--white);
}

.policy-index {
    position: sticky;
    top: 8rem;
    align-self: start;
    display: grid;
    gap: 0.75rem;
}

.policy-index a {
    width: fit-content;
    font-size: 0.85rem;
    font-weight: 700;
    text-underline-offset: 0.25em;
}

.policy-content {
    max-width: 52rem;
}

.policy-content section {
    padding: 0 0 3.5rem;
    margin-bottom: 3.5rem;
    border-bottom: 1px solid var(--line);
}

.policy-content h2 {
    font-size: clamp(2rem, 3vw, 3.2rem);
}

.policy-content h3 {
    margin-top: 2rem;
    font-size: 1.25rem;
}

.policy-content li + li {
    margin-top: 0.65rem;
}

.error-page {
    display: grid;
    place-content: center start;
    min-height: calc(100svh - 86px);
    background: var(--coral);
}

.error-page a {
    display: inline-block;
    width: fit-content;
    margin-top: 2rem;
    padding: 1rem 1.4rem;
    border: 2px solid currentColor;
    font-weight: 750;
    text-decoration: none;
}

/* ============================================
   13. RESPONSIVE
============================================ */
@media (max-width: 1024px) {
    .site-header {
        grid-template-columns: 1fr auto auto;
        gap: 1.25rem;
    }

    .menu-toggle {
        display: flex;
        gap: 0.7rem;
        align-items: center;
        padding: 0.5rem;
        border: 0;
        background: transparent;
        font-size: 0.82rem;
        font-weight: 750;
        cursor: pointer;
    }

    .menu-toggle__icon,
    .menu-toggle__icon::before {
        display: block;
        width: 1.5rem;
        height: 2px;
        background: var(--ink);
        content: "";
        transition: transform 180ms ease;
    }

    .menu-toggle__icon::before {
        transform: translateY(0.42rem);
    }

    .menu-toggle[aria-expanded="true"] .menu-toggle__icon {
        transform: translateY(0.2rem) rotate(45deg);
    }

    .menu-toggle[aria-expanded="true"] .menu-toggle__icon::before {
        transform: rotate(-90deg);
    }

    .site-nav {
        position: absolute;
        top: 100%;
        right: 0;
        left: 0;
        display: none;
        gap: 0;
        padding: 0 var(--gutter) 2rem;
        background: var(--sand);
    }

    .site-nav.is-open {
        display: grid;
    }

    .site-nav a {
        padding: 1.2rem 0;
        border-bottom: 1px solid var(--ink);
        font-size: clamp(1.8rem, 5vw, 3rem);
        letter-spacing: -0.04em;
    }

    .hero {
        grid-template-columns: 1fr;
        min-height: auto;
        padding-top: clamp(20rem, 50vw, 34rem);
    }

    .hero__weave {
        top: -5%;
        right: -10%;
        width: 78vw;
        height: 43%;
    }

    .hero-action {
        width: min(100%, 420px);
        margin-top: 3rem;
    }

    .starting-points,
    .approach,
    .contact {
        grid-template-columns: 1fr;
    }

    .section-heading {
        position: static;
    }

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

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

    .principles p {
        min-height: 14rem;
        border-right: 0;
        border-bottom: 1px solid var(--ink);
    }

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

@media (max-width: 700px) {
    .site-header {
        min-height: 74px;
    }

    .site-logo img {
        width: 150px;
    }

    .menu-toggle__label {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip: rect(0 0 0 0);
    }

    .hero {
        min-height: calc(100svh - 74px);
        padding-top: min(78vw, 22rem);
    }

    .hero__copy > p {
        margin-left: 0;
    }

    .hero__weave {
        right: -24%;
        width: 105vw;
        height: 36%;
    }

    .starting-list article {
        grid-template-columns: 2.5rem 1fr;
    }

    .starting-list article p {
        grid-column: 2;
    }

    .service-weave {
        display: flex;
        min-height: 0;
        flex-direction: column;
        padding-left: 1.25rem;
    }

    .service-weave::before {
        right: auto;
        left: 0;
    }

    .service-band {
        min-height: 12rem;
        margin: 0 0 1rem;
    }

    .service-band:nth-child(even) {
        margin-left: 1rem;
    }

    .approach__steps li {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    .contact-form {
        grid-template-columns: 1fr;
    }

    .form-field--wide {
        grid-column: auto;
    }

    .site-footer,
    .policy-layout {
        grid-template-columns: 1fr;
    }

    .policy-index {
        position: static;
        padding-bottom: 2rem;
        border-bottom: 1px solid var(--line);
    }
}

@media (max-width: 420px) {
    :root {
        --gutter: 1rem;
    }

    .site-header {
        gap: 0.65rem;
    }

    .site-logo img {
        width: 132px;
    }

    .language-switch {
        gap: 0.15rem;
    }

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

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

/* ============================================
   14. REDUCED MOTION
============================================ */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

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