/* XBARBER booking website: white, with black type. The barbers' photos are the centre of the page. */

:root {
    color-scheme: light;
    --bg: #ffffff;
    --bg-2: #f5f5f5;
    --surface: #f3f3f3;
    --surface-2: #e8e8e8;
    --surface-3: #dcdcdc;
    --line: rgba(0, 0, 0, 0.1);
    --line-2: rgba(0, 0, 0, 0.2);
    --ink: #0a0a0a;
    --ink-2: #2e2e2e;
    --muted: #6b6b6b;
    /* Text on black buttons and on the chosen day / time. */
    --on-ink: #ffffff;
    --error: #c62828;
    --radius: 18px;
    --radius-lg: 28px;
    --shadow: 0 30px 70px rgba(0, 0, 0, 0.2);
    --font: system-ui, -apple-system, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
    --font-display: "Didot", "Bodoni 72", "Bodoni MT", "Playfair Display", Georgia, "Times New Roman", serif;
    --font-arabic: "Noto Kufi Arabic", "Noto Sans Arabic", "Geeza Pro", "Segoe UI", Tahoma, sans-serif;
    --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
    /* Width of the big photo in the middle (its height is 5:4 of it). It follows the screen
       height, so the photo, the name, the booking button and the barber buttons fit on one screen. */
    --card-w: min(74vw, max(220px, min(380px, calc((100vh - 470px) * 0.8))));
}

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

[hidden] {
    display: none !important;
}

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

body {
    margin: 0;
    min-height: 100vh;
    background: var(--bg);
    color: var(--ink);
    font-family: var(--font);
    font-size: 16px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

[dir="rtl"] body,
[dir="rtl"] .display,
[dir="rtl"] .spot-name {
    font-family: var(--font-arabic);
}

body.sheet-open {
    overflow: hidden;
}

h1, h2, h3, p {
    margin: 0;
}

a {
    color: inherit;
}

button {
    font: inherit;
    color: inherit;
}

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

.display {
    font-family: var(--font-display);
    font-weight: 600;
    letter-spacing: -0.01em;
    line-height: 1.04;
}

[dir="rtl"] .display {
    font-weight: 800;
    letter-spacing: 0;
    line-height: 1.25;
}

svg.icon {
    width: 22px;
    height: 22px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

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

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 54px;
    padding: 0 28px;
    border: 1px solid transparent;
    border-radius: 999px;
    background: transparent;
    font-size: 16px;
    font-weight: 750;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
    transition: transform 0.2s var(--ease), background-color 0.2s, border-color 0.2s, color 0.2s;
}

.btn:active:not(:disabled) {
    transform: scale(0.98);
}

.btn:disabled {
    opacity: 0.4;
    cursor: default;
}

.btn-light {
    background: var(--ink);
    color: var(--on-ink);
}

.btn-light:hover:not(:disabled) {
    background: #333333;
}

.btn-ghost {
    border-color: var(--line-2);
    color: var(--ink);
}

.btn-ghost:hover:not(:disabled) {
    border-color: var(--ink);
}

.btn-small {
    min-height: 42px;
    padding: 0 20px;
    font-size: 14.5px;
}

.btn-block {
    width: 100%;
}

.icon-btn {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    flex-shrink: 0;
    border: 1px solid var(--line-2);
    border-radius: 50%;
    background: transparent;
    cursor: pointer;
}

.icon-btn:hover {
    border-color: var(--ink);
}

[dir="rtl"] .flip-rtl {
    transform: scaleX(-1);
}

/* ---------------- Loading screen ---------------- */

.loader {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: grid;
    place-items: center;
    background:
        radial-gradient(55% 45% at 50% 45%, rgba(0, 0, 0, 0.04), transparent 70%),
        var(--bg);
    transition: opacity 0.7s var(--ease), visibility 0.7s;
}

.loader-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 26px;
}

.loader-mark {
    width: 112px;
    height: auto;
    overflow: visible;
    animation: mark-glow 1.1s 1s var(--ease) forwards;
}

