/* Layout (dark redesign): header over the hero, pre-footer close, footer with the flowing wordmark, cookie notice,
   video modal. Owner: Site role. The footer follows docs/samples/home-dark-concept.src.html. */

/* ================= Header ================= */
.site-header {
    position: absolute; top: 0; left: 0; right: 0; z-index: 100;
    padding-top: env(safe-area-inset-top, 0px);
    /* scrim: keeps the logo and links legible over any hero (living light, photos, screenshots) */
    background: linear-gradient(180deg, rgba(5, 13, 11, .92) 0%, rgba(5, 13, 11, .62) 62%, rgba(5, 13, 11, 0) 100%);
}
.topbar { border-bottom: 1px solid rgba(255, 255, 255, .07); }
.topbar__inner { display: flex; align-items: center; justify-content: flex-end; gap: 18px; min-height: 36px; }
.topbar__social { display: flex; list-style: none; margin: 0; padding: 0; }
.topbar__social-link { display: grid; place-items: center; width: 34px; height: 34px; color: var(--soft); font-size: 14px; transition: color .2s ease; }
.topbar__social-link:hover, .topbar__social-link:focus-visible { color: var(--mint); }
.topbar__phone p { margin: 0; font: 600 13px/34px var(--font-display); letter-spacing: .06em; color: var(--ink); }
.topbar__phone:hover p { color: var(--mint); }

.site-header__inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 76px; position: relative; }
.site-header__logo { display: block; flex: none; width: 160px; }
.site-header__logo img { display: block; width: 160px; height: auto; }

