/* Hotel Harnaś — coming soon
   One screen, no scroll: full-bleed video, white Poppins 200 over it, and a
   counter to the opening date. Type scale and hairline detailing carry over
   from the previous light layout; the palette is inverted because the text
   now sits on footage. */

:root {
    --container-w: 110rem;
    --container-gutter: 1.5rem;

    --border-radius: .13rem;

    /* Palette — text sits on a photograph, so everything is light-on-dark */
    --color-text: #FFFFFF;
    --color-text-dim: rgba(255, 255, 255, .62);
    --color-text-faint: rgba(255, 255, 255, .42);
    --color-lines: rgba(255, 255, 255, .22);
    --color-backdrop: #0B0D12;

    --transition-ease-out: 400ms ease-out;

    --spacing-xs: clamp(1rem, 2.78vw, 2.5rem);
    --spacing-sm: clamp(1.5rem, 3.33vw, 3rem);

    --header-spacing-block: 1.5rem;
    /* Loader mark. The hero mark is sized separately — it is a composition
       element there, not a piece of chrome. */
    --logo-size: 3rem;
    --logo-size-hero: clamp(3.5rem, 5.5vw, 5rem);

    /* Nothing is laid over the footage. Legibility comes from this halo alone:
       it darkens each glyph's immediate surroundings and leaves the picture
       untouched. */
    --text-halo:
        0 0 2px rgba(0, 0, 0, .55),
        0 1px 6px rgba(0, 0, 0, .6),
        0 2px 28px rgba(0, 0, 0, .7);
}

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

html {
    font-size: clamp(1rem, .55vw + .5rem, 1.25rem);
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    display: flex;
    min-height: 100dvh;
    flex-direction: column;
    position: relative;
    font-family: "Poppins", system-ui, -apple-system, sans-serif;
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.5;
    color: var(--color-text);
    background-color: var(--color-backdrop);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* The previous layout carried a full-page film-grain overlay to give the flat
   #F0F0F0 background some texture. Dropped: a photograph brings its own
   grain, so the overlay bought nothing here beyond a blended full-screen
   compositing layer. */

h1, h2, h3, p, ul, figure { margin: 0; }
ul { list-style: none; padding: 0; }
img { display: block; width: 100%; height: auto; min-width: 0; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
hr { border: 0; margin: 0; }

.container {
    width: min(100%, var(--container-w));
    margin-inline: auto;
    padding-inline: var(--container-gutter);
}

.wrapper { flex: 1 1 auto; }

/* ── Typography scale ─────────────────────────────────────────── */

/* The `vh` term matters: on a phone held sideways the width is generous but
   the height is not, and a purely `vw`-based headline would push the counter
   and the footer off the screen. */
.text-2xl {
    font-size: clamp(2.25rem, min(9.5vw, 15vh), 7.5rem);
    line-height: .95;
    letter-spacing: .01em;
    font-weight: 200;
    text-transform: uppercase;
}

.text-3xs {
    font-size: .75rem;
    line-height: 1.66;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: .06em;
}

/* ── Backdrop ─────────────────────────────────────────────────── */

/* `absolute`, not `fixed`. Chrome fails to paint the animated child at all
   inside a fixed-position, overflow-clipped parent — the photograph vanishes
   and the page renders black. The page is a single screen and never scrolls,
   so anchoring to the body box instead costs nothing. */
.backdrop {
    position: absolute;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    background-color: var(--color-backdrop);
}

/* The movement now comes from the footage itself, so there is no CSS
   animation here. That also removes the compositing hazard an animated
   `transform` created under the loader. The poster frame covers the gap
   before playback starts, and stays put entirely under reduced motion. */
.backdrop-video {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 50% 50%;
    background-color: var(--color-backdrop);
}

/* No scrim. The footage is a night sky and is dark on its own: measured over
   eight frames, the area behind the headline averages 8.8:1 against white and
   only 0.2% of it is too bright for 4.5:1 — scattered stars, not background.
   An earlier version darkened the whole frame on the strength of a
   worst-single-pixel reading, which a starfield makes meaningless. Legibility
   is carried by --text-halo instead, which costs the picture nothing.

   If the footage is ever replaced with something brighter, this is the first
   thing to reinstate — measure the share of area above the threshold, not the
   brightest pixel. */

/* Everything else stacks above the footage. The halo goes on the small text
   too — it is the header and footer that sit closest to open sky. */
.header, .main, .footer { position: relative; z-index: 1; }
.header, .footer { text-shadow: var(--text-halo); }

/* text-shadow does not reach an SVG, so the mark gets the same treatment as
   a filter. */
.hero-logo-inner,
.loader-logo-svg { filter: drop-shadow(0 1px 6px rgba(0, 0, 0, .6)); }

/* ── Skip links ───────────────────────────────────────────────── */

.quick-access-link {
    position: absolute;
    left: -9999px;
    z-index: 1001;
}

.quick-access-link:focus {
    left: 1rem;
    top: 1rem;
    padding: .625rem .75rem;
    background: var(--color-backdrop);
    color: var(--color-text);
}

/* ── Loader ───────────────────────────────────────────────────── */

.loader {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--color-backdrop);
    transition: opacity .6s ease-out, visibility .6s ease-out;
}

.loader-logo {
    position: relative;
    width: var(--logo-size);
    height: var(--logo-size);
    aspect-ratio: 1;
}

.loader-logo-svg,
.loader-logo-circle {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    color: var(--color-text);
}

.loader-logo-circle { transform: rotate(-90deg); }

.loader-logo-circle circle {
    stroke: currentColor;
    stroke-width: 1;
    stroke-dasharray: 219.6;
    stroke-dashoffset: 219.6;
    animation: logoLoading 1.6s cubic-bezier(.6, 0, .3, 1) forwards;
}

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

body.is-loaded .loader {
    opacity: 0;
    visibility: hidden;
}

/* ── Header ───────────────────────────────────────────────────── */

.header {
    padding-block: var(--header-spacing-block);
    flex: none;
}

.header-wrapper {
    display: flex;
    align-items: center;
    gap: .5rem;
    min-height: 2.5rem;
}

.header-wordmark {
    font-size: clamp(.875rem, 1.1vw, 1.0625rem);
    letter-spacing: .16em;
    font-weight: 400;
}

.header-actions {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: .5rem;
}

/* Language toggle */

.language { position: relative; }

.language-toggle,
.language-link {
    background: none;
    border: 0;
    padding: .5rem;
    cursor: pointer;
    transition: color var(--transition-ease-out);
}

.language-toggle:hover,
.language-link:hover { color: var(--color-text-dim); }

.language-list {
    position: absolute;
    top: 100%;
    right: 0;
    margin: 0;
    display: grid;
    background: rgba(11, 13, 18, .82);
    backdrop-filter: blur(6px);
    border: 1px solid var(--color-lines);
    border-radius: var(--border-radius);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-.25rem);
    transition: opacity var(--transition-ease-out), transform var(--transition-ease-out), visibility var(--transition-ease-out);
}

