﻿/* ==========================================================================
   CASA RIVA — Architecture & Interiors
   Fonts: Playfair Display (display), Manrope (body), DM Mono (labels)
   ========================================================================== */

/* ---- Tokens -------------------------------------------------------------- */
:root {
    --font-sans: 'Manrope', sans-serif;
    --font-display: 'Playfair Display', Georgia, serif;
    --font-mono: 'DM Mono', monospace;

    --bg: hsl(38 33% 91%);
    --fg: hsl(19 25% 20%);
    --border: hsl(24 19% 73%);

    --cream: #f2ede4;
    --ink: #352a24;
    --ivory: #f5f0e7;
    --sage-light: #e4e5d6;
    --sand: #e7d7c4;
    --green: #53604a;
    --green-text: #4e5a48;
    --dark: #3d3028;
    --darker: #2d251f;
    --terracotta: #d79565;
    --peach: #e7c8a6;
    --brown: #70483a;
    --text-muted: #786c60;
    --text-sage: #756a5e;
}

/* ---- Reset --------------------------------------------------------------- */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    border: 0 solid var(--border);
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
    line-height: 1.5;
}

body {
    margin: 0;
    font-family: var(--font-sans);
    background: var(--bg);
    color: var(--fg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

::selection { background: hsl(14 68% 56%); color: var(--fg); }

h1, h2, h3, h4, h5, h6 { font-size: inherit; font-weight: inherit; }
a { color: inherit; text-decoration: inherit; }
ul { list-style: none; }
img, svg { display: block; max-width: 100%; vertical-align: middle; }
img { height: auto; }
button, input, select, textarea {
    font: inherit;
    color: inherit;
    letter-spacing: inherit;
    background: transparent;
    border-radius: 0;
}
button { cursor: pointer; }
textarea { resize: vertical; }
[hidden] { display: none !important; }

/* ---- Shared -------------------------------------------------------------- */
.page {
    position: relative;
    min-height: 100vh;
    overflow: hidden;
    background: var(--cream);
    color: var(--ink);
}

/* Film-grain overlay */
.noise::after {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 20;
    opacity: .055;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 160 160' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.45'/%3E%3C/svg%3E");
}

.container { width: 100%; max-width: 1200px; margin-inline: auto; }

.section { padding: 6rem 1.25rem; scroll-margin-top: 2.5rem; }
.section--cream { background: var(--cream); }
.section--sage-light { background: var(--sage-light); }
.section--sand { background: var(--sand); }
.section--green { background: var(--green); color: var(--ivory); }
.section--dark { background: var(--dark); color: var(--ivory); }

.kicker {
    font-family: var(--font-mono);
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: .24em;
    color: #887365;
}
.kicker--light { color: rgba(223, 209, 189, .75); }

.accent { color: var(--terracotta); flex-shrink: 0; }
.inline-icon { display: inline; margin-left: .25rem; }

.btn {
    display: inline-flex;
    align-items: center;
    gap: .75rem;
    border-radius: 9999px;
    padding: .875rem 1.5rem;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    transition: color .15s, background-color .15s;
}
.btn--primary { background: var(--peach); color: var(--ink); letter-spacing: .15em; }
.btn--primary:hover { background: #fff; }

.btn-line {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    border-bottom: 1px solid rgba(245, 240, 231, .6);
    padding-bottom: .5rem;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .15em;
    color: var(--ivory);
    transition: gap .35s ease;
}
.btn-line:hover { gap: 1rem; }
.btn-line svg { transition: transform .35s ease; }
.btn-line:hover svg { transform: translateX(3px); }

/* Reveal on scroll (only when JS is available) */
.js [data-reveal] { opacity: 0; }
.js [data-reveal].is-visible {
    animation: rise-in .9s cubic-bezier(.2, .7, .2, 1) both;
    animation-delay: var(--delay, 0ms);
}
@keyframes rise-in {
    from { opacity: 0; transform: translateY(18px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Image tint */
.image-wash { position: relative; overflow: hidden; }
.image-wash::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(125deg, rgba(47, 29, 23, .15), transparent 55%, rgba(209, 105, 70, .15));
    mix-blend-mode: multiply;
    pointer-events: none;
}
.image-wash img { width: 100%; height: 100%; object-fit: cover; }

/* ---- Header -------------------------------------------------------------- */
.site-header {
    position: absolute;
    inset: 0 0 auto 0;
    z-index: 40;
    padding: 1.25rem;
    color: var(--ivory);
}
.site-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    max-width: 1480px;
    margin-inline: auto;
}

.brand { display: flex; align-items: center; gap: .75rem; }
.brand__dot {
    width: .5rem;
    height: .5rem;
    border-radius: 9999px;
    background: var(--terracotta);
    transition: transform .15s;
}
.brand:hover .brand__dot { transform: scale(1.5); }
.brand__name {
    font-family: var(--font-display);
    font-size: 1.25rem;
    line-height: 1;
    letter-spacing: .1em;
}

.main-nav { display: none; align-items: center; gap: 1.75rem; }
.nav-link {
    position: relative;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .17em;
    color: rgba(245, 240, 231, .85);
}
.nav-link::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -6px;
    width: 100%;
    height: 1px;
    background: currentColor;
    transform: scaleX(0);
    transform-origin: right;
    transition: transform .35s ease;
}
.nav-link:hover::after { transform: scaleX(1); transform-origin: left; }

.nav-cta {
    border: 1px solid rgba(245, 240, 231, .65);
    border-radius: 9999px;
    padding: .75rem 1.25rem;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .16em;
    transition: color .15s, background-color .15s;
}
.nav-cta:hover { background: var(--ivory); color: var(--ink); }

.menu-toggle {
    display: flex;
    align-items: center;
    gap: .5rem;
    border: 0;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .17em;
}
.menu-toggle__icon--close { display: none; }
.menu-toggle[aria-expanded="true"] .menu-toggle__icon--open { display: none; }
.menu-toggle[aria-expanded="true"] .menu-toggle__icon--close { display: block; }

.mobile-nav {
    position: absolute;
    inset: 100% 0 auto 0;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    border-top: 1px solid rgba(255, 255, 255, .15);
    background: rgba(53, 42, 36, .95);
    padding: 1.75rem 1.5rem;
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
}
.mobile-nav__link {
    font-family: var(--font-display);
    font-size: 1.875rem;
    line-height: 2.25rem;
    color: var(--ivory);
}
.mobile-nav__cta {
    padding-top: .5rem;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .18em;
    color: var(--terracotta);
}

/* ---- Hero ---------------------------------------------------------------- */
.hero {
    position: relative;
    display: flex;
    align-items: flex-end;
    min-height: 760px;
    overflow: hidden;
    background: var(--ink);
    color: var(--ivory);
}
.hero__media { position: absolute; inset: 0; overflow: hidden; }
.hero__media img { width: 100%; height: 100%; object-fit: cover; object-position: center; }
.hero__shade { position: absolute; inset: 0; }
.hero__shade--side {
    background: linear-gradient(90deg, rgba(33, 27, 23, .8) 0%, rgba(33, 27, 23, .48) 48%, rgba(33, 27, 23, .14) 100%);
}
.hero__shade--bottom {
    background: linear-gradient(0deg, rgba(33, 27, 23, .45) 0%, transparent 55%);
}
.hero__content {
    position: relative;
    width: 100%;
    max-width: 1480px;
    margin-inline: auto;
    padding: 9rem 1.25rem 5rem;
}
.hero__copy { max-width: 850px; }
.hero__title {
    margin-top: 1.75rem;
    font-family: var(--font-display);
    font-size: clamp(3.6rem, 6.8vw, 7rem);
    line-height: 0.9;
    letter-spacing: -0.055em;
    max-width: 100%;
}

.hero__title span {
    display: block;
}

.hero__title em {
    font-style: italic;
    white-space: nowrap;
}

@media (max-width: 767px) {
    .hero__title {
        font-size: clamp(2.4rem, 7.5vw, 3.8rem);
        line-height: 0.95;
        letter-spacing: -0.04em;
    }
}
.hero__lead {
    max-width: 510px;
    margin-top: 2.25rem;
    font-size: .875rem;
    line-height: 1.75rem;
    color: rgba(245, 240, 231, .85);
}
.hero__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1.25rem 2rem;
    margin-top: 2rem;
}
.hero__actions .btn { letter-spacing: .14em; }
.hero__discover {
    position: absolute;
    right: 1.25rem;
    bottom: 2rem;
    display: none;
    align-items: center;
    gap: .75rem;
    color: rgba(245, 240, 231, .7);
}
.hero__discover span {
    font-family: var(--font-mono);
    font-size: 9px;
    text-transform: uppercase;
    letter-spacing: .2em;
}

/* ---- Studio -------------------------------------------------------------- */
.studio__grid { display: grid; gap: 3rem; }
.studio__title {
    max-width: 410px;
    margin-top: 1.25rem;
    font-family: var(--font-display);
    font-size: 2.25rem;
    line-height: .98;
    letter-spacing: -.055em;
    color: var(--green-text);
}
.studio__text {
    max-width: 660px;
    font-size: 1rem;
    line-height: 2rem;
    color: var(--text-sage);
}
/* ---- Offerings ----------------------------------------------------------- */
.offerings__head {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 1.75rem;
    margin-bottom: 3.5rem;
}
.offerings__title {
    max-width: 700px;
    margin-top: 1.25rem;
    font-family: var(--font-display);
    font-size: 3rem;
    line-height: .9;
    letter-spacing: -.06em;
}
.offerings__intro { max-width: 370px; font-size: .875rem; line-height: 1.75rem; color: var(--text-muted); }
.offerings__grid { display: grid; gap: 3rem 1.75rem; }

.service__media { aspect-ratio: 1.33; background: #d8cec0; }
.service__media::before {
    content: '';
    position: absolute;
    z-index: 1;
    inset: 0;
    background-image:
        repeating-linear-gradient(165deg, transparent 0 22px, rgba(35, 25, 18, .11) 25px 31px, rgba(255, 255, 255, .04) 33px 36px, transparent 39px 60px),
        linear-gradient(115deg, transparent 37%, rgba(255, 255, 255, 0) 44%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, 0) 56%, transparent 64%);
    background-size: 100% 180%, 240% 100%;
    background-position: 0 0, 130% 0;
    opacity: 0;
    pointer-events: none;
    transition: opacity 950ms ease, background-position 950ms cubic-bezier(.22, .7, .25, 1);
}
.service__media img {
    position: absolute;
    inset: 0;
    transition: transform 950ms cubic-bezier(.22, .7, .25, 1);
}
@media (hover: hover) and (pointer: fine) {
    .service__media:hover::before {
        background-position: 0 100%, -35% 0;
        opacity: 1;
    }
    .group:hover .service__media img { transform: scale(1.035); }
}
.service__label {
    position: absolute;
    top: 1rem;
    left: 1rem;
    z-index: 2;
    border-radius: 9999px;
    background: rgba(242, 237, 228, .9);
    padding: .5rem .75rem;
    font-family: var(--font-mono);
    font-size: 9px;
    text-transform: uppercase;
    letter-spacing: .14em;
    color: var(--text-muted);
}
.service__row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1.25rem;
    padding: 1.25rem 0 .75rem;
    border-bottom: 1px solid rgba(168, 145, 125, .45);
}
.service__number { font-family: var(--font-mono); font-size: 9px; color: #a0816d; }
.service__name {
    margin-top: .5rem;
    font-family: var(--font-display);
    font-size: 1.875rem;
    line-height: 2.25rem;
    letter-spacing: -.03em;
}
.service__arrow {
    margin-top: 1.25rem;
    border: 1px solid rgba(168, 145, 125, .55);
    border-radius: 9999px;
    padding: .625rem;
    transition: color .15s, background-color .15s;
}
.service__arrow:hover { background: var(--green); color: #fff; }
.service__text { padding-top: 1rem; font-size: .875rem; line-height: 1.5rem; color: var(--text-muted); }

/* ---- Philosophy ---------------------------------------------------------- */
.philosophy__grid { display: grid; gap: 3rem; }
.philosophy__media { min-height: 390px; background: #bdb29d; }
.philosophy__media img { position: absolute; inset: 0; }
.philosophy__shade {
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(to top, rgba(50, 42, 36, .45), transparent);
}
.philosophy__caption { position: absolute; bottom: 1.5rem; left: 1.5rem; z-index: 2; color: #fff; }
.philosophy__title {
    max-width: 620px;
    margin-top: 1.25rem;
    font-family: var(--font-display);
    font-size: 3rem;
    line-height: .92;
    letter-spacing: -.06em;
    color: var(--brown);
}
.philosophy__lead { max-width: 530px; margin-top: 1.75rem; font-size: .875rem; line-height: 1.75rem; color: #806e5e; }
.principles {
    margin-top: 2.5rem;
    border-top: 1px solid rgba(159, 121, 104, .3);
    border-bottom: 1px solid rgba(159, 121, 104, .3);
}
.principles > * + * { border-top: 1px solid rgba(159, 121, 104, .3); }
.principle { display: grid; gap: .5rem; padding: 1.25rem 0; }
.principle__title { font-family: var(--font-display); font-size: 1.5rem; line-height: 2rem; color: var(--brown); }
.principle__text { max-width: 430px; font-size: .875rem; line-height: 1.5rem; color: #806e5e; }

/* ---- Gallery ------------------------------------------------------------- */
.gallery__head { display: flex; flex-direction: column; justify-content: space-between; gap: 1.75rem; }
.gallery__title {
    margin-top: 1.25rem;
    font-family: var(--font-display);
    font-size: 3rem;
    line-height: 1;
    letter-spacing: -.055em;
    scroll-margin-top: 6rem;
}
.gallery__intro { max-width: 340px; font-size: .875rem; line-height: 1.5rem; color: var(--text-muted); }

.filters { display: flex; gap: .5rem; margin-top: 2.5rem; padding-bottom: .5rem; overflow-x: auto; }
.filter {
    flex-shrink: 0;
    border: 1px solid rgba(159, 142, 124, .45);
    border-radius: 9999px;
    padding: .625rem 1rem;
    font-size: 9px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .12em;
    color: #716256;
    transition: color .15s, background-color .15s, border-color .15s;
}
.filter:hover { border-color: var(--green); }
.filter.is-active { border-color: var(--green); background: var(--green); color: #fff; }

.gallery__grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 2rem 1rem;
    margin-top: 2rem;
}
.project__media { aspect-ratio: .84; background: #d5c9b8; }
.project__media img { transition: transform .7s ease-out; }
.group:hover .project__media img { transform: scale(1.04); }
.project__badge {
    position: absolute;
    bottom: .75rem;
    left: .75rem;
    z-index: 1;
    border-radius: 9999px;
    background: rgba(242, 237, 228, .9);
    padding: .375rem .75rem;
    font-family: var(--font-mono);
    font-size: 8px;
    text-transform: uppercase;
    letter-spacing: .14em;
    color: #62564b;
}
.project__name {
    margin-top: .75rem;
    font-family: var(--font-display);
    font-size: 1.25rem;
    line-height: 1.25;
    letter-spacing: -.025em;
}

/* ---- Process ------------------------------------------------------------- */
.process__head { display: grid; gap: 2rem; }
.process__title {
    margin-top: 1.25rem;
    font-family: var(--font-display);
    font-size: 3rem;
    line-height: .9;
    letter-spacing: -.06em;
}
.process__intro { max-width: 530px; font-size: .875rem; line-height: 1.75rem; color: rgba(229, 219, 201, .85); }
.process__grid { display: grid; gap: 1rem; margin-top: 3.5rem; }

.step {
    display: grid;
    height: 100%;
    overflow: hidden;
    border: 1px solid rgba(216, 213, 183, .25);
    background: rgba(242, 237, 228, .04);
}
.step__media { min-height: 210px; }
.step__media img { position: absolute; inset: 0; }
.step__body { padding: 1.5rem; }
.step__top { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.step__text { margin-top: 1rem; font-size: .875rem; line-height: 1.5rem; color: rgba(229, 219, 201, .85); }
.step__list {
    margin-top: 1.25rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(216, 213, 183, .2);
}
.step__list > * + * { margin-top: .5rem; }
.step__list li {
    display: flex;
    align-items: flex-start;
    gap: .5rem;
    font-size: 10px;
    line-height: 1.25rem;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: rgba(229, 219, 201, .7);
}
.step__list svg { margin-top: .125rem; }

/* ---- Why ----------------------------------------------------------------- */
.why { padding-top: 5rem; padding-bottom: 5rem; }
.why__title {
    margin-top: 1rem;
    font-family: var(--font-display);
    font-size: 2.25rem;
    line-height: 2.5rem;
    letter-spacing: -.05em;
    color: var(--green-text);
}
.why__grid { display: grid; gap: 1.75rem; margin-top: 2.5rem; }
.reason { padding-top: 1rem; border-top: 1px solid rgba(136, 125, 112, .4); }
.reason__title {
    margin-top: 1rem;
    font-family: var(--font-display);
    font-size: 1.5rem;
    line-height: 2rem;
    color: var(--green-text);
}
.reason__text { margin-top: .75rem; font-size: .875rem; line-height: 1.5rem; color: var(--text-sage); }

/* ---- Partners ------------------------------------------------------------ */
.partners { padding-top: 4rem; padding-bottom: 4rem; }
.partners__head {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid rgba(168, 145, 125, .35);
}
.partners__title {
    margin-top: 1rem;
    font-family: var(--font-display);
    font-size: 2.25rem;
    line-height: 2.5rem;
    letter-spacing: -.05em;
}
.partners__intro { max-width: 390px; font-size: .875rem; line-height: 1.5rem; color: var(--text-muted); }
.partners__grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.5rem 1rem;
    padding-top: 2rem;
}
.partner {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 4.5rem;
    padding: .75rem .5rem;
    border-bottom: 1px solid rgba(168, 145, 125, .2);
}
.partner__logo {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 160px;
    transition: opacity .2s, transform .2s;
    cursor: default;
}
.partner:hover .partner__logo { opacity: .75; transform: scale(1.04); }
.partner__logo svg {
    width: 100%;
    height: auto;
    max-height: 48px;
}
.partner__logo img {
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 48px;
    object-fit: contain;
}
.partner__name {
    font-family: var(--font-display);
    font-size: 1.125rem;
    line-height: 1.75rem;
    letter-spacing: -.02em;
    color: #69594c;
    text-align: center;
}

/* ---- Contact ------------------------------------------------------------- */
.contact__layout {
    display: grid;
    gap: 2.5rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(216, 213, 183, .25);
}
.contact__info { display: grid; gap: 1.5rem; }
.contact__intro { max-width: 480px; }
.contact__title {
    margin-top: 1.25rem;
    font-family: var(--font-display);
    font-size: 3rem;
    line-height: .88;
    letter-spacing: -.06em;
}
.contact__lead {
    max-width: 460px;
    margin-top: 1.25rem;
    font-size: 1rem;
    line-height: 1.75rem;
    color: rgba(229, 219, 201, .8);
}
.pill {
    display: inline-flex;
    align-items: center;
    gap: .75rem;
    margin-top: 2rem;
    border: 1px solid rgba(216, 213, 183, .3);
    border-radius: 9999px;
    padding: .625rem 1rem;
    font-size: 9px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .14em;
    color: #e5dbc9;
}
.contact__details {
    display: grid;
    gap: 1.25rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(216, 213, 183, .25);
}
.contact__item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    font-size: .875rem;
    line-height: 1.25rem;
    color: #e5dbc9;
    transition: color .15s;
}
.contact__item:hover { color: #fff; }
.contact__item > svg { margin-top: .125rem; }
.contact__item-title { display: block; font-weight: 600; }
.contact__item-text { display: block; margin-top: .25rem; }


.contact__form-wrap {
    width: 100%;
    padding: 1.25rem;
    border: none;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

.form { display: grid; gap: 1.25rem; position: relative; }
.contact__form-wrap .form { gap: 1rem; }
.form__trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.field { display: block; }
.field__label {
    font-size: 9px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .15em;
    color: rgba(229, 219, 201, .7);
}
.field input,
.field select,
.field textarea {
    width: 100%;
    margin-top: .5rem;
    padding: .75rem 0;
    border-bottom: 1px solid rgba(216, 213, 183, .35);
    font-size: .875rem;
    line-height: 1.25rem;
    outline: none;
}
.field input::placeholder,
.field textarea::placeholder { color: rgba(229, 219, 201, .35); opacity: 1; }
.field input:focus,
.field select:focus,
.field textarea:focus { border-color: #e2b78d; }
.field select { background: var(--dark); color: var(--ivory); }
.field select option { background: var(--dark); color: var(--ivory); }
.form__status { max-width: 450px; margin-top: 1rem; font-size: .75rem; line-height: 1.25rem; color: rgba(229, 219, 201, .75); }
.form__status--error { color: #f0b49a; }

/* ---- Footer -------------------------------------------------------------- */
.site-footer { background: var(--darker); padding: 1.75rem 1.25rem; color: #e5dbc9; }
.site-footer__inner {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    max-width: 1200px;
    margin-inline: auto;
}
.site-footer__copyright { font-size: .8rem; line-height: 1.5; color: rgba(229, 219, 201, .7); }
.site-footer__copyright span { font-family: var(--font-display); letter-spacing: .04em; color: var(--terracotta); }
.site-footer__tagline { font-size: 9px; text-transform: uppercase; letter-spacing: .13em; color: rgba(229, 219, 201, .55); }
.site-footer__top {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    font-size: 9px;
    text-transform: uppercase;
    letter-spacing: .13em;
    color: rgba(229, 219, 201, .75);
    transition: color .15s;
}
.site-footer__top:hover { color: #fff; }
/* ==========================================================================
   Responsive
   ========================================================================== */

/* sm — 640px */
@media (min-width: 40rem) {
    .gallery__grid { column-gap: 1.5rem; }
    .project__name { font-size: 1.5rem; }
    .step { grid-template-columns: .8fr 1.2fr; }
    .step__media { min-height: 100%; }
    .principle { grid-template-columns: 190px 1fr; gap: 1.5rem; }
    .why__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .partners__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .partner__logo { max-width: 180px; }
    .form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .field--wide { grid-column: 1 / -1; }
    .site-footer__inner { flex-direction: row; align-items: center; justify-content: space-between; }
}

/* md — 768px */
@media (min-width: 48rem) {
    .site-header { padding: 1.75rem 2.5rem; }
    .section { padding: 8rem 2.5rem; }
    .why { padding-top: 6rem; padding-bottom: 6rem; }
    .partners { padding-top: 5rem; padding-bottom: 5rem; }
    .site-footer { padding-left: 2.5rem; padding-right: 2.5rem; }
    .contact { padding-bottom: 4rem; }

    .hero { min-height: 94vh; }
    .hero__content { padding: 9rem 2.5rem 11vh; }
    .hero__lead { margin-left: 30%; font-size: 1rem; line-height: 1.75rem; }
    .hero__actions { margin-left: 30%; }
    .hero__discover { display: flex; right: 2.5rem; }

    .studio__grid { grid-template-columns: .75fr 1.25fr; align-items: end; }
    .studio__title { font-size: 3.75rem; line-height: .98; }
    .studio__text { font-size: 1.125rem; }

    .offerings__head { flex-direction: row; align-items: flex-end; margin-bottom: 4rem; }
    .offerings__title,
    .philosophy__title,
    .gallery__title,
    .process__title { font-size: 4.5rem; }
    .contact__title { font-size: 3.5rem; }
    .offerings__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }

    .philosophy__media { min-height: 550px; }

    .gallery__head { flex-direction: row; align-items: flex-end; }
    .gallery__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }

    .process__head { grid-template-columns: .75fr 1.25fr; align-items: end; }
    .process__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 4rem; }
    .step__body { padding: 1.75rem; }

    .why__title,
    .partners__title { font-size: 3rem; line-height: 1; }

    .partners__head { flex-direction: row; align-items: flex-end; }
    .partners__grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
}

/* lg — 1024px */
@media (min-width: 64rem) {
    .main-nav { display: flex; }
    .menu-toggle,
    .mobile-nav { display: none !important; }

    .philosophy__grid { grid-template-columns: .85fr 1.15fr; align-items: center; }
    .why__grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .contact { padding-bottom: 3rem; }
    .contact__layout { grid-template-columns: .85fr 1.15fr; align-items: stretch; gap: 3rem; }
    .contact__form-wrap { padding: 1.5rem; }
    .contact__title { font-size: 3.5rem; }
}

/* xl — 1280px */
@media (min-width: 80rem) {
    .offerings__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .gallery__grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .js [data-reveal].is-visible { animation: none; opacity: 1; }
    *, *::before, *::after { transition-duration: .01ms !important; }
    .service__media::before { display: none; }
    .group:hover .service__media img { transform: none; }
}
/* ==========================================================================
   Modal  — matches reference design (two-column: image left, form right)
   ========================================================================== */

/* ── Overlay ──────────────────────────────────────────────────────────────── */
.modal {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}
.modal[hidden] { display: none !important; }

.modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(18, 12, 8, .72);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    animation: mbd-in .35s ease both;
}
@keyframes mbd-in  { from { opacity: 0; } to { opacity: 1; } }
@keyframes mbd-out { from { opacity: 1; } to { opacity: 0; } }

/* ── Panel ────────────────────────────────────────────────────────────────── */
.modal__panel {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 820px;
    max-height: 92dvh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border-radius: 1.25rem;
    background: #f7f3ee;
    box-shadow: 0 32px 80px rgba(0,0,0,.40), 0 8px 24px rgba(0,0,0,.22);
    animation: mp-in .44s cubic-bezier(.22,.9,.36,1) both;
}
@keyframes mp-in {
    from { opacity: 0; transform: translateY(28px) scale(.97); }
    to   { opacity: 1; transform: translateY(0)    scale(1); }
}
.modal.is-closing .modal__backdrop { animation: mbd-out .26s ease both; }
.modal.is-closing .modal__panel    { animation: mp-out  .26s cubic-bezier(.55,0,.8,.45) both; }
@keyframes mp-out {
    from { opacity: 1; transform: translateY(0)    scale(1); }
    to   { opacity: 0; transform: translateY(20px) scale(.97); }
}

/* ── Close button ─────────────────────────────────────────────────────────── */
.modal__close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.125rem;
    height: 2.125rem;
    border-radius: 9999px;
    background: rgba(255,255,255,.85);
    border: 1px solid rgba(100,80,65,.15);
    color: #5a4a3a;
    transition: background .18s, color .18s;
}
.modal__close:hover { background: #352a24; color: #f5f0e7; }

/* ── Two-column body ──────────────────────────────────────────────────────── */
.modal__body {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    overflow-y: auto;
}
@media (min-width: 600px) {
    .modal__body {
        flex-direction: row;
        overflow: hidden;
        align-items: stretch;
    }
}

/* ── Left image panel ─────────────────────────────────────────────────────── */
.modal__img {
    position: relative;
    flex-shrink: 0;
    height: 260px;          /* mobile: tall enough to show tagline */
    overflow: hidden;
}
.modal__img img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 20%;
}
.modal__img-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to top,
        rgba(20,13,9,.88) 0%,
        rgba(20,13,9,.35) 45%,
        rgba(20,13,9,.08) 100%
    );
}
.modal__img-brand {
    position: absolute;
    top: 1.25rem;
    left: 1.25rem;
    z-index: 2;
    font-family: var(--font-display);
    font-size: .75rem;
    letter-spacing: .22em;
    color: rgba(245,240,231,.9);
}
.modal__img-tagline {
    position: absolute;
    bottom: 1.5rem;
    left: 1.5rem;
    right: 1.5rem;
    z-index: 2;
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-style: italic;
    line-height: 1.35;
    letter-spacing: -.02em;
    color: #fff;
}

/* Desktop: image stretches full height of the panel */
@media (min-width: 600px) {
    .modal__img {
        width: 300px;
        height: auto;           /* stretch to match content height */
        align-self: stretch;
    }
    .modal__img-tagline { font-size: 1.5rem; }
}
@media (min-width: 760px) {
    .modal__img { width: 340px; }
}

/* ── Right content ────────────────────────────────────────────────────────── */
.modal__content {
    flex: 1;
    min-width: 0;
    padding: 1.75rem 1.5rem 2rem;
    overflow-y: auto;
    background: #f7f3ee;
}
@media (min-width: 600px) {
    .modal__content {
        padding: 2rem 2rem 2rem 2.25rem;
        overflow-y: auto;
        max-height: 92dvh;
    }
}

/* Kicker */
.modal__kicker {
    font-family: var(--font-mono);
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .24em;
    color: var(--terracotta);
    margin-bottom: .625rem;
}

/* Heading */
.modal__title {
    font-family: var(--font-display);
    font-size: 2rem;
    line-height: 1.05;
    letter-spacing: -.04em;
    color: #2a1f17;
    margin-bottom: .75rem;
}
@media (min-width: 600px) { .modal__title { font-size: 2.375rem; } }

/* Sub + free line */
.modal__sub {
    font-size: .875rem;
    line-height: 1.6;
    color: #6b5a4e;
    margin-bottom: .5rem;
}
.modal__free {
    font-size: .8125rem;
    font-weight: 600;
    color: #8c6d57;
    margin-bottom: 1.5rem;
}

/* ── Form ─────────────────────────────────────────────────────────────────── */
.modal__form { display: flex; flex-direction: column; gap: 1rem; }

/* Labelled field */
.mf { display: flex; flex-direction: column; gap: .375rem; flex: 1; min-width: 0; }
.mf__label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .12em;
    color: #7a6555;
}
.mf__input {
    width: 100%;
    padding: .75rem .875rem;
    border: 1.5px solid #ddd5c8;
    border-radius: .5rem;
    background: #fff;
    font-size: .9rem;
    color: #2a1f17;
    outline: none;
    transition: border-color .18s, box-shadow .18s;
    -webkit-appearance: none;
    appearance: none;
}
.mf__input::placeholder { color: rgba(60,45,35,.38); }
.mf__input:focus {
    border-color: #b87e5a;
    box-shadow: 0 0 0 3px rgba(184,126,90,.14);
}
.mf__select {
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23937060' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right .875rem center;
    padding-right: 2.25rem;
}

/* Phone wrap */
.mf--phone .mf__phone-wrap {
    display: flex;
    align-items: center;
    border: 1.5px solid #ddd5c8;
    border-radius: .5rem;
    background: #fff;
    overflow: hidden;
    transition: border-color .18s, box-shadow .18s;
}
.mf--phone .mf__phone-wrap:focus-within {
    border-color: #b87e5a;
    box-shadow: 0 0 0 3px rgba(184,126,90,.14);
}
.mf__code {
    flex-shrink: 0;
    padding: .75rem .75rem .75rem .875rem;
    font-size: .9rem;
    font-weight: 600;
    color: #7a6555;
    border-right: 1.5px solid #e4d9ce;
}
.mf--phone .mf__input {
    border: 0;
    border-radius: 0;
    box-shadow: none;
    padding-left: .625rem;
}
.mf--phone .mf__input:focus { box-shadow: none; }

/* Row of two fields */
.mf-row { display: grid; grid-template-columns: 1fr 1fr; gap: .875rem; }

/* Submit */
.modal__submit {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .75rem;
    width: 100%;
    padding: .9375rem 1.5rem;
    border-radius: .5rem;
    background: #d9784b;
    color: var(--ink);
    font-family: var(--font-sans);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .2em;
    transition: background .18s, transform .1s;
    margin-top: .25rem;
}
.modal__submit:hover  { background: #c96a3f; }
.modal__submit:active { transform: scale(.985); }
.modal__submit svg    { flex-shrink: 0; opacity: .85; }

/* Footer note */
.modal__footer-note {
    text-align: center;
    font-size: .8rem;
    color: #a08878;
    margin-top: .625rem;
}

/* Status messages */
.modal__status {
    padding: .75rem 1rem;
    border-radius: .5rem;
    font-size: .8125rem;
    line-height: 1.4;
    text-align: center;
}
.modal__status--error   { background: #fef2f0; color: #b83333; }
.modal__status--success { background: #f0f6ef; color: #2f6b2a; }

/* Lock body scroll */
body.modal-open { overflow: hidden; }

/* ===== CASA RIVA POPUP FORM LAYOUT FIX ===== */

#enquiry-modal .modal__panel {
    width: min(100%, 900px);
    max-height: 92vh;
    max-height: 92dvh;
}

#enquiry-modal .modal__body {
    display: flex;
    flex: 1;
    min-width: 0;
    min-height: 0;
    flex-direction: row;
    align-items: stretch;
    overflow: hidden;
}

#enquiry-modal .modal__img {
    flex: 0 0 40%;
    width: 40%;
    min-width: 0;
    height: auto;
    align-self: stretch;
}

#enquiry-modal .modal__content {
    flex: 1 1 60%;
    min-width: 0;
    min-height: 0;
    padding: 1.5rem;
    overflow-x: hidden;
    overflow-y: auto;
}

#enquiry-modal .modal__form {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    width: 100%;
}

#enquiry-modal .mf {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
    min-width: 0;
}

#enquiry-modal .mf__label {
    display: block;
    font-size: 11px;
    line-height: 1.4;
}

#enquiry-modal .mf__input {
    display: block;
    width: 100%;
    min-width: 0;
    min-height: 42px;
    margin: 0;
    padding: 0.65rem 0.75rem;
    box-sizing: border-box;
    font-size: 14px;
}

#enquiry-modal .mf--phone .mf__input {
    min-width: 0;
    padding-left: 0.5rem;
}

#enquiry-modal .mf__phone-wrap {
    width: 100%;
    min-width: 0;
}

#enquiry-modal .mf-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
    width: 100%;
}

#enquiry-modal .modal__submit {
    width: 100%;
    margin-top: 0.25rem;
    box-sizing: border-box;
}

@media (max-width: 599px) {
    #enquiry-modal .modal__panel {
        width: 100%;
        max-height: 92vh;
        max-height: 92dvh;
    }

    #enquiry-modal .modal__body {
        flex-direction: column;
        overflow-y: auto;
    }

    #enquiry-modal .modal__img {
        flex: 0 0 auto;
        width: 100%;
        height: 190px;
    }

    #enquiry-modal .modal__content {
        flex: 0 0 auto;
        overflow: visible;
        padding: 1.25rem;
    }

    #enquiry-modal .modal__title {
        font-size: 2rem;
    }

    #enquiry-modal .mf-row {
        grid-template-columns: minmax(0, 1fr);
    }
}