.loader-mark polygon {
    fill: var(--ink);
    opacity: 0;
}

.mark-left {
    animation: mark-left 0.95s 0.15s var(--ease) forwards;
}

.mark-right {
    animation: mark-right 0.95s 0.15s var(--ease) forwards;
}

@keyframes mark-left {
    from { opacity: 0; transform: translate(-330px, -260px); }
    to { opacity: 1; transform: none; }
}

@keyframes mark-right {
    from { opacity: 0; transform: translate(330px, 260px); }
    to { opacity: 1; transform: none; }
}

@keyframes mark-glow {
    0% { filter: drop-shadow(0 0 0 rgba(0, 0, 0, 0)); transform: scale(1); }
    45% { filter: drop-shadow(0 10px 18px rgba(0, 0, 0, 0.25)); transform: scale(1.06); }
    100% { filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.1)); transform: scale(1); }
}

.loader-word {
    display: flex;
    gap: 0.32em;
    font-family: var(--font-display);
    font-size: 22px;
    font-weight: 600;
    letter-spacing: 0.06em;
}

.loader-word span {
    opacity: 0;
    transform: translateY(12px);
    animation: letter-in 0.6s var(--ease) forwards;
}

.loader-word span:nth-child(1) { animation-delay: 1.05s; }
.loader-word span:nth-child(2) { animation-delay: 1.12s; }
.loader-word span:nth-child(3) { animation-delay: 1.19s; }
.loader-word span:nth-child(4) { animation-delay: 1.26s; }
.loader-word span:nth-child(5) { animation-delay: 1.33s; }
.loader-word span:nth-child(6) { animation-delay: 1.40s; }
.loader-word span:nth-child(7) { animation-delay: 1.47s; }

@keyframes letter-in {
    to { opacity: 1; transform: none; }
}

.loader-line {
    width: 120px;
    height: 2px;
    overflow: hidden;
    border-radius: 2px;
    background: var(--line);
}

.loader-line span {
    display: block;
    width: 40%;
    height: 100%;
    border-radius: 2px;
    background: var(--ink);
    transform: translateX(-110%);
    animation: line-run 1.1s 0.4s ease-in-out infinite;
}

[dir="rtl"] .loader-line span {
    animation-name: line-run-rtl;
}

@keyframes line-run {
    to { transform: translateX(260%); }
}

@keyframes line-run-rtl {
    from { transform: translateX(110%); }
    to { transform: translateX(-260%); }
}

body.is-ready .loader {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

body.is-ready .loader-inner {
    transform: scale(1.08);
    transition: transform 0.7s var(--ease);
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: max(14px, env(safe-area-inset-top)) clamp(18px, 5vw, 56px) 14px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0.78));
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--line);
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.brand-mark {
    width: 28px;
    height: auto;
}

.brand-mark polygon {
    fill: var(--ink);
}

/* The X in the header never stops: its two halves slide apart and back together. */
.site-header .brand-mark {
    overflow: visible;
}

.site-header .brand-mark polygon:first-child {
    animation: brand-left 3.2s ease-in-out infinite;
}

.site-header .brand-mark polygon:last-child {
    animation: brand-right 3.2s ease-in-out infinite;
}

@keyframes brand-left {
    0%, 20%, 100% { transform: none; }
    50%, 62% { transform: translate(-70px, -56px); }
}

@keyframes brand-right {
    0%, 20%, 100% { transform: none; }
    50%, 62% { transform: translate(70px, 56px); }
}

.brand-word {
    font-family: var(--font-display);
    font-size: 19px;
    font-weight: 600;
    letter-spacing: 0.16em;
}

.header-end {
    display: flex;
    align-items: center;
    gap: 10px;
}

.langs {
    display: inline-flex;
    padding: 4px;
    border: 1px solid var(--line);
    border-radius: 999px;
}

.langs button {
    min-width: 40px;
    height: 34px;
    padding: 0 10px;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: var(--muted);
    font-size: 13.5px;
    font-weight: 750;
    cursor: pointer;
}

