:root {
    --font-serif: "EB Garamond", Garamond, "Times New Roman", serif;
    --font-sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;

    --color-bg: #f8f8f7;
    --color-text: #140700;
    --color-muted: #6b6560;
    --color-line: #e2e0dc;

    --gutter: clamp(16px, 4.5vw, 88px);
    --header-height: 64px;
}

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

.background {
    background-color: var(--color-bg);
    color: var(--color-text);
}

body {
    margin: 0;
    font-family: var(--font-sans);
    font-weight: 400;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
    font-family: var(--font-serif);
    font-weight: 400;
    letter-spacing: -0.01em;
}

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

/* ---------- Header ---------- */

.site-header {
    position: fixed;
    inset: 0 0 auto 0;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: var(--header-height);
    padding: 0 var(--gutter);
    background-color: var(--color-bg);
    border-bottom: 1px solid var(--color-line);
}

.logo {
    font-size: 0.8125rem;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

/* ---------- Burger menu ---------- */

.menu-toggle {
    position: relative;
    z-index: 1; /* stays clickable above the open panel */
    display: grid;
    align-content: center;
    gap: 5px;
    width: 40px;
    height: 40px;
    margin-right: -8px;
    padding: 8px;
    border: 0;
    background: none;
    color: inherit;
    cursor: pointer;
}

.menu-toggle__bar {
    display: block;
    height: 1.5px;
    background-color: currentColor;
    transition: transform 0.25s ease, opacity 0.2s ease;
}

/* Bars turn into an X when open */
.menu-toggle[aria-expanded="true"] .menu-toggle__bar:nth-child(1) {
    transform: translateY(6.5px) rotate(45deg);
}

.menu-toggle[aria-expanded="true"] .menu-toggle__bar:nth-child(2) {
    opacity: 0;
}

.menu-toggle[aria-expanded="true"] .menu-toggle__bar:nth-child(3) {
    transform: translateY(-6.5px) rotate(-45deg);
}

/* Full-height panel that slides in from the right */
.site-menu {
    position: fixed;
    top: 0;
    right: 0;
    display: flex;
    align-items: center;
    width: min(560px, 100%);
    height: 100vh;
    height: 100svh;
    padding: var(--header-height) var(--gutter);
    background-color: var(--color-bg);
    border-left: 1px solid var(--color-line);
    box-shadow: -24px 0 48px rgba(20, 7, 0, 0.06);
    transform: translateX(100%);
    visibility: hidden;
    transition: transform 0.35s ease, visibility 0s linear 0.35s;
}

.site-menu.is-open {
    transform: none;
    visibility: visible;
    transition: transform 0.35s ease;
}

.site-menu__list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.site-menu__list a {
    display: inline-block;
    font-family: var(--font-serif);
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    line-height: 1.1;
    letter-spacing: -0.02em;
    color: var(--color-text);
    text-decoration: none;
    transition: opacity 0.2s ease, transform 0.3s ease;
}

/* Same hover as the home page list: dim the others, nudge the active one */
.site-menu__list:hover a {
    opacity: 0.3;
}

.site-menu__list a:hover,
.site-menu__list a:focus-visible {
    opacity: 1;
    transform: translateX(clamp(8px, 1.5vw, 16px));
}

/* ---------- Index nav (stands in for the hero) ---------- */

.index-nav {
    display: flex;
    align-items: center;
    min-height: 100vh;
    min-height: 100svh;
    padding: var(--header-height) var(--gutter);
}

.index-nav__list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.index-nav__list li + li {
    margin-top: clamp(16px, 2vw, 28px);
}

/* Number sits underneath each word */
.index-nav__list a {
    display: inline-flex;
    flex-direction: column;
    align-items: flex-start;
    gap: clamp(6px, 0.8vw, 12px);
    font-family: var(--font-serif);
    font-size: clamp(3rem, 9vw, 8rem);
    line-height: 1;
    letter-spacing: -0.02em;
    transition: opacity 0.2s ease, transform 0.3s ease;
}

.index-nav__num {
    font-family: var(--font-sans);
    font-size: 0.6875rem;
    font-weight: 500;
    letter-spacing: 0.08em;
    color: var(--color-muted);
}

.index-nav__list:hover a {
    opacity: 0.3;
}

.index-nav__list a:hover,
.index-nav__list a:focus-visible {
    opacity: 1;
    transform: translateX(clamp(8px, 1.5vw, 24px));
}

/* ---------- Small screens ---------- */

@media (max-width: 760px) {
    .index-nav__list a {
        font-size: clamp(3.5rem, 15vw, 4.5rem);
    }

    .index-nav__num {
        font-size: 0.75rem;
    }
}

/* ---------- Work ---------- */

.work {
    --work-columns: minmax(0, 1fr) minmax(0, 2fr);
    --work-gap: clamp(32px, 5vw, 96px);
    padding: clamp(96px, 12vw, 180px) var(--gutter) clamp(64px, 10vw, 160px);
}

.work__title {
    margin: 0 0 clamp(40px, 6vw, 96px);
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    line-height: 1;
}

.work__list {
    display: grid;
    gap: clamp(48px, 7vw, 120px);
}

.work__item {
    display: grid;
    grid-template-columns: var(--work-columns);
    gap: var(--work-gap);
    align-items: start;
    margin: 0;
}

.work__item--even {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}

.work__divider {
    margin: clamp(48px, 7vw, 120px) 0;
    border: 0;
    border-top: 1px solid currentColor;
    opacity: 0.2;
}

.work__figure {
    display: grid;
    gap: 12px;
    margin: 0;
}

.work__item--even > .work__figure {
    margin-top: -24px;
}

@media (max-width: 760px) {
    .work__item--even > .work__figure {
        margin-top: 0;
    }
}

.work__caption {
    display: grid;
    gap: 12px;
}

.work__name {
    margin: 0;
    font-size: clamp(1.5rem, 2.4vw, 2.25rem);
    line-height: 1.1;
}

.work__description {
    max-width: 65ch;
    margin: 16px 0 0;
    font-family: var(--font-sans);
    font-size: 1rem;
    line-height: 1.7;
    color: var(--color-muted);
}

.work__quote {
    max-width: 60ch;
    margin: 24px 0 0;
    padding-left: 20px;
    border-left: 2px solid currentColor;
    font-size: clamp(1.25rem, 2vw, 1.5rem);
    line-height: 1.4;
}

.work__quote p {
    margin: 0 0 12px;
}

.work__quote cite {
    font-family: var(--font-sans);
    font-size: 0.875rem;
    font-style: normal;
    color: var(--color-muted);
}

.work__photo {
    display: block;
    width: 100%;
    aspect-ratio: 3 / 2;
    border-radius: clamp(8px, 1vw, 14px);
    object-fit: cover;
}

.work__photo--placeholder {
    background: linear-gradient(160deg, #e2ded8, #c9c2b8);
}

.work__text {
    max-width: 52ch;
    margin: 0;
    font-family: var(--font-sans);
    font-size: 0.9375rem;
    line-height: 1.6;
    color: var(--color-muted);
}

@media (max-width: 760px) {
    .work__item {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    /* Photo first, then its text, on small screens */
    .work__caption {
        order: 1;
    }
}

/* ---------- Services ---------- */

.services,
.cta {
    padding: 0 var(--gutter);
}

.services {
    padding-top: clamp(96px, 12vw, 180px);
}

.services__title {
    margin: 0 0 clamp(24px, 3vw, 40px);
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    line-height: 1;
}

.services__intro {
    max-width: 52ch;
    margin: 0 0 clamp(40px, 6vw, 96px);
    font-size: 1.0625rem;
    line-height: 1.7;
    color: var(--color-muted);
}

.services__list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.service {
    display: grid;
    grid-template-columns: clamp(48px, 8vw, 120px) minmax(0, 1fr) auto;
    gap: var(--gutter);
    align-items: start;
    padding: clamp(32px, 4vw, 56px) 0;
    border-top: 1px solid var(--color-line);
}

.service:last-child {
    border-bottom: 1px solid var(--color-line);
}

.service__num {
    padding-top: 0.75em;
    font-size: 0.6875rem;
    font-weight: 500;
    letter-spacing: 0.08em;
    color: var(--color-muted);
}

.service__body {
    display: grid;
    gap: 16px;
    max-width: 65ch;
}

.service__name {
    margin: 0;
    font-size: clamp(2rem, 4vw, 3.25rem);
    line-height: 1;
}

.service__description {
    margin: 0;
    line-height: 1.7;
    color: var(--color-muted);
}

.service__includes {
    margin: 0;
    padding: 0;
    list-style: none;
    font-size: 0.9375rem;
    line-height: 1.9;
}

.service__includes li::before {
    content: "—";
    margin-right: 10px;
    color: var(--color-muted);
}

.service__link,
.cta__link {
    justify-self: start;
    font-size: 0.9375rem;
    font-weight: 500;
    border-bottom: 1px solid currentColor;
    transition: opacity 0.2s ease;
}

.service__link:hover,
.cta__link:hover {
    opacity: 0.6;
}

.service__links {
    margin: 0;
    font-size: 0.9375rem;
    font-weight: 500;
}

.service__price {
    margin: 0;
    padding-top: 0.5em;
    font-size: 0.875rem;
    color: var(--color-muted);
    white-space: nowrap;
}

.service__price strong {
    display: block;
    font-family: var(--font-serif);
    font-size: clamp(1.75rem, 3vw, 2.5rem);
    font-weight: 400;
    color: var(--color-text);
}

.services__note {
    margin: 24px 0 0;
    font-size: 0.875rem;
    color: var(--color-muted);
}

.cta {
    padding-top: clamp(96px, 12vw, 180px);
    padding-bottom: clamp(64px, 10vw, 160px);
}

.cta__title {
    margin: 0 0 20px;
    font-size: clamp(2.5rem, 6vw, 5rem);
    line-height: 1;
}

.cta__link {
    display: inline-block;
    font-size: 1.0625rem;
}

@media (max-width: 760px) {
    .service {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .service__num,
    .service__price {
        padding-top: 0;
    }
}

/* ---------- Contact ---------- */

.contact {
    padding: clamp(96px, 12vw, 180px) var(--gutter) clamp(64px, 10vw, 160px);
}

.contact__title {
    max-width: 14ch;
    margin: 0 0 clamp(24px, 3vw, 40px);
    font-size: clamp(2.5rem, 6vw, 5rem);
    line-height: 1;
}

.contact__intro {
    max-width: 52ch;
    margin: 0 0 clamp(32px, 4vw, 56px);
    font-size: 1.0625rem;
    line-height: 1.7;
    color: var(--color-muted);
}

.contact__whatsapp {
    display: inline-block;
    padding: 16px 28px;
    border-radius: 999px;
    background-color: var(--color-text);
    color: var(--color-bg);
    font-size: 1rem;
    font-weight: 500;
    transition: opacity 0.2s ease;
}

.contact__whatsapp:hover,
.contact__whatsapp:focus-visible {
    opacity: 0.8;
}

.contact__details {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--gutter);
    margin: clamp(64px, 8vw, 120px) 0 0;
}

.contact__detail {
    padding-top: 20px;
    border-top: 1px solid var(--color-line);
}

.contact__detail dt {
    margin-bottom: 8px;
    font-size: 0.6875rem;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--color-muted);
}

.contact__detail dd {
    margin: 0;
    font-family: var(--font-serif);
    font-size: clamp(1.25rem, 2vw, 1.5rem);
    line-height: 1.3;
}

@media (max-width: 760px) {
    .contact__details {
        grid-template-columns: 1fr;
        gap: 24px;
    }
}

/* ---------- About ---------- */

.about {
    padding: clamp(88px, 9vw, 130px) var(--gutter) clamp(64px, 10vw, 160px);
}

.about__title {
    margin: 0 0 clamp(32px, 4vw, 64px);
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    line-height: 1;
}

.about__layout {
    display: grid;
    grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
    gap: var(--gutter);
    align-items: start;
}

.about__text {
    max-width: 60ch;
}

.about__lead {
    margin: 0 0 24px;
    font-family: var(--font-serif);
    font-size: clamp(1.5rem, 2.6vw, 2.25rem);
    line-height: 1.25;
}

.about__description {
    margin: 16px 0 0;
    line-height: 1.7;
    color: var(--color-muted);
}

.about__figure {
    margin: 0;
}

.about__photo {
    display: block;
    width: 100%;
    aspect-ratio: 4 / 5;
    border-radius: clamp(8px, 1vw, 14px);
    object-fit: cover;
}

.about__photo--placeholder {
    background: linear-gradient(160deg, #e2ded8, #c9c2b8);
}

.about__cta-title {
    margin: clamp(40px, 5vw, 64px) 0 0;
    font-family: var(--font-serif);
    font-size: clamp(1.5rem, 2.6vw, 2.25rem);
    line-height: 1.25;
}

.about__cta {
    display: inline-block;
    margin-top: 20px;
    padding: 16px 28px;
    border-radius: 999px;
    background-color: var(--color-text);
    color: var(--color-bg);
    font-size: 1rem;
    font-weight: 500;
    transition: opacity 0.2s ease;
}

.about__cta:hover,
.about__cta:focus-visible {
    opacity: 0.8;
}

@media (max-width: 760px) {
    .about__layout {
        grid-template-columns: 1fr;
    }

    /* Photo first on small screens */
    .about__figure {
        order: -1;
        max-width: 360px;
    }
}

/* ---------- Page transitions ---------- */

@view-transition {
    navigation: auto;
}

::view-transition-old(root) {
    animation: page-out 200ms ease-in both;
}

::view-transition-new(root) {
    animation: page-in 300ms ease-out both;
}

@keyframes page-out {
    to {
        opacity: 0;
    }
}

@keyframes page-in {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        transition: none !important;
    }

    ::view-transition-old(root),
    ::view-transition-new(root) {
        animation: none;
    }
}
