:root {
    --ink: #121212;
    --muted: #68625c;
    --line: #ded8cf;
    --paper: #fbfaf7;
    --panel: #ffffff;
    --champagne: #b89b5e;
    --olive: #4f5a45;
    --wine: #6d2539;
    --charcoal: #202326;
    --shadow: 0 20px 60px rgba(28, 25, 21, .10);
}

* {
    box-sizing: border-box;
}

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

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px clamp(18px, 5vw, 64px);
    background: rgba(251, 250, 247, .88);
    border-bottom: 1px solid rgba(222, 216, 207, .72);
    backdrop-filter: blur(16px);
}

.header-center-logo {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.header-center-logo img {
    display: block;
    width: 48px;
    height: auto;
}

.brand {
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.45rem;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.brand-image {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    height: 52px;
    min-width: 0;
}

.brand-image img {
    display: block;
    height: auto;
}

.brand-symbol {
    width: 49px;
}

.brand-wordmark {
    width: auto;
    height: 40px;
    max-width: clamp(128px, 14vw, 190px);
    object-fit: contain;
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 24px;
    color: var(--muted);
    font-size: .94rem;
}

.site-nav a:hover {
    color: var(--ink);
}

.nav-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    margin-left: 4px;
    padding: 0 6px;
    border-radius: 999px;
    background: var(--wine);
    color: #fff;
    font-size: .72rem;
    font-weight: 700;
}

.nav-badge[hidden] {
    display: none;
}

.nav-form {
    margin: 0;
}

.nav-form button,
.login-trigger {
    border: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    cursor: pointer;
}

.login-trigger {
    min-height: 36px;
    padding: 0 14px;
    border: 1px solid var(--ink);
    border-radius: 4px;
    color: var(--ink);
}

.nav-toggle {
    display: none;
}

.hero {
    min-height: calc(100vh - 86px);
    display: grid;
    align-items: end;
    padding: clamp(56px, 8vw, 110px) clamp(18px, 5vw, 64px);
    color: #fff;
    background:
        linear-gradient(180deg, rgba(18, 18, 18, .20), rgba(18, 18, 18, .74)),
        url("https://images.unsplash.com/photo-1519671482749-fd09be7ccebf?auto=format&fit=crop&w=2200&q=80") center/cover;
}

.hero-content {
    max-width: 850px;
}

.eyebrow {
    color: var(--champagne);
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: .16em;
    text-transform: uppercase;
}

h1,
h2,
h3 {
    margin: 0;
    font-family: Georgia, "Times New Roman", serif;
    font-weight: 500;
    line-height: 1.05;
}

h1 {
    margin-top: 16px;
    font-size: clamp(3rem, 8vw, 7rem);
}

h2 {
    font-size: clamp(2rem, 4vw, 4rem);
}

h3 {
    font-size: 1.4rem;
}

p {
    color: var(--muted);
}

.hero p {
    max-width: 670px;
    color: rgba(255, 255, 255, .84);
    font-size: clamp(1.05rem, 2vw, 1.35rem);
}

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

.button,
button.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 20px;
    border: 1px solid var(--ink);
    border-radius: 4px;
    background: var(--ink);
    color: #fff;
    font: inherit;
    cursor: pointer;
}

.button.secondary {
    background: transparent;
    color: inherit;
    border-color: currentColor;
}

.section {
    padding: clamp(54px, 8vw, 110px) clamp(18px, 5vw, 64px);
}

.section.dark {
    background: var(--charcoal);
    color: #fff;
}

.section.dark p {
    color: rgba(255, 255, 255, .74);
}

.section-head {
    display: flex;
    justify-content: space-between;
    gap: 30px;
    margin-bottom: 32px;
}

.section-head p {
    max-width: 560px;
    margin: 0;
}

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

.card {
    padding: 26px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--panel);
    box-shadow: var(--shadow);
}

.metric-card {
    display: grid;
    gap: 8px;
}

.metric {
    color: var(--wine);
    font-family: Georgia, "Times New Roman", serif;
    font-size: 3rem;
    line-height: 1;
}

.dark .card {
    color: #fff;
    background: rgba(255, 255, 255, .06);
    border-color: rgba(255, 255, 255, .16);
    box-shadow: none;
}

.meta {
    color: var(--muted);
    font-size: .9rem;
}

.dark .meta {
    color: rgba(255, 255, 255, .62);
}

.form-panel {
    max-width: 920px;
    padding: clamp(24px, 4vw, 42px);
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    box-shadow: var(--shadow);
}