.langs button[aria-pressed="true"] {
    background: var(--ink);
    color: var(--on-ink);
}

/* ---------------- Hero: the barbers ---------------- */

.hero {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: center;
    gap: 16px;
    min-height: calc(100vh - 72px);
    min-height: calc(100dvh - 72px);
    padding: clamp(14px, 2.4vh, 32px) 0 clamp(20px, 3vh, 40px);
    overflow: hidden;
    text-align: center;
}

/* A huge outlined XBARBER behind the photos that keeps sliding past, without end. */
.hero-word {
    position: absolute;
    top: 52%;
    left: 0;
    width: 100%;
    overflow: hidden;
    font-family: var(--font-display);
    font-size: 25vw;
    font-weight: 600;
    line-height: 1;
    letter-spacing: -0.02em;
    color: transparent;
    -webkit-text-stroke: 1px rgba(0, 0, 0, 0.13);
    white-space: nowrap;
    transform: translateY(-50%);
    pointer-events: none;
    user-select: none;
}

/* Two equal halves: when the first half has moved out, the second is exactly in its place. */
.hero-word-track {
    display: flex;
    width: max-content;
    animation: word-slide 36s linear infinite;
}

.hero-word-track span {
    padding-right: 0.35em;
}

@keyframes word-slide {
    from { transform: translateX(0); }
    to { transform: translateX(-50%); }
}

.hero-head {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 0 20px;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: var(--muted);
    font-size: 12.5px;
    font-weight: 750;
    letter-spacing: 0.24em;
    text-transform: uppercase;
}

.eyebrow:empty {
    display: none;
}

[dir="rtl"] .eyebrow {
    letter-spacing: 0;
    font-size: 14px;
}

.eyebrow::before,
.eyebrow::after {
    content: "";
    width: 28px;
    height: 1px;
    background: var(--line-2);
}

.hero-title {
    font-size: clamp(28px, 3.8vw, 50px);
}

.hero-accent {
    color: var(--muted);
    font-style: italic;
}

[dir="rtl"] .hero-accent {
    font-style: normal;
}

.hero-hours {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--muted);
    font-size: 14.5px;
    font-weight: 600;
}

.hero-hours:empty {
    display: none;
}

.dot {
    width: 8px;
    height: 8px;
    flex-shrink: 0;
    border: 1px solid var(--muted);
    border-radius: 50%;
}

.dot-on {
    border-color: var(--ink);
    background: var(--ink);
    box-shadow: 0 0 0 0 rgba(0, 0, 0, 0.35);
    animation: dot-pulse 2s ease-out infinite;
}

@keyframes dot-pulse {
    70% { box-shadow: 0 0 0 9px rgba(0, 0, 0, 0); }
    100% { box-shadow: 0 0 0 0 rgba(0, 0, 0, 0); }
}

.closed-banner {
    position: relative;
    align-self: center;
    max-width: min(92vw, 560px);
    padding: 12px 18px;
    border: 1px solid var(--line-2);
    border-radius: var(--radius);
    background: var(--surface);
    color: var(--ink-2);
    font-weight: 650;
}

/* Carousel */
.carousel {
    position: relative;
}

.stage {
    --dir: 1;
    position: relative;
    height: calc(var(--card-w) * 1.25);
    touch-action: pan-y;
    user-select: none;
}

[dir="rtl"] .stage {
    --dir: -1;
}

.slide {
    position: absolute;
    top: 0;
    left: 50%;
    width: var(--card-w);
    height: 100%;
    margin-left: calc(var(--card-w) / -2);
    padding: 0;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background:
        radial-gradient(80% 60% at 50% 35%, rgba(255, 255, 255, 0.7), transparent 70%),
        linear-gradient(160deg, #f0f0f0, #d9d9d9);
    cursor: pointer;
    transition: transform 0.9s var(--ease), opacity 0.9s var(--ease), filter 0.9s var(--ease), box-shadow 0.9s;
}

.slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(1) contrast(1.08);
    -webkit-user-drag: none;
    pointer-events: none;
}

