/* ==========================================================================
   Base styles: shared by the booking wizard, the landing page and the admin.
   Brand colours arrive as CSS variables from the settings table, so a new
   client changes colours without touching this file.
   ========================================================================== */

:root {
    --brand: #1f4632;
    --brand-ink: #13261c;
    --brand-accent: #b8902e;

    --paper: #fbf8f1;
    --surface: #ffffff;
    --surface-warm: #fdfbf6;

    --ink: #17211b;
    --ink-soft: #5f6f65;
    --line: #e4ded1;
    --line-strong: #d3cbbc;

    --danger: #8c2f27;
    --danger-bg: #fbeceb;
    --info-bg: #eef3ee;

    --radius-sm: 10px;
    --radius: 14px;
    --radius-lg: 20px;

    --shadow-sm: 0 1px 2px rgba(23, 33, 27, 0.05);
    --shadow: 0 2px 4px rgba(23, 33, 27, 0.04), 0 12px 32px rgba(23, 33, 27, 0.06);

    --serif: ui-serif, "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
    --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

    --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);

    --wrap: 68rem;
}

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

html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font: 16px/1.6 var(--sans);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

.wrap {
    width: min(100% - 2.5rem, var(--wrap));
    margin-inline: auto;
}

/* ---------------------------------------------------------------- type */

h1, h2, h3 {
    line-height: 1.2;
    margin: 0 0 0.5rem;
    letter-spacing: -0.012em;
}

h1 {
    font: 400 clamp(1.75rem, 4vw, 2.5rem)/1.15 var(--serif);
}

h2 {
    font: 400 1.375rem/1.25 var(--serif);
}

h3 {
    font-size: 1.0625rem;
    font-weight: 600;
}

p {
    margin: 0 0 0.875rem;
}

a {
    color: var(--brand);
    text-underline-offset: 0.15em;
}

code {
    font-size: 0.875em;
    background: #f1ede3;
    padding: 0.1em 0.35em;
    border-radius: 5px;
}

.muted {
    color: var(--ink-soft);
}

.small {
    font-size: 0.9375rem;
}

.eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.14em;
    font-size: 0.6875rem;
    font-weight: 700;
    color: #7d5f16;
    color: color-mix(in oklab, var(--brand-accent) 68%, #1a1408);
    margin-bottom: 0.35rem;
}

.lede {
    font-size: 1.0625rem;
    color: var(--ink-soft);
    max-width: 40rem;
}

/* ---------------------------------------------------------------- header */

.site-header {
    background: var(--brand);
    color: #fff;
}

.site-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    min-height: 4.25rem;
}

.wordmark {
    color: #fff;
    font-family: var(--serif);
    font-size: 1.125rem;
    text-decoration: none;
    letter-spacing: 0.01em;
}

.site-nav a {
    color: #fff;
    opacity: 0.8;
    text-decoration: none;
    padding: 0.75rem 0.5rem;
    display: inline-block;
}

.site-nav a:hover,
.site-nav a:focus-visible {
    opacity: 1;
}

.site-footer {
    margin-top: 4rem;
    padding-block: 2rem;
    border-top: 1px solid var(--line);
    color: var(--ink-soft);
    font-size: 0.9375rem;
}

.site-footer p {
    margin: 0.25rem 0;
}

/* ---------------------------------------------------------------- blocks */

.card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    padding: 1.5rem;
    margin-block: 1.25rem;
}

.notice {
    border-radius: var(--radius);
    padding: 1rem 1.125rem;
    border: 1px solid var(--line);
    background: var(--surface);
}

.notice--info {
    background: var(--info-bg);
    border-color: #d6e0d7;
}

.notice--warning {
    background: #fdf6e6;
    border-color: #e9dcb8;
}

.notice--error {
    background: var(--danger-bg);
    border-color: #e8c4c0;
    color: var(--danger);
}

.badge {
    display: inline-block;
    font-size: 0.625rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    background: var(--brand-accent);
    color: #fff;
    border-radius: 999px;
    padding: 0.2rem 0.5rem;
    font-weight: 700;
    vertical-align: middle;
}

.badge--quiet {
    background: #ebe6da;
    color: var(--ink-soft);
}

/* ---------------------------------------------------------------- forms */

.field {
    margin-bottom: 1.125rem;
}

.field label {
    display: block;
    font-weight: 600;
    font-size: 0.875rem;
    margin-bottom: 0.4rem;
}

.field__optional {
    font-weight: 400;
    color: var(--ink-soft);
}

