/* ===========================================================
   Safi Vintage Homes — design system
   Charcoal + warm ivory + brushed gold, serif headings
   =========================================================== */

:root {
    --ink: #1b1b1a;
    --ink-soft: #3a3a37;
    --ivory: #f7f4ee;
    --ivory-deep: #efe9de;
    --gold: #ab8a52;
    --gold-deep: #8a6f3f;
    --line: #e2dccd;
    --white: #ffffff;
    --radius: 4px;
    --font-display: 'Playfair Display', Georgia, serif;
    --font-body: 'Inter', -apple-system, Segoe UI, sans-serif;
    --shadow: 0 14px 40px rgba(20,18,12,0.10);
}

* {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-body);
    color: var(--ink);
    background: var(--ivory);
    line-height: 1.6;
}

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

h1, h2, h3, h4 {
    font-family: var(--font-display);
    font-weight: 600;
    margin: 0 0 .5em;
    letter-spacing: .2px;
}

p {
    margin: 0 0 1em;
    color: var(--ink-soft);
}

.container {
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 24px;
}

.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;
}

/* ---------- Header ---------- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(247,244,238,.96);
    backdrop-filter: blur(6px);
    border-bottom: 1px solid var(--line);
}

.header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 76px;
}

.brand {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}

.brand-mark {
    font-family: var(--font-display);
    font-size: 24px;
    font-weight: 700;
    letter-spacing: .5px;
}

.brand-sub {
    font-size: 10px;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--gold-deep);
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 28px;
}

    .main-nav a {
        font-size: 14px;
        font-weight: 500;
        color: var(--ink-soft);
        transition: color .15s;
    }

        .main-nav a:hover {
            color: var(--gold-deep);
        }

.nav-cta {
    background: var(--ink);
    color: var(--white) !important;
    padding: 10px 20px;
    border-radius: var(--radius);
}

    .nav-cta:hover {
        background: var(--gold-deep);
    }

.nav-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 22px;
    cursor: pointer;
}

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

    .main-nav {
        position: absolute;
        top: 76px;
        left: 0;
        right: 0;
        background: var(--ivory);
        flex-direction: column;
        align-items: flex-start;
        gap: 0;
        max-height: 0;
        overflow: hidden;
        border-bottom: 1px solid var(--line);
    }

        .main-nav.open {
            max-height: 500px;
        }

        .main-nav a {
            width: 100%;
            padding: 14px 24px;
            border-bottom: 1px solid var(--line);
        }

    .nav-cta {
        margin: 14px 24px;
        text-align: center;
    }
}

/* ---------- Buttons / forms ---------- */
.btn {
    display: inline-block;
    padding: 13px 28px;
    border-radius: var(--radius);
    border: 1px solid var(--ink);
    background: var(--ink);
    color: var(--white);
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all .15s;
}

    .btn:hover {
        background: transparent;
        color: var(--ink);
    }

.btn-gold {
    background: var(--gold);
    border-color: var(--gold);
    color: var(--white);
}

    .btn-gold:hover {
        background: transparent;
        color: var(--gold-deep);
        border-color: var(--gold-deep);
    }

.btn-outline {
    background: transparent;
    color: var(--white);
    border-color: var(--white);
}

    .btn-outline:hover {
        background: var(--white);
        color: var(--ink);
    }

.btn-block {
    width: 100%;
}

.input, input[type=text], input[type=email], input[type=tel], input[type=date], select, textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    font-family: var(--font-body);
    font-size: 14px;
    background: var(--white);
    color: var(--ink);
    margin-bottom: 12px;
}

textarea {
    min-height: 120px;
    resize: vertical;
}

label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--ink-soft);
}

.field-error {
    color: #a23b3b;
    font-size: 13px;
}

/* ---------- Hero ---------- */
.hero {
    position: relative;
    background: var(--ink);
    color: var(--white);
    padding: 130px 0 90px;
    text-align: left;
    min-height: 820px;
    display: flex;
    align-items: center;
    overflow: hidden;
}

    .hero .container {
        max-width: 100%;
        padding-left: 5vw;
        padding-right: 5vw;
        margin: 0;
        position: relative;
        z-index: 3;
    }

.hero-logo {
    position: absolute;
    top: 28px;
    left: 5vw;
    max-width: 170px;
    margin: 0;
    display: block;
    border-radius: 4px;
    z-index: 4;
}