.slide::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.12) 0%, transparent 25%, transparent 70%, rgba(0, 0, 0, 0.3) 100%);
    pointer-events: none;
}

.slide-num {
    position: absolute;
    top: 18px;
    inset-inline-start: 20px;
    z-index: 1;
    font-family: var(--font-display);
    font-size: 15px;
    letter-spacing: 0.2em;
    /* Readable on a photo and on the plain grey card alike. */
    color: #ffffff;
    mix-blend-mode: difference;
}

.slide-initial {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    color: rgba(0, 0, 0, 0.72);
    font-family: var(--font-display);
    font-size: calc(var(--card-w) * 0.45);
    font-weight: 600;
}

[dir="rtl"] .slide-initial {
    font-family: var(--font-arabic);
}

.slide[data-pos="0"] {
    z-index: 3;
    border-color: var(--line-2);
    box-shadow: var(--shadow);
}

.slide[data-pos="1"],
.slide[data-pos="-1"] {
    z-index: 2;
    opacity: 0.55;
}

.slide[data-pos="1"] {
    transform: translateX(calc(86% * var(--dir))) scale(0.74);
}

.slide[data-pos="-1"] {
    transform: translateX(calc(-86% * var(--dir))) scale(0.74);
}

.slide[data-pos="2"],
.slide[data-pos="-2"] {
    z-index: 1;
    opacity: 0.22;
}

.slide[data-pos="2"] {
    transform: translateX(calc(156% * var(--dir))) scale(0.56);
}

.slide[data-pos="-2"] {
    transform: translateX(calc(-156% * var(--dir))) scale(0.56);
}

.slide[data-pos="hidden"] {
    z-index: 0;
    opacity: 0;
    transform: scale(0.5);
    pointer-events: none;
}

.slide-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 20px;
    padding: 30px;
    color: var(--muted);
    cursor: default;
}

.slide-empty svg {
    width: 34%;
    height: auto;
}

.slide-empty polygon {
    fill: rgba(0, 0, 0, 0.18);
}

.slide-loading {
    background: linear-gradient(100deg, var(--surface) 30%, var(--surface-2) 50%, var(--surface) 70%);
    background-size: 300% 100%;
    animation: shimmer 1.4s ease-in-out infinite;
    cursor: default;
}

@keyframes shimmer {
    to { background-position: -150% 0; }
}

.arrow {
    position: absolute;
    top: 50%;
    z-index: 5;
    display: grid;
    place-items: center;
    width: 56px;
    height: 56px;
    border: 1px solid var(--line-2);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.8);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    cursor: pointer;
    transform: translateY(-50%);
    transition: background-color 0.2s, color 0.2s, border-color 0.2s;
}

.arrow:hover {
    border-color: var(--ink);
    background: var(--ink);
    color: var(--on-ink);
}

.arrow-prev {
    inset-inline-start: calc(50% - var(--card-w) / 2 - 84px);
}

.arrow-next {
    inset-inline-end: calc(50% - var(--card-w) / 2 - 84px);
}

/* Under the photo: name, next free time and the booking button */
.spotlight {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    min-height: 150px;
    padding: 0 20px;
}

.spot-name {
    font-family: var(--font-display);
    font-size: clamp(34px, 4.4vw, 56px);
    font-weight: 600;
    line-height: 1.05;
}

[dir="rtl"] .spot-name {
    font-weight: 800;
}

.spot-status {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--ink-2);
    font-size: 15px;
    font-weight: 600;
}

.spot-status strong {
    color: var(--ink);
}

.spot-in > * {
    animation: rise 0.6s var(--ease) both;
}

.spot-in > :nth-child(2) { animation-delay: 0.06s; }
.spot-in > :nth-child(3) { animation-delay: 0.12s; }

@keyframes rise {
    from { opacity: 0; transform: translateY(14px); }
    to { opacity: 1; transform: none; }
}

.spot-error {
    color: var(--ink-2);
}

