/* =========================================================
   M&R Meedia
   ---------------------------------------------------------
   Motion note: every entrance animation lives inside
   `prefers-reduced-motion: no-preference` and uses
   `animation-fill-mode: backwards`, never `forwards`.
   Content is therefore visible by default and hover states
   are never locked out by an animation's fill.
   ========================================================= */

:root {
    --bg: #0a0a0a;
    --bg-raise: #101010;
    --text-primary: #ffffff;
    /* Measured on #0a0a0a: 0.78 ≈ 11.6:1, 0.62 ≈ 7.8:1. Raised from 0.68/0.52
       so the header nav and splash sub-labels stop reading as faint. */
    --text-secondary: rgba(255, 255, 255, 0.78);
    --text-muted: rgba(255, 255, 255, 0.62);
    --line: rgba(240, 215, 189, 0.18);
    --line-soft: rgba(240, 215, 189, 0.10);
    /* Warm sand — the brand colour carried over from mrmeedia.ee. */
    --accent: #f0d7bd;
    --accent-hover: #ffeddb;
    --accent-deep: #d9b98f;
    --accent-dim: rgba(240, 215, 189, 0.55);
    --danger: #e06c6c;
    --danger-soft: #e88f8f;
    /* Surface tint and image shadow are theme-bound: the dark values below
       are invisible (white tint) or far too heavy (0.4 black) once the
       interior flips to sand, so both sets are declared per theme. */
    --tint: rgba(255, 255, 255, 0.03);
    --shadow-img: 0 16px 40px rgba(0, 0, 0, 0.4);
    --ease: cubic-bezier(0.19, 1, 0.22, 1);
    --container-max: 1480px;

    /* Unified border-radius system */
    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 10px;
    --radius-xl: 12px;
    --radius-pill: 100px;
}

/* ---------------------------------------------------------
   The interior runs light on the brand sand. The splash stays
   dark by the owner's decision — a dark door into a warm house.
   --------------------------------------------------------- */
/* Page content sits on the brand sand.
   Contrast against #f0d7bd, measured, not guessed — the old values put every
   small label below AA on this background, which is exactly the "thin brown
   text on tan" that was unreadable:
     text-secondary  0.74 → 0.82   6.75:1 → 8.65:1
     text-muted      0.56 → 0.72   3.85:1 → 6.32:1   (was failing AA outright)
     accent   #8a4f22 → #7a4419    4.70:1 → 5.68:1
     accent-hover #b3672d → …deep  3.10:1 → 7.86:1   (hover was the worst of all;
                                    on a light ground a hover must go darker, not lighter)
   The brand sand itself is untouched — only the ink on it moved. */
body.standard-page {
    --bg: #f0d7bd;
    --bg-raise: #f7e8d8;
    --text-primary: #17120d;
    --text-secondary: rgba(23, 18, 13, 0.82);
    --text-muted: rgba(23, 18, 13, 0.72);
    --line: rgba(23, 18, 13, 0.24);
    --line-soft: rgba(23, 18, 13, 0.14);
    --accent: #7a4419;
    --accent-hover: #5b3315;
    --accent-deep: #4a2810;
    --accent-dim: rgba(122, 68, 25, 0.72);
    --danger: #97241f;
    --danger-soft: #7d1c18;
    --tint: rgba(23, 18, 13, 0.04);
    --shadow-img: 0 14px 34px rgba(23, 18, 13, 0.16);
}

/* Header and footer stay black — they carry the dark token set with them,
   so everything inside them keeps the sand accent and light text. */
.site-header,
.portfolio-footer {
    --bg: #0a0a0a;
    --bg-raise: #101010;
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.78);
    --text-muted: rgba(255, 255, 255, 0.62);
    --line: rgba(240, 215, 189, 0.18);
    --line-soft: rgba(240, 215, 189, 0.10);
    --accent: #f0d7bd;
    --accent-hover: #ffeddb;
    --accent-deep: #d9b98f;
    --accent-dim: rgba(240, 215, 189, 0.55);
    background: #0a0a0a;
    color: var(--text-primary);
}

/* =========================================================
   Page transitions — Crisp, Zero-Delay Flow
   ---------------------------------------------------------
   Instant click response with lightweight GPU-accelerated
   entrance glide. No blocking timeouts, no blurs.
   ========================================================= */

@view-transition { navigation: auto; }

.site-header      { view-transition-name: site-header; }
main              { view-transition-name: page-main; }
.portfolio-footer { view-transition-name: site-footer; }

/* Snappy entrance animation on page load (220ms, zero lag) */
@keyframes pageEntry {
    0% {
        opacity: 0;
        transform: translateY(12px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* No fill-mode: with `both`, the 100% keyframe's `transform: translateY(0)` —
   a no-op value, but not `none` — stays applied to <main> forever after the
   0.24s animation ends, which needlessly keeps it on its own compositing
   layer and would become a new containing block for any `position: fixed`
   descendant added later. Dropping the fill-mode lets the transform (and the
   layer) go once the entrance is done. */
main {
    animation: pageEntry 0.24s cubic-bezier(0.16, 1, 0.3, 1);
}

/* View Transition API enhancement for supported engines */
::view-transition-old(page-main) {
    animation: pageOut 0.2s cubic-bezier(0.4, 0, 0.2, 1) both;
}

::view-transition-new(page-main) {
    animation: pageIn 0.24s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes pageOut {
    to { opacity: 0; transform: translateY(-8px); }
}

@keyframes pageIn {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}

::view-transition-old(site-header),
::view-transition-new(site-header),
::view-transition-old(site-footer),
::view-transition-new(site-footer) {
    animation-duration: 0.2s;
    animation-timing-function: ease;
}

@media (prefers-reduced-motion: reduce) {
    main { animation: none !important; }
    ::view-transition-group(*),
    ::view-transition-old(*),
    ::view-transition-new(*) {
        animation: none !important;
    }
}

*, *::before, *::after { box-sizing: border-box; }

html {
    -webkit-text-size-adjust: 100%;
    /* The header is sticky, so an anchor jump (the skip link, above all)
       otherwise parks its target underneath it. site.js keeps --header-h
       in step with the real height; the fallback covers the no-JS case. */
    scroll-padding-top: var(--header-h, 100px);
}

body, html {
    margin: 0;
    padding: 0;
    width: 100%;
}

body {
    /* Sticky footer: short pages (404, form success) must not leave
       the footer floating mid-screen. */
    min-height: 100vh;
    min-height: 100svh;
    display: flex;
    flex-direction: column;
    background-color: var(--bg);
    font-family: 'Inter', system-ui, sans-serif;
    /* 400, not 300. Inter Light on the brand sand was a real part of why body
       copy read as faint — thin strokes lose more contrast than the ratio
       alone suggests. */
    font-weight: 400;
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

main { flex: 1 0 auto; }
.portfolio-footer { flex-shrink: 0; }

h1, h2, h3, h4, h5, h6 {
    font-family: 'Playfair Display', Georgia, serif;
    font-weight: 400;
    color: var(--text-primary);
    line-height: 1.15;
    margin: 0;
}

p { margin: 0; }

img { max-width: 100%; height: auto; display: block; }

ul, ol, dl, dd { margin: 0; padding: 0; }
ul, ol { list-style: none; }

a {
    color: var(--text-primary);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover { color: var(--accent); }

:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 4px;
}

.container {
    width: 100%;
    max-width: var(--container-max, 1480px);
    margin: 0 auto;
    padding: 0 clamp(24px, 4.5vw, 56px);
}

.visually-hidden {
    position: absolute;
    width: 1px; height: 1px;
    margin: -1px; padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
}

.skip-link {
    position: absolute;
    top: 0; left: 50%;
    transform: translate(-50%, -120%);
    z-index: 999;
    background: var(--text-primary);
    color: var(--bg);
    padding: 0.85rem 1.6rem;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    transition: transform 0.25s ease;
}

.skip-link:focus {
    transform: translate(-50%, 0);
    color: var(--bg);
}

/* =========================================================
   Buttons and links
   ========================================================= */

.cta-btn {
    display: inline-block;
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--line);
    padding: 0.95rem 2.25rem;
    border-radius: var(--radius-md, 8px);
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 0.875rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    text-decoration: none;
    cursor: pointer;
    /* isolate: guarantees ::before sits behind the label but above the page */
    position: relative;
    z-index: 0;
    isolation: isolate;
    overflow: hidden;
    transition: color 0.4s ease, border-color 0.4s ease;
}

.cta-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--text-primary);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.5s var(--ease);
    z-index: -1;
}

.cta-btn:hover,
.cta-btn:focus-visible {
    color: var(--bg);
    border-color: var(--text-primary);
}

.cta-btn:hover::before,
.cta-btn:focus-visible::before {
    transform: scaleX(1);
    transform-origin: left;
}

.cta-btn--solid {
    background: var(--text-primary);
    color: var(--bg);
    border-color: var(--text-primary);
}

.cta-btn--solid::before { background: var(--accent); }
.cta-btn--solid:hover,
.cta-btn--solid:focus-visible { color: var(--bg); border-color: var(--accent); }

.cta-link {
    display: inline-block;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--accent);
    padding-bottom: 4px;
    background-image: linear-gradient(var(--accent), var(--accent));
    background-repeat: no-repeat;
    background-position: 0 100%;
    background-size: 0% 1px;
    transition: background-size 0.45s var(--ease), color 0.3s ease;
}

.cta-link:hover,
.cta-link:focus-visible {
    color: var(--accent-hover);
    background-size: 100% 1px;
}

/* =========================================================
   Landing splash (index.php)
   Flex column — nothing is positioned by an animation.
   ========================================================= */

body.landing-page {
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
    position: relative;
}


.silk-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
    display: block;
}

.content {
    position: relative;
    z-index: 10;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    text-align: center;
    height: 100%;
    width: 100%;
    padding: clamp(24px, 4vh, 48px) 20px;
    gap: clamp(1.25rem, 3vh, 2.5rem);
}

.splash-top {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: clamp(1.25rem, 3vh, 2.25rem);
    max-width: 700px;
}



.brand-logo {
    max-height: clamp(64px, 11vh, 120px);
    width: auto;
    filter: brightness(0) invert(1); /* artwork is black on transparent */
}


.hero-intro h1 {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: clamp(1.75rem, 3.2vw, 2.5rem);
    line-height: 1.2;
    margin-bottom: 0.85rem;
}

.hero-intro p {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: clamp(0.95rem, 1.1vw, 1.05rem);
    color: var(--text-secondary);
    line-height: 1.65;
}

.center-nav {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: clamp(1rem, 2.4vw, 2rem);
    width: 100%;
    max-width: 1300px;
    /* Lifts the hover panel above the bottom block so a transient
       hover never fights the CTA for the same pixels. */
    z-index: 20;
}

.nav-item {
    position: relative;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    text-decoration: none;
    transition: opacity 0.4s ease;
    z-index: 1;
}

.nav-item:hover,
.nav-item:focus-within {
    z-index: 50;
}

.nav-text-wrapper {
    position: relative;
    z-index: 5;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: clamp(180px, 16vw, 250px);
    padding: clamp(0.85rem, 1.8vh, 1.15rem) clamp(1.4rem, 2.2vw, 2.2rem);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg, 10px);
    background: transparent;
    transition: border-color 0.35s var(--ease),
                transform 0.35s var(--ease);
    will-change: transform;
}

