:root {
    --navy: #073952;
    --ink: #122f3d;
    --ink-soft: #2d4752;
    --muted: #5d686c;
    --gold: #c69b48;
    --gold-deep: #a77d2e;
    --ivory: #f7f5ef;
    --paper: #f7f5ef;
    --line: #d9dedc;
    --surface: #f7f5ef;
    --surface-2: #f2f3ef;
    --surface-3: #e7eae7;
    --theme-dark: #073952;
    --theme-dark-soft: #0f4d68;
    --soft-white: #fff;
    --brass: #c69b48;
    --accent-dark: #a77d2e;
    --ink-on-dark: #fff;
    --muted-on-dark: #d1dce0;
    --red: #c69b48;
    --serif: Georgia, 'Times New Roman', serif;
    --sans: Arial, Helvetica, sans-serif;
    --progress: 0;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 110px;
}

html,
body,
button,
input,
select,
textarea {
    font-family: var(--sans);
}

body {
    background: #fff;
    color: var(--ink);
    font-size: 15px;
    line-height: 1.65;
}

h1,
h2,
h3,
h4,
h5,
h6,
.admin-body h1,
.admin-body h2 {
    font-family: var(--serif);
    font-weight: 400;
    letter-spacing: -1.8px;
}

h2 {
    font-size: clamp(36px, 4vw, 56px);
    line-height: 1.08;
}

h3 {
    line-height: 1.3;
}

::selection {
    background: var(--gold);
    color: var(--navy);
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

button:focus-visible,
a:focus-visible,
summary:focus-visible {
    outline-color: var(--gold);
}

input:focus-visible,
textarea:focus-visible,
select:focus-visible {
    outline-color: var(--gold);
}

/* Header */
.header {
    height: 88px;
    padding: 0 4.7%;
    background: #fff;
    border-bottom: 1px solid #eceeeb;
    position: sticky;
    top: 0;
    z-index: 40;
}

.header:after {
    background: var(--gold);
}

.brand {
    color: var(--navy);
    font-family: var(--serif);
    font-size: 30px;
    font-weight: 400;
    letter-spacing: -1px;
}

.brand-mark span,
.footer-top .red-dot {
    color: var(--gold);
}

.brand-mark i {
    background: var(--navy);
}

.brand small {
    font-family: var(--sans);
    font-size: 7px;
    letter-spacing: 2px;
    color: var(--muted);
}

nav a {
    color: var(--ink);
    font-size: 12px;
}

nav a:after {
    background: var(--gold);
}

.menu-toggle {
    color: var(--navy);
}

/* Buttons and accents */
.button {
    background: var(--navy);
    color: #fff;
}

.button:hover {
    background: var(--theme-dark-soft);
}

.button-red {
    background: var(--gold);
    color: var(--navy);
}

.button-red:hover {
    background: #d9b15e;
}

.eyebrow {
    color: #586b70;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 2.3px;
}

.light,
.film-copy .eyebrow {
    color: #eadfc5;
}

.red-dot {
    background: var(--gold);
}

.service-ribbon {
    background: var(--ivory);
    border-bottom: 1px solid var(--line);
    color: var(--ink);
    font-size: 11px;
    letter-spacing: 1.8px;
}

.service-ribbon i {
    color: var(--gold);
}

.section-number,
.section-heading > p,
.project-title > span,
.project-card > p {
    color: var(--muted);
}

h2 .muted {
    color: #87969b;
}

.text-link {
    border-color: #aeb9bb;
}

.text-link:hover {
    border-color: var(--gold);
}

/* About */
.about-grid {
    grid-template-columns: .92fr 1.08fr;
    gap: 7%;
    align-items: center;
}

.about-image {
    position: relative;
    height: 590px;
    overflow: hidden;
    background: var(--surface-3);
}

.about-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.image-caption {
    position: absolute;
    left: 18px;
    right: 18px;
    bottom: 18px;
    padding: 13px 16px;
    background: #ffffffeb;
    color: var(--ink);
    font-size: 11px;
}

.about-copy p {
    color: var(--muted);
    line-height: 1.9;
    font-size: 14px;
}

.about-copy .large-copy {
    color: var(--navy);
    font-family: var(--serif);
    font-size: 24px;
    line-height: 1.4;
}

.values {
    border-top: 1px solid var(--line);
    font-size: 9px;
    letter-spacing: .3px;
}

.values span:before {
    color: var(--gold-deep);
}

/* Services */
.services {
    background: var(--ivory);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px 30px;
}

.services-grid-4 {
    grid-template-columns: repeat(2, 1fr);
}

.service-card a {
    display: block;
}

.service-image {
    position: relative;
    overflow: hidden;
    aspect-ratio: 4 / 3;
    background: var(--surface-3);
}

.service-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .5s cubic-bezier(.2, .7, .2, 1);
}

