/* ==================================================
   UNI ENGINEERING / УНИ ИНЖЕНЕРИНГ — Coming Soon page
   Single-viewport responsive landing page
   HTML5 + CSS3, no frameworks
   ================================================== */

/* ----------  1. BRAND VARIABLES  ---------- */
:root {
    --navy-deep:   #06182F;
    --navy-dark:   #082E5B;
    --blue:        #008EE8;
    --cyan:        #32C5FF;
    --red:         #E52421;
    --orange:      #FF7900;
    --white:       #FFFFFF;
    --gray-light:  #E9EEF4;
    --gray-muted:  #91A5B8;

    --font-head: 'Montserrat', sans-serif;
    --font-body: 'Inter', sans-serif;

    /* fluid spacing used across the layout */
    --pad-x: clamp(1rem, 4vw, 3.5rem);
}

/* ----------  2. RESET / BASE  ---------- */
*,
*::before,
*::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
    height: 100%;
    overflow: hidden;               /* the page fits one viewport — no scrolling */
}

body {
    font-family: var(--font-body);
    color: var(--gray-light);
    background: linear-gradient(135deg, var(--navy-deep) 0%, var(--navy-dark) 55%, #051224 100%);
    -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { font: inherit; cursor: pointer; background: none; border: none; color: inherit; }

/* ----------  3. DECORATIVE BACKGROUND  ---------- */
/* very subtle technical grid */
.bg-grid {
    position: fixed;
    inset: 0;
    background-image:
        linear-gradient(rgba(50, 197, 255, 0.045) 1px, transparent 1px),
        linear-gradient(90deg, rgba(50, 197, 255, 0.045) 1px, transparent 1px);
    background-size: 56px 56px;
    pointer-events: none;
    z-index: 0;
}

/* soft glows: blue = cooling side, orange = heating side */
.bg-glow {
    position: fixed;
    width: clamp(280px, 42vw, 620px);
    height: clamp(280px, 42vw, 620px);
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.22;
    pointer-events: none;
    z-index: 0;
}
.bg-glow--cool { background: var(--blue);   top: -10%; left: -8%; }
.bg-glow--warm { background: var(--orange); bottom: -14%; right: -6%; opacity: 0.14; }

/* ----------  4. PAGE FRAME (header / hero / footer)  ---------- */
.page {
    position: relative;
    z-index: 1;
    height: 100vh;
    height: 100dvh;                 /* better fit on mobile browsers */
    display: flex;
    flex-direction: column;
}

/* ----------  5. HEADER  ---------- */
.site-header {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: clamp(0.5rem, 1.2vh, 0.9rem) var(--pad-x);
    background: rgba(6, 24, 47, 0.55);
    border-bottom: 1px solid rgba(50, 197, 255, 0.12);
    backdrop-filter: blur(8px);
}

/* logo */
.logo { display: flex; align-items: center; gap: 0.6rem; min-width: 0; }
.logo-mark { width: clamp(30px, 4.5vh, 42px); height: auto; flex: 0 0 auto; }
.logo-img  { height: clamp(38px, 6vh, 54px); width: auto; border-radius: 6px; }   /* real logo image */
.logo-text { display: flex; flex-direction: column; line-height: 1.15; min-width: 0; }
.logo-text strong {
    font-family: var(--font-head);
    font-weight: 800;
    font-size: clamp(0.78rem, 1.6vw, 1.05rem);
    letter-spacing: 0.06em;
    color: var(--white);
    white-space: nowrap;
}
.logo-text small {
    font-size: clamp(0.55rem, 1.1vw, 0.68rem);
    color: var(--gray-muted);
    letter-spacing: 0.04em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* language switcher + contact */
.header-actions { display: flex; align-items: center; gap: clamp(0.5rem, 1.5vw, 1.1rem); flex: 0 0 auto; }

.lang-switch { display: flex; align-items: center; gap: 0.35rem; }
.lang-divider { color: var(--gray-muted); font-size: 0.8rem; }
.lang-btn {
    font-weight: 600;
    font-size: clamp(0.75rem, 1.4vw, 0.85rem);
    letter-spacing: 0.05em;
    color: var(--gray-muted);
    padding: 0.25rem 0.4rem;
    border-radius: 6px;
    transition: color 0.2s, background 0.2s;
}
.lang-btn:hover { color: var(--white); }
.lang-btn.is-active {
    color: var(--white);
    background: rgba(0, 142, 232, 0.25);
    box-shadow: inset 0 0 0 1px rgba(50, 197, 255, 0.45);
}

/* ----------  6. BUTTONS  ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    border-radius: 10px;
    white-space: nowrap;
    transition: transform 0.2s, box-shadow 0.2s, background 0.2s, border-color 0.2s;
}

/* small header contact button */
.btn--header {
    font-size: clamp(0.72rem, 1.4vw, 0.85rem);
    padding: 0.42em 1.1em;
    color: var(--white);
    background: linear-gradient(90deg, var(--red), var(--orange));
    box-shadow: 0 2px 10px rgba(229, 36, 33, 0.35);
}
.btn--header:hover { transform: translateY(-1px); box-shadow: 0 4px 16px rgba(255, 121, 0, 0.45); }

/* primary CTA: red → orange gradient */
.btn--primary {
    font-size: clamp(0.82rem, 1.6vw, 0.95rem);
    padding: 0.75em 1.6em;
    color: var(--white);
    background: linear-gradient(90deg, var(--red) 0%, var(--orange) 100%);
    box-shadow: 0 4px 18px rgba(229, 36, 33, 0.4);
}
.btn--primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 26px rgba(255, 121, 0, 0.55);
}

/* secondary CTA: transparent + blue outline */
.btn--secondary {
    font-size: clamp(0.82rem, 1.6vw, 0.95rem);
    padding: 0.75em 1.5em;
    color: var(--white);
    background: rgba(6, 24, 47, 0.55);
    border: 1px solid var(--blue);
}
.btn--secondary:hover {
    border-color: var(--cyan);
    background: rgba(0, 142, 232, 0.18);
    transform: translateY(-2px);
}

/* ----------  6b. CONTACT DROPDOWN (email / phone choice)  ---------- */
.contact-dropdown { position: relative; }

.contact-menu {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    min-width: 13rem;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    padding: 0.4rem;
    border-radius: 10px;
    background: rgba(8, 30, 58, 0.97);
    border: 1px solid rgba(50, 197, 255, 0.22);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
    z-index: 20;
}
.contact-menu[hidden] { display: none; }

.contact-menu-item {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.5rem 0.6rem;
    border-radius: 7px;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--gray-light);
    transition: background 0.15s, color 0.15s;
}
.contact-menu-item:hover,
.contact-menu-item:focus-visible { background: rgba(0, 142, 232, 0.2); color: var(--white); }
.contact-menu-item svg { width: 17px; height: 17px; flex: 0 0 auto; stroke: currentColor; }

/* CTA row dropdown menu should hang below without pushing layout */
#cta-contact-dropdown .contact-menu { right: auto; left: 0; }

/* ----------  7. HERO (split layout)  ---------- */
.hero {
    flex: 1 1 auto;
    min-height: 0;                  /* allow children to shrink — critical for 100vh fit */
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
    align-items: stretch;
    gap: clamp(1rem, 3vw, 3rem);
    padding: clamp(0.6rem, 1.6vh, 1.4rem) var(--pad-x);
}

/* left column */
.hero-content {
    min-width: 0;
    min-height: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: clamp(0.45rem, 1.4vh, 0.95rem);
}

.hero-label {
    font-family: var(--font-head);
    font-weight: 700;
    font-size: clamp(0.62rem, 1.3vw, 0.78rem);
    letter-spacing: 0.22em;
    color: var(--cyan);
    text-transform: uppercase;
}
.hero-label::before {
    content: "";
    display: inline-block;
    width: 2em;
    height: 2px;
    background: linear-gradient(90deg, var(--blue), var(--orange));
    vertical-align: middle;
    margin-right: 0.7em;
}

.hero-title {
    font-family: var(--font-head);
    font-weight: 800;
    font-size: clamp(1.45rem, 3.4vw, 2.9rem);
    line-height: 1.12;
    color: var(--white);
}

.hero-desc {
    font-size: clamp(0.8rem, 1.5vw, 0.98rem);
    line-height: 1.5;
    color: var(--gray-light);
    max-width: 56ch;
}

/* ----------  8. COUNTDOWN  ---------- */
.countdown-intro {
    font-size: clamp(0.7rem, 1.3vw, 0.82rem);
    color: var(--gray-muted);
    margin-bottom: clamp(0.3rem, 0.8vh, 0.55rem);
    letter-spacing: 0.03em;
}

.countdown {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: clamp(0.4rem, 1vw, 0.8rem);
    max-width: 30rem;
}

/* glass-style cards */
.count-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.1rem;
    padding: clamp(0.45rem, 1.4vh, 0.85rem) 0.3rem;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(6px);
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-top-width: 2px;
}
.count-card--cool { border-top-color: var(--cyan); }
.count-card--warm { border-top-color: var(--orange); }

