:root {
    --color-bg: #f5f2ed;
    --color-bg-light: #f3f0ea;
    --color-bg-warm: #efeae2;
    --color-bg-dark: #e8e3d9;
    --color-text: #2a2a2a;
    --color-text-light: #9a9590;
    --color-highlight-dark: rgba(74, 74, 74, 0.8);
    --color-highlight-gray: rgba(154, 149, 144, 0.75);
    --color-white: #ffffff;
    --color-border: #c5c0b8;

    --font-dragon: 'Playfair Display', Georgia, serif;
    --font-construction: 'DM Serif Display', 'Times New Roman', serif;
    --font-mono: 'Space Mono', 'Courier New', monospace;
    --font-sans: 'DM Sans', system-ui, sans-serif;

    --space-xs: 0.5rem;
    --space-sm: 1rem;
    --space-md: 1.5rem;
    --space-lg: 2.5rem;
    --space-xl: 4rem;
    --space-2xl: 6rem;
}

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

body {
    margin: 0;
    font-family: var(--font-sans);
    background-color: var(--color-bg);
    color: var(--color-text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.skip-link {
    position: absolute;
    top: -100%;
    left: 1rem;
    padding: 0.5rem 1rem;
    background: var(--color-highlight-dark);
    color: var(--color-white);
    text-decoration: none;
    z-index: 100;
    border-radius: 0 0 4px 4px;
}

.skip-link:focus {
    top: 0;
}

:focus-visible {
    outline: 2px solid var(--color-highlight-dark);
    outline-offset: 2px;
}

/* Shared */
.label {
    font-family: var(--font-sans);
    font-size: 0.75rem;
    color: var(--color-text-light);
    margin: 0 0 var(--space-sm) 0;
    font-weight: 400;
    letter-spacing: 0.01em;
}

.label strong {
    color: var(--color-text);
    font-weight: 500;
}

/* Shimmer Button */
.btn-outline {
    --shimmer-color: #2a2a2a;
    --shimmer-spread: 90deg;
    --shimmer-speed: 3s;
    --shimmer-cut: 0.05em;
    --shimmer-bg: rgba(245, 242, 237, 1);
    --shimmer-radius: 999px;

    display: inline-block;
    position: relative;
    z-index: 0;
    padding: 0.45rem 1.3rem;
    border: 1px solid rgba(42, 42, 42, 0.1);
    border-radius: var(--shimmer-radius);
    color: var(--color-text);
    text-decoration: none;
    font-family: var(--font-sans);
    font-size: 0.65rem;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    background: var(--shimmer-bg);
    cursor: pointer;
    overflow: hidden;
    transform: translateZ(0);
    transition: transform 0.3s ease-in-out;
}

.btn-outline:active {
    transform: translateY(1px);
}

/* Shimmer spark container */
.btn-outline .shimmer-spark {
    position: absolute;
    inset: 0;
    z-index: -3;
    overflow: visible;
    filter: blur(2px);
    container-type: size;
}

/* Shimmer spark slide */
.btn-outline .shimmer-spark-inner {
    position: absolute;
    inset: 0;
    height: 100cqh;
    aspect-ratio: 1;
    animation: shimmer-slide var(--shimmer-speed) linear infinite;
}

/* Shimmer conic gradient */
.btn-outline .shimmer-spark-inner::before {
    content: '';
    position: absolute;
    inset: -100%;
    width: auto;
    background: conic-gradient(
        from calc(270deg - (var(--shimmer-spread) * 0.5)),
        transparent 0,
        var(--shimmer-color) var(--shimmer-spread),
        transparent var(--shimmer-spread)
    );
    animation: spin-around var(--shimmer-speed) linear infinite;
}

/* Shimmer highlight overlay */
.btn-outline .shimmer-highlight {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border-radius: var(--shimmer-radius);
    box-shadow: inset 0 -8px 10px rgba(42, 42, 42, 0.08);
    transform: translateZ(0);
    transition: box-shadow 0.3s ease-in-out;
    pointer-events: none;
}

.btn-outline:hover .shimmer-highlight {
    box-shadow: inset 0 -6px 10px rgba(42, 42, 42, 0.14);
}

.btn-outline:active .shimmer-highlight {
    box-shadow: inset 0 -10px 10px rgba(42, 42, 42, 0.14);
}

/* Shimmer backdrop (fills inside, leaves border shimmer visible) */
.btn-outline .shimmer-backdrop {
    position: absolute;
    inset: var(--shimmer-cut);
    z-index: -2;
    background: var(--shimmer-bg);
    border-radius: var(--shimmer-radius);
    pointer-events: none;
}

/* Button text stays above layers */
.btn-outline .btn-text {
    position: relative;
    z-index: 1;
}

@keyframes shimmer-slide {
    to {
        translate: 2em 0;
    }
}

@keyframes spin-around {
    0% {
        rotate: 0deg;
    }
    100% {
        rotate: 360deg;
    }
}

.btn-outline:hover {
    background-color: var(--shimmer-bg);
    color: var(--color-text);
}

.btn-arrow span {
    margin-left: 0.3em;
}

/* ==================
   Section 1: Hero
   ================== */
.hero {
    padding: var(--space-2xl) var(--space-xl);
    padding-bottom: var(--space-2xl);
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
}

.hero__logo {
    height: 3.6rem;
    width: auto;
    margin: 0 auto var(--space-md) auto;
}

.hero__tagline {
    font-family: var(--font-sans);
    font-size: 1.8rem;
    color: var(--color-text-light);
    margin: 0 0 var(--space-md) 0;
    font-weight: 400;
    letter-spacing: 0.01em;
}

.hero__tagline em {
    font-family: var(--font-dragon);
    font-style: italic;
    font-size: 1.1em;
    color: var(--color-text);
}

.hero__title {
    font-family: var(--font-construction);
    font-size: clamp(1.6rem, 7.5vw, 5rem);
    font-weight: 400;
    line-height: 1.1;
    margin: 0 0 var(--space-md) 0;
    display: block;
    text-align: center;
    white-space: nowrap;
}

.hero__services {
    font-family: var(--font-sans);
    font-size: 0.77rem;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--color-text-light);
    margin: 0 auto var(--space-sm) auto;
    max-width: 560px;
    line-height: 1.9;
}

.hero__body {
    font-size: 1.15rem;
    line-height: 1.7;
    color: var(--color-text);
    margin: 0 auto var(--space-md) auto;
    max-width: 480px;
    opacity: 0.7;
}

/* ==================
   Section 2: Services
   ================== */
.services {
    background-color: var(--color-bg-warm);
    padding: 0 var(--space-xl);
}

.services__inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-xl);
    max-width: 1100px;
    margin: 0 auto;
    align-items: stretch;
}