.nav-title {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    font-family: 'Playfair Display', Georgia, serif;
    font-size: clamp(1.2rem, 1.8vw, 1.65rem);
    font-weight: 500;
    color: var(--text-primary);
    line-height: 1.2;
    letter-spacing: 0.01em;
    transition: color 0.35s ease;
}

.nav-arrow {
    display: inline-block;
    width: 0.8em;
    height: 0.8em;
    color: var(--accent);
    opacity: 0.85;
    flex-shrink: 0;
    will-change: transform;
    transition: color 0.35s ease, opacity 0.35s ease, transform 0.35s var(--ease);
}

.nav-reveal {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    width: clamp(280px, 26vw, 360px);
    height: clamp(360px, 35vh, 460px);
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
    z-index: -1;
    border-radius: var(--radius-xl, 12px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.8);
    transition: opacity 0.5s var(--ease), transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.nav-reveal::after {
    display: none !important;
}

.nav-reveal-pair {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2px;
    width: 100%;
    height: 100%;
}

.nav-reveal > img,
.nav-reveal > .nav-reveal-pair {
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
}

.nav-reveal img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.15);
    filter: brightness(0.4) grayscale(30%); /* Dark enough without gradients */
    transition: transform 1s cubic-bezier(0.16, 1, 0.3, 1), filter 0.8s ease;
}

.nav-description {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 20px 24px;
    background: transparent;
    border-top: none;
    z-index: 2;
}

.nav-description span {
    display: block;
    font-size: 0.95rem;
    line-height: 1.55;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.85);
    text-align: center;
}

/* Hover and keyboard focus behave identically — only dim siblings when an actual item is active. */
.center-nav:has(.nav-item:hover) .nav-item:not(:hover),
.center-nav:has(.nav-item:focus-visible) .nav-item:not(:focus-visible) {
    opacity: 0.4;
}

.center-nav:has(.nav-item:hover) .nav-item:not(:hover) .nav-text-wrapper,
.center-nav:has(.nav-item:focus-visible) .nav-item:not(:focus-visible) .nav-text-wrapper {
    border-color: var(--line-soft);
}

.center-nav .nav-item:hover .nav-text-wrapper,
.center-nav .nav-item:focus-visible .nav-text-wrapper {
    border-color: var(--accent);
}

.nav-item:hover .nav-title,
.nav-item:focus-visible .nav-title { color: #fff; }

.nav-item:hover .nav-arrow,
.nav-item:focus-visible .nav-arrow {
    color: var(--accent-hover);
    opacity: 1;
}

.nav-item:active .nav-text-wrapper {
    border-color: var(--accent-hover);
}

.nav-item:focus-visible {
    outline: none;
}

.nav-item:focus-visible .nav-text-wrapper {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
}

.nav-item:hover .nav-reveal,
.nav-item:focus-visible .nav-reveal { opacity: 1; transform: translate(-50%, -50%) scale(1); }

.nav-item:hover .nav-reveal img,
.nav-item:focus-visible .nav-reveal img { transform: scale(1); filter: brightness(0.4) grayscale(0%); }

.bottom-center {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: clamp(1.5rem, 3vh, 2.5rem);
}

/* Splash-only: matches the footer's "Kasvame koos" — the shared .cta-btn on
   other pages (e.g. 404) keeps its default Inter treatment. */
.bottom-center .cta-btn { font-family: 'Playfair Display', Georgia, serif; }

/* One social component, used identically on the splash and in the footer. */
.social-links { display: flex; gap: 15px; }

/* Entrance motion — opt-in, and `backwards` so hover states survive. */
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(28px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

@media (prefers-reduced-motion: no-preference) {
    .silk-canvas  { animation: fadeIn 1.6s ease-out backwards; }
    .splash-top   { animation: fadeUp 1s var(--ease) 0.15s backwards; }
    .bottom-center{ animation: fadeUp 1s var(--ease) 0.85s backwards; }

    .center-nav .nav-item { animation: fadeUp 1s var(--ease) backwards; }
    .center-nav .nav-item:nth-child(1) { animation-delay: 0.35s; }
    .center-nav .nav-item:nth-child(2) { animation-delay: 0.5s; }
    .center-nav .nav-item:nth-child(3) { animation-delay: 0.65s; }
    .center-nav .nav-item:nth-child(4) { animation-delay: 0.8s; }
}

/* Laptop-height screens: the splash is locked to the viewport with overflow hidden —
   without this the CTA and socials fall off the bottom at 720p. Everything
   here is compaction, not removal. */
@media (max-height: 960px) and (min-width: 681px) {
    .content { padding: 24px 20px; gap: 1rem; }
    .hero-intro h1 { font-size: clamp(1.45rem, 2.5vw, 1.85rem); margin-bottom: 0.6rem; }
    .hero-intro p { font-size: 0.9rem; line-height: 1.55; }
    .center-nav { gap: clamp(0.75rem, 1.8vw, 1.4rem); }
    .nav-text-wrapper { min-width: clamp(160px, 14vw, 210px); padding: clamp(0.65rem, 1.4vh, 0.9rem) clamp(1.1rem, 1.8vw, 1.6rem); }
    .nav-title { font-size: clamp(1.05rem, 1.5vw, 1.35rem); }
    .bottom-center { gap: 1rem; }
}

/* Safety net: below this the composition genuinely cannot hold a full screen,
   so the splash stops being locked and simply scrolls. Clipping the CTA off
   the bottom of an `overflow: hidden` viewport is never the better trade. */
@media (max-height: 780px) and (min-width: 681px) {
    body.landing-page { height: auto; min-height: 100dvh; overflow: visible; }
    .content { height: auto; min-height: 100dvh; }
}

/* Short viewports: the hover panel cannot fit — drop the garnish, keep the seed.
   Width-scoped to the locked-height layout on purpose. Below 680px the splash
   switches to `height: auto` and simply scrolls, so nothing needs dropping —
   unscoped, this hid the positioning line on every 640px-tall Android. */
@media (max-height: 640px) and (min-width: 681px) {
    .nav-reveal { display: none; }
    .hero-intro p { display: none; }
}

@media (max-width: 900px) {
    .nav-reveal { width: clamp(170px, 22vw, 230px); }
}

/* Phones: the splash becomes a clean stacked navigation */
@media (max-width: 680px) {
    body.landing-page { height: auto; overflow: visible; }

    .content {
        height: auto;
        min-height: 100dvh;
        justify-content: flex-start;
        padding: 32px 20px 48px;
        gap: 2rem;
    }

    .center-nav {
        flex-direction: column;
        align-items: center;
        gap: 0.85rem;
        width: 100%;
        max-width: 380px;
    }

    /* Each card keeps one fixed footprint whether resting or active — only
       the image's opacity/colour and the title's tone cross-fade, so
       nothing reflows as the list scrolls. Activation is scroll-driven
       (splashMobileActivation() in site.js toggles .is-active as a card
       crosses the viewport's centre band) since touch has no hover and a
       second confirming tap is worse than either. */
    .nav-item {
        position: relative;
        width: 100%;
        max-width: 100%;
        height: clamp(200px, 54vw, 260px);
        overflow: hidden;
        border-radius: var(--radius-lg, 10px);
    }

    .nav-text-wrapper {
        width: auto;
        max-width: calc(100% - 2.4rem);
        min-width: 0;
        padding: 0.95rem 1.4rem;
        border-radius: var(--radius-md, 8px);
    }

    .nav-title {
        font-size: clamp(1.15rem, 4.5vw, 1.35rem);
    }

    .nav-reveal {
        position: absolute;
        inset: 0;
        top: auto;
        left: auto;
        transform: none;
        width: 100%;
        height: 100%;
        opacity: 0;
        z-index: 0;
        border-radius: 0;
        box-shadow: none;
    }

    /* The desktop hover/focus rules aren't width-scoped, and touch browsers
       can apply a sticky :hover after a tap — without this the popup's
       translate(-50%,-50%) fires on this now-static, inset panel and shoves
       it off-centre (the exact bug already fixed once for the old floating
       version; see mrmeedia_project memory, 2026-08-05 second pass). */
    .nav-item:hover .nav-reveal,
    .nav-item:focus-visible .nav-reveal {
        transform: none;
    }

    .nav-reveal img {
        filter: brightness(0.45) grayscale(45%);
        transform: scale(1.05);
    }

    .nav-description {
        display: none;
    }

    .nav-item.is-active .nav-reveal { opacity: 1; }

    .nav-item.is-active .nav-reveal img {
        filter: brightness(0.45) grayscale(0%);
        transform: scale(1);
    }

    .nav-item.is-active .nav-text-wrapper { border-color: var(--accent); }
    .nav-item.is-active .nav-title { color: #fff; }

    .nav-item.is-active .nav-arrow {
        color: var(--accent-hover);
        opacity: 1;
    }

    /* Hover/focus-driven dimming is a desktop concept; on touch the same
       dim-the-others language is driven by scroll position instead. */
    .center-nav:has(.nav-item:hover) .nav-item:not(:hover),
    .center-nav:has(.nav-item:focus-visible) .nav-item:not(:focus-visible) {
        opacity: 1;
    }

    .center-nav:has(.nav-item.is-active) .nav-item:not(.is-active) {
        opacity: 0.4;
    }

    .bottom-center { margin-top: 1rem; }
    .social-link svg { width: 34px; height: 34px; }
}

/* =========================================================
   Standard pages — header and footer
   ========================================================= */

.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background-color: var(--bg);
    border-bottom: 1px solid var(--line-soft);
    box-shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.4);
    padding: clamp(0.45rem, 0.8vw, 0.65rem) 0;
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.brand-link { display: inline-flex; align-items: center; }
.brand-link .brand-logo { max-height: clamp(62px, 6.2vw, 84px); }
.brand-link:hover .brand-logo { opacity: 0.75; transition: opacity 0.3s ease; }

.main-nav {
    display: flex;
    align-items: center;
    gap: clamp(1.4rem, 3vw, 2.75rem);
}

/* ---------------------------------------------------------
   Nav links — the same interaction the splash already uses:
   the row recedes, the one you touch warms to the brand sand
   and lifts. No rules, no underlines, no borders in any state.
   --------------------------------------------------------- */

.nav-link {
    /* inline-flex + min-height keeps every nav word a 42px touch target
       without adding visible box or changing where the text sits. */
    display: inline-flex;
    align-items: center;
    min-height: 42px;
    padding: 4px 0;
    font-size: 0.9rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    transition: color 0.4s ease, opacity 0.4s ease, transform 0.5s var(--ease);
}

.main-nav .nav-link {
    font-size: clamp(0.9rem, 1.05vw, 1.02rem);
    letter-spacing: 0.07em;
}

.nav-link.is-current { color: var(--accent); }

.main-nav:has(.nav-link:hover) .nav-link:not(:hover),
.main-nav:has(.nav-link:focus-visible) .nav-link:not(:focus-visible),
.footer-nav:has(.nav-link:hover) .nav-link:not(:hover),
.footer-nav:has(.nav-link:focus-visible) .nav-link:not(:focus-visible) {
    opacity: 0.35;
}

.main-nav .nav-link:hover,
.main-nav .nav-link:focus-visible,
.footer-nav .nav-link:hover,
.footer-nav .nav-link:focus-visible {
    opacity: 1;
    color: var(--accent);
    transform: translateY(-3px);
}

@media (prefers-reduced-motion: reduce) {
    .nav-link,
    .nav-arrow { transition: color 0.2s linear, opacity 0.2s linear; }
    .main-nav .nav-link:hover,
    .main-nav .nav-link:focus-visible,
    .footer-nav .nav-link:hover,
    .footer-nav .nav-link:focus-visible,
    .nav-item:hover .nav-arrow,
    .nav-item:focus-visible .nav-arrow { transform: none; }
}


/* =========================================================
   Page shell
   ========================================================= */

.page-content { padding-bottom: 0; }

.page-header {
    padding: clamp(1.75rem, 3.5vw, 3rem) 0 clamp(1.25rem, 2.5vw, 2rem);
    max-width: 780px;
    margin: 0 auto;
    text-align: center;
}

.page-header h1 {
    font-size: clamp(2rem, 3.5vw, 2.75rem);
    line-height: 1.15;
    margin-bottom: 0.65rem;
}

.page-header p {
    color: var(--text-secondary);
    font-size: clamp(1rem, 1.2vw, 1.125rem);
    line-height: 1.6;
    max-width: 62ch;
    margin-left: auto;
    margin-right: auto;
}

/* =========================================================
   Teenused — split list with a cross-fading image column
   ========================================================= */

/* Titles run down the left; the matching text and image sit on the right
   and swap in place. `display: contents` lets each service stay one unit in
   the markup while the grid splits it across the two columns — so the mobile
   stack keeps title-then-panel order without duplicating any content. */

.services-split {
    display: grid;
    grid-template-columns: minmax(0, 38%) minmax(0, 62%);
    column-gap: clamp(2rem, 3.5vw, 3.5rem);
    padding-bottom: clamp(2.5rem, 4.5vw, 4rem);
    align-items: stretch;
}

.service { display: contents; }

.service-title {
    grid-column: 1;
    margin: 0;
    padding: 0;
    border-bottom: 1px solid var(--line-soft);
}

.service:last-child .service-title {
    border-bottom: none;
}

.service-title-btn {
    display: flex;
    flex-direction: row;
    align-items: center;
    width: 100%;
    height: 100%;
    padding: clamp(0.75rem, 1.2vw, 1.1rem) 0;
    background: transparent;
    border: none;
    cursor: pointer;
    text-align: left;
    font: inherit;
    transition: opacity 0.3s ease, transform 0.4s var(--ease);
}

.service-title-text {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: clamp(1.25rem, 1.7vw, 1.55rem);
    font-weight: 400;
    line-height: 1.2;
    color: var(--text-primary);
    transition: color 0.35s ease, transform 0.4s var(--ease);
}

.services-split.js-ready .service-title .service-title-btn {
    opacity: 0.45;
}

.services-split.js-ready .service-title:hover .service-title-btn,
.services-split.js-ready .service-title-btn:focus-visible {
    opacity: 1;
    transform: translateX(8px);
}

.services-split.js-ready .service-title:hover .service-title-text,
.services-split.js-ready .service-title-btn:focus-visible .service-title-text {
    color: var(--accent-deep);
}

.services-split.js-ready .service-title.is-active .service-title-btn {
    opacity: 1;
    transform: translateX(10px);
}

.services-split.js-ready .service-title.is-active .service-title-text {
    color: var(--accent-deep);
    font-weight: 500;
}

.service-panel {
    grid-column: 2;
    grid-row: 1 / -1;
    align-self: start;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(8px);
    transition: opacity 0.35s ease, transform 0.4s var(--ease), visibility 0.35s;
}

.service-panel.is-active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: none;
}

.service-view {
    display: flex;
    flex-direction: column;
    gap: clamp(1rem, 1.8vw, 1.6rem);
}

.service-figure {
    margin: 0;
    width: 100%;
    border-radius: var(--radius-lg, 10px);
    overflow: hidden;
    border: 1px solid var(--line-soft);
    background: var(--bg-raise);
}

.service-figure img {
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    display: block;
    transition: transform 0.75s var(--ease);
}

.service-view:hover .service-figure img {
    transform: scale(1.02);
}

.service-details {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.service-lead {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: clamp(1.25rem, 1.8vw, 1.55rem);
    font-weight: 500;
    color: var(--text-primary);
    line-height: 1.3;
    margin: 0;
}

.service-desc {
    font-size: 0.98rem;
    line-height: 1.7;
    color: var(--text-secondary);
    margin: 0;
    max-width: 58ch;
}

.service-action-link {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: 0.35rem;
    padding: 0.4rem 0;
    min-height: 40px;
    width: fit-content;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    font-weight: 600;
    color: var(--accent);
    text-decoration: none;
    position: relative;
    transition: color 0.35s ease;
}

.service-action-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 1.5px;
    background: var(--accent);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.35s var(--ease);
}

.service-action-link:hover,
.service-action-link:focus-visible {
    color: var(--accent-deep);
}

.service-action-link:hover::after,
.service-action-link:focus-visible::after {
    transform: scaleX(1);
    background: var(--accent-deep);
}

.service-action-link .ic {
    transition: transform 0.35s var(--ease);
}

.service-action-link:hover .ic {
    transform: translateX(5px);
}

@media (prefers-reduced-motion: reduce) {
    .service-title-btn,
    .service-panel,
    .service-figure img,
    .service-action-link .ic { transition: none; }
    .services-split.js-ready .service-title:hover .service-title-btn,
    .services-split.js-ready .service-title.is-active .service-title-btn { transform: none; }
}

/* =========================================================
   Tulemused / Work Showcase
   ========================================================= */

.work-showcase { padding: clamp(2rem, 4vw, 3rem) 0 clamp(4rem, 9vw, 7rem); }

.showcase-header {
    margin-bottom: clamp(1.75rem, 3.5vw, 2.5rem);
    padding-top: clamp(3rem, 6vw, 5rem);
    border-top: 1px solid var(--line-soft);
    text-align: center;
}

.showcase-header h2 {
    font-size: clamp(1.75rem, 3vw, 2.35rem);
    line-height: 1.2;
    margin: 0 0 0.75rem;
}

.showcase-header p {
    color: var(--text-secondary);
    font-size: clamp(1rem, 1.2vw, 1.125rem);
    line-height: 1.6;
    max-width: 68ch;
    margin: 0 auto;
}

/* ---------------------------------------------------------
   Kinetic Stream Rails
   --------------------------------------------------------- */
.kinetic-gallery-wrapper {
    --reel-w: clamp(220px, 17vw, 275px);
    --reel-gap: clamp(12px, 1.25vw, 18px);
    --edge-fade: clamp(24px, 4vw, 56px);

    position: relative;
    width: 100%;
    max-width: 100%;
    margin: 0;
    overflow: hidden;
    padding: 0.75rem 0;
    display: flex;
    flex-direction: column;
    gap: var(--reel-gap);
    cursor: grab;
    user-select: none;
    -webkit-user-select: none;
    mask-image: linear-gradient(to right, transparent 0, black var(--edge-fade), black calc(100% - var(--edge-fade)), transparent 100%);
    -webkit-mask-image: linear-gradient(to right, transparent 0, black var(--edge-fade), black calc(100% - var(--edge-fade)), transparent 100%);
}

.kinetic-gallery-wrapper:active {
    cursor: grabbing;
}

.kinetic-rail {
    display: flex;
    width: 100%;
    overflow: hidden;
    touch-action: pan-y;
}

.kinetic-track {
    display: flex;
    gap: var(--reel-gap);
    width: max-content;
    will-change: transform;
}

@keyframes kineticDriftLeft {
    0% { transform: translate3d(0, 0, 0); }
    100% { transform: translate3d(-50%, 0, 0); }
}

@keyframes kineticDriftRight {
    0% { transform: translate3d(-50%, 0, 0); }
    100% { transform: translate3d(0, 0, 0); }
}

.kinetic-rail--left .kinetic-track {
    animation: kineticDriftLeft 36s linear infinite;
}

.kinetic-rail--right .kinetic-track {
    animation: kineticDriftRight 40s linear infinite;
}

.kinetic-gallery-wrapper:hover .kinetic-track,
.kinetic-gallery-wrapper:focus-within .kinetic-track,
.kinetic-gallery-wrapper.is-paused .kinetic-track {
    animation-play-state: paused;
}

.kinetic-gallery-wrapper .gallery-card {
    flex: 0 0 var(--reel-w);
    width: var(--reel-w);
    min-width: 0;
    box-sizing: border-box;
    background: var(--bg-raise);
    border: 1px solid var(--line-soft);
    border-radius: var(--radius-xl, 12px);
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.35s var(--ease), border-color 0.3s ease, box-shadow 0.35s ease;
    text-align: left;
}

.kinetic-gallery-wrapper .gallery-card:hover,
.kinetic-gallery-wrapper .gallery-card:focus-visible {
    transform: translateY(-5px) scale(1.02);
    border-color: var(--accent);
    box-shadow: 0 18px 36px rgba(0, 0, 0, 0.3);
    z-index: 10;
}

.gallery-card-media {
    position: relative;
    width: 100%;
    aspect-ratio: 9 / 14;
    overflow: hidden;
    background: #141414;
}

.gallery-card-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s var(--ease);
}

