:root {
    --ink: #22211f;
    --muted: #6f6961;
    --paper: #f7f3ed;
    --ivory: #fffaf2;
    --sage: #78866b;
    --clay: #b36a46;
    --plum: #4d3142;
    --gold: #c4944f;
    --line: rgba(34, 33, 31, 0.14);
    --shadow: 0 24px 70px rgba(34, 33, 31, 0.18);
    --radius: 8px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--ink);
    background: var(--paper);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.6;
}

body.inner-page {
    min-height: 100vh;
}

img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

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

.site-header {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 18px clamp(18px, 5vw, 72px);
    color: var(--ivory);
    transition: background 220ms ease, color 220ms ease, box-shadow 220ms ease;
}

.site-header.scrolled {
    color: var(--ink);
    background: rgba(255, 250, 242, 0.94);
    box-shadow: 0 10px 34px rgba(34, 33, 31, 0.1);
    backdrop-filter: blur(18px);
}

.site-header.menu-open {
    color: var(--ink);
    background: rgba(255, 250, 242, 0.98);
}

.inner-page .site-header {
    color: var(--ink);
    background: rgba(255, 250, 242, 0.96);
    box-shadow: 0 10px 34px rgba(34, 33, 31, 0.1);
    backdrop-filter: blur(18px);
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    letter-spacing: 0;
}

.brand-mark {
    display: grid;
    width: 38px;
    height: 38px;
    place-items: center;
    color: var(--ivory);
    background: var(--clay);
    border-radius: 50%;
    font-size: 0.78rem;
}

.nav {
    display: flex;
    align-items: center;
    gap: 28px;
    font-weight: 700;
    font-size: 0.95rem;
}

.nav a {
    opacity: 0.9;
}

.nav a:hover {
    opacity: 1;
}

.nav-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 1px solid currentColor;
    border-radius: 50%;
    background: transparent;
    color: inherit;
}

.nav-toggle span {
    display: block;
    width: 18px;
    height: 2px;
    margin: 4px auto;
    background: currentColor;
}

.hero {
    position: relative;
    display: grid;
    min-height: 92vh;
    overflow: hidden;
    color: var(--ivory);
    isolation: isolate;
}

.hero-bg {
    position: absolute;
    inset: 0;
    z-index: -2;
    background-image: linear-gradient(90deg, rgba(28, 24, 21, 0.72), rgba(28, 24, 21, 0.28), rgba(28, 24, 21, 0.08)), url("https://images.unsplash.com/photo-1600585154340-be6161a56a0c?auto=format&fit=crop&w=1800&q=90");
    background-position: center;
    background-size: cover;
    transform: scale(1.02);
}

.hero::after {
    position: absolute;
    inset: auto 0 0;
    z-index: -1;
    height: 32%;
    content: "";
    background: linear-gradient(0deg, var(--paper), transparent);
}

.hero-content {
    align-self: center;
    width: min(680px, calc(100% - 36px));
    margin-left: clamp(18px, 6vw, 90px);
    padding-top: 90px;
}

