/* openslot - landing page styles (self-contained) */

:root {
    --bg: #faf6f0;
    --panel: #ffffff;
    --border: #e8ddcc;
    --ink: #2e2620;
    --muted: #8a7a64;        /* large text (>= 16px) only */
    --muted-strong: #6d5f4b; /* small muted text, 4.5:1 on cream */
    --accent: #c96f4a;
    --accent-deep: #b0512e;  /* WCAG AA 4.5:1 on white - use for interactive text/controls */
    --accent-hover: #b55e3b;
    --confirm: #2e7d4f;
    --radius: 14px;
    --radius-sm: 10px;
    --shadow-soft: 0 2px 6px rgba(46, 38, 32, 0.06);
    --shadow-lift: 0 18px 40px -18px rgba(46, 38, 32, 0.35);
    --font-display: "Fraunces", Georgia, "Times New Roman", serif;
    --font-body: system-ui, -apple-system, "Segoe UI", sans-serif;
}

/* Dark mode - warm espresso. Overrides the custom properties above; every
   component reads these vars, so nothing else needs to change. */
html[data-theme="dark"] {
    --bg: #1c1714;
    --panel: #26201b;
    --border: #3a3128;
    --ink: #f0e8dd;
    --muted: #a2937d;        /* large text (>= 16px) only */
    --muted-strong: #c3b5a1; /* small muted text, AA on espresso */
    --accent: #d98561;
    --accent-deep: #e08a63;  /* AA on the dark surfaces - interactive text/controls */
    --accent-hover: #e6946f;
    --confirm: #3fa06a;
    --shadow-soft: 0 2px 6px rgba(0, 0, 0, 0.35);
    --shadow-lift: 0 18px 40px -18px rgba(0, 0, 0, 0.6);
}

* {
    box-sizing: border-box;
}

body {
    transition: background-color 0.25s ease, color 0.25s ease;
}

@media (prefers-reduced-motion: reduce) {
    body {
        transition: none;
    }
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
    font-family: var(--font-display);
    font-weight: 600;
    line-height: 1.15;
    margin: 0 0 0.5em;
    letter-spacing: -0.01em;
}

p {
    margin: 0 0 1em;
}

a {
    color: var(--accent-deep);
}

a:focus-visible,
.btn:focus-visible {
    outline: 3px solid var(--accent);
    outline-offset: 2px;
    border-radius: 4px;
}

/* ---------- Buttons ---------- */

.btn {
    display: inline-block;
    padding: 10px 22px;
    border-radius: 999px;
    font-weight: 600;
    font-size: 15px;
    text-decoration: none;
    text-align: center;
    white-space: nowrap;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.btn-solid {
    background: var(--accent-deep);
    color: #fff;
    border: 1.5px solid var(--accent-deep);
}

.btn-solid:hover {
    background: #9a4526;
    border-color: #9a4526;
}

.btn-outline {
    background: transparent;
    color: var(--accent-deep);
    border: 1.5px solid var(--accent);
}

.btn-outline:hover {
    background: var(--accent-deep);
    border-color: var(--accent-deep);
    color: #fff;
}

.btn-ghost {
    background: transparent;
    color: var(--ink);
    border: 1.5px solid var(--border);
}

.btn-ghost:hover {
    border-color: var(--muted);
}

.btn-lg {
    padding: 13px 28px;
    font-size: 16px;
}

/* ---------- Header / nav ---------- */

.site-header {
    position: sticky;
    top: 0;
    z-index: 20;
    background: rgba(250, 246, 240, 0.92);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--border);
}

/* The header background is hardcoded (not a var) so it can stay frosted;
   give dark mode its own translucent espresso instead of the cream. */
html[data-theme="dark"] .site-header {
    background: rgba(28, 23, 20, 0.82);
}

.nav {
    max-width: 1100px;
    margin: 0 auto;
    padding: 14px 20px;
    display: flex;
    align-items: center;
    gap: 20px;
}

