/* The Directory: full-screen photo with search, then a quiet index of names.
   Same palette and type as the homepage. */

body.page-directory {
    overflow: auto;
    background: var(--color-base);
    color: var(--text-light);
    line-height: 1.5;
}

body.page-directory.drawer-open {
    overflow: hidden;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

/* ── Photo hero ────────────────────────────────────────────────────────── */
.dh {
    position: relative;
    height: 100vh;
    height: 100dvh;
    min-height: 520px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.dh-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.62) contrast(1.08);
}

.dh-shade {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at center 45%, rgba(24, 18, 22, 0.55) 0%, rgba(24, 18, 22, 0.15) 55%, transparent 75%),
        linear-gradient(to bottom, transparent 60%, var(--color-base) 100%);
}

.dh-nav {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    padding: 20px clamp(16px, 4vw, 40px);
}

.dh-nav a {
    color: var(--color-champagne);
    text-decoration: none;
    letter-spacing: 0.04em;
    font-size: 0.95rem;
    text-shadow: 0 1px 10px rgba(0, 0, 0, 0.6);
    transition: color 0.3s ease;
}

.dh-nav a:hover {
    color: var(--color-rose);
}

.dh-center {
    position: relative;
    width: min(640px, 100% - 32px);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 18px;
}

.dh-logo {
    width: clamp(200px, 30vw, 340px);
    height: auto;
    filter: drop-shadow(0 4px 26px rgba(24, 18, 22, 0.75));
}

.dh-tagline {
    font-size: clamp(1rem, 2.2vw, 1.2rem);
    text-shadow: 0 1px 12px rgba(0, 0, 0, 0.7);
}

.dh-search {
    display: flex;
    width: 100%;
    margin-top: 6px;
    background: rgba(24, 18, 22, 0.72);
    border: 1px solid var(--color-mauve);
    border-radius: 999px;
    overflow: hidden;
    backdrop-filter: blur(6px);
    transition: border-color 0.3s ease;
}

.dh-search:focus-within {
    border-color: var(--color-champagne);
}

.dh-search input {
    flex: 1;
    min-width: 0;
    padding: 16px 22px;
    font: inherit;
    font-size: 1rem;
    color: var(--text-light);
    background: transparent;
    border: none;
    outline: none;
}

.dh-search input::placeholder {
    color: var(--text-light);
    opacity: 0.55;
}

.dh-search button {
    padding: 0 26px;
    font: inherit;
    letter-spacing: 0.06em;
    color: var(--color-base);
    background: var(--color-champagne);
    border: none;
    cursor: pointer;
    transition: background 0.3s ease;
}

.dh-search button:hover {
    background: var(--color-rose);
}

.dh-status {
    min-height: 1.5em;
    font-size: 0.9rem;
    opacity: 0.8;
    text-shadow: 0 1px 10px rgba(0, 0, 0, 0.7);
}

.dh-down {
    position: absolute;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    color: var(--color-champagne);
    opacity: 0.8;
    animation: dh-bob 2.4s ease-in-out infinite;
}

.dh-down:hover {
    color: var(--color-rose);
    opacity: 1;
}

@keyframes dh-bob {
    0%, 100% { transform: translate(-50%, 0); }
    50%      { transform: translate(-50%, 8px); }
}

@media (prefers-reduced-motion: reduce) {
    .dh-down { animation: none; }
}

/* ── The index of names ────────────────────────────────────────────────── */
.dx {
    max-width: 1100px;
    margin: 0 auto;
    padding: 56px clamp(16px, 4vw, 48px) 96px;
    scroll-margin-top: 0;
}

.dx-filter {
    margin-bottom: 32px;
    opacity: 0.85;
}

.dx-group + .dx-group {
    margin-top: 52px;
}

.dx-group h2 {
    display: flex;
    align-items: baseline;
    gap: 12px;
    padding-bottom: 12px;
    margin-bottom: 18px;
    border-bottom: 1px solid var(--color-berry);
    font-family: 'Harmond', serif;
    font-weight: 800;
    font-size: clamp(1.05rem, 2.2vw, 1.45rem);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--color-champagne);
}