.services__text {
    padding: var(--space-2xl) 0;
}

.services__heading {
    font-family: var(--font-construction);
    font-size: 2.8rem;
    font-weight: 400;
    line-height: 1.15;
    margin: 0 0 var(--space-md) 0;
}

.services__sub {
    font-size: 0.75rem;
    color: var(--color-text-light);
    margin: 0 0 var(--space-md) 0;
}

.services__image {
    overflow: hidden;
    border-radius: 6px;
}

.services__image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
}

/* ==================
   Section 3: Projects
   ================== */
.projects {
    background-color: var(--color-bg-light);
    padding: var(--space-2xl) var(--space-xl);
}

.projects__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-xl);
    max-width: 1100px;
    margin: 0 auto;
}

.projects__heading {
    font-family: var(--font-construction);
    font-size: 1.8rem;
    font-weight: 400;
    margin: 0 0 var(--space-sm) 0;
}

.projects__body {
    font-size: 0.8rem;
    line-height: 1.7;
    color: var(--color-text);
    opacity: 0.7;
    margin: 0 0 var(--space-md) 0;
}

/* ==================
   Section 4: Featured
   ================== */
.featured {
    background-color: var(--color-bg-warm);
    padding: 0 var(--space-xl);
}

.featured__inner {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: var(--space-xl);
    max-width: 1100px;
    margin: 0 auto;
    align-items: stretch;
}

.featured__image {
    overflow: hidden;
}

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

.featured__image video {
    width: 70%;
    aspect-ratio: 9 / 16;
    object-fit: cover;
    border-radius: 6px;
    cursor: pointer;
    transition: transform 0.3s ease, width 0.3s ease;
}

.featured__image video.expanded {
    width: 100%;
}