.gallery-card:hover .gallery-card-media img,
.gallery-card:focus-visible .gallery-card-media img {
    transform: scale(1.05);
}

.gallery-card-badges {
    position: absolute;
    top: 10px;
    left: 10px;
    right: 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.4rem;
    z-index: 2;
    pointer-events: none;
}

.gallery-badge-views {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.28rem 0.55rem;
    border-radius: 999px;
    background: rgba(10, 10, 10, 0.78);
    backdrop-filter: blur(6px);
    color: #ffffff;
    font-size: 0.74rem;
    font-weight: 500;
    letter-spacing: 0.02em;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.gallery-badge-views .gallery-icon {
    color: var(--accent);
}

.gallery-badge-cat {
    display: inline-flex;
    align-items: center;
    padding: 0.28rem 0.5rem;
    border-radius: 999px;
    background: rgba(10, 10, 10, 0.65);
    backdrop-filter: blur(6px);
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.68rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.gallery-card-hover-action {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    background: rgba(10, 10, 10, 0.3);
    opacity: 0;
    transition: opacity 0.35s ease;
    z-index: 3;
    pointer-events: none;
}

.gallery-card:hover .gallery-card-hover-action,
.gallery-card:focus-visible .gallery-card-hover-action {
    opacity: 1;
}

/* Touch devices have no real :hover, so the watch button would otherwise
   never be reachable — show it permanently, without the dimming tint so
   the thumbnails stay clean. */
@media (hover: none) {
    .gallery-card-hover-action {
        opacity: 1;
        background: transparent;
    }
}

.gallery-action-btn {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: rgba(10, 10, 10, 0.85);
    backdrop-filter: blur(8px);
    border: 1px solid var(--accent);
    color: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    transform: scale(0.85);
    transition: transform 0.35s var(--ease);
    text-decoration: none;
    pointer-events: auto;
}

.gallery-card:hover .gallery-action-btn,
.gallery-card:focus-visible .gallery-action-btn {
    transform: scale(1);
}

@media (hover: none) {
    .gallery-action-btn { transform: scale(1); }
}

.gallery-action-label {
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #fff;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
}

.gallery-card-info {
    padding: 0.85rem 0.95rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    flex-grow: 1;
}

.gallery-card-title {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.05rem;
    font-weight: 500;
    color: var(--text-primary);
    line-height: 1.25;
    margin: 0;
    transition: color 0.3s ease;
}

.gallery-card:hover .gallery-card-title,
.gallery-card:focus-visible .gallery-card-title {
    color: var(--accent);
}

.gallery-card-client {
    font-size: 0.82rem;
    color: var(--text-muted);
    margin: 0;
    line-height: 1.4;
}

.gallery-footer-note {
    margin-top: clamp(2rem, 4vw, 3rem);
    padding-top: 1.5rem;
    border-top: 1px solid var(--line-soft);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.gallery-footer-note p {
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.55;
    color: var(--text-muted);
    max-width: 60ch;
}

/* ---------------------------------------------------------
   Gallery Lightbox Modal
   --------------------------------------------------------- */
html.lightbox-open,
body.lightbox-open {
    overflow: hidden;
}

body.lightbox-open .kinetic-track {
    animation-play-state: paused !important;
}

.gallery-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(12px, 3vw, 24px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.22s ease, visibility 0.22s ease;
    contain: layout paint;
}

.gallery-lightbox.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.lightbox-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(8, 8, 8, 0.93);
    cursor: pointer;
    touch-action: none;
}

.lightbox-dialog {
    position: relative;
    z-index: 2;
    width: min(92vw, 840px);
    max-height: min(90vh, 720px);
    background: var(--bg-raise);
    border: 1px solid var(--line);
    border-radius: var(--radius-xl, 12px);
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.6);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transform: translate3d(0, 10px, 0) scale(0.97);
    will-change: transform, opacity;
    transition: transform 0.26s cubic-bezier(0.16, 1, 0.3, 1);
}

.gallery-lightbox.is-open .lightbox-dialog {
    transform: translate3d(0, 0, 0) scale(1);
}

.lightbox-close {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 10;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(10, 10, 10, 0.75);
    border: 1px solid var(--line-soft);
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.lightbox-close:hover,
.lightbox-close:focus-visible {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--bg-raise);
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: rgba(10, 10, 10, 0.75);
    border: 1px solid var(--line-soft);
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.lightbox-nav:hover,
.lightbox-nav:focus-visible {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--bg-raise);
}

.lightbox-prev { left: 14px; }
.lightbox-next { right: 14px; }

.lightbox-content {
    display: grid;
    grid-template-columns: 340px 1fr;
    height: 100%;
    max-height: min(90vh, 720px);
    overflow-y: auto;
}

.lightbox-media-wrapper {
    position: relative;
    background: #0a0a0a;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    min-height: 400px;
    border-right: 1px solid var(--line-soft);
}

.lightbox-img {
    width: 100%;
    height: 100%;
    max-height: 720px;
    object-fit: contain;
    display: block;
}

.lightbox-meta {
    padding: clamp(1.75rem, 3vw, 2.5rem);
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.9rem;
}

.lightbox-header-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.lightbox-badge-cat {
    font-size: 0.76rem;
    font-weight: 500;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--accent);
}