.service-card a:hover .service-image img {
    transform: scale(1.045);
}

.service-arrow {
    position: absolute;
    right: 14px;
    bottom: 14px;
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: #fff;
    color: var(--navy);
    font-size: 23px;
    line-height: 1;
}

.service-title {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
    margin-top: 19px;
}

.service-title h3 {
    font-size: 23px;
    margin: 0 0 10px;
}

.service-title > span {
    color: #8d7955;
    font-size: 11px;
}

.service-card p {
    max-width: 340px;
    margin: 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.7;
}

/* Projects */
.projects {
    background: #fff;
}

.project-grid {
    gap: 48px 30px;
}

.project-card:nth-child(2),
.project-card:nth-child(3) {
    width: auto;
    margin-top: 0;
    grid-column: auto;
}

.project-image {
    background: var(--surface-3);
    aspect-ratio: 4 / 3;
}

.project-tag,
.project-cta {
    background: #fff;
    color: var(--navy);
}

.project-title h3 {
    font-size: 28px;
    font-weight: 400;
}

.project-card > p {
    font-size: 12px;
    line-height: 1.75;
}

/* Before and after */
.transformations {
    background: var(--ivory);
}

.filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: -24px 0 36px;
}

.filter {
    border: 1px solid #cbd0cc;
    border-radius: 30px;
    background: transparent;
    color: var(--navy);
    padding: 10px 17px;
    font-size: 11px;
    transition: background .2s, border-color .2s, color .2s;
}

.filter:hover {
    background: #fff;
}

.filter.active {
    border-color: var(--navy);
    background: var(--navy);
    color: #fff;
}

.comparison-grid {

    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px 30px;
}

.comparison-card {
    margin: 0;
    min-width: 0;
}

.comparison-card:first-child,
.comparison-grid.single-visible .comparison-card {
    grid-column: 1 / -1;
}

.comparison-card[hidden] {
    display: none;
}

.comparison-grid.single-visible {
    grid-template-columns: 1fr;
}

.comparison-grid.single-visible .comparison {
    aspect-ratio: 2.1 / 1;
}

.comparison {
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: var(--navy);
    border: 1px solid var(--line);
    cursor: ew-resize;
    isolation: isolate;
    user-select: none;
    --position: 50%;
}

.comparison-card:first-child .comparison {
    aspect-ratio: 2.1 / 1;
}

.comparison-media,
.comparison-media img,
.comparison > img,
.comparison-before,
.comparison-before img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.comparison > img,
.comparison-before img {
    display: block;
    object-fit: cover;
    pointer-events: none;
}

.comparison-before {
    clip-path: inset(0 calc(100% - var(--position)) 0 0);
}

.comparison:after {
    content: '';
    position: absolute;
    inset: 0;
    border: 1px solid #ffffff26;
    pointer-events: none;
    z-index: 2;
}