.eyebrow {
    margin: 0 0 12px;
    color: var(--gold);
    font-size: 0.78rem;
    font-weight: 900;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

h1,
h2,
h3,
p {
    margin-top: 0;
}

h1 {
    margin-bottom: 18px;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(3.2rem, 8vw, 7.4rem);
    line-height: 0.92;
    letter-spacing: 0;
}

h2 {
    margin-bottom: 16px;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(2rem, 4.4vw, 4.3rem);
    line-height: 1.02;
    letter-spacing: 0;
}

h3 {
    margin-bottom: 8px;
    font-size: 1.15rem;
    line-height: 1.22;
}

.hero-copy {
    width: min(520px, 100%);
    color: rgba(255, 250, 242, 0.92);
    font-size: clamp(1rem, 2vw, 1.22rem);
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 28px;
}

.btn {
    display: inline-flex;
    min-height: 48px;
    align-items: center;
    justify-content: center;
    padding: 0 22px;
    border: 1px solid transparent;
    border-radius: var(--radius);
    font-weight: 850;
    line-height: 1;
    transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.btn:hover {
    transform: translateY(-2px);
}

.btn.primary {
    color: var(--ivory);
    background: var(--clay);
    box-shadow: 0 14px 28px rgba(102, 54, 33, 0.24);
}

.btn.secondary {
    color: var(--ivory);
    border-color: rgba(255, 250, 242, 0.62);
    background: rgba(255, 250, 242, 0.08);
}

.btn.muted {
    color: var(--ink);
    border-color: var(--line);
    background: var(--ivory);
}

.hero-panel {
    position: absolute;
    right: clamp(18px, 5vw, 72px);
    bottom: clamp(24px, 6vw, 76px);
    display: grid;
    grid-template-columns: repeat(3, minmax(86px, 1fr));
    gap: 1px;
    width: min(480px, calc(100% - 36px));
    overflow: hidden;
    border: 1px solid rgba(255, 250, 242, 0.3);
    border-radius: var(--radius);
    background: rgba(255, 250, 242, 0.16);
    backdrop-filter: blur(18px);
}

.hero-panel div {
    padding: 18px;
    background: rgba(34, 33, 31, 0.16);
}

.hero-panel strong,
.hero-panel span {
    display: block;
}

.hero-panel strong {
    font-size: 1.55rem;
}

.hero-panel span {
    color: rgba(255, 250, 242, 0.82);
    font-size: 0.82rem;
}

.section {
    width: min(1180px, calc(100% - 36px));
    margin: 0 auto;
    padding: 88px 0;
}

.intro {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
    gap: clamp(28px, 7vw, 84px);
    align-items: end;
}

.intro p:last-child,
.section-head > p {
    color: var(--muted);
    font-size: 1.06rem;
}

.section-head {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 28px;
    margin-bottom: 30px;
}

.filter-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.filter-tabs button {
    min-height: 40px;
    padding: 0 14px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    color: var(--ink);
    background: var(--ivory);
    font-weight: 800;
    cursor: pointer;
}

.filter-tabs button.active {
    color: var(--ivory);
    background: var(--plum);
    border-color: var(--plum);
}

.product-grid,
.steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 18px;
}

.product-card,
.steps article {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--ivory);
    box-shadow: 0 10px 30px rgba(34, 33, 31, 0.08);
}

.product-card {
    min-height: 390px;
    transition: transform 220ms ease, opacity 220ms ease, box-shadow 220ms ease;
}

.product-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 18px 48px rgba(34, 33, 31, 0.15);
}

.product-card.is-hidden {
    display: none;
}

.product-card img {
    height: 260px;
}

.product-info {
    padding: 18px;
}

.product-info span,
.project-card span {
    color: var(--sage);
    font-size: 0.78rem;
    font-weight: 900;
    text-transform: uppercase;
}

.product-info p {
    margin-bottom: 0;
    color: var(--clay);
    font-weight: 900;
}

.showcase {
    padding: 20px 0 90px;
    background: var(--ink);
    color: var(--ivory);
}

.showcase-head {
    padding-bottom: 34px;
}

.project-grid {
    display: grid;
    grid-template-columns: 1.25fr 0.88fr 0.88fr;
    grid-auto-flow: dense;
    gap: 18px;
    width: min(1180px, calc(100% - 36px));
    margin: 0 auto;
}

.project-card {
    position: relative;
    min-height: 430px;
    overflow: hidden;
    border-radius: var(--radius);
    isolation: isolate;
}

.project-card:first-child {
    min-height: 560px;
    grid-row: span 2;
}

.gallery-section {
    padding-top: 96px;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    grid-auto-rows: 170px;
    gap: 14px;
}

.gallery-item {
    position: relative;
    min-height: 170px;
    margin: 0;
    overflow: hidden;
    border-radius: var(--radius);
    background: var(--ivory);
    box-shadow: 0 10px 30px rgba(34, 33, 31, 0.08);
}

.gallery-item:nth-child(1),
.gallery-item:nth-child(4) {
    grid-column: span 3;
    grid-row: span 2;
}

.gallery-item:nth-child(2),
.gallery-item:nth-child(3),
.gallery-item:nth-child(5),
.gallery-item:nth-child(6) {
    grid-column: span 3;
}

.gallery-item::after {
    position: absolute;
    inset: 0;
    content: "";
    background: linear-gradient(0deg, rgba(34, 33, 31, 0.72), transparent 62%);
}

.gallery-item figcaption {
    position: absolute;
    right: 16px;
    bottom: 14px;
    left: 16px;
    z-index: 1;
    color: var(--ivory);
    font-weight: 900;
}

.gallery-item img,
.project-card img,
.product-card img {
    transition: transform 500ms ease;
}

.gallery-item:hover img,
.project-card:hover img,
.product-card:hover img {
    transform: scale(1.055);
}

.project-card::after {
    position: absolute;
    inset: 0;
    z-index: 1;
    content: "";
    background: linear-gradient(0deg, rgba(25, 22, 20, 0.78), rgba(25, 22, 20, 0.08));
}

.project-card div {
    position: absolute;
    right: 22px;
    bottom: 20px;
    left: 22px;
    z-index: 2;
}