.lightbox-badge-views {
    font-size: 0.8rem;
    color: var(--text-muted);
    padding-left: 0.75rem;
    border-left: 1px solid var(--line-soft);
}

.lightbox-title {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: clamp(1.35rem, 2.2vw, 1.75rem);
    font-weight: 500;
    color: var(--text-primary);
    line-height: 1.2;
    margin: 0;
}

.lightbox-client {
    font-size: 0.92rem;
    color: var(--text-secondary);
    font-weight: 500;
    margin: -0.35rem 0 0;
}

.lightbox-desc {
    font-size: 0.95rem;
    line-height: 1.65;
    color: var(--text-secondary);
    margin: 0.25rem 0 0;
}

.lightbox-footer-row {
    margin-top: 0.75rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--line-soft);
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 1rem;
    flex-wrap: wrap;
}

/* Always-visible badge on the lightbox media itself — the actual video only
   exists on Instagram, so this is the obvious way to reach it. */
.lightbox-watch {
    position: absolute;
    left: 50%;
    bottom: clamp(1rem, 3vw, 1.75rem);
    transform: translateX(-50%);
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.7rem 1.25rem;
    border-radius: 999px;
    background: rgba(10, 10, 10, 0.85);
    backdrop-filter: blur(8px);
    border: 1px solid var(--accent);
    color: #fff;
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 0.02em;
    text-decoration: none;
    white-space: nowrap;
    z-index: 2;
    transition: transform 0.3s var(--ease), border-color 0.3s ease;
}

.lightbox-watch .ic { color: var(--accent); }

.lightbox-watch:hover,
.lightbox-watch:focus-visible {
    transform: translateX(-50%) translateY(-3px);
    border-color: var(--accent-hover);
}

.lightbox-cta {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--accent);
    text-decoration: none;
    transition: color 0.3s ease;
}

.lightbox-cta:hover,
.lightbox-cta:focus-visible {
    color: var(--accent-hover);
}

.lightbox-cta .ic {
    transition: transform 0.3s var(--ease);
}

.lightbox-cta:hover .ic,
.lightbox-cta:focus-visible .ic {
    transform: translateX(4px);
}

@media (max-width: 1024px) {
    .kinetic-gallery-wrapper {
        --reel-w: clamp(195px, 24vw, 235px);
        --reel-gap: 14px;
        --edge-fade: clamp(20px, 3.5vw, 36px);
    }
}

@media (max-width: 900px) {
    .showcase-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1.25rem;
        text-align: left;
    }

    .showcase-header p {
        margin: 0;
    }
}

@media (max-width: 900px), (max-height: 650px) {
    .lightbox-dialog {
        max-height: min(92vh, 640px);
    }
    .lightbox-content {
        grid-template-columns: 1fr;
        max-height: min(92vh, 640px);
    }
    .lightbox-media-wrapper {
        height: clamp(220px, 40vh, 320px);
        min-height: auto;
        border-right: none;
        border-bottom: 1px solid var(--line-soft);
    }
    .lightbox-img {
        max-height: 100%;
    }
    .lightbox-meta {
        padding: 1.25rem 1.5rem;
    }
}

@media (max-width: 768px) {
    .kinetic-gallery-wrapper {
        --reel-w: clamp(165px, 36vw, 205px);
        --reel-gap: 12px;
        --edge-fade: clamp(16px, 3vw, 28px);
    }
    .gallery-card-info {
        padding: 0.75rem 0.85rem 0.95rem;
    }
    .gallery-card-title {
        font-size: 0.95rem;
    }
    .gallery-card-client {
        font-size: 0.76rem;
    }
    .gallery-badge-views {
        font-size: 0.68rem;
        padding: 0.24rem 0.45rem;
    }
    .gallery-badge-cat {
        font-size: 0.64rem;
        padding: 0.24rem 0.45rem;
    }
    .lightbox-nav {
        width: 38px;
        height: 38px;
    }
    .lightbox-prev { left: 8px; }
    .lightbox-next { right: 8px; }
}

@media (max-width: 480px) {
    .kinetic-gallery-wrapper {
        --reel-w: clamp(145px, 48vw, 175px);
        --reel-gap: 10px;
        --edge-fade: 16px;
    }
    .gallery-card-info {
        padding: 0.6rem 0.7rem 0.75rem;
    }
    .gallery-card-title {
        font-size: 0.88rem;
        line-height: 1.2;
    }
    .gallery-card-client {
        font-size: 0.72rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .kinetic-track {
        animation: none !important;
    }
    .kinetic-gallery-wrapper {
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        mask-image: none;
        -webkit-mask-image: none;
    }
    .kinetic-gallery-wrapper .gallery-card {
        scroll-snap-align: start;
        transition: none !important;
        transform: none !important;
    }
    .gallery-card-media img,
    .lightbox-dialog,
    .lightbox-cta .ic {
        transition: none !important;
        transform: none !important;
    }
}

/* =========================================================
   Footer — ported from the library "Creative Portfolio Footer",
   skinned to the house type and gold rather than its acid yellow.
   ========================================================= */

.portfolio-footer {
    position: relative;
    z-index: 10;
    border-top-left-radius: clamp(14px, 1.8vw, 22px);
    border-top-right-radius: clamp(14px, 1.8vw, 22px);
    margin-top: clamp(1.5rem, 3.5vw, 3rem);
    padding: clamp(3.5rem, 6vw, 5.5rem) clamp(20px, 5vw, 5%) 2.5rem;
    box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.08);
}

.footer-container {
    max-width: 1600px;
    margin: 0 auto;
}

.cta-section {
    text-align: center;
    margin-bottom: clamp(3rem, 6vw, 4.5rem);
}

.cta-title {
    display: inline-block;
    font-family: 'Playfair Display', Georgia, serif;
    font-size: clamp(2.5rem, 8.5vw, 7.5rem);
    font-weight: 600;
    line-height: 0.92;
    letter-spacing: -0.02em;
    text-transform: uppercase;
    margin-bottom: clamp(1.25rem, 2.5vw, 2rem);
    color: var(--text-primary);
    transition: transform 0.6s var(--ease);
}

.cta-title-line { display: block; }

.cta-title-line--accent {
    color: var(--accent);
    font-style: italic;
    transition: color 0.45s ease;
}

.cta-title:hover,
.cta-title:focus-visible {
    transform: scale(1.02);
    color: var(--text-primary);
}

.cta-title:hover .cta-title-line--accent,
.cta-title:focus-visible .cta-title-line--accent { color: var(--accent-hover); }

@media (prefers-reduced-motion: reduce) {
    .cta-title { transition: none; }
    .cta-title:hover,
    .cta-title:focus-visible { transform: none; }
}

.cta-subtitle {
    max-width: 46ch;
    margin: 0 auto;
    font-size: clamp(1.1rem, 1.4vw, 1.3rem);
    color: var(--text-secondary);
    line-height: 1.6;
}

.footer-grid {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 2.5rem;
    flex-wrap: wrap;
    padding-top: clamp(2.5rem, 5vw, 3.75rem);
    border-top: 1px solid var(--line-soft);
}

.footer-label {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
}

.footer-info a {
    /* fit-content keeps the tap area on the address itself, not the whole row. */
    display: flex;
    align-items: center;
    width: fit-content;
    min-height: 44px;
    font-size: clamp(1.1rem, 1.5vw, 1.35rem);
    font-weight: 400;
    color: var(--text-primary);
}

.footer-info a:hover,
.footer-info a:focus-visible { color: var(--accent); }

.magnetic-link {
    display: flex;
    align-items: center;
    justify-content: center;
    /* Never below 44px — touch target minimum. */
    width: clamp(52px, 4.4vw, 62px);
    height: clamp(52px, 4.4vw, 62px);
    border-radius: 50%;
    border: 1px solid var(--line);
    color: var(--text-primary);
    transform: translate(var(--mx, 0px), var(--my, 0px));
    transition: border-color 0.3s ease, color 0.3s ease;
    will-change: transform;
}

.magnetic-link.is-releasing {
    transition: transform 0.5s var(--ease), border-color 0.3s ease, color 0.3s ease;
}

.magnetic-mark {
    display: flex;
    pointer-events: none;
    transform: translate(var(--ix, 0px), var(--iy, 0px));
}

.magnetic-link.is-releasing .magnetic-mark {
    transition: transform 0.5s var(--ease);
}

.magnetic-link svg { width: 22px; height: 22px; }