.comparison-handle {
    position: absolute;
    top: 0;
    bottom: 0;
    left: var(--position);
    width: 2px;
    background: #fff;
    transform: translateX(-1px);
    pointer-events: none;
    z-index: 3;
}

.comparison-handle span {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 52px;
    height: 52px;
    display: grid;
    place-items: center;
    border: 1px solid #e3e6e4;
    border-radius: 50%;
    background: #fff;
    color: var(--navy);
    font-size: 21px;
    box-shadow: 0 10px 28px #00000030;
    transform: translate(-50%, -50%);
}

.comparison-label {
    position: absolute;
    top: 20px;
    z-index: 2;
    padding: 7px 12px;
    border-radius: 20px;
    background: #ffffffed;
    color: var(--navy);
    font-size: 8px;
    font-weight: 700;
    letter-spacing: 1.3px;
    text-transform: uppercase;
    box-shadow: 0 1px 10px #00000012;
}

.comparison-label-before {
    left: 20px;
}

.comparison-label-after {
    right: 20px;
}

.comparison-range {
    position: absolute;
    inset: 0;
    z-index: 4;
    width: 100%;
    height: 100%;
    margin: 0;
    opacity: 0;
    cursor: ew-resize;
    touch-action: pan-y;
}

.comparison:focus-within {
    outline: 3px solid var(--gold);
    outline-offset: 5px;
}

.comparison:focus-within .comparison-handle span {
    background: var(--gold);
}

.comparison-caption {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    padding-top: 17px;
    color: var(--muted);
    font-size: 10px;
    letter-spacing: 1.2px;
    line-height: 1.6;
    text-transform: uppercase;
}

.comparison-caption p {
    margin: 0;
}

.transformations-footer {
    display: flex;
    justify-content: flex-end;
    margin-top: 46px;
}

/* Process */
.journey {
    background: var(--ivory);
}

.journey-grid article {
    border-top-color: var(--line);
}

.journey-grid span {
    color: var(--gold-deep);
    font-size: 9px;
    letter-spacing: 1.5px;
}

.journey-grid h3 {
    font-size: 24px;
}

.journey-grid p {
    color: var(--muted);
}

/* Contact */
.contact {
    background: var(--navy);
    color: #fff;
    padding-block: 95px;
}

.contact-copy h2 {
    font-size: clamp(40px, 4.2vw, 60px);
}

.contact-copy h2 em {
    color: #f0d8a3;
    font-family: var(--serif);
    font-style: italic;
}

.contact-copy > p:not(.eyebrow),
.contact-copy > small {
    color: var(--muted-on-dark);
}

.contact-copy > a {
    color: #fff;
}

.contact-copy .contact-phone {
    color: var(--gold);
}

.quote-form {
    background: #fff;
    color: var(--ink);
    padding: 38px;
}

.quote-form h3 {
    font-size: 30px;
}

.quote-form > p,
.quote-form > small,
.field-help {
    color: var(--muted);
}

.quote-form label {
    color: var(--ink);
}

.quote-form input,
.quote-form textarea,
.quote-form select {
    color: var(--ink);
    border-bottom-color: #d7dedf;
}

.quote-form input::placeholder,
.quote-form textarea::placeholder {
    color: #8b9698;
}

.quote-form input:focus,
.quote-form textarea:focus,
.quote-form select:focus {
    outline-color: var(--gold);
}

.quote-form .button {
    background: var(--navy);
    color: #fff;
}

.quote-form .button:hover {
    background: var(--theme-dark-soft);
}

.notice.success {
    background: #edf2e8;
    color: #3f5533;
}

.notice.error {
    background: #f8e9e4;
    color: #8a4326;
}

/* Footer */
footer {
    background: #fff;
    color: var(--ink);
    border-top: 1px solid var(--line);
    padding: 55px 6% 25px;
}

.footer-top {
    border-bottom-color: var(--line);
}

.footer-top .brand {
    color: var(--navy);
    font-size: 34px;
}