.dx-group h2 span {
    font-family: 'Absans', sans-serif;
    font-weight: 400;
    font-size: 0.85rem;
    letter-spacing: 0.05em;
    color: #a99ba2; /* readable muted tone; mauve on base failed contrast (1.99:1) */
}

.dx-names {
    list-style: none;
    columns: 3 240px;
    column-gap: 40px;
}

.dx-names li {
    break-inside: avoid;
}

.dx-name {
    display: block;
    width: 100%;
    padding: 7px 0;
    font: inherit;
    font-size: 1.02rem;
    text-align: left;
    color: var(--text-light);
    background: none;
    border: none;
    cursor: pointer;
    transition: color 0.25s ease, transform 0.25s var(--transition-curve);
}

.dx-name:hover,
.dx-name:focus-visible {
    color: var(--color-rose);
    transform: translateX(4px);
    outline: none;
}

.dx-empty {
    opacity: 0.85;
}

.linklike {
    font: inherit;
    color: var(--color-rose);
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
}

.linklike:hover {
    text-decoration: underline;
}

/* ── Details drawer ────────────────────────────────────────────────────── */
.drawer-backdrop {
    position: fixed;
    inset: 0;
    z-index: 30;
    background: rgba(24, 18, 22, 0.6);
    opacity: 0;
    transition: opacity 0.35s ease;
}

.drawer-open .drawer-backdrop {
    opacity: 1;
}

.drawer {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    z-index: 31;
    width: min(440px, 100%);
    background: linear-gradient(170deg, var(--color-plum) 0%, var(--color-base) 85%);
    border-left: 1px solid var(--color-berry);
    box-shadow: -20px 0 60px rgba(0, 0, 0, 0.45);
    transform: translateX(100%);
    visibility: hidden;
    transition: transform 0.45s var(--transition-curve), visibility 0s linear 0.45s;
}

.drawer-open .drawer {
    transform: translateX(0);
    visibility: visible;
    transition: transform 0.45s var(--transition-curve), visibility 0s;
}

.drawer-close {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 1;
    width: 40px;
    height: 40px;
    font: inherit;
    font-size: 1.5rem;
    line-height: 1;
    color: var(--color-champagne);
    background: rgba(24, 18, 22, 0.5);
    border: 1px solid var(--color-mauve);
    border-radius: 50%;
    cursor: pointer;
    transition: color 0.3s ease, border-color 0.3s ease;
}

.drawer-close:hover {
    color: var(--color-rose);
    border-color: var(--color-rose);
}

.drawer-body {
    height: 100%;
    overflow-y: auto;
    padding: 64px 28px 36px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.dd-cat {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--color-rose);
}

.dd-name {
    font-size: 1.7rem;
    font-weight: 400;
    line-height: 1.2;
    color: var(--color-champagne);
}

.dd-status {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 14px;
    font-size: 0.9rem;
    opacity: 0.9;
}

.dd-badge {
    font-size: 0.72rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 4px 10px;
    border-radius: 999px;
}

.dd-badge--open {
    color: var(--color-base);
    background: var(--color-champagne);
}

.dd-badge--closed {
    border: 1px solid var(--color-rust);
}

.dd-line {
    font-size: 0.92rem;
    opacity: 0.8;
}

.dd-about {
    font-size: 1rem;
    opacity: 0.9;
}

.dd-note {
    font-size: 0.92rem;
    padding: 12px 14px;
    background: rgba(64, 39, 54, 0.5);
    border-left: 2px solid var(--color-rose);
}

.dd-specials h3 {
    font-size: 0.78rem;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--color-rose);
    margin-bottom: 6px;
}

.dd-specials p {
    font-size: 0.92rem;
    padding: 4px 0;
}

.dd-specials b {
    color: var(--color-champagne);
    font-weight: 400;
    margin-left: 6px;
}

.dd-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.dd-tags span {
    font-size: 0.75rem;
    padding: 3px 10px;
    border: 1px solid var(--color-berry);
    border-radius: 999px;
}

.dd-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 6px;
}

.dd-btn {
    display: inline-block;
    padding: 10px 16px;
    font-size: 0.9rem;
    letter-spacing: 0.04em;
    text-decoration: none;
    color: var(--color-champagne);
    border: 1px solid var(--color-mauve);
    border-radius: 2px;
    transition: background 0.3s ease, border-color 0.3s ease, color 0.3s ease;
}