/* A button for every barber */
.picker {
    position: relative;
    display: flex;
    justify-content: center;
    gap: 8px;
    padding: 4px clamp(16px, 4vw, 40px) 6px;
    overflow-x: auto;
    scrollbar-width: none;
}

.picker::-webkit-scrollbar {
    display: none;
}

.pick {
    position: relative;
    display: inline-flex;
    flex-shrink: 0;
    align-items: center;
    gap: 9px;
    height: 46px;
    padding: 0 18px 0 5px;
    overflow: hidden;
    border: 1px solid var(--line-2);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.8);
    color: var(--ink-2);
    font-size: 14.5px;
    font-weight: 700;
    white-space: nowrap;
    cursor: pointer;
    transition: background-color 0.3s, color 0.3s, border-color 0.3s;
}

.pick:hover {
    border-color: var(--ink);
}

/* A barber who is closed for bookings. */
.pick.is-closed:not([aria-current="true"]) {
    color: var(--muted);
}

.pick.is-closed > span:not(.pick-face) {
    text-decoration: line-through;
}

.pick-face {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    flex-shrink: 0;
    overflow: hidden;
    border-radius: 50%;
    background: var(--surface-3);
    font-family: var(--font-display);
    font-size: 16px;
}

.pick-face img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(1);
}

.pick[aria-current="true"] {
    border-color: var(--ink);
    background: var(--ink);
    color: var(--on-ink);
}

.pick[aria-current="true"] .pick-face {
    background: #3a3a3a;
    color: var(--on-ink);
}

/* Fills up while the next barber is coming (5 seconds). */
.pick-progress {
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 3px;
    background: var(--on-ink);
    transform: scaleX(0);
    transform-origin: left;
}

[dir="rtl"] .pick-progress {
    transform-origin: right;
}

.carousel-playing .pick[aria-current="true"] .pick-progress {
    animation: progress 5s linear forwards;
}

.carousel-paused .pick[aria-current="true"] .pick-progress {
    animation: progress 5s linear forwards;
    animation-play-state: paused;
}

@keyframes progress {
    to { transform: scaleX(1); }
}

/* Content rises in once the loading screen is gone. */
.reveal {
    opacity: 0;
    transform: translateY(22px);
}

body.is-ready .reveal {
    opacity: 1;
    transform: none;
    transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
}

body.is-ready .carousel.reveal { transition-delay: 0.1s; }
body.is-ready .spotlight.reveal { transition-delay: 0.2s; }
body.is-ready .picker.reveal { transition-delay: 0.3s; }

/* ---------------- How it works ---------------- */

.section {
    padding: clamp(46px, 8vh, 90px) clamp(18px, 6vw, 72px);
}

.section-title {
    margin-bottom: 28px;
    font-size: clamp(32px, 4.6vw, 52px);
}

.steps {
    border-top: 1px solid var(--line);
}

.step-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1px;
    margin: 0;
    padding: 0;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--line);
    list-style: none;
}

.step-list li {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 26px;
    background: var(--bg);
}

.step-list strong {
    font-size: 18px;
}

.step-list span:not(.step-num) {
    color: var(--muted);
    font-size: 15px;
}

.step-num {
    margin-bottom: 10px;
    color: var(--muted);
    font-family: var(--font-display);
    font-size: 30px;
    line-height: 1;
}

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

.site-footer {
    padding: 48px clamp(18px, 6vw, 72px) calc(28px + env(safe-area-inset-bottom));
    border-top: 1px solid var(--line);
    background: var(--bg-2);
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 28px;
}

.footer-cols {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 24px;
    margin-bottom: 34px;
}