.contact-section {
    position: relative;
    display: grid;
    justify-items: center;
    overflow: hidden;
    background:
        linear-gradient(135deg, rgba(184, 155, 94, .16), rgba(255, 255, 255, 0) 38%),
        linear-gradient(315deg, rgba(109, 37, 57, .10), rgba(255, 255, 255, 0) 42%),
        #f8f4ec;
}

.contact-section::before {
    content: "";
    position: absolute;
    inset: 32px clamp(18px, 5vw, 64px);
    border: 1px solid rgba(184, 155, 94, .28);
    pointer-events: none;
}

.contact-head {
    position: relative;
    z-index: 1;
    display: grid;
    justify-items: center;
    max-width: 760px;
    text-align: center;
}

.contact-head p {
    max-width: 640px;
}

.contact-panel {
    position: relative;
    z-index: 1;
    width: min(100%, 880px);
    border-color: rgba(184, 155, 94, .42);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, .96), rgba(255, 255, 255, .90)),
        #fff;
    box-shadow: 0 28px 90px rgba(56, 45, 34, .16);
}

.contact-panel::before {
    content: "";
    display: block;
    width: 72px;
    height: 2px;
    margin: 0 auto 28px;
    background: var(--champagne);
}

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

.filter-bar {
    display: grid;
    grid-template-columns: 1.4fr repeat(2, minmax(180px, .7fr)) auto;
    align-items: end;
    gap: 14px;
    margin-bottom: 22px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
}

.filter-actions {
    display: flex;
    gap: 10px;
}

.field {
    display: grid;
    gap: 8px;
}

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

label {
    color: #36322f;
    font-size: .86rem;
    font-weight: 700;
}

input,
select,
textarea {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 4px;
    padding: 13px 14px;
    background: #fff;
    color: var(--ink);
    font: inherit;
}

.contact-panel input,
.contact-panel select,
.contact-panel textarea {
    background: #fdfbf7;
    border-color: rgba(184, 155, 94, .34);
}

.contact-panel input:focus,
.contact-panel select:focus,
.contact-panel textarea:focus {
    outline: 2px solid rgba(184, 155, 94, .22);
    border-color: var(--champagne);
}

.password-field {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: stretch;
}

.password-field input {
    border-radius: 4px 0 0 4px;
}

.password-field button {
    min-width: 78px;
    border: 1px solid var(--line);
    border-left: 0;
    border-radius: 0 4px 4px 0;
    background: #f8f5ef;
    color: var(--ink);
    font: inherit;
    cursor: pointer;
}

.modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 30;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 22px;
    background: rgba(18, 18, 18, .58);
}

.modal-backdrop.is-open {
    display: flex;
}

.login-modal {
    position: relative;
    width: min(100%, 460px);
    padding: 34px;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 30px 90px rgba(0, 0, 0, .28);
}

.login-modal h2 {
    margin-top: 10px;
    font-size: 2rem;
}

.login-modal .field {
    margin-top: 16px;
}

.modal-close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 34px;
    height: 34px;
    border: 1px solid var(--line);
    border-radius: 50%;
    background: #fff;
    color: var(--ink);
    cursor: pointer;
}

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

.checkbox {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    color: var(--muted);
    font-size: .92rem;
}

.checkbox input {
    width: auto;
    margin-top: 4px;
}

.file-field input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
}

.file-field .file-trigger {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    min-height: 46px;
    padding: 0 16px;
    border: 1px dashed var(--champagne);
    border-radius: 4px;
    color: var(--wine);
    cursor: pointer;
}

.notice {
    margin-bottom: 18px;
    padding: 14px 16px;
    border-radius: 4px;
    background: #eef5ef;
    color: #244126;
}

.error {
    margin-bottom: 18px;
    padding: 14px 16px;
    border-radius: 4px;
    background: #f8ecec;
    color: #7f1d1d;
}

.table-wrap {
    overflow-x: auto;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 760px;
}

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