.magnetic-link:hover,
.magnetic-link:focus-visible {
    border-color: var(--accent);
    color: var(--accent);
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1.5rem 2.5rem;
    flex-wrap: wrap;
    margin-top: clamp(2.5rem, 4vw, 3.5rem);
    color: var(--text-muted);
    font-size: 0.875rem;
}

.footer-nav { display: flex; gap: clamp(1.25rem, 3vw, 2.25rem); }
.footer-nav .nav-link { font-size: 0.85rem; letter-spacing: 0.08em; }

.copyright {
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 0.82rem;
}

/* Ideearendus backlink — bottom-right editorial badge */
.footer-credit {
    display: inline-flex;
    flex-direction: column;
    align-items: flex-end;
    text-align: right;
    gap: 0.2rem;
    text-decoration: none;
    color: inherit;
    margin-left: auto;
    transition: transform 0.3s var(--ease);
}

.footer-credit-label {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-weight: 500;
    color: var(--text-muted);
    transition: color 0.3s ease;
}

.footer-credit-row {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.footer-credit-name {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.05rem;
    font-weight: 500;
    color: var(--text-primary);
    letter-spacing: 0.01em;
    transition: color 0.3s ease;
}

.footer-credit-arrow {
    color: var(--accent);
    opacity: 0.75;
    transition: transform 0.3s var(--ease), opacity 0.3s ease, color 0.3s ease;
}

.footer-credit:hover .footer-credit-name,
.footer-credit:focus-visible .footer-credit-name {
    color: var(--accent);
}

.footer-credit:hover .footer-credit-label,
.footer-credit:focus-visible .footer-credit-label {
    color: var(--text-secondary);
}

.footer-credit:hover .footer-credit-arrow,
.footer-credit:focus-visible .footer-credit-arrow {
    opacity: 1;
    transform: translate(2px, -2px);
    color: var(--accent-hover);
}

/* =========================================================
   404
   ========================================================= */

.error-page { text-align: center; padding: clamp(4rem, 10vw, 7rem) 0; }
.error-page h1 { font-size: clamp(2.25rem, 4vw, 3.25rem); margin-bottom: 1.25rem; }
.error-page p { color: var(--text-secondary); font-size: 1rem; margin-bottom: 2.5rem; }

/* =========================================================
   Scroll-linked motion — progressive enhancement only.
   Browsers without support simply show the content.
   ========================================================= */

@media (prefers-reduced-motion: no-preference) {
    @supports (animation-timeline: view()) {
        .gallery-grid {
            animation: fadeUp linear both;
            animation-timeline: view();
            animation-range: entry 5% cover 28%;
        }
    }
}

/* =========================================================
   Responsive
   ========================================================= */

@media (max-width: 900px) {
    .services-split {
        display: block;
    }

    .service {
        display: block;
        border-bottom: 1px solid var(--line-soft);
    }

    .service:last-child {
        border-bottom: none;
    }

    .service-title {
        border: none;
        padding: 0;
    }

    .service-title-btn {
        display: flex;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: 1rem;
        width: 100%;
        min-height: auto;
        padding: clamp(0.85rem, 3vw, 1.15rem) 0;
        text-align: left;
        transform: none !important;
        opacity: 1 !important;
    }

    .service-title-btn::after {
        content: '';
        flex-shrink: 0;
        width: 10px;
        height: 10px;
        border-right: 1.5px solid var(--text-muted);
        border-bottom: 1.5px solid var(--text-muted);
        transform: rotate(45deg);
        transition: transform 0.35s var(--ease), border-color 0.35s ease;
    }

    .service-title-btn[aria-expanded="true"]::after {
        transform: rotate(-135deg);
        border-color: var(--accent);
    }

    .service-title-text {
        font-size: clamp(1.15rem, 3.5vw, 1.35rem);
        transform: none !important;
    }

    .service-title:hover,
    .service-title:focus-within { transform: none; }

    .service-panel { opacity: 1; padding-bottom: clamp(1.5rem, 5vw, 2.5rem); }

    .services-split.accordion-ready .service-panel { display: none; }

    .services-split.accordion-ready .service-panel.is-active {
        display: block;
        animation: fadeIn 0.35s ease;
    }

    .service-figure img {
        aspect-ratio: 16 / 10;
    }

    .service-details {
        margin-top: 1rem;
    }
}

@media (max-width: 900px) and (prefers-reduced-motion: reduce) {
    .services-split.accordion-ready .service-panel.is-active { animation: none; }
    .service-title-btn::after { transition: none; }
}

@media (max-width: 860px) {
    .contact-layout { grid-template-columns: 1fr; }
    .contact-faces { max-width: 380px; }
    .footer-grid { flex-direction: column; align-items: flex-start; gap: 2.5rem; }
    .footer-bottom { flex-direction: column; align-items: flex-start; gap: 1.5rem; }
    .footer-credit { align-items: flex-start; text-align: left; margin-left: 0; }
}

@media (max-width: 680px) {
    .site-header {
        padding: 0.5rem 0;
    }
    .header-inner {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 0.45rem;
    }
    .brand-link .brand-logo {
        max-height: 55px;
    }
    .main-nav {
        width: 100%;
        justify-content: center;
        gap: 0.45rem 1.15rem;
        flex-wrap: wrap;
    }
    .main-nav .nav-link {
        font-size: 0.85rem;
        letter-spacing: 0.05em;
        min-height: 36px;
        padding: 2px 0;
    }
    .service-action-link,
    .footer-label { font-size: 0.8rem; }
}

@media (max-width: 560px) {
    .cta-btn { width: 100%; text-align: center; padding: 0.95rem 1.5rem; }
    .cta-title::after { height: 4px; }
}

@media (max-width: 380px) {
    .main-nav { gap: 0.4rem 1rem; }
    .main-nav .nav-link { font-size: 0.82rem; }
}



/* =========================================================
   /alusta — "Kaks ust, üks rada"
   ---------------------------------------------------------
   The page runs on the standard-page sand tokens like every
   other interior page; it carries the real header and footer.
   Step-hiding is JS-only (see the html.js gate below): with
   JS off every view stays on the page and both forms post
   straight to PHP.
   ========================================================= */

html.js .al-view:not(.is-on)   { display: none; }
html.js .pkg-panel:not(.is-on) { display: none; }

/* The rail, and the two outcome beats, are meaningless until JS puts you on
   one — they ship with [hidden] so they stay out of the no-JS flow. Declared
   explicitly, because a class that sets `display` would otherwise outrank the
   UA's own [hidden] rule. */
.rail[hidden],
.al-view[hidden] { display: none; }


/* ---------------------------------------------------------
   The rail — a scrubber, not a stepper. The fill is the
   loader; the playhead parks in the middle of the beat you
   are on and only runs the track out on the last one.
   --------------------------------------------------------- */
.rail {
    position: sticky;
    top: var(--header-h, 100px);
    z-index: 60;
    background: var(--bg);
    border-bottom: 1px solid var(--line-soft);
}

.rail-inner {
    padding-top: 1.1rem;
    padding-bottom: 0;
}

.rail-marks {
    list-style: none;
    margin: 0 0 0.7rem;
    padding: 0;
    display: grid;
    gap: 0;
}

.rail-marks li {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding-right: 0.75rem;
}

.rail-step-btn {
    background: none;
    border: none;
    font: inherit;
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-weight: 500;
    color: var(--text-muted);
    opacity: 0.6;
    padding: 0.4rem 0.5rem 0.6rem 0;
    cursor: default;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    transition: color 0.3s ease, opacity 0.3s ease;
    text-align: left;
    width: 100%;
}

.rail-marks li.is-done .rail-step-btn {
    color: var(--accent);
    opacity: 0.85;
    cursor: pointer;
}

.rail-marks li.is-done .rail-step-btn:hover {
    color: var(--accent-deep);
    opacity: 1;
    text-decoration: underline;
    text-underline-offset: 4px;
}

.rail-marks li.is-now .rail-step-btn {
    color: var(--accent-deep);
    font-weight: 700;
    opacity: 1;
    cursor: default;
}

.rail-track {
    position: relative;
    height: 2px;
    background: rgba(23, 18, 13, 0.14);
}

.rail-fill {
    position: absolute;
    inset: 0 auto 0 0;
    width: 0;
    background: var(--accent);
    transition: width 0.65s cubic-bezier(0.16, 1, 0.3, 1);
}

.rail-fill::after {
    content: '';
    position: absolute;
    right: -1px;
    top: -6px;
    width: 2px;
    height: 14px;
    background: var(--accent-deep);
}

/* Compact form: below 680px only the beat you are on is named. */
.rail-now {
    display: none;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.7rem;
}

.rail-now-name {
    font-size: 0.84rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-weight: 600;
    color: var(--accent);
}

.rail-now-count {
    font-size: 0.82rem;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    font-variant-numeric: tabular-nums;
}

@media (prefers-reduced-motion: reduce) {
    .rail-fill { transition: none; }
}


/* ---------------------------------------------------------
   The doors — distinctive, elevated dual pathways.
   --------------------------------------------------------- */
.al-intro {
    padding: clamp(2.5rem, 6vw, 4.5rem) 0 clamp(1.5rem, 3vw, 2.5rem);
    max-width: 840px;
    margin: 0 auto;
    text-align: center;
}

.al-intro h1 {
    font-size: clamp(2rem, 3.5vw, 2.75rem);
    line-height: 1.15;
    margin: 0;
}

.al-intro p {
    color: var(--text-secondary);
    font-size: clamp(1rem, 1.2vw, 1.125rem);
    line-height: 1.6;
    max-width: 58ch;
    margin-left: auto;
    margin-right: auto;
}

/* ---------------------------------------------------------
   Choice Cards — clear, distinguished starting options.
   --------------------------------------------------------- */
.doors-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: clamp(1.25rem, 2.5vw, 2.25rem);
    margin-top: clamp(1rem, 2vw, 1.75rem);
    padding-bottom: clamp(3rem, 6vw, 5rem);
}

.door-card {
    position: relative;
    display: flex;
    flex-direction: column;
    background: var(--bg-raise);
    border: 1px solid var(--line);
    border-radius: var(--radius-xl, 12px);
    padding: clamp(1.65rem, 3.2vw, 2.5rem);
    color: inherit;
    text-decoration: none;
    transition: transform 0.35s var(--ease), border-color 0.35s ease, box-shadow 0.35s ease;
    overflow: hidden;
    isolation: isolate;
}

.door-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.02) 0%, rgba(122, 68, 25, 0.07) 100%);
    opacity: 0;
    transition: opacity 0.35s ease;
    z-index: -1;
}

.door-card:hover {
    transform: translateY(-5px);
    border-color: var(--accent);
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.45);
}

.door-card:hover::before {
    opacity: 1;
}

.door-card-badge-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-bottom: 1.15rem;
}

.door-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 0.35rem 0.85rem;
    border-radius: 100px;
    transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease;
}

.door-pill--a {
    background: rgba(122, 68, 25, 0.12);
    border: 1px solid rgba(122, 68, 25, 0.28);
    color: var(--accent-deep);
}

.door-pill--b {
    background: rgba(240, 215, 189, 0.1);
    border: 1px solid rgba(240, 215, 189, 0.25);
    color: var(--accent);
}

.door-card:hover .door-pill {
    background: var(--accent);
    color: #ffffff;
    border-color: var(--accent);
}

.door-meta-tag {
    font-size: 0.82rem;
    color: var(--text-muted);
    font-weight: 500;
}