.dd-btn:hover {
    background: var(--color-berry);
    border-color: var(--color-rose);
    color: var(--color-rose);
}

.dd-btn--solid {
    color: var(--color-base);
    background: var(--color-champagne);
    border-color: var(--color-champagne);
}

.dd-btn--solid:hover {
    color: var(--color-base);
    background: var(--color-rose);
    border-color: var(--color-rose);
}

.dd-owner {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: auto;
    padding-top: 20px;
    border-top: 1px solid var(--color-berry);
}

.dd-owner a {
    font-size: 0.8rem;
    color: var(--text-light);
    opacity: 0.55;
    text-decoration: none;
}

.dd-owner a:hover {
    opacity: 0.95;
    color: var(--color-rose);
}

/* Phones: the drawer comes up from the bottom as a sheet */
@media (max-width: 768px) {
    .drawer {
        top: auto;
        left: 0;
        width: 100%;
        max-height: 85vh;
        max-height: 85dvh;
        border-left: none;
        border-top: 1px solid var(--color-berry);
        border-radius: 14px 14px 0 0;
        box-shadow: 0 -20px 60px rgba(0, 0, 0, 0.45);
        transform: translateY(100%);
    }

    .drawer-open .drawer {
        transform: translateY(0);
    }

    .drawer-body {
        height: auto;
        max-height: 85vh;
        max-height: 85dvh;
        padding: 58px 22px 28px;
    }

    .dx-names {
        columns: 1;
    }

    .dh-search input {
        padding: 14px 18px;
    }

    .dh-search button {
        padding: 0 18px;
    }
}

/* ── Get listed form ───────────────────────────────────────────────────── */
.join {
    border-top: 1px solid var(--color-berry);
    background: linear-gradient(180deg, var(--color-base) 0%, var(--color-plum) 100%);
    padding: 72px clamp(16px, 4vw, 48px) 96px;
    scroll-margin-top: 0;
}

.join-inner {
    max-width: 720px;
    margin: 0 auto;
}

.join h2 {
    font-family: 'Harmond', serif;
    font-weight: 800;
    font-size: clamp(1.3rem, 3vw, 2rem);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-champagne);
}

.join-sub {
    margin: 10px 0 32px;
    opacity: 0.8;
}

.join-form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px 20px;
}

.join-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

.join-field--wide {
    grid-column: 1 / -1;
}

.join-field label {
    font-size: 0.85rem;
    letter-spacing: 0.04em;
    color: var(--color-champagne);
}

.join-count {
    float: right;
    opacity: 0.6;
    color: var(--text-light);
}

.join-field input,
.join-field select,
.join-field textarea {
    width: 100%;
    padding: 12px 14px;
    font: inherit;
    font-size: 1rem;
    color: var(--text-light);
    background: rgba(24, 18, 22, 0.6);
    border: 1px solid var(--color-mauve);
    border-radius: 2px;
    outline: none;
    resize: vertical;
    transition: border-color 0.3s ease;
}

.join-field select option {
    background: var(--color-base);
}

.join-field input:focus,
.join-field select:focus,
.join-field textarea:focus {
    border-color: var(--color-champagne);
}

.join-check {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    font-size: 0.92rem;
    cursor: pointer;
}

.join-check input {
    margin-top: 4px;
    accent-color: var(--color-rose);
}

.join-hp {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    opacity: 0;
}

.join-submit {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px;
    margin-top: 6px;
}

.join-submit button {
    padding: 14px 30px;
    font: inherit;
    letter-spacing: 0.06em;
    color: var(--color-base);
    background: var(--color-champagne);
    border: none;
    border-radius: 999px;
    cursor: pointer;
    transition: background 0.3s ease, opacity 0.3s ease;
}

.join-submit button:hover {
    background: var(--color-rose);
}

.join-submit button:disabled {
    opacity: 0.6;
    cursor: default;
}

.join-msg {
    font-size: 0.95rem;
}

.join-msg.is-ok {
    color: var(--color-champagne);
}

.join-msg.is-err {
    color: var(--color-rose);
}

@media (max-width: 640px) {
    .join-form {
        grid-template-columns: 1fr;
    }
}