.wordmark {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 19px;
    color: var(--ink);
    text-decoration: none;
    margin-right: auto;
    white-space: nowrap;
}

.wordmark span {
    color: var(--accent);
}

.nav-links {
    display: none;
    gap: 26px;
}

.nav-links a {
    color: var(--muted-strong);
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
}

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

.nav-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.nav-actions .btn {
    padding: 8px 18px;
    font-size: 14px;
}

/* Utilities (theme + language) grouped and set apart from the auth actions. */
.nav-utils {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-divider {
    width: 1px;
    height: 22px;
    background: var(--border);
}

.nav-login {
    color: var(--muted-strong);
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
}

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

.theme-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    padding: 0;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--panel);
    color: var(--ink);
    cursor: pointer;
    transition: border-color 0.15s ease, color 0.15s ease;
}

.theme-toggle:hover {
    border-color: var(--accent);
    color: var(--accent-deep);
}

.theme-toggle:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.theme-toggle svg {
    width: 18px;
    height: 18px;
}

/* Show the sun in dark mode (click → go light), the moon in light mode. */
.theme-toggle .icon-sun {
    display: none;
}
html[data-theme="dark"] .theme-toggle .icon-sun {
    display: block;
}
html[data-theme="dark"] .theme-toggle .icon-moon {
    display: none;
}

/* ---------- Hero ---------- */

.hero {
    max-width: 1100px;
    margin: 0 auto;
    padding: 56px 20px 40px;
    display: flex;
    flex-direction: column;
    gap: 56px;
}

.hero h1 {
    font-size: clamp(2.3rem, 5.5vw, 3.4rem);
    max-width: 13em;
}

.hero-sub {
    font-size: 18px;
    color: var(--muted-strong);
    max-width: 32em;
    margin-bottom: 1.8em;
}

.hero-ctas {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

/* Booking widget mock (pure CSS) */

.hero-visual {
    display: flex;
    justify-content: center;
    padding: 12px 0 24px;
    perspective: 1200px;
}

.widget-card {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 16px;
    box-shadow: var(--shadow-lift);
    transform: rotate(-4deg);
    transition: transform 0.35s ease;
    transform-style: preserve-3d;
    backface-visibility: hidden;
    padding: 24px;
    width: min(360px, 100%);
}

/* Edge-on midpoint of the auto-flip (content swaps here) */
.widget-card.is-flipping {
    transform: rotate(-4deg) rotateY(90deg);
}

/* Instant jump to the far side before flipping back in - no transition */
.widget-card.is-flipped-back {
    transition: none;
    transform: rotate(-4deg) rotateY(-90deg);
}

@media (prefers-reduced-motion: reduce) {
    .widget-card {
        transition: none;
    }
}

.widget-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
    margin-bottom: 18px;
}

.widget-title {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 18px;
}

.widget-date {
    font-size: 13px;
    color: var(--muted-strong);
}

.slot-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 18px;
}