.count-num {
    font-family: var(--font-head);
    font-weight: 700;
    font-size: clamp(1.25rem, 3vw, 2rem);
    color: var(--white);
    font-variant-numeric: tabular-nums;
    line-height: 1.1;
}
/* subtle pop animation when a number changes (class added by JS) */
.count-num.tick { animation: tick 0.35s ease; }
@keyframes tick {
    0%   { transform: translateY(-4px) scale(1.08); opacity: 0.4; }
    100% { transform: translateY(0)    scale(1);    opacity: 1; }
}

.count-label {
    font-size: clamp(0.55rem, 1.1vw, 0.68rem);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--gray-muted);
}

/* "website is live" message */
.countdown-finished {
    font-family: var(--font-head);
    font-weight: 700;
    font-size: clamp(1.05rem, 2.4vw, 1.5rem);
    color: var(--cyan);
}

.status-text {
    font-size: clamp(0.65rem, 1.2vw, 0.76rem);
    color: var(--gray-muted);
    margin-top: clamp(0.25rem, 0.7vh, 0.45rem);
}

/* ----------  9. PRODUCT CATEGORIES  ---------- */
.services {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: clamp(0.3rem, 0.8vw, 0.55rem);
    max-width: 40rem;
}

.service-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    padding: clamp(0.3rem, 0.9vh, 0.5rem) 0.3rem;
    border-radius: 10px;
    background: rgba(8, 46, 91, 0.45);
    border: 1px solid rgba(50, 197, 255, 0.16);
    font-size: clamp(0.56rem, 1.05vw, 0.7rem);
    font-weight: 500;
    color: var(--gray-light);
    text-align: center;
    transition: border-color 0.2s, background 0.2s;
}
.service-badge:hover { border-color: var(--cyan); background: rgba(0, 142, 232, 0.14); }