.process {
    padding-top: 96px;
}

.steps {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.steps article {
    padding: 28px;
}

.steps span {
    display: inline-grid;
    width: 42px;
    height: 42px;
    margin-bottom: 24px;
    place-items: center;
    border-radius: 50%;
    color: var(--ivory);
    background: var(--sage);
    font-weight: 900;
}

.steps p {
    margin-bottom: 0;
    color: var(--muted);
}

.contact-band {
    display: grid;
    grid-template-columns: minmax(0, 0.86fr) minmax(320px, 0.74fr);
    gap: clamp(28px, 6vw, 80px);
    align-items: center;
    padding: 88px clamp(18px, 6vw, 90px);
    color: var(--ivory);
    background-image: linear-gradient(90deg, rgba(34, 33, 31, 0.9), rgba(34, 33, 31, 0.66)), url("https://images.unsplash.com/photo-1600607688969-a5bfcd646154?auto=format&fit=crop&w=1800&q=85");
    background-position: center;
    background-size: cover;
}

.contact-copy {
    max-width: 650px;
}

.contact-copy p:last-child {
    color: rgba(255, 250, 242, 0.82);
    font-size: 1.08rem;
}

.contact-form {
    display: grid;
    gap: 14px;
    padding: 24px;
    border: 1px solid rgba(255, 250, 242, 0.22);
    border-radius: var(--radius);
    background: rgba(255, 250, 242, 0.12);
    box-shadow: var(--shadow);
    backdrop-filter: blur(22px);
}

.contact-form label {
    display: grid;
    gap: 7px;
    font-size: 0.86rem;
    font-weight: 850;
}

.contact-form input,
.contact-form select,
.contact-form textarea {
    width: 100%;
    min-height: 46px;
    border: 1px solid rgba(255, 250, 242, 0.26);
    border-radius: var(--radius);
    color: var(--ink);
    background: rgba(255, 250, 242, 0.94);
    font: inherit;
    padding: 11px 12px;
}

.contact-form textarea {
    resize: vertical;
}

.footer {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 20px;
    align-items: center;
    justify-content: space-between;
    padding: 26px clamp(18px, 6vw, 90px);
    color: var(--ivory);
    background: var(--plum);
}

.footer p {
    margin: 0;
}

.status-page {
    background-image: linear-gradient(90deg, rgba(34, 33, 31, 0.78), rgba(34, 33, 31, 0.38)), url("https://images.unsplash.com/photo-1618221195710-dd6b41faaea6?auto=format&fit=crop&w=1600&q=85");
    background-position: center;
    background-size: cover;
}

.inner-shell,
.dashboard-shell {
    width: min(1180px, calc(100% - 36px));
    margin: 0 auto;
    padding: 128px 0 72px;
}

.status-card {
    width: min(620px, 100%);
    margin: 0 auto;
    padding: clamp(26px, 5vw, 46px);
    border-radius: var(--radius);
    background: var(--ivory);
    box-shadow: var(--shadow);
}

.status-card h1 {
    color: var(--ink);
    font-size: clamp(2.2rem, 6vw, 4.4rem);
}

.status-card .btn {
    margin-top: 12px;
}

.status-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 18px;
}

.admin-login-page,
.dashboard-page {
    background:
        linear-gradient(180deg, rgba(247, 243, 237, 0.96), rgba(247, 243, 237, 0.96)),
        url("https://images.unsplash.com/photo-1615873968403-89e068629265?auto=format&fit=crop&w=1800&q=85");
    background-attachment: fixed;
    background-position: center;
    background-size: cover;
}

.admin-login {
    display: grid;
    grid-template-columns: minmax(0, 0.92fr) minmax(320px, 0.58fr);
    gap: clamp(28px, 6vw, 80px);
    align-items: center;
    min-height: 620px;
}

.admin-login h1,
.dashboard-hero h1 {
    color: var(--ink);
    font-size: clamp(2.6rem, 7vw, 5.8rem);
}

.admin-login p,
.dashboard-hero p {
    color: var(--muted);
    font-size: 1.08rem;
}

.admin-form,
.admin-table-wrap,
.dashboard-stats article,
.empty-state {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(255, 250, 242, 0.92);
    box-shadow: 0 18px 54px rgba(34, 33, 31, 0.12);
    backdrop-filter: blur(16px);
}

.admin-form {
    display: grid;
    gap: 16px;
    padding: clamp(20px, 4vw, 32px);
}

.admin-form label {
    display: grid;
    gap: 8px;
    font-size: 0.86rem;
    font-weight: 850;
}