.door-card .door-title {
    font-family: 'Playfair Display', Georgia, serif;
    font-weight: 400;
    font-size: clamp(1.6rem, 2.2vw, 2rem);
    line-height: 1.2;
    margin: 0 0 0.65rem;
    color: var(--text-primary);
    transition: color 0.3s ease;
}

.door-card:hover .door-title {
    color: var(--accent-deep);
}

.door-card .door-tagline {
    font-size: 0.95rem;
    line-height: 1.55;
    color: var(--text-secondary);
    margin: 0 0 1.35rem;
}

.door-card-audience {
    background: var(--bg);
    border: 1px solid var(--line-soft);
    border-radius: var(--radius-md, 8px);
    padding: 0.85rem 1.15rem;
    margin-bottom: 1.5rem;
}

.audience-label {
    display: block;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 0.25rem;
}

.audience-text {
    font-size: 0.88rem;
    line-height: 1.45;
    color: var(--text-primary);
    margin: 0;
    font-weight: 500;
}

.door-card .door-features {
    list-style: none;
    margin: 0 0 clamp(1.5rem, 3vw, 2.25rem);
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.door-card .door-features li {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    font-size: 0.92rem;
    line-height: 1.5;
    color: var(--text-secondary);
}

.door-card .feature-icon {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: rgba(122, 68, 25, 0.12);
    color: var(--accent-deep);
    display: grid;
    place-items: center;
    flex: none;
    margin-top: 0.1rem;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.door-card:hover .feature-icon {
    background: var(--accent);
    color: #ffffff;
}

.feature-text strong {
    color: var(--text-primary);
    font-weight: 600;
}

.door-action {
    margin-top: auto;
    padding-top: 1.25rem;
    border-top: 1px solid var(--line-soft);
}

.door-btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 0.85rem 1.25rem;
    background: var(--bg);
    border: 1px solid var(--line);
    border-radius: var(--radius-md, 8px);
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
    transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease;
}

.door-btn .ic {
    transition: transform 0.35s var(--ease);
}

.door-card:hover .door-btn {
    background: var(--accent);
    border-color: var(--accent);
    color: #ffffff;
}

.door-card:hover .door-btn .ic {
    transform: translateX(4px);
}

.door-btn--primary {
    background: rgba(122, 68, 25, 0.1);
    border-color: rgba(122, 68, 25, 0.25);
    color: var(--accent-deep);
}

@media (max-width: 860px) {
    .doors-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .door-card,
    .door-card::before,
    .door-card .door-title,
    .door-btn .ic,
    .feature-icon { transition: none; }
    .door-card:hover,
    .door-card:hover .door-btn .ic { transform: none; }
}

/* ---------------------------------------------------------
   Doors Comparison Matrix & FAQ
   --------------------------------------------------------- */
.doors-comparison {
    margin-top: clamp(2rem, 4.5vw, 3.5rem);
    position: relative;
}

/* Mobile-only: names the swipe gesture on a horizontally-scrolling block
   instead of leaving a thin native scrollbar as the only clue. Reused
   above both the doors grid and the comparison table below. */
.swipe-hint {
    display: none;
    align-items: center;
    gap: 0.5rem;
    margin: 0 0 0.75rem;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
}

.comparison-table-wrap {
    position: relative;
    background: var(--bg-raise);
    border: 1px solid var(--line);
    border-radius: var(--radius-xl, 12px);
    overflow-x: auto;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    max-width: 1100px;
    margin: 0 auto;
}

.comparison-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 620px;
    text-align: left;
}

.comparison-table th,
.comparison-table td {
    padding: 1.1rem 1.4rem;
    border-bottom: 1px solid var(--line-soft);
    font-size: 0.92rem;
    line-height: 1.5;
    vertical-align: middle;
}

.comparison-table th {
    background: rgba(255, 255, 255, 0.02);
    font-weight: 600;
}

.comparison-table .col-criteria {
    width: 28%;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
}

.comparison-table .col-opt-a {
    width: 36%;
    border-left: 1px solid var(--line-soft);
}

.comparison-table .col-opt-b {
    width: 36%;
    border-left: 1px solid var(--line-soft);
    background: rgba(122, 68, 25, 0.03);
}

.table-opt-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 0.2rem 0.6rem;
    border-radius: 100px;
    background: rgba(122, 68, 25, 0.12);
    color: var(--accent-deep);
    border: 1px solid rgba(122, 68, 25, 0.25);
    margin-bottom: 0.4rem;
}

.table-opt-badge--b {
    background: rgba(240, 215, 189, 0.1);
    color: var(--accent);
    border-color: rgba(240, 215, 189, 0.25);
}

.comparison-table .col-opt-a strong,
.comparison-table .col-opt-b strong {
    display: block;
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.15rem;
    color: var(--text-primary);
}

.comparison-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.015);
}

.criteria-title {
    font-weight: 600;
    color: var(--text-primary);
}

.comparison-table td:nth-child(2),
.comparison-table td:nth-child(3) {
    border-left: 1px solid var(--line-soft);
    color: var(--text-secondary);
}

.comp-highlight {
    color: var(--text-primary);
    font-weight: 600;
}

.comparison-table tfoot td {
    border-bottom: none;
    padding: 1.25rem 1.4rem;
    background: rgba(0, 0, 0, 0.15);
}

.comp-foot-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.75rem 1.1rem;
    border-radius: var(--radius-md, 8px);
    background: var(--bg);
    border: 1px solid var(--line);
    color: var(--text-primary);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s ease, border-color 0.3s ease, color 0.3s ease;
}

.comp-foot-btn .ic {
    transition: transform 0.3s var(--ease);
}

.comp-foot-btn:hover {
    background: var(--accent);
    border-color: var(--accent);
    color: #ffffff;
}

.comp-foot-btn:hover .ic {
    transform: translateX(4px);
}

.comp-foot-btn--primary {
    background: rgba(122, 68, 25, 0.12);
    border-color: rgba(122, 68, 25, 0.3);
    color: var(--accent-deep);
}

/* FAQ */
.doors-faq {
    margin-top: clamp(3.5rem, 6vw, 5rem);
    padding-bottom: clamp(3.5rem, 7vw, 5.5rem);
    text-align: center;
}

.faq-head {
    margin-bottom: clamp(1.5rem, 3vw, 2.25rem);
    text-align: center;
}

.faq-head h2 {
    font-size: clamp(1.5rem, 2.4vw, 1.95rem);
    line-height: 1.2;
    margin: 0;
}

.faq-list {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    max-width: 880px;
    margin: 0 auto;
    text-align: left;
}

.faq-item {
    background: var(--bg-raise);
    border: 1px solid var(--line-soft);
    border-radius: var(--radius-lg, 10px);
    overflow: hidden;
    transition: border-color 0.3s ease, background-color 0.3s ease, box-shadow 0.3s ease;
}

.faq-item[open] {
    border-color: var(--accent);
    background: rgba(122, 68, 25, 0.05);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.04);
}

.faq-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.15rem 1.4rem;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.98rem;
    color: var(--text-primary);
    list-style: none;
    user-select: none;
    transition: color 0.3s ease;
}


.faq-summary::-webkit-details-marker {
    display: none;
}

.faq-chevron {
    color: var(--accent-deep);
    transition: transform 0.3s var(--ease), color 0.3s ease;
    flex-shrink: 0;
}

.faq-item[open] .faq-chevron {
    transform: rotate(180deg);
    color: var(--accent);
}

.faq-content {
    padding: 0 1.4rem 1.25rem;
    color: var(--text-secondary);
    font-size: 0.92rem;
    line-height: 1.6;
}

.faq-content p {
    margin: 0;
}

/* ---------------------------------------------------------
   Step shell — every beat gets the same frame
   --------------------------------------------------------- */
.al-step {
    display: flex;
    align-items: center;
    min-height: calc(100svh - var(--header-h, 100px) - var(--rail-h, 72px));
    padding: clamp(2.5rem, 6vw, 4.5rem) 0 clamp(3rem, 7vw, 5rem);
}

.al-step > .container { width: 100%; }

@media (min-width: 901px) {
    .al-step {
        min-height: max(calc(100svh - var(--header-h, 100px) - var(--rail-h, 72px)), 68rem);
    }
}

html:not(.js) .al-step { min-height: 0; }

.al-step-head { max-width: 780px; margin-bottom: clamp(1.5rem, 3vw, 2.25rem); }

.al-step-head h2 {
    font-size: clamp(1.6rem, 2.8vw, 2.15rem);
    line-height: 1.2;
    margin: 0 0 0.75rem;
}

.al-step-head p {
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.6;
    margin: 0;
    max-width: 52ch;
}


/* ---------------------------------------------------------
   Pick list — enhanced selectable tiles
   --------------------------------------------------------- */
.pick-list {
    border: none;
    background: transparent;
    padding: 0;
    margin: 0 0 clamp(1.5rem, 3vw, 2.25rem);
}

.pick { display: block; cursor: pointer; margin-bottom: 0.85rem; }
.pick input { position: absolute; opacity: 0; pointer-events: none; }

.pick-row {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    padding: 1.25rem clamp(1.1rem, 2.2vw, 1.75rem);
    background: var(--bg-raise);
    border: 1px solid var(--line-soft);
    border-radius: var(--radius-md, 8px);
    transition: background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.pick:hover .pick-row {
    background: rgba(122, 68, 25, 0.05);
    border-color: var(--line-soft);
}

.pick input:focus-visible ~ .pick-row {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.pick input:checked ~ .pick-row {
    background: rgba(122, 68, 25, 0.10);
    border-color: var(--line-soft);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
}

.pick-body { flex: 1 1 auto; min-width: 0; }

.pick-title {
    display: block;
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.2rem;
    font-weight: 400;
    line-height: 1.3;
    color: var(--text-primary);
    transition: color 0.3s ease;
}

.pick input:checked ~ .pick-row .pick-title {
    color: var(--accent-deep);
    font-weight: 500;
}

.pick-desc {
    display: block;
    font-size: 0.92rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

.pick-mark {
    flex: none;
    width: 24px;
    height: 24px;
    display: grid;
    place-items: center;
    border: 1.5px solid var(--line-soft);
    border-radius: 50%;
    color: transparent;
    transition: color 0.3s ease, border-color 0.3s ease, background-color 0.3s ease;
}

.pick input:checked ~ .pick-row .pick-mark {
    color: #ffffff;
    background: var(--accent);
    border-color: var(--accent);
}


/* ---------------------------------------------------------
   Configurator — Models, Packages, Budget, Timeline
   --------------------------------------------------------- */
.cfg { display: flex; flex-direction: column; gap: clamp(1.75rem, 3vw, 2.5rem); }

.cfg > div {
    background: var(--bg-raise);
    border: 1px solid var(--line-soft);
    border-radius: var(--radius-lg, 10px);
    padding: clamp(1.4rem, 2.2vw, 2rem) clamp(1.2rem, 2.2vw, 2rem) clamp(1.5rem, 2.2vw, 2.25rem);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.03);
}

.cfg-label {
    display: block;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    font-weight: 600;
    color: var(--accent);
    margin-bottom: 1rem;
}

/* Models */
.model-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
    border-top: none;
}

.model { display: block; cursor: pointer; }
.model input { position: absolute; opacity: 0; pointer-events: none; }

.model-box {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 1.35rem 1.75rem;
    border: 1px solid var(--line-soft);
    border-radius: var(--radius-md, 8px);
    background: var(--bg);
    transition: background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.model:hover .model-box {
    background: rgba(122, 68, 25, 0.05);
    border-color: var(--line-soft);
}

.model input:focus-visible ~ .model-box {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.model input:checked ~ .model-box {
    background: rgba(122, 68, 25, 0.10);
    border-color: var(--line-soft);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
}

.model-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.5rem;
}

.model-name {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.2rem;
    line-height: 1.3;
    color: var(--text-primary);
}

.model input:checked ~ .model-box .model-name {
    color: var(--accent-deep);
    font-weight: 500;
}

.model-mark {
    width: 24px;
    height: 24px;
    border: 1.5px solid var(--line-soft);
    border-radius: 50%;
    display: grid;
    place-items: center;
    color: transparent;
    flex: none;
    transition: color 0.3s ease, border-color 0.3s ease, background-color 0.3s ease;
}

.model input:checked ~ .model-box .model-mark {
    color: #ffffff;
    background: var(--accent);
    border-color: var(--accent);
}

.model-desc {
    font-size: 0.92rem;
    color: var(--text-muted);
    line-height: 1.55;
    margin-bottom: 0.5rem;
}

.model-tag {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 0.875rem;
    font-style: italic;
    color: var(--accent);
    margin-top: auto;
}

/* What's included — a read-only panel keyed to the site_type pick; no
   longer a separate radio selector (site_type alone determines the
   package, see alusta.php). */
.pkg-panel {
    padding: 1.25rem 0 0;
    border-top: 1px solid var(--line-soft);
}

.pkg-panel h3 {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.15rem;
    font-weight: 500;
    margin: 0 0 0.85rem;
    color: var(--accent-deep);
}

.pkg-panel ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.65rem; }

.pkg-panel li {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    font-size: 0.95rem;
    line-height: 1.55;
    color: var(--text-secondary);
}

.pkg-panel .ic { color: var(--accent); flex: none; margin-top: 0.15rem; }

/* Budget */
.budget-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }

.budget-val {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: clamp(1.75rem, 2.5vw, 2.25rem);
    line-height: 1.1;
    color: var(--accent-deep);
    font-variant-numeric: tabular-nums;
    font-weight: 500;
}

.budget-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 4px;
    margin: 1.6rem 0 1rem;
    background: linear-gradient(to right,
        var(--accent) 0 var(--fill, 9%),
        rgba(23, 18, 13, 0.18) var(--fill, 9%) 100%);
    cursor: pointer;
    border-radius: 2px;
}

.budget-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 6px;
    height: 24px;
    background: var(--accent-deep);
    border: 0;
    border-radius: 1px;
    cursor: grab;
}

.budget-slider::-moz-range-thumb {
    width: 6px;
    height: 24px;
    background: var(--accent-deep);
    border: 0;
    border-radius: 1px;
    cursor: grab;
}

.budget-slider:focus-visible { outline: 2px solid var(--accent); outline-offset: 8px; }

.budget-scale {
    display: flex;
    justify-content: space-between;
    font-size: 0.82rem;
    color: var(--text-muted);
    letter-spacing: 0.04em;
}

/* Timeline — unified 5-column responsive card grid */
.when-row {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 0.85rem;
    border-top: none;
}

.when { cursor: pointer; position: relative; }
.when input { position: absolute; opacity: 0; pointer-events: none; }

.when-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0.75rem 0.85rem;
    font-size: 0.9rem;
    color: var(--text-primary);
    text-align: center;
    border: 1px solid var(--line-soft);
    border-radius: var(--radius-md, 8px);
    background: var(--bg);
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.when:hover .when-btn {
    background: rgba(122, 68, 25, 0.05);
    border-color: var(--line-soft);
}

.when input:focus-visible ~ .when-btn {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.when input:checked ~ .when-btn {
    background: rgba(122, 68, 25, 0.10);
    border-color: var(--line-soft);
    color: var(--accent-deep);
    font-weight: 600;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
}


/* ---------------------------------------------------------
   Contact beat — unified with kontakt.php styling
   --------------------------------------------------------- */
.al-split {
    display: grid;
    grid-template-columns: 0.8fr 1.2fr;
    gap: clamp(2.5rem, 5vw, 5rem);
    align-items: start;
}

.al-aside { position: sticky; top: calc(var(--header-h, 100px) + 4rem); }

.al-recap {
    margin: 0;
    background: var(--bg-raise);
    border: 1px solid var(--line-soft);
    border-radius: var(--radius-lg, 10px);
    padding: 0.5rem clamp(1rem, 2vw, 1.5rem);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.03);
}

.al-recap-line {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.85rem 0;
    border-bottom: 1px solid var(--line-soft);
}

.al-recap-line:last-child {
    border-bottom: none;
}

.al-recap dt {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-weight: 600;
    color: var(--text-muted);
    flex: none;
}

.al-recap dd {
    margin: 0;
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.05rem;
    text-align: right;
    color: var(--accent-deep);
}

.al-note {
    margin: 1.5rem 0 0;
    font-size: 0.95rem;
    color: var(--text-muted);
    max-width: 36ch;
    line-height: 1.6;
}

/* ---------------------------------------------------------
   Contact page layout (kontakt.php) — editorial column (heading,
   direct channels, two staggered portrait shots) beside the form.
   The form itself uses the shared system just below.
   --------------------------------------------------------- */
.premium-contact-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 4rem;
    position: relative;
    padding: clamp(3.5rem, 6vw, 6rem) 0 clamp(4rem, 8vw, 8rem);
}

/* Grid items default to min-width:auto, so the portrait-pair row inside
   .premium-contact-left refuses to shrink below its own content size and
   pushes the whole page wider than the viewport on mobile. min-width:0 lets
   flexbox's normal shrink math take over inside it, as it should. */
.premium-contact-left,
.premium-contact-right {
    min-width: 0;
}

@media (min-width: 1024px) {
    .premium-contact-grid {
        grid-template-columns: 1fr 1fr;
        gap: 6rem;
        align-items: flex-start;
    }
}

.contact-editorial-header {
    margin-bottom: 2.5rem;
}

.contact-editorial-title {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: clamp(2rem, 3.5vw, 2.75rem);
    line-height: 1.15;
    font-weight: 400;
    letter-spacing: -0.01em;
    margin-bottom: 1.25rem;
    color: var(--text-primary);
}

.contact-editorial-lead {
    font-size: clamp(1rem, 1.2vw, 1.125rem);
    line-height: 1.6;
    color: var(--text-secondary);
    font-weight: 400;
    margin: 0;
}

.contact-image-composition {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.contact-image-wrapper {
    flex: 1;
    position: relative;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    border-radius: var(--radius-lg, 10px);
    background-color: var(--bg-raise);
}

/* The right-hand portrait sits a touch lower than the left — a deliberate
   stagger, not a mistake — so the pair reads as a composed diptych. */
.contact-image-wrapper:nth-child(2) {
    transform: translateY(2rem);
}

.contact-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.8s var(--ease);
}

.contact-image-wrapper:hover img {
    transform: scale(1.05);
}

.contact-direct-channels {
    display: flex;
    flex-direction: column;
    gap: 1.75rem;
    margin-top: 1.5rem;
    padding-top: 1.75rem;
    border-top: 1px solid var(--line-soft);
}

.contact-direct-item {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.contact-direct-label {
    font-size: 0.76rem;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    font-weight: 600;
    color: var(--accent);
}

.contact-direct-link {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    width: fit-content;
    min-height: 44px;
    font-size: clamp(1.2rem, 1.8vw, 1.55rem);
    font-weight: 500;
    letter-spacing: -0.015em;
    font-variant-numeric: tabular-nums;
    color: var(--text-primary);
    text-decoration: none;
    line-height: 1.25;
    transition: color 0.3s ease, transform 0.35s var(--ease);
}

.contact-direct-link:hover,
.contact-direct-link:focus-visible {
    color: var(--accent-deep);
    transform: translateX(6px);
}

.contact-direct-link .ic {
    color: var(--accent);
    opacity: 0.7;
    transition: transform 0.35s var(--ease), opacity 0.3s ease;
}

.contact-direct-link:hover .ic,
.contact-direct-link:focus-visible .ic {
    opacity: 1;
    transform: translateX(4px);
}

.contact-direct-sub {
    font-size: 0.88rem;
    color: var(--text-muted);
    line-height: 1.5;
    margin: 0;
    max-width: 42ch;
}

/* Only this page's form needs to fill its column edge-to-edge — the shared
   .premium-submit-btn used on alusta.php stays min-width, not full width. */
.premium-contact-right .premium-submit-btn {
    width: 100%;
    margin-top: 0.5rem;
}

@media (max-width: 1023px) {
    .contact-image-composition { max-width: 480px; }
}

@media (max-width: 640px) {
    .contact-editorial-header { margin-bottom: 2rem; }
    .contact-editorial-title { font-size: clamp(1.85rem, 7vw, 2.35rem); }
    .contact-direct-link { font-size: clamp(1.15rem, 4.8vw, 1.5rem); word-break: break-word; }
    .contact-image-composition { gap: 1rem; margin-bottom: 2.25rem; }
    .contact-image-wrapper:nth-child(2) { transform: none; }
}

/* ---------------------------------------------------------
   Shared / Elevated Form System (kontakt.php & alusta.php)
   --------------------------------------------------------- */
.premium-form-container {
    background: var(--bg-raise);
    padding: clamp(2.5rem, 4.5vw, 4.25rem);
    border-radius: var(--radius-xl, 12px);
    border: 1px solid var(--line-soft);
    position: relative;
    box-shadow: 0 14px 36px rgba(0, 0, 0, 0.06);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.al-form-card {
    padding: clamp(2.25rem, 3.5vw, 3.5rem);
    border-radius: var(--radius-xl, 12px);
    border: 1px solid var(--line-soft);
    background: var(--bg-raise);
    box-shadow: 0 14px 36px rgba(0, 0, 0, 0.06);
}

.form-header {
    margin-bottom: 2.25rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid var(--line-soft);
}

.form-kicker {
    display: block;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    font-weight: 600;
    color: var(--accent);
    margin-bottom: 0.4rem;
}

.form-title {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: clamp(1.35rem, 2vw, 1.75rem);
    font-weight: 400;
    color: var(--text-primary);
    line-height: 1.25;
    margin: 0 0 0.5rem;
}

.form-desc {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.55;
    margin: 0;
}

.form-row {
    position: relative;
    margin-bottom: 2.25rem;
}

.form-row:last-of-type {
    margin-bottom: 1.75rem;
}

.form-row label {
    position: absolute;
    top: 1rem;
    left: 0;
    font-size: 1rem;
    color: var(--text-secondary);
    transition: all 0.3s var(--ease);
    pointer-events: none;
}

.form-row input,
.form-row textarea {
    width: 100%;
    background: transparent;
    border: none;
    border-bottom: 1px solid var(--line);
    padding: 1rem 0 0.5rem;
    font-size: 1rem;
    color: var(--text-primary);
    font-family: inherit;
    transition: border-color 0.3s ease;
    resize: none;
}

.form-row textarea {
    min-height: 110px;
}

.form-row input:focus,
.form-row textarea:focus {
    outline: none;
    border-bottom-color: var(--accent);
}

.form-row input:focus ~ label,
.form-row input:not(:placeholder-shown) ~ label,
.form-row textarea:focus ~ label,
.form-row textarea:not(:placeholder-shown) ~ label {
    top: -1rem;
    font-size: 0.78rem;
    color: var(--accent);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-weight: 600;
}

.form-row.has-error input,
.form-row.has-error textarea {
    border-bottom-color: var(--danger);
}

.form-row.has-error label {
    color: var(--danger);
}

.field-error {
    font-size: 0.82rem;
    color: var(--danger);
    margin-top: 0.4rem;
    margin-bottom: 0;
}

.premium-submit-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    min-width: 220px;
    background: var(--text-primary);
    color: var(--bg);
    padding: 1rem 2.25rem;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-weight: 600;
    border: 1px solid var(--text-primary);
    border-radius: var(--radius-md, 8px);
    cursor: pointer;
    transition: all 0.35s var(--ease);
}

.premium-submit-btn:hover,
.premium-submit-btn:focus-visible {
    border-color: var(--accent);
    background: var(--accent);
    color: var(--bg-raise);
}

.premium-submit-btn .ic {
    transition: transform 0.4s var(--ease);
}

.premium-submit-btn:hover .ic {
    transform: translateX(5px);
}

.al-fields-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 1.75rem;
}