.footer-cols h3 {
    margin-bottom: 8px;
    color: var(--muted);
    font-size: 12.5px;
    font-weight: 750;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

[dir="rtl"] .footer-cols h3 {
    letter-spacing: 0;
    font-size: 14.5px;
}

.footer-cols p {
    color: var(--ink-2);
}

.footer-cols a {
    color: var(--ink);
    font-weight: 700;
    text-decoration: none;
}

/* "See our work": opens the Instagram page. */
.footer-cols .see-work {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-top: 16px;
    padding: 12px 20px;
    border-radius: 999px;
    background: var(--ink);
    color: var(--on-ink);
    font-size: 15px;
    font-weight: 750;
    transition: transform 0.2s var(--ease), background-color 0.2s;
}

.footer-cols .see-work[hidden] {
    display: none;
}

.footer-cols .see-work:hover {
    background: #333333;
}

.footer-cols .see-work:active {
    transform: scale(0.97);
}

.see-work svg.icon {
    width: 18px;
    height: 18px;
}

.see-work + .socials {
    margin-top: 14px;
}

/* Instagram and WhatsApp */
.socials {
    display: flex;
    gap: 10px;
    margin-top: 16px;
}

.footer-cols .social-link {
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    border: 1px solid var(--line-2);
    border-radius: 50%;
    color: var(--ink);
    transition: background-color 0.2s, color 0.2s, border-color 0.2s, transform 0.2s var(--ease);
}

.footer-cols .social-link:hover,
.footer-cols .social-link:focus-visible {
    border-color: var(--ink);
    background: var(--ink);
    color: var(--on-ink);
}

.footer-cols .social-link:active {
    transform: scale(0.94);
}

svg.icon-brand {
    width: 21px;
    height: 21px;
    fill: currentColor;
    stroke: none;
}

.footer-bottom {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 10px;
    padding-top: 20px;
    border-top: 1px solid var(--line);
    color: var(--muted);
    font-size: 14px;
}

.footer-bottom a {
    color: var(--muted);
}

/* ---------------- Booking window ---------------- */

.sheet-backdrop {
    position: fixed;
    inset: 0;
    z-index: 60;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(0, 0, 0, 0.4);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    opacity: 0;
    transition: opacity 0.3s;
}

.sheet-backdrop.show {
    opacity: 1;
}

.sheet {
    position: relative;
    display: flex;
    flex-direction: column;
    width: min(100%, 580px);
    max-height: min(92vh, 860px);
    max-height: min(92dvh, 860px);
    overflow: hidden;
    border: 1px solid var(--line-2);
    border-radius: var(--radius-lg);
    background: var(--bg-2);
    box-shadow: var(--shadow);
    transform: translateY(24px) scale(0.98);
    transition: transform 0.4s var(--ease);
}

.sheet-backdrop.show .sheet {
    transform: none;
}

.sheet:focus {
    outline: none;
}

.sheet-head {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px 18px 14px 20px;
    border-bottom: 1px solid var(--line);
}

.sheet-avatar {
    display: grid;
    place-items: center;
    width: 52px;
    height: 52px;
    flex-shrink: 0;
    overflow: hidden;
    border-radius: 50%;
    background: var(--surface-3);
    font-family: var(--font-display);
    font-size: 24px;
}

.sheet-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(1);
}

.sheet-who {
    display: flex;
    flex: 1;
    flex-direction: column;
    min-width: 0;
}

.sheet-who small {
    color: var(--muted);
    font-size: 13px;
    font-weight: 650;
}