/* Main navigation (desktop) */
.nav__list { display: flex; align-items: center; justify-content: flex-end; gap: 28px; list-style: none; margin: 0; padding: 0; }
.nav__item { position: relative; }
.nav__link { display: flex; align-items: center; gap: 4px; min-height: 44px; font: 500 15px/1.2 var(--font-display); color: #fff; transition: color .2s ease; }
.nav__caret { width: 9px; height: 14px; margin-left: 2px; opacity: .8; }
.nav__item:hover > .nav__link, .nav__link:focus-visible, .nav__item.is-open > .nav__link, .nav__item.is-current > .nav__link { color: var(--mint); }
.nav__cta { display: inline-flex; align-items: center; min-height: 44px; padding: 0 22px; border-radius: var(--radius-pill); background: var(--mint); color: var(--on-mint); font: 600 15px/1.2 var(--font-display); box-shadow: var(--glow-mint); transition: transform .2s ease, box-shadow .2s ease; }
.nav__cta:hover, .nav__cta:focus-visible { color: var(--on-mint); transform: translateY(-2px); box-shadow: 0 0 56px rgba(0, 216, 193, .5); }

.nav__dropdown {
    position: absolute; top: 100%; left: -18px; z-index: 10;
    min-width: 260px; margin: 14px 0 0; padding: 10px;
    list-style: none; white-space: nowrap;
    border-radius: 18px; border: 1px solid var(--line);
    background: rgba(10, 24, 21, .96);
    box-shadow: 0 30px 60px rgba(0, 0, 0, .55), 0 0 60px rgba(0, 216, 193, .1);
    opacity: 0; visibility: hidden; transform: translateY(10px);
    transition: opacity .25s ease, transform .25s ease, visibility 0s linear .25s;
}
@supports (backdrop-filter: blur(1px)) { .nav__dropdown { background: rgba(10, 24, 21, .82); backdrop-filter: blur(18px); } }
.nav__dropdown::before { content: ""; position: absolute; left: 0; right: 0; bottom: 100%; height: 16px; } /* hover bridge */
.nav__item--dropdown:hover > .nav__dropdown,
.nav__item--dropdown.is-open > .nav__dropdown,
.nav__item--dropdown:focus-within > .nav__dropdown { opacity: 1; visibility: visible; transform: none; transition: opacity .25s ease, transform .25s ease, visibility 0s; }
.nav__dropdown-link { display: flex; align-items: center; min-height: 42px; padding: 0 14px; border-radius: 10px; font: 500 15px/1.3 var(--font-display); color: var(--ink); }
.nav__dropdown-link:hover, .nav__dropdown-link:focus-visible { background: rgba(0, 216, 193, .1); color: var(--mint); }
.nav__dropdown-item.is-current .nav__dropdown-link { color: var(--mint); }

.nav-toggle { display: none; }

@media (max-width: 1024px) {
    .nav__list { gap: 18px; }
    .nav__link, .nav__cta { font-size: 14px; }
    .nav__cta { padding: 0 16px; }
    .site-header__logo, .site-header__logo img { width: 130px; }
}

/* Phones (<= 767px): logo + menu button. With JavaScript the button opens the full-screen menu (mobile.css);
   without it the button is inert and the main list shows as a plain stacked list under the logo. */
@media (max-width: 767px) {
    .topbar { display: none; }
    .site-header__inner { min-height: 68px; flex-wrap: wrap; }
    .site-header__logo, .site-header__logo img { width: 120px; }
    .nav-toggle {
        display: grid; align-content: center; gap: 5px;
        width: 48px; height: 48px; padding: 0 12px;
        border: 1px solid var(--line); border-radius: 14px; background: rgba(5, 13, 11, .5); cursor: pointer;
    }
    .nav-toggle__line { display: block; height: 2px; border-radius: 2px; background: #fff; }
    .js .nav { display: none; }
    .no-js .site-header { position: relative; background: var(--night); }
    .no-js .nav { flex-basis: 100%; padding-bottom: 16px; }
    .no-js .nav-toggle { display: none; }
    .nav__list { flex-direction: column; align-items: stretch; gap: 0; }
    .nav__dropdown { position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; border: 0; background: none; padding: 0 0 0 12px; margin: 0; min-width: 0; white-space: normal; }
    .nav__item--cta { margin-top: 10px; }
}

/* ================= Pre-footer: "#1 DMS Software" close ================= */
.prefooter { position: relative; overflow: hidden; padding-block: var(--section-y) 0; border-top: 1px solid var(--line); background: radial-gradient(60% 70% at 50% 100%, rgba(0, 167, 149, .42), rgba(0, 167, 149, 0) 70%); }
.prefooter__inner { display: grid; justify-items: center; gap: 18px; text-align: center; }
.prefooter__tag { display: inline-block; background: var(--gold); color: var(--on-gold); font: 700 13px/1.2 var(--font-display); letter-spacing: .08em; padding: 8px 16px; border-radius: 8px; transform: rotate(-2deg); text-decoration: none; transition: transform .2s ease; }
.prefooter__tag:hover, .prefooter__tag:focus-visible { color: var(--on-gold); transform: rotate(0deg) scale(1.04); }
.prefooter__title { margin: 0; font-size: clamp(2.6rem, 9vw, 7rem); font-weight: 700; line-height: 1.05; letter-spacing: -.04em; background: linear-gradient(100deg, #fff 30%, var(--mint)); -webkit-background-clip: text; background-clip: text; color: transparent; padding-bottom: .04em; }
.prefooter__subtitle { margin: 0; font: 600 clamp(.9rem, 1.6vw, 1.2rem)/1.4 var(--font-display); letter-spacing: .3em; color: var(--ink); }
.prefooter__text { margin: 0; max-width: 52ch; color: var(--soft); font-size: clamp(1.05rem, 1.5vw, 1.2rem); }
.prefooter__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 10px; }
.prefooter__tour .icon { width: 12px; height: 12px; }
.prefooter__media { width: min(340px, 72vw); margin-top: clamp(20px, 4vw, 40px); filter: drop-shadow(0 0 60px rgba(0, 216, 193, .25)); }
.prefooter__media img { display: block; width: 100%; height: auto; }

/* ================= Footer ================= */
.site-footer { border-top: 1px solid var(--line); padding-block: clamp(56px, 8vw, 96px) 28px; background: linear-gradient(180deg, var(--night), var(--night-3)); overflow: hidden; color: var(--ink); }
.site-footer__top { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 2.6fr); gap: 40px 56px; }
.site-footer__brand { display: grid; gap: 10px; align-content: start; }
.site-footer__logo img { display: block; width: 170px; height: auto; }
.site-footer__tagline { margin: 0; color: var(--soft); }
.site-footer__phone { margin-top: 8px; color: var(--mint); font: 600 1rem var(--font-display); letter-spacing: .04em; }
.site-footer__grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 32px 24px; }
.site-footer__title { margin: 0 0 14px; font: 600 .82rem/1.3 var(--font-display); letter-spacing: .16em; text-transform: uppercase; color: var(--mint); }
.site-footer__links { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.site-footer__links a { display: inline-flex; align-items: center; min-height: 36px; color: var(--ink); font-size: 1rem; line-height: 1.3; background: linear-gradient(var(--mint), var(--mint)) 0 100% / 0 2px no-repeat; transition: background-size .25s ease, color .2s ease; }
.site-footer__links a:hover, .site-footer__links a:focus-visible { color: var(--mint); background-size: 100% 2px; }
.site-footer__social { display: flex; gap: 10px; list-style: none; margin: 0; padding: 0; }
.site-footer__social-link { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%; border: 1px solid var(--line); color: var(--ink); transition: background .2s ease, color .2s ease, transform .2s ease, border-color .2s ease; }
.site-footer__social-link .icon { width: 18px; height: 18px; }
.site-footer__social-link:hover, .site-footer__social-link:focus-visible { background: var(--mint); border-color: var(--mint); color: var(--on-mint); transform: translateY(-3px); }
.site-footer .fword { margin-top: calc(clamp(36px, 6vw, 70px) - .14em); }
.site-footer__bottom { margin-top: 26px; padding-top: 22px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 10px 24px; flex-wrap: wrap; color: var(--soft); font-size: 14px; }
.site-footer__bottom p { margin: 0; }
.site-footer__bottom a { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.site-footer__bottom a:hover { color: var(--mint); }
.site-footer__heart { color: var(--red); }
.site-footer__cookie { margin-left: 10px; padding: 0; border: 0; background: none; color: var(--ink); font: inherit; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; min-height: 24px; }
.site-footer__cookie:hover { color: var(--mint); }
.no-js .site-footer__cookie { display: none; }
@media (max-width: 1100px) { .site-footer__top { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 900px) {
    .site-footer__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .site-footer__links a { min-height: 44px; }
}

/* ================= Cookie notice ================= */
.cookie-notice {
    position: fixed; z-index: 99995;
    left: calc(16px + env(safe-area-inset-left, 0px)); bottom: calc(16px + env(safe-area-inset-bottom, 0px));
    width: min(440px, calc(100vw - 32px));
    padding: 20px;
    border-radius: 20px; border: 1px solid var(--line);
    background: rgba(10, 24, 21, .96); color: var(--ink);
    box-shadow: 0 30px 60px rgba(0, 0, 0, .55), 0 0 60px rgba(0, 216, 193, .12);
}
@supports (backdrop-filter: blur(1px)) { .cookie-notice { background: rgba(10, 24, 21, .86); backdrop-filter: blur(18px); } }
.cookie-notice[hidden] { display: none; }
.cookie-notice:focus { outline: none; }
.cookie-notice:focus-visible { outline: 3px solid var(--mint); }
.cookie-notice__text { margin: 0 0 14px; font-size: 15px; line-height: 1.55; color: var(--soft); }
.cookie-notice__link { color: var(--mint); text-decoration: underline; text-underline-offset: 3px; }
.cookie-notice__actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.cookie-notice__button { min-height: 46px; padding: 0 18px; border-radius: var(--radius-pill); font: 600 15px var(--font-display); cursor: pointer; border: 1.5px solid transparent; transition: background-color .2s ease, color .2s ease, border-color .2s ease; }
.cookie-notice__button--decline { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .5); }
.cookie-notice__button--decline:hover { background: rgba(255, 255, 255, .1); border-color: #fff; }
.cookie-notice__button--accept { background: var(--mint); color: var(--on-mint); }
.cookie-notice__button--accept:hover { background: #2ee6d1; }

/* ================= Video modal ================= */
.video-modal { position: fixed; inset: 0; z-index: 100002; display: grid; place-items: center; padding: 20px; }
.video-modal[hidden] { display: none; }
.video-modal__backdrop { position: absolute; inset: 0; background: rgba(3, 8, 7, .9); }
@supports (backdrop-filter: blur(1px)) { .video-modal__backdrop { background: rgba(3, 8, 7, .78); backdrop-filter: blur(10px); } }
.video-modal__dialog { position: relative; width: min(1100px, 100%); }
.video-modal__video { display: block; width: 100%; max-height: 82vh; border-radius: 16px; background: #000; box-shadow: 0 0 0 1px var(--line), 0 0 90px rgba(0, 216, 193, .3); }
.video-modal__close { position: absolute; top: -56px; right: 0; display: grid; place-items: center; width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 50%; background: var(--night-2); color: #fff; cursor: pointer; }
.video-modal__close:hover { background: var(--mint); color: var(--on-mint); border-color: var(--mint); }
.video-modal__close .icon { width: 16px; height: 16px; }