.featured__text {
    padding: var(--space-2xl) 0;
}

.featured__heading {
    font-family: var(--font-construction);
    font-size: 2rem;
    font-weight: 400;
    margin: 0 0 var(--space-sm) 0;
}

.featured__body {
    font-size: 0.8rem;
    line-height: 1.7;
    color: var(--color-text);
    opacity: 0.7;
    margin: 0 0 var(--space-md) 0;
    max-width: 350px;
}

/* Blueprint expand */
.blueprint {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.6s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.4s ease, margin-top 0.4s ease;
    margin-top: 0;
}

.blueprint.visible {
    max-height: 500px;
    opacity: 1;
    margin-top: var(--space-lg);
}

.blueprint__inner {
    border: 1px solid rgba(42, 42, 42, 0.15);
    border-radius: 4px;
    padding: var(--space-md);
    background: var(--color-bg-light);
}

.blueprint__placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-sm);
}

.blueprint__icon {
    width: 100%;
    max-width: 320px;
    height: auto;
    color: var(--color-text);
    opacity: 0.5;
}

.blueprint__caption {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    color: var(--color-text-light);
    margin: 0;
    letter-spacing: 0.04em;
}

/* ==================
   Section 2: Project Gallery
   ================== */
.gallery {
    background-color: var(--color-bg-light);
    padding: var(--space-2xl) var(--space-xl) 0;
    text-align: center;
    overflow: hidden;
}

.gallery__label {
    margin-bottom: var(--space-xs);
}

.gallery__heading {
    font-family: var(--font-construction);
    font-size: 2.8rem;
    font-weight: 400;
    margin: 0 0 var(--space-xl) 0;
}

.gallery__viewport {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-sm);
    max-width: 1200px;
    margin: 0 auto;
    height: 600px;
    overflow: hidden;
    mask-image: linear-gradient(to bottom, transparent 0%, black 8%, black 92%, transparent 100%);
    -webkit-mask-image: linear-gradient(to bottom, transparent 0%, black 8%, black 92%, transparent 100%);
}

.gallery__column {
    overflow: hidden;
    position: relative;
}

.gallery__column:has(.gallery__item.active) {
    overflow: visible;
    z-index: 10;
}

.gallery__scroll {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
    animation: gallery-scroll var(--scroll-speed, 35s) linear infinite;
}

@keyframes gallery-scroll {
    0% {
        transform: translateY(0);
    }
    100% {
        transform: translateY(-50%);
    }
}

.gallery__item {
    position: relative;
    cursor: pointer;
    border-radius: 4px;
    overflow: hidden;
    flex-shrink: 0;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.4s ease;
    transform: scale(1) translate(0, 0);
}

.gallery__item:hover {
    transform: scale(1.03);
}

.gallery__item.active {
    overflow: visible;
    z-index: 10;
    transform: scale(var(--enlarge-scale, 2)) translate(var(--offset-x, 0px), var(--offset-y, 0px));
    border-radius: 6px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
}

.gallery__item img {
    width: 100%;
    display: block;
    border-radius: 4px;
}

.gallery__item.active img {
    filter: brightness(1.05);
    border-radius: 6px;
}

.gallery__item::after {
    content: attr(data-caption);
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 0.4em 0.3em 0.25em;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8) 0%, transparent 100%);
    color: var(--color-white);
    font-family: var(--font-sans);
    font-size: clamp(0.4rem, 1.2vw, 0.7rem);
    font-weight: 500;
    letter-spacing: 0.02em;
    line-height: 1.3;
    border-radius: 0 0 6px 6px;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.gallery__item.active::after {
    opacity: 1;
}

/* Pause scrolling on hover or when an item is enlarged */
.gallery__viewport:hover .gallery__scroll,
.gallery__viewport.has-active .gallery__scroll {
    animation-play-state: paused;
}

/* ==================
   Section 6: Footer CTA
   ================== */
.footer-cta {
    background-color: var(--color-bg-dark);
    padding: var(--space-2xl) var(--space-xl);
    text-align: center;
}

.footer-cta__heading {
    font-family: var(--font-construction);
    font-size: 3rem;
    font-weight: 400;
    margin: 0 0 var(--space-sm) 0;
}