.footer-top p,
.footer-bottom {
    color: var(--muted);
}

.footer-top > a:last-child {
    color: var(--navy);
}

.maple {
    color: var(--gold);
}

/* Film hero */
.film-hero {
    height: 460vh;
    height: 460svh;
    background: var(--navy);
}

.film-viewport {
    top: 88px;
    height: calc(100vh - 88px);
    height: calc(100svh - 88px);
    background: var(--navy);
}

.film-poster,
.film-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.film-poster {
    background: var(--navy);
}

.film-video {
    background: var(--navy);
    opacity: 0;
    pointer-events: none;
    transition: opacity .35s ease;
    will-change: opacity;
}

.film-loaded .film-video {
    opacity: 1;
}

.film-shade {
    background: linear-gradient(90deg, rgba(7, 57, 82, .78), rgba(7, 57, 82, .24) 65%, rgba(7, 57, 82, .06)), linear-gradient(0deg, rgba(7, 57, 82, .62), transparent 50%);
}

.film-top a {
    border-color: #ffffff70;
}

.film-copy {
    top: 50%;
    right: auto;
    width: min(680px, calc(100% - 12%));
    max-height: calc(100svh - 220px);
    transform: translateY(-50%);
}

.film-copy h1 {
    font-family: var(--serif);
    font-weight: 400;
    letter-spacing: -2.2px;
}

.film-copy > p:last-of-type {
    color: #f1f2ee;
}

.film-copy .button {
    background: var(--gold);
    color: var(--navy);
}

.film-copy .button:hover {
    background: #d9b15e;
}

.film-scroll small {
    color: #d1dce0;
}

.film-watch {
    background: rgba(7, 57, 82, .34);
    border-color: #ffffff66;
}

.film-watch:hover {
    background: rgba(7, 57, 82, .72);
}

.film-chapters button {
    color: #d1dce0;
}

.film-chapters button:before {
    background: #ffffff45;
}

.film-chapters button[aria-pressed=true] {
    color: #fff;
}

.film-chapters button[aria-pressed=true]:before {
    background: var(--gold);
}

.film-viewport:after {
    background: var(--gold);
}

.film-caption-note {
    color: #d1dce0;
}

/* Back to top */
.back-to-top {
    position: fixed;
    right: clamp(16px, 3vw, 34px);
    bottom: clamp(16px, 3vw, 34px);
    z-index: 80;
    width: 52px;
    height: 52px;
    display: grid;
    place-items: center;
    border: 1px solid #ffffff30;
    border-radius: 50%;
    background: var(--navy);
    color: #fff;
    font-size: 22px;
    line-height: 1;
    box-shadow: 0 12px 32px rgba(7, 57, 82, .22);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(14px);
    transition: opacity .25s, transform .25s, background .2s, color .2s;
}

.back-to-top.is-visible {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: none;
}

.back-to-top:hover,
.back-to-top:focus-visible {
    background: var(--gold);
    color: var(--navy);
}

/* Admin */
.admin-card {
    background: var(--soft-white);
    border: 1px solid var(--line);
}

.badge {
    background: var(--surface);
}

.admin-image-preview {
    display: block;
    width: 100%;
    max-width: 340px;
    height: auto;
    margin: 0 0 18px;
    border: 1px solid var(--line);
}

.admin-portfolio-fields {
    margin: 0 0 23px;
    padding: 22px;
    border: 1px solid var(--line);
    background: var(--surface-2);
}

.admin-portfolio-fields[hidden] {
    display: none;
}

@media (max-width: 1050px) {
    .about-grid {
        gap: 5%;
    }

    .about-copy .large-copy {
        font-size: 21px;
    }

    .services-grid {
        gap: 35px 22px;
    }
}

.film-hero.film-static {
    height: calc(100vh - 88px);
    height: calc(100svh - 88px);
}

.film-static .film-viewport {
    position: relative;
    top: 0;
    height: 100%;
}

