:root {
    --bg: #f7f1eb;
    --bg-strong: #191316;
    --surface: #ffffff;
    --surface-alt: #efe5db;
    --text: #1d1719;
    --muted: #6d6362;
    --line: rgba(29, 23, 25, 0.1);
    --primary: #d62828;
    --primary-dark: #9f1717;
    --gold: #c7862f;
    --shadow: 0 18px 50px rgba(29, 23, 25, 0.12);
    --radius: 24px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background:
        radial-gradient(circle at top left, rgba(214, 40, 40, 0.12), transparent 34%),
        radial-gradient(circle at bottom right, rgba(199, 134, 47, 0.12), transparent 28%),
        var(--bg);
    color: var(--text);
    font-family: "Manrope", sans-serif;
    line-height: 1.6;
}

body.admin-body,
body.login-body {
    background: #efe7dc;
}

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

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

.container {
    width: min(1140px, calc(100% - 2rem));
    margin: 0 auto;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 20;
    backdrop-filter: blur(14px);
    background: rgba(247, 241, 235, 0.82);
    border-bottom: 1px solid var(--line);
}

.nav-row {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 1.5rem;
    align-items: center;
    padding: 1rem 0;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 0.9rem;
}

.brand img {
    width: 88px;
}

.brand strong,
.brand-admin strong {
    display: block;
    font-family: "Cormorant Garamond", serif;
    font-size: 1.7rem;
    letter-spacing: 0.03em;
}

.brand small,
.brand-admin small,
.muted,
.admin-topbar p {
    color: var(--muted);
    font-size: 0.82rem;
}

.site-nav {
    display: flex;
    justify-content: center;
    gap: 1.1rem;
    flex-wrap: wrap;
}

.site-nav a,
.admin-nav a {
    position: relative;
    font-weight: 600;
}

.site-nav a::after,
.admin-nav a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -0.35rem;
    width: 100%;
    height: 2px;
    background: var(--primary);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.2s ease;
}