.footer-cta__body {
    font-size: 0.8rem;
    line-height: 1.7;
    color: var(--color-text);
    opacity: 0.7;
    margin: 0 auto var(--space-lg) auto;
    max-width: 500px;
}

.footer-cta__form {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
    margin: 0 auto var(--space-lg) auto;
    max-width: 560px;
    text-align: left;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-md);
}

.form-field {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.form-label {
    font-family: var(--font-sans);
    font-size: 0.7rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--color-text);
}

.form-input {
    padding: 0.6rem 0.9rem;
    border: 1px solid var(--color-border);
    border-radius: 0;
    background: transparent;
    font-family: var(--font-sans);
    font-size: 0.85rem;
    color: var(--color-text);
    outline: none;
    transition: border-color 0.2s;
}

.form-input::placeholder {
    color: var(--color-text-light);
}

.form-input:focus {
    border-color: var(--color-text);
}

.form-textarea {
    resize: vertical;
    min-height: 100px;
}

.form-file {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.8rem 0.9rem;
    border: 1px dashed var(--color-border);
    cursor: pointer;
    color: var(--color-text-light);
    transition: border-color 0.2s, color 0.2s;
}

.form-file:hover,
.form-file:focus-visible {
    border-color: var(--color-text);
    color: var(--color-text);
}

.form-file-input {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
}

.form-file-text {
    font-family: var(--font-sans);
    font-size: 0.8rem;
}

.btn-submit {
    align-self: flex-start;
    cursor: pointer;
    background: none;
}

.footer-cta__contact {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-xl);
    max-width: 720px;
    margin: 0 auto var(--space-lg) auto;
    padding-top: var(--space-lg);
    border-top: 1px solid var(--color-border);
}

.contact-location {
    text-align: left;
}

.contact-location__label {
    font-family: var(--font-sans);
    font-size: 0.7rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--color-text);
    margin: 0 0 var(--space-xs) 0;
}

.contact-location__address {
    font-family: var(--font-sans);
    font-size: 0.85rem;
    line-height: 1.6;
    color: var(--color-text);
    margin: 0 0 var(--space-xs) 0;
}

.contact-location__phone {
    font-family: var(--font-sans);
    font-size: 0.8rem;
    color: var(--color-text-light);
    margin: 0;
}

.footer-cta__social {
    display: flex;
    gap: var(--space-sm);
    justify-content: center;
}

.social-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    color: var(--color-text);
    transition: opacity 0.2s;
}

.social-icon:hover {
    opacity: 0.6;
}

/* ==================
   Form Validation Toast
   ================== */