.admin-form input {
    width: 100%;
    min-height: 48px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    color: var(--ink);
    background: #fff;
    font: inherit;
    padding: 11px 12px;
}

.form-alert {
    margin: 0;
    padding: 12px 14px;
    border-radius: var(--radius);
    color: #7a271a;
    background: #fff0ea;
    font-weight: 800;
}

.dashboard-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(320px, 0.78fr);
    gap: 24px;
    align-items: end;
    margin-bottom: 28px;
}

.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.dashboard-stats article {
    padding: 20px;
}

.dashboard-stats strong,
.dashboard-stats span {
    display: block;
}

.dashboard-stats strong {
    color: var(--clay);
    font-size: clamp(1.45rem, 4vw, 2.2rem);
}

.dashboard-stats span {
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 800;
}

.admin-table-wrap {
    padding: clamp(18px, 4vw, 30px);
}

.table-head {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    align-items: end;
    justify-content: space-between;
    margin-bottom: 18px;
}

.table-scroll {
    overflow-x: auto;
}

.admin-table {
    width: 100%;
    min-width: 860px;
    border-collapse: collapse;
}

.admin-table th,
.admin-table td {
    padding: 14px 12px;
    border-bottom: 1px solid var(--line);
    text-align: left;
    vertical-align: top;
}

.admin-table th {
    color: var(--plum);
    font-size: 0.78rem;
    text-transform: uppercase;
}

.admin-table td {
    color: var(--muted);
}

.table-action {
    min-height: 36px;
    padding: 0 12px;
    border: 0;
    border-radius: var(--radius);
    color: var(--ivory);
    background: var(--clay);
    font-weight: 850;
    cursor: pointer;
}

.table-note {
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 800;
}

.empty-state {
    padding: 28px;
}

.animate-on-scroll {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 700ms ease, transform 700ms ease;
}

.animate-on-scroll.is-visible {
    opacity: 1;
    transform: translateY(0);
}

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

    .animate-on-scroll {
        opacity: 1;
        transform: none;
    }
}

@media (max-width: 960px) {
    .nav-toggle {
        display: block;
    }

    .nav {
        position: absolute;
        top: 78px;
        right: 18px;
        display: none;
        width: min(280px, calc(100vw - 36px));
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        overflow: hidden;
        border: 1px solid var(--line);
        border-radius: var(--radius);
        color: var(--ink);
        background: var(--ivory);
        box-shadow: var(--shadow);
    }

    .nav.is-open {
        display: flex;
    }

    .nav a {
        padding: 15px 18px;
        border-bottom: 1px solid var(--line);
    }

    .nav a:last-child {
        border-bottom: 0;
    }

    .hero-content {
        align-self: start;
        margin-top: 110px;
    }

    .hero-panel {
        right: 18px;
        bottom: 28px;
        left: 18px;
        width: auto;
    }

    .intro,
    .contact-band,
    .section-head,
    .admin-login,
    .dashboard-hero {
        grid-template-columns: 1fr;
    }

    .section-head {
        display: grid;
        align-items: start;
    }

    .product-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .project-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .project-card,
    .project-card:first-child {
        min-height: 390px;
        grid-row: auto;
    }

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

    .gallery-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        grid-auto-rows: 220px;
    }

    .gallery-item:nth-child(n) {
        grid-column: auto;
        grid-row: auto;
    }

    .dashboard-stats {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 620px) {
    .site-header {
        padding: 14px 18px;
    }

    .brand span:last-child {
        max-width: 140px;
        line-height: 1.05;
    }

    .hero {
        min-height: 760px;
    }

    .hero-content {
        width: calc(100% - 36px);
        margin-left: 18px;
        margin-top: 92px;
        padding-top: 0;
    }

    .hero-panel {
        grid-template-columns: 1fr;
        bottom: 18px;
    }

    .hero-panel div {
        padding: 14px 16px;
    }

    .hero-actions,
    .btn {
        width: 100%;
    }

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

    .contact-form {
        padding: 18px;
    }

    .gallery-grid,
    .project-grid {
        grid-template-columns: 1fr;
    }

    .gallery-grid {
        grid-auto-rows: 240px;
    }

    .inner-shell,
    .dashboard-shell {
        padding-top: 108px;
    }

    .status-actions,
    .status-actions .btn {
        width: 100%;
    }

    h1 {
        font-size: clamp(2.65rem, 16vw, 4rem);
    }

    h2 {
        font-size: clamp(1.85rem, 10vw, 2.75rem);
    }

    .eyebrow {
        font-size: 0.7rem;
    }
}