.site-nav a:hover::after,
.admin-nav a:hover::after {
    transform: scaleX(1);
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 999px;
    padding: 0.9rem 1.4rem;
    font-weight: 800;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.button:hover {
    transform: translateY(-1px);
}

.button-primary {
    background: linear-gradient(135deg, var(--primary), #f05454);
    color: white;
    box-shadow: 0 16px 30px rgba(214, 40, 40, 0.2);
}

.button-secondary {
    background: white;
    color: var(--text);
    border: 1px solid var(--line);
}

.button-danger {
    background: #2a2225;
    color: white;
}

.button-small {
    padding: 0.6rem 0.9rem;
    font-size: 0.88rem;
}

.hero,
.inner-hero {
    padding: 5rem 0 3rem;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 2rem;
    align-items: stretch;
}

.hero-copy h1,
.inner-hero h1,
.section-heading h2,
.cta-box h2,
.admin-topbar h1,
.login-card h1 {
    margin: 0;
    font-family: "Cormorant Garamond", serif;
    font-size: clamp(2.7rem, 5vw, 4.8rem);
    line-height: 0.95;
}

.hero-copy {
    padding: 2rem 0;
}

.hero-text,
.section-heading p,
.narrow-copy p,
.prose p,
.portfolio-body p,
.service-card p,
.project-card p,
.info-card p,
.process-card p,
.testimonial-card p {
    color: var(--muted);
    font-size: 1.05rem;
}

.eyebrow {
    display: inline-block;
    margin-bottom: 1rem;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    font-size: 0.82rem;
    font-weight: 800;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: 1.8rem;
}

.hero-panel {
    display: grid;
    gap: 1rem;
}

.hero-card,
.info-card,
.portfolio-card,
.testimonial-card,
.process-card,
.service-card,
.project-card,
.stat-card,
.admin-panel,
.contact-form-wrap,
.cta-box,
.login-card {
    background: rgba(255, 255, 255, 0.84);
    border: 1px solid rgba(29, 23, 25, 0.08);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.hero-card,
.info-card,
.testimonial-card,
.process-card,
.service-card,
.project-card,
.stat-card,
.admin-panel,
.cta-box,
.login-card {
    padding: 1.5rem;
}

.hero-card strong,
.stat-card strong {
    display: block;
    margin-top: 0.45rem;
    font-size: 2rem;
    font-weight: 800;
}

.hero-card-wide p {
    margin: 0.35rem 0 0;
}

.accent-card {
    background: linear-gradient(135deg, #2a1719, #561f20);
    color: white;
}

.section {
    padding: 4.5rem 0;
}

.section-dark {
    background: linear-gradient(135deg, #24191b, #120d0e);
    color: white;
}

.section-dark .section-heading p,
.section-dark .process-card p {
    color: rgba(255, 255, 255, 0.75);
}

.section-muted {
    background: rgba(239, 229, 219, 0.68);
}

.section-heading {
    margin-bottom: 2rem;
}

.card-grid,
.testimonial-grid,
.process-grid,
.admin-stats {
    display: grid;
    gap: 1.25rem;
}

.card-grid,
.three-up,
.testimonial-grid,
.process-grid,
.admin-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.admin-stats {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-bottom: 1.5rem;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    background: rgba(214, 40, 40, 0.08);
    color: var(--primary-dark);
    font-weight: 800;
    font-size: 0.82rem;
}

.portfolio-card {
    overflow: hidden;
    padding: 0;
}

.portfolio-art {
    aspect-ratio: 16 / 10;
    background:
        radial-gradient(circle at top left, rgba(214, 40, 40, 0.5), transparent 35%),
        linear-gradient(135deg, #1e1819, #382527 45%, #8c2a2a 100%);
    display: flex;
    align-items: end;
    padding: 1.25rem;
    color: white;
    font-size: 1.2rem;
    font-weight: 800;
}

.portfolio-body {
    padding: 1.35rem;
}

.portfolio-body h3,
.service-card h3,
.project-card h3,
.process-card h3 {
    margin: 0.8rem 0 0.4rem;
    font-size: 1.25rem;
}

.process-index {
    display: inline-flex;
    width: 3rem;
    height: 3rem;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: rgba(199, 134, 47, 0.18);
    color: var(--gold);
    font-weight: 800;
    margin-bottom: 1rem;
}

.narrow-copy,
.prose {
    width: min(760px, 100%);
}

.contact-grid {
    display: grid;
    grid-template-columns: 0.9fr 1.1fr;
    gap: 1.5rem;
    align-items: start;
}

.contact-list {
    display: grid;
    gap: 1rem;
    margin: 1.6rem 0;
}

.contact-list span {
    display: block;
    color: var(--muted);
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

.contact-form-wrap {
    padding: 1.5rem;
}

.contact-form,
.admin-form,
.login-form {
    display: grid;
    gap: 1rem;
}

label {
    display: grid;
    gap: 0.45rem;
    font-weight: 700;
}

input,
textarea {
    width: 100%;
    padding: 0.9rem 1rem;
    border-radius: 16px;
    border: 1px solid rgba(29, 23, 25, 0.12);
    background: white;
    color: var(--text);
    font: inherit;
}

textarea {
    resize: vertical;
}

.cta-box {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    background: linear-gradient(135deg, #24191b, #631d1d);
    color: white;
}

.site-footer {
    background: #160f10;
    color: rgba(255, 255, 255, 0.88);
    margin-top: 4rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.1fr 1fr 1fr;
    gap: 2rem;
    padding: 3rem 0;
}

.footer-grid h3,
.footer-grid h4 {
    margin-top: 0;
    font-family: "Cormorant Garamond", serif;
    font-size: 1.8rem;
}

.social-row {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.footer-bar {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding: 1rem 0;
    font-size: 0.92rem;
}

.flash {
    padding: 0.9rem 1rem;
    border-radius: 16px;
    margin-bottom: 1rem;
    font-weight: 700;
}

.flash-success {
    background: rgba(34, 197, 94, 0.12);
    color: #136c36;
}

.flash-error {
    background: rgba(214, 40, 40, 0.12);
    color: var(--primary-dark);
}

.admin-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 280px 1fr;
}

.admin-sidebar {
    background: linear-gradient(180deg, #1e1719, #100d0e);
    color: white;
    padding: 1.5rem;
}

.brand-admin {
    margin-bottom: 2rem;
}

.brand-admin img {
    width: 90px;
}

.admin-nav {
    display: grid;
    gap: 1rem;
}

.admin-main {
    padding: 1.5rem;
}

.admin-topbar {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

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

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

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

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.admin-form-grid {
    display: grid;
    gap: 1.5rem;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.form-grid .full {
    grid-column: 1 / -1;
}

.checkbox {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
}

.checkbox input {
    width: auto;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
}

.actions-cell {
    display: flex;
    gap: 0.6rem;
    flex-wrap: wrap;
}

.login-body {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 1.5rem;
}

.login-card {
    width: min(460px, 100%);
    text-align: center;
}

.login-card img {
    width: 112px;
    margin: 0 auto 1rem;
}

@media (max-width: 1000px) {
    .hero-grid,
    .contact-grid,
    .footer-grid,
    .admin-shell,
    .card-grid,
    .testimonial-grid,
    .process-grid,
    .admin-stats {
        grid-template-columns: 1fr;
    }

    .admin-shell {
        display: block;
    }

    .nav-row {
        grid-template-columns: 1fr;
        justify-items: start;
    }

    .site-nav {
        justify-content: flex-start;
    }

    .cta-box,
    .admin-topbar {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 720px) {
    .hero,
    .inner-hero,
    .section {
        padding: 3.2rem 0;
    }

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

    .button {
        width: 100%;
    }
}
.admin-stats {
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}

.admin-nav-form,
.inline-form {
    margin: 0;
}

.admin-nav-button {
    width: 100%;
    padding: 0;
    border: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    text-align: left;
    font-weight: 600;
    cursor: pointer;
}

.admin-nav-button:hover {
    color: white;
}

input:focus,
textarea:focus,
button:focus,
a:focus {
    outline: 3px solid rgba(214, 40, 40, 0.2);
    outline-offset: 2px;
}