.validation-toast {
    position: fixed;
    top: var(--space-md);
    right: var(--space-md);
    background: var(--color-highlight-dark);
    color: var(--color-white);
    padding: var(--space-sm) var(--space-md);
    border-radius: 4px;
    font-family: var(--font-sans);
    font-size: 0.85rem;
    line-height: 1.6;
    max-width: 340px;
    z-index: 1000;
    opacity: 0;
    transform: translateY(-12px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    pointer-events: none;
}

.validation-toast.visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.validation-toast__title {
    font-weight: 500;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 0.4rem;
}

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

.validation-toast__list li {
    padding: 0.15rem 0;
    font-size: 0.8rem;
    opacity: 0.85;
}

.validation-toast__list li::before {
    content: '\2022';
    margin-right: 0.5em;
    opacity: 0.5;
}

.form-input.invalid {
    border-color: #b54a4a;
}

/* ==================
   Services Modal/Popup
   ================== */
.services-modal {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(42, 42, 42, 0.75);
    backdrop-filter: blur(4px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.services-modal.visible {
    opacity: 1;
    pointer-events: auto;
}

.services-modal__content {
    background: var(--color-bg);
    padding: var(--space-xl);
    border-radius: 8px;
    max-width: 620px;
    width: 90%;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    transform: scale(0.95) translateY(20px);
    transition: transform 0.3s ease;
    position: relative;
}

.services-modal.visible .services-modal__content {
    transform: scale(1) translateY(0);
}

.services-modal__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-md);
}

.services-modal__title {
    font-family: var(--font-construction);
    font-size: 2rem;
    font-weight: 400;
    margin: 0;
}

.services-modal__close {
    background: none;
    border: none;
    font-size: 2rem;
    line-height: 1;
    cursor: pointer;
    color: var(--color-text-light);
    transition: color 0.2s;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.services-modal__close:hover {
    color: var(--color-text);
}

.services-modal__body {
    margin-bottom: var(--space-lg);
}

.services-modal__subtitle {
    font-family: var(--font-construction);
    font-size: 1.2rem;
    font-weight: 400;
    margin: 0 0 var(--space-md) 0;
    color: var(--color-text);
}

.services-modal__body p {
    font-family: var(--font-sans);
    font-size: 0.85rem;
    line-height: 1.75;
    color: var(--color-text);
    opacity: 0.8;
    margin: 0 0 var(--space-sm) 0;
}

.services-modal__body p:last-child {
    margin-bottom: 0;
}

.services-modal__services-heading {
    font-family: var(--font-construction);
    font-size: 1.2rem;
    font-weight: 400;
    margin: 0 0 var(--space-sm) 0;
    color: var(--color-text);
}

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

.services-modal__list li {
    padding: var(--space-sm) 0;
    border-bottom: 1px solid var(--color-border);
    font-family: var(--font-sans);
    font-size: 0.95rem;
    color: var(--color-text);
    display: flex;
    align-items: center;
}

.services-modal__list li:last-child {
    border-bottom: none;
}

.services-modal__list li::before {
    content: '\2713';
    margin-right: var(--space-sm);
    color: var(--color-highlight-dark);
    font-weight: bold;
}

/* ==================
   Scroll Animations
   ================== */
.fade-in {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.6s ease, transform 0.6s ease;
    transition-delay: var(--delay, 0s);
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Restore opacity for elements that have it set already */
.hero__body.fade-in.visible {
    opacity: 0.7;
}

.projects__body.fade-in.visible,
.featured__body.fade-in.visible,
.footer-cta__body.fade-in.visible {
    opacity: 0.7;
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
    .fade-in {
        opacity: 1;
        transform: none;
        transition: none;
    }
}

/* ==================
   Responsive: Tablet (768px)
   ================== */
@media (max-width: 768px) {
    :root {
        --space-xl: 2.5rem;
        --space-2xl: 4rem;
    }

    .hero__logo {
        height: 3rem;
    }

    .hero {
        max-width: 100%;
    }

    .hero__tagline {
        font-size: 1.4rem;
    }

    .gallery__heading {
        font-size: 2.2rem;
    }

    .gallery__viewport {
        grid-template-columns: repeat(3, 1fr);
        height: 500px;
    }

    .gallery__column:nth-child(4) {
        display: none;
    }

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

    .services__heading {
        font-size: 2.2rem;
    }

    .services {
        padding: 0 var(--space-xl);
    }

    .services__text {
        padding: var(--space-xl) 0;
    }

    .projects__grid {
        grid-template-columns: 1fr;
        gap: var(--space-2xl);
    }

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

    .featured {
        padding: 0 var(--space-xl);
    }

    .featured__text {
        padding: var(--space-xl) 0;
    }

    .footer-cta__heading {
        font-size: 2.2rem;
    }

    .footer-cta__form {
        max-width: 100%;
    }
}

/* ==================
   Responsive: Phone (480px)
   ================== */
@media (max-width: 480px) {
    :root {
        --space-xl: 1.5rem;
        --space-2xl: 3rem;
    }

    .hero__logo {
        height: 2.5rem;
    }

    .hero__tagline {
        font-size: 1.2rem;
    }

    .gallery__heading {
        font-size: 1.8rem;
    }

    .gallery__viewport {
        grid-template-columns: repeat(2, 1fr);
        height: 420px;
    }

    .gallery__column:nth-child(3),
    .gallery__column:nth-child(4) {
        display: none;
    }


    .services__heading {
        font-size: 1.8rem;
    }

    .services__text {
        padding: var(--space-lg) 0;
    }

    .projects__heading {
        font-size: 1.5rem;
    }

    .featured__text {
        padding: var(--space-lg) 0;
    }

    .featured__heading {
        font-size: 1.6rem;
    }

    .footer-cta__heading {
        font-size: 1.8rem;
    }

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

    .footer-cta__contact {
        grid-template-columns: 1fr;
        gap: var(--space-lg);
    }
}