.service-icon { width: clamp(13px, 1.6vw, 17px); height: clamp(13px, 1.6vw, 17px); flex: 0 0 auto; }
.icon-cool { color: var(--cyan); }
.icon-warm { color: var(--orange); }

/* ----------  10. CTA ROW + TRUST LINE  ---------- */
.cta-row { display: flex; flex-wrap: wrap; gap: clamp(0.5rem, 1.2vw, 0.9rem); }

.trust-line {
    font-size: clamp(0.62rem, 1.2vw, 0.74rem);
    color: var(--gray-muted);
    letter-spacing: 0.02em;
}

/* ----------  11. HERO VISUAL (right)  ---------- */
.hero-visual {
    position: relative;
    min-height: 0;
    border-radius: 18px;
    overflow: hidden;
    border: 1px solid rgba(50, 197, 255, 0.18);
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
}

.hero-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* dark overlay so nearby text stays readable */
.hero-visual-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(115deg,
        rgba(6, 24, 47, 0.72) 0%,
        rgba(6, 24, 47, 0.25) 45%,
        rgba(6, 24, 47, 0.45) 100%);
}

/* subtle animated airflow streaks */
.airflow {
    position: absolute;
    width: 55%;
    height: 3px;
    border-radius: 3px;
    filter: blur(1px);
    opacity: 0.65;
    animation: flow 6s ease-in-out infinite;
}
.airflow--cool {
    top: 26%;
    left: -10%;
    background: linear-gradient(90deg, transparent, var(--cyan), transparent);
}
.airflow--warm {
    bottom: 24%;
    right: -10%;
    background: linear-gradient(90deg, transparent, var(--orange), transparent);
    animation-delay: 3s;
}
@keyframes flow {
    0%, 100% { transform: translateX(0);    opacity: 0.25; }
    50%      { transform: translateX(18%);  opacity: 0.75; }
}

