/* Esquires Table Ordering — Landing styles */

:root {
    --color-cream: #F8F4EF;
    --color-espresso: #3B2F2F;
    --color-green: #2D5A3D;
    --color-green-light: #3d7352;
    --color-white: #ffffff;
    --color-muted: #6b5e5e;
    --color-border: #e8dfd4;
    --color-surface: #ffffff;
    --color-surface-alt: #F8F4EF;
    --color-hero-gradient-end: #eef5f0;
    --color-footer-bg: #3B2F2F;
    --color-footer-text: rgba(255, 255, 255, 0.75);
    --color-footer-link: rgba(255, 255, 255, 0.85);
    --color-link: #2D5A3D;
    --color-link-hover: #3d7352;
    --color-focus: #2D5A3D;
    --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --text-scale: 1;
    --shadow-sm: 0 1px 3px rgba(59, 47, 47, 0.08);
    --shadow-md: 0 4px 16px rgba(59, 47, 47, 0.1);
    --radius: 12px;
    --radius-lg: 20px;
    --max-width: 1100px;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: var(--font-sans);
    font-size: 1rem;
    line-height: 1.6;
    color: var(--color-espresso);
    background-color: var(--color-cream);
    -webkit-font-smoothing: antialiased;
}

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

a {
    color: var(--color-link);
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}

a:hover {
    color: var(--color-link-hover);
}

.container {
    width: 100%;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 1.25rem;
}

.skip-link {
    position: absolute;
    top: -100%;
    left: 1rem;
    z-index: 200;
    padding: 0.5rem 1rem;
    background: var(--color-green);
    color: var(--color-white);
    border-radius: var(--radius);
}

.skip-link:focus {
    top: 1rem;
}

/* Header */

.site-header {
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-border);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-sm);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 4rem;
    gap: 1rem;
    flex-wrap: wrap;
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    text-decoration: none;
    color: var(--color-espresso);
    font-weight: 700;
    font-size: 1.25rem;
}

.brand:hover {
    color: var(--color-green);
}

.brand-logo {
    flex-shrink: 0;
}

.site-nav {
    display: flex;
    gap: 1.5rem;
}

.site-nav a {
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    color: var(--color-muted);
}

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

/* Hero */

.hero {
    padding: 3.5rem 0 4rem;
    background: linear-gradient(160deg, var(--color-surface) 0%, var(--color-cream) 55%, var(--color-hero-gradient-end) 100%);
}

.hero-inner {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2.5rem;
    align-items: center;
}

.hero-content {
    max-width: 36rem;
}

.hero-eyebrow {
    display: inline-block;
    margin: 0 0 1rem;
    padding: 0.35rem 0.85rem;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--color-green);
    background: rgba(45, 90, 61, 0.1);
    border-radius: 999px;
}

.hero h1 {
    margin: 0 0 1rem;
    font-size: clamp(2rem, 5vw, 3rem);
    line-height: 1.15;
    font-weight: 800;
    color: var(--color-espresso);
}

.hero-lead {
    margin: 0 0 1.75rem;
    font-size: 1.125rem;
    color: var(--color-muted);
    max-width: 32rem;
}

.hero-cta {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.9rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    color: var(--color-white);
    background: var(--color-green);
    border: none;
    border-radius: var(--radius);
    text-decoration: none;
    box-shadow: var(--shadow-md);
    cursor: pointer;
    font-family: inherit;
    line-height: 1.2;
}

.hero-cta:hover,
.hero-cta:focus-visible {
    background: var(--color-green-light);
    color: var(--color-white);
}

.hero-cta-icon {
    width: 1.25rem;
    height: 1.25rem;
    flex-shrink: 0;
}

.hero-note {
    margin: 1rem 0 0;
    font-size: 0.875rem;
    color: var(--color-muted);
}

.hero-visual {
    display: flex;
    justify-content: center;
}

.hero-card {
    width: 100%;
    max-width: 20rem;
    padding: 2rem;
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    text-align: center;
    border: 1px solid var(--color-border);
}

.hero-card-qr {
    width: 8rem;
    height: 8rem;
    margin: 0 auto 1.25rem;
    padding: 0.75rem;
    background: var(--color-cream);
    border-radius: var(--radius);
    border: 2px dashed var(--color-green);
}

.hero-card-qr svg {
    width: 100%;
    height: 100%;
}

.hero-card p {
    margin: 0;
    font-weight: 600;
    color: var(--color-espresso);
}

.hero-card span {
    display: block;
    margin-top: 0.35rem;
    font-size: 0.875rem;
    font-weight: 400;
    color: var(--color-muted);
}

/* Sections */

.section {
    padding: 4rem 0;
}

.section-alt {
    background: var(--color-surface);
}

.section-header {
    text-align: center;
    max-width: 36rem;
    margin: 0 auto 3rem;
}

.section-header h2 {
    margin: 0 0 0.75rem;
    font-size: clamp(1.75rem, 4vw, 2.25rem);
    font-weight: 800;
    color: var(--color-espresso);
}