.hero-eyebrow {
    letter-spacing: 4px;
    text-transform: uppercase;
    font-size: 12px;
    color: var(--gold);
    margin-bottom: 18px;
}

.hero-accent {
    color: var(--gold);
    font-style: italic;
}

.hero h1 {
    font-size: 52px;
    line-height: 1.1;
    max-width: 760px;
    margin: 0 0 24px;
    text-shadow: 0 2px 10px rgba(0,0,0,.45);
}

.hero p.lead {
    max-width: 560px;
    margin: 0 0 32px;
    color: #f1efe9;
    font-size: 17px;
    text-shadow: 0 1px 6px rgba(0,0,0,.5);
}

.hero-actions {
    display: flex;
    gap: 14px;
    justify-content: flex-start;
    flex-wrap: wrap;
}

@media (max-width: 640px) {
    .hero h1 {
        font-size: 34px;
    }

    .hero {
        padding: 90px 0 60px;
        min-height: 640px;
    }
}

/* ---------- Hero background video ---------- */
.hero-video-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(180deg, rgba(27,27,26,.25), rgba(27,27,26,.60));
}

/* ---------- About page ---------- */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    padding: 20px 0;
}

.about-heading {
    font-size: 20px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--ink);
    margin-bottom: 14px;
}

@media (max-width: 760px) {
    .about-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }
}

.quote-banner {
    background-size: cover;
    background-position: center;
    min-height: 480px;
    margin: 0;
    padding: 0;
    border-top: 4px solid var(--ink);
}

@media (max-width: 640px) {
    .quote-banner {
        min-height: 320px;
    }
}

/* ---------- Sections ---------- */
section {
    padding: 80px 0;
}

.section-head {
    text-align: center;
    max-width: 640px;
    margin: 0 auto 48px;
}

.section-eyebrow {
    letter-spacing: 3px;
    text-transform: uppercase;
    font-size: 12px;
    color: var(--gold-deep);
    font-weight: 600;
    margin-bottom: 10px;
}

.section-alt {
    background: var(--ivory-deep);
}

/* ---------- Cards / grids ---------- */
.grid {
    display: grid;
    gap: 28px;
}

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

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

@media (max-width: 900px) {
    .grid-3 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 620px) {
    .grid-3, .grid-2 {
        grid-template-columns: 1fr;
    }
}

.card {
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    transition: transform .2s, box-shadow .2s;
}

    .card:hover {
        transform: translateY(-4px);
        box-shadow: var(--shadow);
    }

    .card img {
        width: 100%;
        height: 220px;
        object-fit: cover;
        display: block;
    }

.card-body {
    padding: 22px;
}

.card-tag {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--gold-deep);
    background: #f1e9d6;
    padding: 4px 10px;
    border-radius: 20px;
    margin-bottom: 10px;
}

.card-body h3 {
    font-size: 19px;
    margin-bottom: 6px;
}

.card-meta {
    font-size: 13px;
    color: var(--ink-soft);
    margin-bottom: 10px;
}

.feature-row {
    display: flex;
    align-items: center;
    gap: 56px;
}

    .feature-row:nth-child(even) {
        flex-direction: row-reverse;
    }

    .feature-row img {
        width: 50%;
        border-radius: var(--radius);
        box-shadow: var(--shadow);
    }

    .feature-row .feature-copy {
        width: 50%;
    }

@media (max-width: 760px) {
    .feature-row, .feature-row:nth-child(even) {
        flex-direction: column;
    }

        .feature-row img, .feature-row .feature-copy {
            width: 100%;
        }
}

.logo-row {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
    align-items: center;
    justify-content: center;
    opacity: .85;
}

    .logo-row img {
        max-height: 56px;
        max-width: 150px;
        object-fit: contain;
        filter: grayscale(100%);
    }

/* ---------- Tables (admin + listings) ---------- */
table.data {
    width: 100%;
    border-collapse: collapse;
    background: var(--white);
}

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

    table.data th {
        background: var(--ivory-deep);
        font-weight: 700;
        text-transform: uppercase;
        font-size: 11px;
        letter-spacing: .5px;
    }

.badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
}

.badge-pending, .badge-requested {
    background: #fbe7c6;
    color: #8a5a00;
}

.badge-paid, .badge-confirmed, .badge-published, .badge-completed {
    background: #d8ecd8;
    color: #2e6b2e;
}