.slot {
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 9px 0;
    text-align: center;
    font-size: 14px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

.slot-selected {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}

.slot-unavailable {
    color: #c4b8a4;
    border-style: dashed;
    text-decoration: line-through;
    font-weight: 400;
}

.confirm-bar {
    background: var(--confirm);
    color: #fff;
    border-radius: var(--radius-sm);
    text-align: center;
    padding: 12px;
    font-weight: 600;
    font-size: 15px;
}

.confirm-bar .tick {
    margin-left: 4px;
}

/* ---------- Sections ---------- */

.section {
    max-width: 1100px;
    margin: 0 auto;
    padding: 56px 20px;
    scroll-margin-top: 72px;
}

.section > h2 {
    font-size: clamp(1.7rem, 3.5vw, 2.2rem);
    margin-bottom: 1.2em;
}

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

.card h3 {
    font-size: 19px;
    margin-bottom: 0.4em;
}

.card p {
    color: var(--muted-strong);
    font-size: 15px;
    margin-bottom: 0;
}

/* How it works */

.how-grid {
    display: grid;
    gap: 18px;
}

.step-num {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 20px;
    color: var(--accent);
    background: rgba(201, 111, 74, 0.1);
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
}

/* Features */

.feature-grid {
    display: grid;
    gap: 18px;
}

.glyph {
    color: var(--accent);
    margin-bottom: 14px;
}

.glyph svg {
    width: 30px;
    height: 30px;
}

/* Audience cards */

.audience-grid {
    display: grid;
    gap: 18px;
}

.audience-card {
    padding: 36px 28px;
}

.audience-card h2 {
    font-size: 26px;
}

.audience-card p {
    font-size: 16px;
    margin-bottom: 1.4em;
}

/* Pricing */

.pricing-grid {
    display: grid;
    gap: 18px;
    max-width: 760px;
}

.price-card h3 {
    font-size: 24px;
}

.price-card .price {
    color: var(--muted-strong);
    font-size: 15px;
    margin-bottom: 1em;
}

.price-card .amount {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 30px;
    color: var(--ink);
    margin-right: 6px;
}

.price-card ul {
    list-style: none;
    margin: 0 0 24px;
    padding: 0;
}

.price-card li {
    padding: 6px 0 6px 26px;
    position: relative;
    font-size: 15px;
}

.price-card li::before {
    content: "\2713";
    position: absolute;
    left: 0;
    color: var(--confirm);
    font-weight: 700;
}

.price-free {
    border: 2px solid var(--accent);
}

.price-pro {
    color: var(--muted-strong);
}

.price-pro h3 {
    color: var(--muted-strong);
}

.price-pro li::before {
    color: var(--muted);
}

/* ---------- Footer ---------- */

.site-footer {
    border-top: 1px solid var(--border);
    margin-top: 40px;
    padding: 32px 20px 40px;
    text-align: center;
    font-size: 14px;
    color: var(--muted-strong);
}

.site-footer p {
    margin: 0;
}

.site-footer a {
    color: var(--muted-strong);
    text-decoration-color: var(--border);
}

.site-footer a:hover {
    color: var(--accent);
}

/* ---------- Small screens ---------- */

@media (max-width: 479.98px) {
    .nav {
        padding: 12px;
        gap: 8px;
    }

    .wordmark {
        font-size: 16px;
    }

    .nav-actions {
        gap: 8px;
    }

    .nav-actions .btn {
        padding: 7px 12px;
        font-size: 13px;
    }
}

/* ---------- Wider screens ---------- */

@media (min-width: 720px) {
    .nav-links {
        display: flex;
    }

    .hero {
        flex-direction: row;
        align-items: center;
        padding-top: 80px;
        padding-bottom: 72px;
    }

    .hero-copy {
        flex: 1.2;
    }

    .hero-visual {
        flex: 1;
        padding: 0;
    }

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

    .feature-grid {
        gap: 20px;
    }

    .audience-grid,
    .pricing-grid {
        grid-template-columns: 1fr 1fr;
    }

    .section {
        padding: 72px 20px;
    }
}

@media (min-width: 720px) and (max-width: 979.98px) {
    .feature-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

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

/* ---- Language selector (pure CSS via <details>) ---- */

.lang {
    position: relative;
}

.lang summary {
    list-style: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    padding: 0;
    border: 1px solid var(--border);
    border-radius: 999px;
    font-size: 17px;
    line-height: 1;
    color: var(--ink);
    background: var(--panel);
    user-select: none;
}

.lang summary::-webkit-details-marker {
    display: none;
}

.lang summary:hover,
.lang[open] summary {
    border-color: var(--accent);
}

.lang summary:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.lang-menu {
    position: absolute;
    right: 0;
    top: calc(100% + 8px);
    margin: 0;
    padding: 6px;
    list-style: none;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-lift);
    min-width: 150px;
    z-index: 60;
}

.lang-menu a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 8px;
    color: var(--ink);
    font-size: 14px;
    white-space: nowrap;
}

.lang-menu a:hover {
    background: var(--bg);
}

.lang-menu a[aria-current="true"] {
    font-weight: 600;
}