th {
    color: var(--muted);
    font-size: .78rem;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.is-new-row {
    background: #fffaf0;
}

.status-pill {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0 10px;
    border-radius: 999px;
    font-size: .82rem;
    font-weight: 700;
}

.status-pill.new {
    background: #f7e8bb;
    color: #6b4b00;
}

.status-pill.read {
    background: #edf1ed;
    color: #405343;
}

.link-button {
    border: 0;
    padding: 0;
    background: transparent;
    color: var(--wine);
    font: inherit;
    text-decoration: underline;
    cursor: pointer;
}

.inline-action {
    margin-top: 8px;
}

.url-preview {
    max-width: 260px;
    margin-bottom: 6px;
    color: var(--muted);
    font-size: .86rem;
    overflow-wrap: anywhere;
}

.file-list {
    display: grid;
    gap: 8px;
    margin: 0;
    padding-left: 18px;
}

.file-list a {
    overflow-wrap: anywhere;
}

.file-list .meta {
    display: block;
}

.site-footer {
    padding: 42px clamp(18px, 5vw, 64px);
    border-top: 1px solid var(--line);
    color: var(--muted);
}

.footer-inner {
    display: grid;
    grid-template-columns: .8fr 1.35fr repeat(3, minmax(0, 1fr));
    align-items: start;
    gap: clamp(24px, 4vw, 54px);
    width: min(82vw, 1180px);
    margin: 0 auto;
}

.footer-column {
    display: grid;
    gap: 10px;
    align-content: start;
}

.footer-column strong {
    color: var(--ink);
}

.footer-brand strong {
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.25rem;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.footer-logo-column {
    justify-items: start;
}

.footer-logo {
    width: min(160px, 100%);
    height: auto;
}

.footer-brand p {
    max-width: 300px;
    margin: 0;
}

.footer-brand small {
    max-width: 320px;
    color: var(--muted);
}

.footer-column a,
.footer-column button {
    width: fit-content;
    border: 0;
    padding: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    justify-content: center;
}

.footer-links button {
    border: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    cursor: pointer;
}

.legal-page {
    max-width: 1120px;
    margin: 0 auto;
}

.legal-content {
    padding: clamp(24px, 4vw, 44px);
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    box-shadow: var(--shadow);
}

.legal-content h2 {
    margin-top: 30px;
    font-size: 1.55rem;
}

.legal-content h2:first-child {
    margin-top: 0;
}

.legal-content a {
    color: var(--wine);
    text-decoration: underline;
}

.cookie-banner {
    position: fixed;
    right: clamp(16px, 4vw, 44px);
    bottom: clamp(16px, 4vw, 44px);
    z-index: 40;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 22px;
    width: min(840px, calc(100vw - 32px));
    padding: 22px;
    border: 1px solid rgba(184, 155, 94, .42);
    border-radius: 8px;
    background: rgba(255, 255, 255, .96);
    box-shadow: 0 24px 80px rgba(0, 0, 0, .20);
    backdrop-filter: blur(16px);
}

.cookie-banner[hidden] {
    display: none;
}

.cookie-banner p {
    margin: 6px 0 0;
}

.cookie-banner a {
    display: inline-block;
    margin-top: 8px;
    color: var(--wine);
    text-decoration: underline;
}

.cookie-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
}

.cookie-choice {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 140px;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-top: 14px;
    min-height: 104px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fdfbf7;
}

.cookie-choice.is-locked {
    background: #f8f5ef;
}

.cookie-copy {
    display: grid;
    gap: 4px;
}

.cookie-status {
    color: var(--olive);
    font-size: .86rem;
    font-weight: 700;
    text-align: right;
}

.cookie-choice p,
.cookie-choice small {
    display: block;
    margin: 0;
    color: var(--muted);
}

.cookie-choice input {
    width: 22px;
    height: 22px;
    justify-self: end;
}

.cookie-modal {
    width: min(100%, 760px);
    max-height: min(86vh, 780px);
    overflow-y: auto;
}

.cookie-modal .actions {
    justify-content: flex-end;
}

@media (max-width: 820px) {
    .nav-toggle {
        display: inline-flex;
        border: 1px solid var(--line);
        border-radius: 4px;
        padding: 8px 12px;
        background: transparent;
    }

    .brand-symbol {
        width: 41px;
    }

    .brand-wordmark {
        width: auto;
        height: 32px;
        max-width: 116px;
    }

    .brand-image {
        height: 42px;
    }

    .header-center-logo {
        display: none;
    }

    .site-nav {
        display: none;
        position: absolute;
        inset: 66px 18px auto;
        flex-direction: column;
        align-items: stretch;
        padding: 18px;
        background: #fff;
        border: 1px solid var(--line);
        border-radius: 8px;
        box-shadow: var(--shadow);
    }

    .site-nav .nav-form,
    .site-nav .nav-form button,
    .site-nav .login-trigger {
        width: 100%;
        text-align: left;
    }

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

    .section-head,
    .site-footer {
        display: grid;
    }

    .footer-inner {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        width: 100%;
    }

    .cookie-banner {
        grid-template-columns: 1fr;
    }

    .cookie-actions {
        justify-content: flex-start;
    }

    .cookie-choice {
        grid-template-columns: 1fr;
    }

    .cookie-choice input {
        justify-self: start;
    }

    .cookie-status {
        text-align: left;
    }

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

    .filter-actions {
        flex-wrap: wrap;
    }
}

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