/* ----------  12. FOOTER  ---------- */
.site-footer {
    flex: 0 0 auto;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.4rem 1.4rem;
    padding: clamp(0.4rem, 1vh, 0.7rem) var(--pad-x);
    border-top: 1px solid rgba(50, 197, 255, 0.12);
    background: rgba(6, 24, 47, 0.55);
    font-size: clamp(0.58rem, 1.2vw, 0.72rem);
    color: var(--gray-muted);
    text-align: center;
}
.footer-brand { font-weight: 600; color: var(--gray-light); }
.footer-domain { color: var(--cyan); font-weight: 500; }
.footer-domain:hover { text-decoration: underline; }

/* ==================================================
   13. RESPONSIVE BEHAVIOUR
   ================================================== */

/* Tablet: keep two columns, shrink the visual */
@media (max-width: 900px) {
    .hero { grid-template-columns: minmax(0, 1.3fr) minmax(0, 0.7fr); gap: 1rem; }
}

/* Mobile: compact vertical layout, image becomes a small banner */
@media (max-width: 700px) {
    .hero {
        grid-template-columns: 1fr;
        grid-template-rows: minmax(0, 1fr) clamp(70px, 12vh, 120px);
        gap: 0.6rem;
        padding-top: 0.5rem;
        padding-bottom: 0.5rem;
    }

    /* visual moves below the content as a slim strip */
    .hero-visual { order: 2; border-radius: 12px; }
    .hero-content { order: 1; gap: 0.5rem; }

    /* hide brand tagline to keep header compact */
    .logo-text small { display: none; }

    /* countdown: stays in one row (4 compact cards) */
    .countdown { max-width: 100%; }

    /* categories in three columns (7 items → 3/3/1) */
    .services { grid-template-columns: repeat(3, minmax(0, 1fr)); max-width: 100%; }

    /* full-width tap-friendly buttons */
    .cta-row { width: 100%; }
    .cta-row .btn { flex: 1 1 auto; min-height: 42px; }

    /* reduce decorative elements */
    .bg-glow { opacity: 0.12; }
    .bg-grid { background-size: 44px 44px; }
}

/* Very small screens (≤380px): 2×2 countdown grid, tighter spacing */
@media (max-width: 380px) {
    .countdown { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .hero { grid-template-rows: minmax(0, 1fr) 0; }
    .hero-visual { display: none; }         /* drop the visual to guarantee the fit */
    .btn--header { padding: 0.4em 0.8em; }
}

/* Short landscape viewports: trim vertical chrome */
@media (max-height: 560px) {
    .hero-desc, .status-text { display: none; }
    .hero-content { gap: 0.4rem; }
}

/* Respect users who prefer less motion */
@media (prefers-reduced-motion: reduce) {
    .airflow, .count-num.tick { animation: none; }
}