.film-static .film-video,
.film-static .film-chapters {
    display: none;
}

@media (max-width: 900px) and (min-width: 761px) {
    .header {
        gap: 16px;
    }

    .header-cta {
        display: none;
    }

    nav {
        gap: 14px;
        font-size: 11px;
    }
}

@media (max-width: 760px) {
    html {
        scroll-padding-top: 92px;
    }

    .header {
        height: 76px;
    }

    .header nav {
        top: 76px;
    }

    .brand {
        font-size: 26px;
    }

    .about-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .about-image {
        height: 400px;
    }

    .about-copy .large-copy {
        font-size: 19px;
    }

    .services-grid {
        grid-template-columns: 1fr 1fr;
        gap: 30px 18px;
    }

    .service-image {
        aspect-ratio: 1;
    }

    .service-title h3 {
        font-size: 18px;
    }

    .service-title > span {
        display: none;
    }

    .service-card p {
        font-size: 12px;
    }

    .project-grid {
        grid-template-columns: 1fr;
        gap: 35px;
    }

    .project-image {
        aspect-ratio: 1.18;
    }

    .filter-row {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 8px;
        margin: -10px 0 28px;
    }

    .filter {
        padding: 11px 10px;
        font-size: 10px;
        text-align: center;
    }

    .comparison-grid {
        grid-template-columns: 1fr;
        gap: 36px;
    }

    .comparison-card:first-child {
        grid-column: auto;
    }

    .comparison,
    .comparison-card:first-child .comparison,
    .comparison-grid.single-visible .comparison {
        aspect-ratio: 1.4;
    }

    .comparison-handle span {
        width: 44px;
        height: 44px;
        font-size: 18px;
    }

    .comparison-label {
        top: 12px;
        padding: 6px 9px;
        font-size: 7px;
    }

    .comparison-label-before {
        left: 10px;
    }

    .comparison-label-after {
        right: 10px;
    }

    .comparison-caption {
        flex-direction: column;
        gap: 5px;
        font-size: 9px;
    }

    .transformations-footer {
        justify-content: flex-start;
        margin-top: 30px;
    }

    .contact {
        padding-block: 65px;
    }

    .quote-form {
        padding: 26px 20px;
    }

    .footer-top {
        align-items: flex-start;
    }

    .footer-top .brand {
        font-size: 30px;
    }

    .film-hero {
        height: 360vh;
        height: 360svh;
        min-height: calc(100svh - 76px);
    }

    .film-viewport {
        position: sticky;
        top: 76px;
        height: calc(100vh - 76px);
        height: calc(100svh - 76px);
        min-height: 480px;
    }

    .film-watch,
    .film-chapters,
    .film-count {
        display: none;
    }

    .film-hero.film-static {
        height: calc(100vh - 76px);
        height: calc(100svh - 76px);
        min-height: 540px;
    }

    .film-static .film-viewport {
        position: relative;
        top: 0;
        height: 100%;
        min-height: 540px;
    }

    .film-copy {
        top: 50%;
        right: 7%;
        width: auto;
        max-height: calc(100svh - 190px);
        transform: translateY(-50%);
    }

    footer {
        padding-left: 7%;
        padding-right: 7%;
    }

    .film-copy h1 {
        font-size: clamp(40px, 10vw, 56px);
        letter-spacing: -1.6px;
    }

    .film-bottom {
        bottom: 50px;
    }

    .film-caption-note {
        bottom: 16px;
    }

    .back-to-top {
        width: 46px;
        height: 46px;
        font-size: 19px;
    }
}

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

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

    .film-hero {
        height: calc(100vh - 88px);
        height: calc(100svh - 88px);
        min-height: 600px;
    }

    .film-viewport {
        position: relative;
        height: 100%;
    }

    .film-video,
    .film-watch,
    .film-chapters,
    .film-count {
        display: none;
    }

    .back-to-top {
        transition: none;
    }
}