.language-toggle[aria-expanded="true"] + .language-list {
    opacity: 1;
    visibility: visible;
    transform: none;
}

.language-link { width: 100%; text-align: center; }

/* ── Hero ─────────────────────────────────────────────────────── */

/* `.main` already stretches to whatever the header and footer leave behind,
   so it does the vertical centring. The hero must NOT also claim a height of
   its own — that was pushing the footer past the bottom of the viewport. */
.main {
    display: grid;
    align-content: center;
}

.hero {
    display: grid;
    justify-items: center;
    gap: clamp(1.25rem, 3vh, 2.25rem);
    padding-block: var(--spacing-xs);
    text-align: center;
}

.hero-logo { color: var(--color-text); }

.hero-logo-inner {
    display: block;
    width: var(--logo-size-hero);
    height: var(--logo-size-hero);
}

.hero-title { text-shadow: var(--text-halo); }

.hero-title .line {
    display: block;
    overflow: hidden;
}

.hero-title .line-inner {
    display: block;
    transform: translateY(110%);
    transition: transform 1s cubic-bezier(.75, 0, .25, 1);
}

.hero-title .line:nth-child(2) .line-inner { transition-delay: .12s; }

body.is-loaded .hero-title .line-inner { transform: none; }

.hero-rule {
    width: 10rem;
    max-width: 40vw;
    height: 1px;
    background-color: var(--color-lines);
}

/* ── Countdown ────────────────────────────────────────────────── */

.countdown {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: clamp(1.5rem, 5vw, 3.5rem);
    text-shadow: var(--text-halo);
}

/* The no-JS state, and the state after the opening date passes */
.countdown-static,
.countdown[data-state="open"] {
    font-size: clamp(1rem, 2vw, 1.375rem);
    font-weight: 200;
    text-transform: uppercase;
    letter-spacing: .22em;
}

.countdown-unit {
    display: grid;
    justify-items: center;
    gap: .35rem;
}

.countdown-value {
    font-size: clamp(1.5rem, min(5vw, 7vh), 3.5rem);
    line-height: 1;
    font-weight: 200;
    /* Without this, `1` is narrower than `8` and the whole block twitches
       every time a value changes — most visible in exactly the place the
       design asks for stillness. */
    font-variant-numeric: tabular-nums;
    font-feature-settings: "tnum" 1;
}

.countdown-label {
    font-size: .6875rem;
    line-height: 1;
    text-transform: uppercase;
    letter-spacing: .18em;
    color: var(--color-text-dim);
}

/* ── Footer ───────────────────────────────────────────────────── */

.footer {
    flex: none;
    padding-block: var(--spacing-sm);
}

.footer-wrapper {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: var(--spacing-xs) var(--spacing-sm);
}

.footer-link {
    color: var(--color-text-dim);
    transition: color var(--transition-ease-out);
}

.footer-link:hover { color: var(--color-text); }
.footer-copy { color: var(--color-text-faint); }

/* ── Narrow screens ───────────────────────────────────────────── */

@media (width < 48rem) {
    /* Two items left in the footer — stacked and centred reads better than
       pinned to opposite edges of a narrow screen. */
    .footer-wrapper {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: var(--spacing-xs);
    }
    .countdown { gap: clamp(1.25rem, 8vw, 2.5rem); }
}

/* ── Focus + motion ───────────────────────────────────────────── */

:where(a, button, input):focus-visible {
    outline: 1px solid var(--color-text);
    outline-offset: 2px;
}

/* Full-screen movement is a motion-sickness trigger for some people. The
   backdrop video is held back in JS for those visitors — they get the poster
   frame — and everything else here is reduced to a nominal duration. */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: .001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .001ms !important;
    }
    .hero-title .line-inner { transform: none; }
}