.badge-cancelled {
    background: #f3d4d4;
    color: #9c2c2c;
}

/* ---------- Footer ---------- */
.site-footer {
    background: var(--ink);
    color: #cfcabf;
    padding: 64px 0 0;
    margin-top: 60px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1.2fr;
    gap: 40px;
    padding-bottom: 40px;
}

    .footer-grid h4 {
        color: var(--white);
        font-family: var(--font-body);
        font-size: 13px;
        text-transform: uppercase;
        letter-spacing: 1px;
        margin-bottom: 14px;
    }

    .footer-grid a {
        display: block;
        color: #cfcabf;
        padding: 4px 0;
        font-size: 14px;
    }

        .footer-grid a:hover {
            color: var(--gold);
        }

.footer-brand {
    color: var(--white);
}

.footer-tagline {
    color: var(--gold);
    font-style: italic;
    margin-top: 8px;
}

.footer-contact {
    font-size: 13px;
}

.footer-note {
    font-size: 13px;
}

.footer-msg {
    display: block;
    font-size: 13px;
    margin-top: 6px;
}

    .footer-msg.success {
        color: #8fd28f;
    }

    .footer-msg.error {
        color: #e09a9a;
    }

.copyright {
    border-top: 1px solid #3a3a37;
    padding: 18px 0;
    font-size: 12px;
    color: #8d897e;
    text-align: center;
}

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

/* ---------- Misc page bits ---------- */
.page-banner {
    background: var(--ink);
    color: var(--white);
    padding: 70px 0 50px;
    text-align: center;
}

    .page-banner h1 {
        color: var(--white);
    }

.breadcrumb {
    color: var(--gold);
    font-size: 12px;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 12px;
}

.form-card {
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 36px;
    box-shadow: var(--shadow);
}

.two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

@media (max-width: 620px) {
    .two-col {
        grid-template-columns: 1fr;
    }
}

.charge-display {
    background: var(--ivory-deep);
    border: 1px dashed var(--gold-deep);
    border-radius: var(--radius);
    padding: 16px 20px;
    margin-bottom: 18px;
    font-weight: 600;
}

.alert {
    padding: 14px 18px;
    border-radius: var(--radius);
    margin-bottom: 18px;
    font-size: 14px;
}

.alert-success {
    background: #e3f3e3;
    color: #2e6b2e;
    border: 1px solid #b9ddb9;
}

.alert-error {
    background: #fbe6e6;
    color: #9c2c2c;
    border: 1px solid #f0bcbc;
}

/* ---------- Admin shell ---------- */
.admin-body {
    background: #f3f1ec;
}

.admin-shell {
    display: flex;
    min-height: 100vh;
}

.admin-sidebar {
    width: 240px;
    background: var(--ink);
    color: #d8d4c9;
    flex-shrink: 0;
}

    .admin-sidebar .brand-mark {
        color: var(--white);
        padding: 24px;
        display: block;
        font-size: 20px;
    }

    .admin-sidebar a {
        display: block;
        padding: 12px 24px;
        font-size: 14px;
        color: #cfcabf;
        border-left: 3px solid transparent;
    }

        .admin-sidebar a:hover, .admin-sidebar a.active {
            background: rgba(255,255,255,.06);
            color: var(--white);
            border-left-color: var(--gold);
        }

.admin-main {
    flex: 1;
    padding: 32px 40px;
}

.admin-topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 28px;
}

.admin-card {
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 24px;
    margin-bottom: 24px;
}

.stat-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 28px;
}

.stat-card {
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 22px;
}

    .stat-card .num {
        font-family: var(--font-display);
        font-size: 32px;
    }

    .stat-card .label {
        font-size: 12px;
        text-transform: uppercase;
        letter-spacing: 1px;
        color: var(--ink-soft);
    }

@media (max-width: 900px) {
    .stat-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .admin-sidebar {
        width: 70px;
    }

        .admin-sidebar a span.label-text {
            display: none;
        }
}

.login-wrap {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--ink);
}

.login-card {
    background: var(--white);
    padding: 44px;
    border-radius: var(--radius);
    width: 360px;
    box-shadow: var(--shadow);
}

.row-actions a {
    margin-right: 10px;
    font-size: 13px;
    font-weight: 600;
    color: var(--gold-deep);
}

    .row-actions a.danger {
        color: #a23b3b;
    }