.sheet-who h2 {
    overflow: hidden;
    font-size: 21px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.progress {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    padding: 14px 20px 0;
}

.progress span {
    display: flex;
    flex-direction: column;
    gap: 6px;
    color: var(--muted);
    font-size: 12.5px;
    font-weight: 750;
}

.progress span::before {
    content: "";
    height: 3px;
    border-radius: 3px;
    background: var(--surface-3);
    transition: background-color 0.3s;
}

.progress .is-done,
.progress .is-current {
    color: var(--ink);
}

.progress .is-done::before,
.progress .is-current::before {
    background: var(--ink);
}

.sheet-body {
    flex: 1;
    padding: 18px 20px 22px;
    overflow-y: auto;
    overscroll-behavior: contain;
}

.sheet-foot {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 14px 20px calc(16px + env(safe-area-inset-bottom));
    border-top: 1px solid var(--line);
    background: var(--bg-2);
}

.label {
    display: block;
    margin-bottom: 10px;
    color: var(--muted);
    font-size: 12.5px;
    font-weight: 750;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

[dir="rtl"] .label {
    letter-spacing: 0;
    font-size: 14px;
}

.days {
    display: flex;
    gap: 8px;
    margin: 0 -20px 22px;
    padding: 2px 20px 6px;
    overflow-x: auto;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
}

.days::-webkit-scrollbar {
    display: none;
}

.day {
    display: flex;
    flex: 0 0 auto;
    flex-direction: column;
    align-items: center;
    gap: 1px;
    min-width: 74px;
    padding: 10px 10px 9px;
    border: 1px solid var(--line-2);
    border-radius: 16px;
    background: var(--surface);
    cursor: pointer;
    scroll-snap-align: start;
    transition: border-color 0.2s, background-color 0.2s, color 0.2s;
}

.day small {
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
}

.day strong {
    font-size: 20px;
    line-height: 1.2;
}

.day em {
    color: var(--ink-2);
    font-size: 11.5px;
    font-style: normal;
    font-weight: 750;
}

.day.is-empty em {
    color: var(--muted);
}

.day:disabled {
    opacity: 0.35;
    cursor: default;
}

.day[aria-pressed="true"] {
    border-color: var(--ink);
    background: var(--ink);
    color: var(--on-ink);
}

.day[aria-pressed="true"] small,
.day[aria-pressed="true"] em {
    color: #c9c9c9;
}

.times {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
    gap: 8px;
}

.time {
    min-height: 50px;
    padding: 0 6px;
    border: 1px solid var(--line-2);
    border-radius: 14px;
    background: var(--surface);
    font-size: 15.5px;
    font-weight: 750;
    cursor: pointer;
    transition: border-color 0.15s, background-color 0.15s, color 0.15s, transform 0.15s;
}

.time:hover:not(:disabled) {
    border-color: var(--ink);
}

.time[aria-pressed="true"] {
    border-color: var(--ink);
    background: var(--ink);
    color: var(--on-ink);
    transform: scale(1.03);
}

.time.is-taken {
    border-style: dashed;
    background: transparent;
    color: var(--muted);
    text-decoration: line-through;
    cursor: not-allowed;
    opacity: 0.5;
}

.time-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 14px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 600;
}

.time-legend span {
    display: inline-flex;
    align-items: center;
    gap: 7px;
}

.time-legend i {
    width: 14px;
    height: 14px;
    border: 1px solid var(--line-2);
    border-radius: 5px;
    background: var(--surface);
}

.time-legend .legend-taken {
    border-style: dashed;
    background: transparent;
}

.notice {
    margin-bottom: 16px;
    padding: 12px 14px;
    border: 1px solid rgba(198, 40, 40, 0.35);
    border-radius: 14px;
    background: #fdeeee;
    color: #8e1c1c;
    font-size: 14.5px;
    font-weight: 650;
}

.notice-soft {
    border-color: var(--line);
    background: var(--surface);
    color: var(--ink-2);
}

.empty-day {
    padding: 26px 16px;
    border: 1px dashed var(--line-2);
    border-radius: var(--radius);
    color: var(--muted);
    text-align: center;
}

.empty-day-spaced {
    margin-top: 14px;
}

.choice-summary {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    padding: 14px 16px;
    border: 1px solid var(--line-2);
    border-radius: var(--radius);
    background: var(--surface);
}

.choice-summary svg.icon {
    flex-shrink: 0;
}

.choice-summary div {
    display: flex;
    flex: 1;
    flex-direction: column;
    min-width: 0;
}

.choice-summary small {
    color: var(--muted);
    font-size: 13px;
    font-weight: 650;
}

.choice-summary strong {
    font-size: 16.5px;
}

.link-btn {
    padding: 6px 8px;
    border: 0;
    background: none;
    color: var(--ink);
    font-weight: 750;
    text-decoration: underline;
    text-underline-offset: 3px;
    cursor: pointer;
}

.field {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 16px;
}

.field span {
    color: var(--ink-2);
    font-size: 14.5px;
    font-weight: 700;
}

.field input {
    width: 100%;
    height: 56px;
    padding: 0 18px;
    border: 1px solid var(--line-2);
    border-radius: 16px;
    background: var(--surface);
    color: var(--ink);
    font: inherit;
    font-size: 17px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.field input::placeholder {
    color: #9a9a9a;
}

.field input:focus {
    border-color: var(--ink);
    outline: none;
    box-shadow: 0 0 0 4px rgba(0, 0, 0, 0.08);
}

.field input[aria-invalid="true"] {
    border-color: var(--error);
}

.field-error {
    color: var(--error);
    font-size: 13.5px;
    font-weight: 650;
}

[dir="rtl"] input[dir="ltr"] {
    text-align: right;
}

.privacy {
    color: var(--muted);
    font-size: 13.5px;
}

.retry-row {
    margin-top: 14px;
}

/* Done */
.done {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 14px 6px 6px;
    text-align: center;
}

.done-check {
    width: 86px;
    height: 86px;
    margin-bottom: 6px;
}

.done-check circle {
    fill: rgba(0, 0, 0, 0.04);
    stroke: var(--ink);
    stroke-width: 2.5;
    stroke-dasharray: 260;
    stroke-dashoffset: 260;
    animation: draw 0.7s var(--ease) forwards;
}

.done-check path {
    fill: none;
    stroke: var(--ink);
    stroke-width: 5;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-dasharray: 60;
    stroke-dashoffset: 60;
    animation: draw 0.5s 0.5s var(--ease) forwards;
}

@keyframes draw {
    to { stroke-dashoffset: 0; }
}

.done h2 {
    font-size: 34px;
}

.done-when {
    font-size: 19px;
    font-weight: 750;
}

.done-note {
    max-width: 380px;
    color: var(--muted);
}

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

@media (max-width: 760px) {
    :root {
        --card-w: min(70vw, max(200px, min(340px, calc((100vh - 520px) * 0.8))));
    }

    .slide[data-pos="1"] {
        transform: translateX(calc(92% * var(--dir))) scale(0.8);
    }

    .slide[data-pos="-1"] {
        transform: translateX(calc(-92% * var(--dir))) scale(0.8);
    }

    .slide[data-pos="2"],
    .slide[data-pos="-2"] {
        opacity: 0;
    }

    .arrow {
        width: 44px;
        height: 44px;
    }

    .arrow-prev {
        inset-inline-start: calc(50% - var(--card-w) / 2 - 22px);
    }

    .arrow-next {
        inset-inline-end: calc(50% - var(--card-w) / 2 - 22px);
    }

    .picker {
        justify-content: flex-start;
    }
}

@media (max-width: 640px) {
    .header-book {
        display: none;
    }

    .brand-word {
        font-size: 16px;
    }

    .hero {
        gap: 14px;
    }

    .eyebrow {
        flex-wrap: wrap;
        justify-content: center;
        font-size: 11.5px;
        letter-spacing: 0.18em;
    }

    .eyebrow::before,
    .eyebrow::after {
        display: none;
    }

    .hero-word {
        top: 46%;
        font-size: 34vw;
    }

    .spotlight {
        min-height: 150px;
    }

    .sheet-backdrop {
        align-items: flex-end;
        padding: 0;
    }

    .sheet {
        width: 100%;
        max-height: 94vh;
        max-height: 94dvh;
        border-inline: 0;
        border-bottom: 0;
        border-radius: 26px 26px 0 0;
        transform: translateY(40px);
    }

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

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-delay: 0ms !important;
        animation-iteration-count: 1 !important;
        transition: none !important;
        scroll-behavior: auto !important;
    }
}

.noscript {
    position: fixed;
    inset: auto 16px 16px;
    z-index: 200;
    padding: 14px;
    border-radius: 12px;
    background: var(--surface-3);
    text-align: center;
}
