/*
| Landing page (resources/views/welcome.blade.php).
|
| Everything the home page needs, in one place. It used to live in two <style> blocks in
| the Blade template — uncacheable, and duplicating rules in styles.css with different
| values. Loaded last, so it wins where the two still overlap.
|
| One accent colour, one typeface, one radius scale, two breakpoints (768 / 1024).
*/

/* ----------------------------------------------------------- overlay nav ---- */

/*
| On the landing page the bar floats over the hero photograph rather than sitting above
| it, so the image starts at the top of the window. Scrolling past the hero gives it a
| solid background — see public/js/site-nav.js, which sets .is-scrolled.
*/

.site-nav--overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    max-width: none;
    margin: 0;
    padding-block: 1rem;
    padding-inline: max(1.5rem, (100% - var(--max-width)) / 2 + 1rem);
    color: var(--surface);
    background-color: transparent;
    transition: background-color .3s ease, box-shadow .3s ease, color .3s ease;
}

/*
| The bar's own contents take its colour, so the switch is declared in one place. They
| need saying explicitly: styles.css colours .nav__logo, and myown.css colours
| .nav__links a at the same weight as any plain .site-nav rule but from a later sheet,
| so both would otherwise keep the wordmark and links dark over the photograph.
*/
.site-nav--overlay .nav__logo,
.site-nav--overlay .nav__links > li > a,
.site-nav--overlay .nav__links a.nav-link,
.site-nav--overlay #hamburgerBtn,
.site-nav--overlay #profileToggle,
.site-nav--overlay #profileToggle span {
    color: inherit;
}

/* The dropdown is a white panel of its own and keeps dark text in either state. */
.site-nav--overlay #profileDropdown {
    color: var(--ink);
}

/* The wordmark and links sit on a photograph until the bar gains its background. */
.site-nav--overlay:not(.is-scrolled) .nav__logo img {
    background: rgba(255, 255, 255, .9);
    border-radius: 50%;
}

.site-nav--overlay.is-scrolled {
    color: var(--ink);
    background-color: var(--surface);
    box-shadow: var(--shadow-sm);
}

/* Users who prefer less motion still get the change, just without the fade. */
@media (prefers-reduced-motion: reduce) {
    .site-nav--overlay {
        transition: none;
    }
}

/* ---------------------------------------------------------------- hero ---- */

.header__container {
    max-width: none;
    padding: 0;
}

.header__image__container {
    position: relative;
    display: flex;
    flex-direction: column;
    /* svh is the viewport with the mobile browser's chrome showing, so the hero is never
       taller than what the guest can actually see. vh stays as the fallback. */
    min-height: 100vh;
    min-height: 100svh;
    /* Top clears the navigation bar, which floats over the hero rather than above it. */
    padding: 5.5rem 0 2.5rem;
    background-image:
        linear-gradient(90deg, rgba(20, 26, 33, .78) 0%, rgba(20, 26, 33, .38) 100%),
        url("assets/bg.jpg");
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
}

.header__content {
    /* Auto margins claim the space the panel leaves, which centres the copy. On a screen
       too short for all three they simply collapse, and the hero grows instead. */
    margin-block: auto;
    width: 100%;
    max-width: calc(34rem + max(1rem, (100% - var(--max-width)) / 2 + 1rem));
    padding: 0 1rem 0 max(1rem, (100% - var(--max-width)) / 2 + 1rem);
}

.header__content h1 {
    margin: 0 0 .75rem;
    font-size: clamp(2rem, 4.5vw, 3rem);
    line-height: 1.15;
    font-weight: 600;
    letter-spacing: -.02em;
    color: var(--surface);
}

.header__content p {
    margin: 0;
    max-width: 30rem;
    font-size: 1.0625rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, .88);
}

/* ------------------------------------------------------- booking widget ---- */

.booking__container {
    width: min(calc(100% - 2rem), var(--max-width));
    margin-inline: auto;
    padding: 2rem;
    border-radius: var(--radius-lg);
    background-color: rgba(255, 255, 255, .7);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-md);

    /* A label's full block: its own height plus the gap to the control. The search
       button drops by exactly this to land on the same line as the inputs. */
    --label-block: 1.375rem;
}

.booking__container form {
    display: grid;
    grid-template-columns: repeat(4, 1fr) auto;
    align-items: start;
    gap: 1.25rem;
}

.booking__container .form__group {
    min-width: 0;
}

.booking__container .input__group {
    position: relative;
}

.booking__container label {
    display: block;
    height: 1rem;
    margin-bottom: .375rem;
    line-height: 1rem;
    font-size: .75rem;
    font-weight: 600;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--ink-faint);
}

.booking__container input,
.booking__container select {
    width: 100%;
    padding: .5rem 0;
    font: inherit;
    font-size: 1rem;
    color: var(--ink);
    background: none;
    border: none;
    border-bottom: 1px solid var(--line);
    border-radius: 0;
    outline: none;
    appearance: none;
    transition: border-color .2s ease;
}

.booking__container input:focus,
.booking__container select:focus {
    border-bottom-color: var(--accent);
}

.booking__container .form__group > p {
    margin: .375rem 0 0;
    font-size: .8125rem;
    color: var(--ink-faint);
}

/* Guest stepper */

.persons__group {
    display: flex;
    align-items: center;
    gap: .5rem;
}

.persons__group input {
    text-align: center;
    font-variant-numeric: tabular-nums;
}

.persons__group input::-webkit-outer-spin-button,
.persons__group input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.persons__group input[type="number"] {
    -moz-appearance: textfield;
}