.section-header p {
    margin: 0;
    color: var(--color-muted);
    font-size: 1.05rem;
}

/* Steps */

.steps-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

.step-card {
    padding: 1.75rem;
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    border: 1px solid var(--color-border);
    box-shadow: var(--shadow-sm);
}

.section-alt .step-card {
    background: var(--color-surface-alt);
}

.step-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    margin-bottom: 1rem;
    font-size: 1rem;
    font-weight: 700;
    color: var(--color-white);
    background: var(--color-green);
    border-radius: 50%;
}

.step-icon {
    width: 2rem;
    height: 2rem;
    margin-bottom: 0.75rem;
    color: var(--color-green);
}

.step-card h3 {
    margin: 0 0 0.5rem;
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--color-espresso);
}

.step-card p {
    margin: 0;
    font-size: 0.95rem;
    color: var(--color-muted);
}

/* Benefits */

.benefits-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

.benefit-card {
    padding: 2rem;
    background: var(--color-surface-alt);
    border-radius: var(--radius-lg);
    border: 1px solid var(--color-border);
}

.benefit-card h3 {
    margin: 0 0 0.5rem;
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--color-green);
}

.benefit-card p {
    margin: 0;
    color: var(--color-muted);
    font-size: 0.95rem;
}

/* Staff placeholder */

.staff-placeholder {
    padding: 4rem 0 5rem;
    min-height: 50vh;
    display: flex;
    align-items: center;
}

.staff-placeholder-card {
    max-width: 28rem;
    margin: 0 auto;
    padding: 2.5rem;
    text-align: center;
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    border: 1px solid var(--color-border);
    box-shadow: var(--shadow-md);
}

.staff-placeholder-card h1 {
    margin: 0 0 0.75rem;
    font-size: 1.75rem;
    color: var(--color-espresso);
}

.staff-placeholder-card p {
    margin: 0 0 1.5rem;
    color: var(--color-muted);
}

.staff-back-link {
    display: inline-block;
    font-weight: 600;
    text-decoration: none;
}

/* Footer */

.site-footer {
    padding: 1.75rem 0;
    background: var(--color-footer-bg);
    color: var(--color-footer-text);
    font-size: 0.875rem;
}

.footer-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.footer-copy {
    margin: 0;
}

.footer-staff-link {
    color: var(--color-footer-link);
    text-decoration: none;
    font-weight: 500;
}

.footer-staff-link:hover {
    color: var(--color-cream);
}

/* Responsive */

@media (max-width: 639px) {
    .header-actions {
        width: 100%;
        justify-content: space-between;
    }

    .site-nav {
        gap: 1rem;
    }
}

@media (min-width: 640px) {
    .steps-grid {
        grid-template-columns: repeat(2, 1fr);
    }

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

@media (min-width: 900px) {
    .hero-inner {
        grid-template-columns: 1.2fr 1fr;
    }

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

/* QR scanner modal (home page) */
body.qr-scanner-open {
    overflow: hidden;
    position: fixed;
    width: 100%;
    left: 0;
    right: 0;
}

.qr-scanner-modal {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: flex;
    align-items: stretch;
    justify-content: center;
    padding: 0;
    background: rgba(0, 0, 0, 0.92);
}

.qr-scanner-modal[hidden] {
    display: none !important;
}

.qr-scanner-dialog {
    width: 100%;
    max-width: none;
    min-height: 100dvh;
    min-height: 100svh;
    background: var(--color-white);
    color: var(--color-espresso);
    border-radius: 0;
    box-shadow: none;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.qr-scanner-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1rem 0.75rem;
    border-bottom: 1px solid var(--color-border, #e5e7eb);
    flex-shrink: 0;
}

.qr-scanner-title {
    margin: 0;
    font-size: 1.125rem;
    font-weight: 700;
}

.qr-scanner-close {
    border: none;
    background: transparent;
    font-size: 1.75rem;
    line-height: 1;
    cursor: pointer;
    color: inherit;
    padding: 0.25rem 0.5rem;
}

.qr-reader {
    flex: 1 1 auto;
    min-height: 0;
    background: #111;
}

.qr-scanner-status {
    margin: 0;
    padding: 1rem;
    font-size: 0.9375rem;
    color: var(--color-muted);
    flex-shrink: 0;
}

.qr-scanner-status.is-error {
    color: #b42318;
}

#qr-reader video {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover;
}

#qr-reader__scan_region,
#qr-reader__dashboard {
    min-height: 100% !important;
}

@media (min-width: 768px) {
    .qr-scanner-modal {
        align-items: center;
        padding: 1rem;
        background: rgba(0, 0, 0, 0.72);
    }

    .qr-scanner-dialog {
        width: min(100%, 28rem);
        min-height: 0;
        max-height: min(90dvh, 40rem);
        border-radius: var(--radius-lg, 1rem);
        box-shadow: var(--shadow-lg);
    }

    .qr-reader {
        min-height: 18rem;
        flex: 1 1 auto;
    }
}