.al-form { width: 100%; }

.al-error {
    margin: 1.5rem 0 0;
    padding: 0.9rem 1.1rem;
    border-left: 3px solid var(--danger);
    border-radius: var(--radius-sm, 6px);
    background: rgba(160, 43, 43, 0.06);
    font-size: 0.95rem;
    color: var(--danger);
}

.al-trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }


/* ---------------------------------------------------------
   Step actions
   --------------------------------------------------------- */
.al-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    flex-wrap: wrap;
    margin-top: clamp(1.75rem, 3vw, 2.25rem);
    padding-top: 1.25rem;
    border-top: 1px solid var(--line-soft);
}

.al-back {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    min-height: 44px;
    background: none;
    border: 0;
    padding: 0;
    font: inherit;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-weight: 500;
    color: var(--text-muted);
    cursor: pointer;
    transition: color 0.3s ease;
}

.al-back:hover { color: var(--accent); }
.al-back .ic { transition: transform 0.4s var(--ease); }
.al-back:hover .ic { transform: translateX(-5px); }

.al-next {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
    min-height: 48px;
    padding: 0.85rem 1.85rem;
    background: var(--text-primary);
    color: var(--bg);
    border: 1px solid var(--text-primary);
    border-radius: var(--radius-md, 8px);
    font: inherit;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.35s ease, color 0.35s ease, border-color 0.35s ease;
}

.al-next:hover,
.al-next:focus-visible {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--bg-raise);
}

.al-next[disabled] { opacity: 0.45; cursor: default; }
.al-next .ic { transition: transform 0.45s var(--ease); }
.al-next:hover .ic { transform: translateX(6px); }

@media (prefers-reduced-motion: reduce) {
    .al-back .ic,
    .al-next .ic { transition: none; }
    .al-back:hover .ic,
    .al-next:hover .ic { transform: none; }
}


/* ---------------------------------------------------------
   Closing beats. Path A's hand-off reuses the rail as a real
   loader — the same track, running out to the destination.
   --------------------------------------------------------- */
.al-done h2 { font-size: clamp(1.75rem, 3vw, 2.25rem); line-height: 1.15; margin: 0 0 1rem; }

/* Deliberately a lone class, not `.al-done > p` — an element reset like that
   scores (0,1,1) and would silently outrank .al-reply's own margin below. */
.al-lead { color: var(--text-secondary); font-size: 1.05rem; line-height: 1.6; max-width: 52ch; margin: 0; }

/* The hand-off is a transitional beat — one column, and the bar gets room. */
.al-done--handoff { max-width: 860px; }
.al-done--handoff h2 { max-width: 16ch; }

.handoff { margin-top: clamp(1.5rem, 3vw, 2.25rem); }

.handoff-label {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 0.7rem;
}

.handoff-count { color: var(--accent); font-variant-numeric: tabular-nums; }

.handoff-track { position: relative; height: 2px; background: rgba(23, 18, 13, 0.14); }

.handoff-fill {
    position: absolute;
    inset: 0 auto 0 0;
    width: 0;
    background: var(--accent);
}

.handoff-fill::after {
    content: '';
    position: absolute;
    right: -1px;
    top: -6px;
    width: 2px;
    height: 14px;
    background: var(--accent-deep);
}

.handoff.is-running .handoff-fill {
    width: 100%;
    transition: width 6s linear;
}

/* The bar is decoration on top of a real timer, so with motion off it
   simply reads as complete rather than animating. */
@media (prefers-reduced-motion: reduce) {
    .handoff.is-running .handoff-fill { transition: none; }
}

.handoff-actions {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
    margin-top: clamp(1.75rem, 3vw, 2.5rem);
}

.al-next-steps { margin: clamp(2rem, 4vw, 3rem) 0 0; border-top: 1px solid var(--line); }

.al-next-step {
    display: flex;
    align-items: baseline;
    gap: 1.25rem;
    padding: 1rem 0;
    border-bottom: 1px solid var(--line-soft);
}

.al-next-step strong {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--accent-deep);
    flex: none;
    min-width: 11ch;
}

.al-next-step span { font-size: 0.95rem; color: var(--text-secondary); }

.al-reply {
    margin: clamp(1.75rem, 3vw, 2.5rem) 0 0;
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--text-secondary);
}

.al-reply a { color: var(--accent); }


/* ---------------------------------------------------------
   Mobile is its own layout: the rail keeps only the beat you
   are on, and the primary action sits above the way back.
   --------------------------------------------------------- */
@media (max-width: 900px) {
    .al-step { min-height: 0; }
    .doors {
        display: flex;
        flex-direction: column;
        border-top: 1px solid var(--line-soft);
    }
    .door {
        display: block;
        grid-column: auto;
        border-bottom: 1px solid var(--line-soft);
    }
    .door--b {
        box-shadow: none;
    }
    .door--a .door-in,
    .door--b .door-in {
        grid-column: auto;
        padding-left: clamp(20px, 5vw, 40px);
        padding-right: clamp(20px, 5vw, 40px);
        padding-top: clamp(2rem, 4.5vw, 3rem);
        padding-bottom: clamp(2rem, 4.5vw, 3rem);
        min-height: auto;
    }
    .model-split { grid-template-columns: 1fr; }
    .model + .model .model-box { box-shadow: inset 0 1px 0 var(--line-soft); }
    .al-fields { grid-template-columns: 1fr; gap: 2.5rem; }
    .al-split { grid-template-columns: 1fr; gap: 2.5rem; }
    .al-aside { position: static; }
}

@media (max-width: 680px) {
    .rail-marks { display: none; }
    .rail-now { display: flex; }
    .rail-inner { padding-top: 0.9rem; }
    .door-metrics { grid-template-columns: 1fr; gap: 0.85rem; }
    .when-row { grid-template-columns: repeat(2, 1fr); gap: 0.65rem; }
    .when-row .when-opt:last-child:nth-child(odd) { grid-column: 1 / -1; }
    .al-fields-grid { grid-template-columns: 1fr !important; }
    .al-actions { flex-direction: column-reverse; align-items: stretch; }
    .al-next { justify-content: center; }
    .al-back { justify-content: center; }
    .al-next-step { flex-direction: column; gap: 0.2rem; }
    .al-next-step strong { min-width: 0; }
    .handoff-actions { flex-direction: column; align-items: stretch; }

    /* Stays a vertical stack (no sideways scrolling) — instead each card's
       own content is tightened so reaching card B is a shorter scroll,
       not a different gesture. */
    .door-card { padding: 1.35rem; }
    .door-card-badge-row { margin-bottom: 0.85rem; }
    .door-card .door-tagline { margin-bottom: 0.9rem; }
    .door-card-audience { padding: 0.65rem 0.9rem; margin-bottom: 1rem; }
    .door-card .door-features { gap: 0.6rem; margin-bottom: 1.35rem; }
    .door-card .door-features li { font-size: 0.88rem; line-height: 1.4; }
    .door-action { padding-top: 1rem; }

    /* The table is still wider than the screen — name the gesture and pin
       the criteria column so it reads against whichever option is
       scrolled into view without eating the space meant for comparing. */
    .swipe-hint { display: flex; }

    .comparison-table { min-width: 440px; table-layout: fixed; }

    .comparison-table th,
    .comparison-table td { padding: 0.85rem 0.75rem; }

    .comparison-table .col-opt-a,
    .comparison-table .col-opt-b { width: 170px; }

    .comparison-table th:first-child,
    .comparison-table td:first-child {
        position: sticky;
        left: 0;
        z-index: 1;
        width: 100px;
        font-size: 0.7rem;
        background: var(--bg-raise);
        border-right: 1px solid var(--line);
    }

    /* The card's own padding leaves ~270px for this button at this width —
       its desktop padding/gap alone don't leave room for "Loo
       broneerimisleht" on one line even at full stretch. */
    .premium-submit-btn {
        min-width: 0;
        padding: 0.9rem 1.1rem;
        gap: 0.55rem;
        font-size: 0.8rem;
        letter-spacing: 0.05em;
    }
}

/* --------------------------------------------------------------------------
   CMS additions
   Classes the ideeveeb build needs that the static demo had no equivalent for.
   -------------------------------------------------------------------------- */

/* Long-form copy (privacy policy, terms) authored in the rich-text editor. */
.mr-prose { max-width: 780px; margin: 0 auto clamp(3rem, 6vw, 5rem); color: var(--text-secondary); }
.mr-prose > :first-child { margin-top: 0; }
.mr-prose p { margin: 0 0 1.1rem; line-height: 1.75; }
.mr-prose h2 { font-size: 1.5rem; margin: 2.4rem 0 .9rem; color: var(--text-primary); }
.mr-prose h3 { font-size: 1.2rem; margin: 2rem 0 .7rem; color: var(--text-primary); }
.mr-prose ul, .mr-prose ol { margin: 0 0 1.1rem; padding-left: 1.4rem; }
.mr-prose li { margin-bottom: .45rem; line-height: 1.7; }
.mr-prose a { color: var(--accent-deep); text-decoration: underline; text-underline-offset: 2px; }

/* A tenant that has not uploaded a logo still needs a brand mark in the header. */
.brand-logo--text {
  display: inline-block; font-family: 'Playfair Display', serif;
  font-size: 1.35rem; letter-spacing: -.01em; color: var(--text-primary); white-space: nowrap;
}

/* Contact form status line — the demo rendered this server-side after a reload;
   here it is filled in place, so it needs both states. */
.premium-status-msg[hidden] { display: none; }
.premium-status-msg { margin: 0 0 1rem; font-size: .95rem; color: var(--accent-deep); }
.premium-status-msg.is-error { color: var(--danger); }
.contact-form .cf-turnstile { margin-bottom: 1rem; }

/* The block renderer wraps every block in a <section class="cms-block …">, which
   on the splash lands between .content and the three groups it spaces apart —
   so justify-content had a single child to distribute and the whole splash
   collapsed to the top of the screen. The wrapper takes over that job. */
.landing-page .content > .cms-block--mr-splash {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  flex: 1 1 auto;
  width: 100%;
  min-height: 0;
  gap: clamp(1.25rem, 3vh, 2.5rem);
}