.person-btn {
    flex: none;
    display: grid;
    place-items: center;
    width: 2rem;
    height: 2rem;
    /* Both stated rather than left to inherit: myown.css puts 10px of padding on every
       button on the site, which inside a 2rem border box leaves the glyph no room to
       centre in, and the inherited 24px line height makes its box taller still. */
    padding: 0;
    line-height: 1;
    font-size: 1rem;
    color: var(--ink-soft);
    background: none;
    border: 1px solid var(--line);
    border-radius: 50%;
    cursor: pointer;
    transition: color .2s ease, border-color .2s ease, opacity .2s ease;
}

.person-btn i {
    display: block;
    line-height: 1;
}

.person-btn:hover,
.person-btn:focus-visible {
    color: var(--accent);
    border-color: var(--accent);
}

/* Fade the steppers in on hover, but only where hovering exists. On touch screens
   there is no hover, so hiding them by default leaves the guest count unchangeable. */
@media (hover: hover) {
    .person-btn {
        opacity: 0;
    }

    .persons__group:hover .person-btn,
    .persons__group:focus-within .person-btn {
        opacity: 1;
    }
}

.booking__container .btn {
    margin-top: var(--label-block);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    padding: .875rem 1.75rem;
    font: inherit;
    font-size: .9375rem;
    font-weight: 600;
    color: var(--surface);
    background-color: var(--accent);
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: background-color .2s ease;
}

.booking__container .btn:hover {
    background-color: var(--accent-strong);
}

.booking__container .btn i {
    font-size: 1.125rem;
}

.booking__notice {
    grid-column: 1 / -1;
    margin: 0;
    font-size: .875rem;
    color: #a33a2b;
}

.booking__notice:empty {
    display: none;
}

/* ---------------------------------------------------------------- rooms ---- */

.section__header {
    margin: 0 0 2.5rem;
    font-size: clamp(1.5rem, 2.5vw, 1.875rem);
    font-weight: 600;
    letter-spacing: -.01em;
    color: var(--ink);
    text-align: center;
}

.popular__scroll {
    display: flex;
    gap: 1.5rem;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding-bottom: .5rem;
    scrollbar-width: thin;
}

.popular__card {
    flex: 0 0 17rem;
    scroll-snap-align: start;
    overflow: hidden;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    transition: box-shadow .2s ease, transform .2s ease;
}

.popular__card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.popular__card img {
    display: block;
    width: 100%;
    height: 11rem;
    object-fit: cover;
}

.popular__content {
    padding: 1.125rem 1.25rem 1.375rem;
}

.popular__content h4 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    color: var(--ink);
}

.subtext {
    margin: .25rem 0 .875rem;
    font-size: .8125rem;
    color: var(--ink-faint);
}

.rating {
    display: flex;
    align-items: center;
    gap: .625rem;
}

.rating-box {
    flex: none;
    padding: .1875rem .5rem;
    font-size: .8125rem;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    color: var(--surface);
    background: var(--ink);
    border-radius: var(--radius-sm);
}

.rating-text {
    display: flex;
    flex-direction: column;
    line-height: 1.3;
}

.rating-text .fabulous {
    font-size: .8125rem;
    font-weight: 500;
    color: var(--ink);
}

.reviews {
    margin: 0;
    font-size: .75rem;
    color: var(--ink-faint);
}

.price {
    margin-top: .875rem;
    font-size: .9375rem;
    font-weight: 600;
    color: var(--ink);
}

.no-rooms {
    margin: 0;
    color: var(--ink-soft);
}

.no-rooms a {
    color: var(--accent);
    text-decoration: underline;
}

/* -------------------------------------------------------------- reviews ---- */

.client {
    background-color: var(--surface-sunken);
}

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

.client__card {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin: 0;
    padding: 1.75rem;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
}

.client__card blockquote {
    margin: 0;
    font-size: .9375rem;
    line-height: 1.65;
    color: var(--ink);
}

.client__card blockquote::before {
    content: "\201C";
}

.client__card blockquote::after {
    content: "\201D";
}

.client__card figcaption {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: .5rem;
    font-size: .8125rem;
    color: var(--ink-faint);
}

.client__name {
    font-weight: 600;
    color: var(--ink);
}

.client__score {
    margin-left: auto;
    padding: .125rem .4375rem;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    color: var(--accent-strong);
    background: var(--accent-tint);
    border-radius: var(--radius-sm);
}

/* ----------------------------------------------------------- responsive ---- */

@media (max-width: 1024px) {
    .booking__container {
        width: calc(100% - 3rem);
        padding: 1.75rem;
    }

    .header__content {
        padding-right: 1.5rem;
    }

    .booking__container form {
        grid-template-columns: repeat(2, 1fr);
    }

    .booking__container .btn {
        grid-column: 1 / -1;
        margin-top: 0;
    }

    .client__grid {
        gap: 1.25rem;
    }
}

@media (max-width: 768px) {
    .header__image__container {
        padding: 5rem 1rem 1.5rem;
    }

    .header__content {
        max-width: none;
        padding: 0 .5rem 1.5rem;
    }

    .booking__container {
        width: 100%;
        padding: 1.5rem 1.25rem;
    }

    .booking__container form {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .person-btn {
        width: 2.25rem;
        height: 2.25rem;
        font-size: 1.125rem;
    }

    .popular__card {
        flex-basis: 14rem;
    }

    .client__grid {
        grid-template-columns: 1fr;
    }
}