.field input,
.field textarea {
    width: 100%;
    padding: 0.75rem 0.875rem;
    font: inherit;
    font-size: 1rem;
    color: var(--ink);
    background: #fff;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-sm);
    min-height: 48px;
    transition: border-color 0.15s var(--ease), box-shadow 0.15s var(--ease);
}

.field textarea {
    min-height: 96px;
    resize: vertical;
}

.field input:focus,
.field textarea:focus {
    outline: none;
    border-color: var(--brand);
    box-shadow: 0 0 0 3px rgba(31, 70, 50, 0.14);
}

.field input[aria-invalid="true"],
.field textarea[aria-invalid="true"] {
    border-color: #c1766f;
    box-shadow: 0 0 0 3px rgba(140, 47, 39, 0.1);
}

.field__help {
    margin: 0.35rem 0 0;
    font-size: 0.8125rem;
    color: var(--ink-soft);
}

.field__error {
    margin: 0.35rem 0 0;
    font-size: 0.8125rem;
    color: var(--danger);
    font-weight: 500;
}

.field-row {
    display: grid;
    gap: 0 1rem;
}

@media (min-width: 30rem) {
    .field-row {
        grid-template-columns: 1fr 1fr;
    }
}

.button,
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background: var(--brand);
    color: #fff;
    border: 1px solid transparent;
    border-radius: 999px;
    padding: 0.8rem 1.5rem;
    font: inherit;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    min-height: 48px;
    transition: transform 0.16s var(--ease), background 0.16s var(--ease), box-shadow 0.16s var(--ease);
}

.button:hover,
.btn--primary:hover {
    background: var(--brand-ink);
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(19, 38, 28, 0.18);
}

.button:active,
.btn--primary:active {
    transform: translateY(0) scale(0.995);
}

.btn--ghost {
    background: transparent;
    color: var(--brand);
    border-color: var(--line-strong);
}

.btn--ghost:hover {
    background: #fff;
    box-shadow: var(--shadow-sm);
    transform: none;
}

.btn--quiet {
    background: transparent;
    color: var(--ink-soft);
    border-color: transparent;
}

.btn--quiet:hover {
    background: #f1ede3;
    color: var(--ink);
    transform: none;
    box-shadow: none;
}

.btn:disabled,
.button:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* ---------------------------------------------------------------- tables */

.table-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9375rem;
    margin-top: 0.5rem;
}

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

th {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--ink-soft);
}

/* ---------------------------------------------------------------- admin */

.auth {
    max-width: 26rem;
    margin: 3.5rem auto;
}

.admin-header {
    display: flex;
    align-items: start;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    margin-block: 2.5rem 1rem;
}

.stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
    margin-block: 1.5rem;
}

@media (min-width: 40rem) {
    .stats {
        grid-template-columns: repeat(4, 1fr);
    }
}

.stat {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 1rem;
}

.stat__value {
    display: block;
    font: 400 1.875rem/1.1 var(--serif);
    color: var(--brand);
}

.stat__label {
    font-size: 0.8125rem;
    color: var(--ink-soft);
}

.plain-list {
    margin: 0.75rem 0 0;
    padding-left: 1.25rem;
}

.plain-list li {
    margin-bottom: 0.3rem;
}

.catalogue__heading {
    margin-top: 1.5rem;
    padding-bottom: 0.35rem;
    border-bottom: 2px solid var(--brand-accent);
}

.chips {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin: 0.5rem 0 0;
    padding: 0;
}

.chip {
    display: inline-flex;
    align-items: baseline;
    gap: 0.35rem;
    background: var(--info-bg);
    border: 1px solid #d9e2da;
    border-radius: 999px;
    padding: 0.25rem 0.65rem;
    font-size: 0.875rem;
}

.chip strong {
    color: var(--brand);
}

/* ---------------------------------------------------------------- landing */

.hero {
    padding-block: 4.5rem 2rem;
    max-width: 40rem;
}

.hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

.service-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: 1fr;
    margin-top: 1rem;
}

@media (min-width: 40rem) {
    .service-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.service {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    box-shadow: var(--shadow-sm);
}

.service__description {
    color: var(--ink-soft);
    font-size: 0.9375rem;
}

.catalogue {
    margin-top: 2.5rem;
}

/* ---------------------------------------------------------------- a11y */

.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    background: var(--brand);
    color: #fff;
    padding: 0.75rem 1rem;
    z-index: 20;
    border-radius: 0 0 var(--radius-sm) 0;
}

.skip-link:focus {
    left: 0;
    top: 0;
}

:focus-visible {
    outline: 3px solid var(--brand-accent);
    outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
