/* ==========================================================================
   HM Trade d.o.o. — landing page
   Inspired by the moii editorial approach (variable-font display type, calm
   structure), but a distinct design for HM Trade:
   - THEIR palette: deep blue #064392 (logo) + indigo #27348b (logo mark)
     + light gray #f0f2f5 (their banner background). No yellow.
   - Light, airy industrial look — white/light gray surfaces, blue accents.
   ========================================================================== */

:root {
    --font-sans: 'Inter Variable', 'Inter', system-ui, -apple-system, sans-serif;
    --font-display: 'Space Grotesk', 'Inter Variable', system-ui, sans-serif;

    --blue: #064392;        /* logo primary */
    --blue-hover: #053a7e;
    --blue-soft: #e8eef8;   /* tinted surface */
    --indigo: #27348b;      /* logo mark accent */
    --navy: #0d1b3d;        /* dark sections / text on light */
    --ink: #16233f;
    --paper: #f0f2f5;       /* their banner background */
    --white: #ffffff;
    --body: #4a5468;
    --muted: #8791a3;
    --line: rgba(13, 27, 61, 0.1);
    --line-dark: rgba(255, 255, 255, 0.12);

    --container: 1160px;
    --radius: 6px;
}

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

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}
html, body { overflow-x: clip; }

body {
    margin: 0;
    font-family: var(--font-sans);
    font-size: 16px;
    line-height: 1.65;
    color: var(--ink);
    background: var(--white);
    -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }

h1, h2, h3 {
    font-family: var(--font-display);
    font-weight: 600;
    letter-spacing: -0.02em;
    line-height: 1.12;
    margin: 0 0 0.6em;
    color: inherit;
}
h1 { font-size: clamp(2.3rem, 5.6vw, 4rem); font-weight: 700; line-height: 1.07; }
h1 em { font-style: normal; font-weight: 500; color: #9dc0ff; }
h2 { font-size: clamp(1.75rem, 3.4vw, 2.6rem); font-weight: 600; }
h2 em { font-style: normal; font-weight: 500; color: var(--blue); }
.section-dark h2 em { color: #9dc0ff; }
h3 { font-size: 1.16rem; font-weight: 600; }

p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }
a { color: inherit; text-decoration: none; }

.muted { color: var(--muted); font-size: 0.92em; }
.desktop-br { display: none; }

.container {
    width: 100%;
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 24px;
}

/* -- Eyebrow / kicker -- */
.eyebrow {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    font-weight: 580;
    color: var(--blue);
    margin: 0 0 18px;
}
.eyebrow::before {
    content: "";
    display: inline-block;
    width: 22px;
    height: 1.5px;
    background: var(--blue);
    vertical-align: middle;
    margin-right: 10px;
}
.eyebrow-dark { color: rgba(255, 255, 255, 0.6); }
.eyebrow-dark::before { background: #9dc0ff; }

/* -- Buttons -- */
.btn-primary, .btn-ghost {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 22px;
    border-radius: var(--radius);
    font-weight: 520;
    font-size: 15px;
    letter-spacing: 0.01em;
    border: 1px solid transparent;
    cursor: pointer;
    transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease, transform 0.18s ease;
}
.btn-lg { padding: 15px 28px; font-size: 16px; }
.btn-block { width: 100%; }

.btn-primary { background: var(--blue); color: var(--white); }
.btn-primary:hover { background: var(--blue-hover); transform: translateY(-1px); }

.btn-ghost { background: transparent; color: inherit; border-color: rgba(255, 255, 255, 0.38); }
.btn-ghost:hover { border-color: #9dc0ff; color: #9dc0ff; }

/* ==========================================================================
   Header — logo LEFT, nav right next to actions
   ========================================================================== */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--line);
    transition: box-shadow 0.25s ease;
}
.site-header.scrolled { box-shadow: 0 6px 24px rgba(13, 27, 61, 0.08); }

.header-inner {
    max-width: var(--container);
    margin: 0 auto;
    padding: 14px 24px;
    display: flex;
    align-items: center;
    gap: 32px;
}
.brand { flex-shrink: 0; margin-right: auto; }   /* logo on the LEFT */
.brand-logo { height: 40px; width: auto; }

.main-nav {
    display: flex;
    gap: 24px;
    font-size: 14.5px;
    font-weight: 480;
    color: #39445c;
}
.main-nav a { position: relative; padding: 4px 0; transition: color 0.15s ease; }
.main-nav a::after {
    content: "";
    position: absolute;
    left: 0; right: 100%; bottom: 0;
    height: 1.5px;
    background: var(--blue);
    transition: right 0.22s ease;
}
.main-nav a:hover { color: var(--blue); }
.main-nav a:hover::after { right: 0; }

.header-actions { display: flex; align-items: center; gap: 14px; }
.header-cta { padding: 10px 18px; font-size: 14px; }

.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 42px;
    height: 42px;
    padding: 10px;
    background: transparent;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    cursor: pointer;
}
.nav-toggle span {
    display: block;
    height: 1.6px;
    background: var(--ink);
    transition: transform 0.25s ease, opacity 0.25s ease;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6.6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6.6px) rotate(-45deg); }

.mobile-nav {
    display: none;
    flex-direction: column;
    padding: 10px 24px 22px;
    border-top: 1px solid var(--line);
    background: var(--white);
}
.mobile-nav a { padding: 12px 0; font-weight: 500; border-bottom: 1px solid var(--line); }
.mobile-nav .btn-primary { margin-top: 14px; border-bottom: none; justify-content: center; }
.mobile-nav.open { display: flex; }

/* ==========================================================================
   Hero — real warehouse photo, light overlay
   ========================================================================== */
.hero {
    position: relative;
    min-height: min(88vh, 800px);
    display: flex;
    align-items: center;
    color: var(--white);
    background: var(--navy);
    isolation: isolate;
}
.hero-media { position: absolute; inset: 0; z-index: -2; }
.hero-media img {
    width: 100%; height: 100%;
    object-fit: cover;
    object-position: center 45%;
    transform: scale(1);
}
@keyframes heroZoom { to { transform: scale(1); } }

.hero-overlay {
    position: absolute; inset: 0;
    background:
        linear-gradient(100deg, rgba(13, 27, 61, 0.93) 25%, rgba(6, 67, 146, 0.66) 60%, rgba(13, 27, 61, 0.38)),
        linear-gradient(rgba(13, 27, 61, 0.18), rgba(13, 27, 61, 0.18));
}

.hero-content { padding: 120px 24px 96px; }
.hero h1 { max-width: 17ch; margin-bottom: 22px; }
.hero-lead {
    max-width: 54ch;
    font-size: clamp(1.02rem, 1.6vw, 1.19rem);
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.88);
    margin-bottom: 34px;
}
.hero-lead strong { color: var(--white); font-weight: 620; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; }

/* ==========================================================================
   Trust band — light gray like their banner surfaces
   ========================================================================== */
.trust-band {
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    padding: 36px 0;
}
.trust-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}
.trust-item { text-align: center; }
.trust-num {
    display: block;
    font-family: var(--font-display);
    font-size: clamp(1.7rem, 3vw, 2.4rem);
    font-weight: 600;
    line-height: 1.1;
    color: var(--blue);
}
.trust-label {
    font-size: 12.5px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
}

/* ==========================================================================
   Sections — shared
   ========================================================================== */
.section { padding: 96px 0; }
.section-head { max-width: 660px; margin-bottom: 52px; }
.section-head h2 { margin-bottom: 14px; }
.section-lead { color: var(--body); font-size: 1.05rem; }

.section-dark {
    background: var(--navy);
    color: var(--white);
}
.section-dark p { color: rgba(255, 255, 255, 0.78); }

/* ==========================================================================
   Galerija — masonry-style photo grid with captions
   ========================================================================== */
.galerija { background: var(--white); }

.galerija-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: 220px;
    grid-auto-flow: dense;
    gap: 18px;
}
.g-item {
    margin: 0;
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--paper);
}
.g-item.g-wide { grid-column: span 2; }
.g-item img {
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform 0.45s ease;
}
.g-item:hover img { transform: scale(1.045); }
.g-item figcaption {
    position: absolute;
    left: 0; right: 0; bottom: 0;
    padding: 40px 18px 14px;
    font-size: 13.5px;
    font-weight: 500;
    color: var(--white);
    background: linear-gradient(transparent, rgba(13, 27, 61, 0.82));
}

.section-cta {
    margin-top: 46px;
    padding: 26px 30px;
    background: var(--blue-soft);
    border: 1px solid rgba(6, 67, 146, 0.14);
    border-radius: var(--radius);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}
.section-cta p { color: var(--navy); font-weight: 500; margin: 0; }

/* ==========================================================================
   O nama — dark blue with mission card
   ========================================================================== */
.o-nama-grid {
    display: grid;
    grid-template-columns: 1.35fr 1fr;
    gap: 64px;
    align-items: start;
}
.o-nama-copy p { max-width: 58ch; }
.o-nama-photo { margin: 26px 0 0; }
.o-nama-photo img {
    border-radius: var(--radius);
    border: 1px solid var(--line-dark);
}
.o-nama-photo figcaption { padding-top: 8px; font-size: 0.85rem; }
.value-chips { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }
.chip {
    padding: 7px 16px;
    border: 1px solid var(--line-dark);
    border-radius: 999px;
    font-size: 13px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.85);
}
.mission-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--line-dark);
    border-top: 2px solid #9dc0ff;
    border-radius: var(--radius);
    padding: 30px 30px 24px;
}
.mission-card h3 { color: #9dc0ff; font-size: 1.02rem; letter-spacing: 0.02em; margin-bottom: 8px; }
.mission-card p { font-size: 0.96rem; margin-bottom: 20px; }
.mission-card p:last-child { margin-bottom: 0; }

/* ==========================================================================
   Zašto mi
   ========================================================================== */
.zašto { background: var(--white); }
.why-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
}
.why-item { border-top: 2px solid var(--blue); padding-top: 20px; }
.why-item:nth-child(even) { border-top-color: var(--indigo); }
.why-num {
    display: block;
    font-family: var(--font-display);
    font-size: 2.1rem;
    font-weight: 400;
    color: rgba(6, 67, 146, 0.22);
    line-height: 1;
    margin-bottom: 14px;
}
.why-item p { color: var(--body); font-size: 0.95rem; }

/* ==========================================================================
   Proces
   ========================================================================== */
.steps {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
}
.step {
    position: relative;
    padding: 26px 24px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--line-dark);
    border-radius: var(--radius);
    transition: border-color 0.25s ease, transform 0.25s ease;
}
.step:hover { border-color: rgba(157, 192, 255, 0.55); transform: translateY(-4px); }
.step-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px; height: 40px;
    border-radius: 50%;
    border: 1px solid #9dc0ff;
    color: #9dc0ff;
    font-family: var(--font-display);
    font-size: 1.15rem;
    font-weight: 600;
    margin-bottom: 16px;
}
.step p { font-size: 0.94rem; }

/* ==========================================================================
   Kontakt
   ========================================================================== */
.kontakt { background: var(--paper); padding-bottom: 0; }
.kontakt-grid {
    display: grid;
    grid-template-columns: 0.85fr 1.15fr;
    gap: 56px;
    margin-bottom: 72px;
}
.info-row { padding: 18px 0; border-bottom: 1px solid var(--line); }
.info-row:first-child { padding-top: 0; }
.info-row h3 {
    font-size: 11.5px;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    font-family: var(--font-sans);
    font-weight: 600;
    color: var(--muted);
    margin-bottom: 6px;
}
.info-row p { margin: 0; font-size: 1.05rem; font-weight: 500; }
.info-row a:hover { color: var(--blue); }

.kontakt-form {
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 34px 34px 30px;
    box-shadow: 0 14px 44px rgba(13, 27, 61, 0.06);
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.form-field { margin-bottom: 18px; }
.form-field label {
    display: block;
    font-size: 13px;
    font-weight: 560;
    margin-bottom: 7px;
    color: var(--navy);
}
.form-field input,
.form-field textarea {
    width: 100%;
    padding: 12px 14px;
    font: inherit;
    font-size: 15px;
    color: var(--ink);
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.form-field input:focus,
.form-field textarea:focus {
    outline: none;
    border-color: var(--blue);
    box-shadow: 0 0 0 3px rgba(6, 67, 146, 0.12);
}
.form-field input::placeholder,
.form-field textarea::placeholder { color: var(--muted); }
.form-field textarea { resize: vertical; min-height: 120px; }

.form-privacy { font-size: 12.5px; margin: 4px 0 18px; }
.form-privacy a { text-decoration: underline; text-underline-offset: 2px; }
.form-privacy a:hover { color: var(--blue); }

.form-status { margin: 14px 0 0; font-weight: 500; min-height: 1.4em; }
.form-status.ok { color: #157347; }
.form-status.err { color: #c0392b; }

.map-wrap {
    margin: 0 -24px;
    height: 380px;
    border-top: 1px solid var(--line);
}
.map-wrap iframe {
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
    filter: saturate(0.85);
}

/* ==========================================================================
   Final CTA
   ========================================================================== */
.final-cta {
    background: var(--navy);
    color: var(--white);
    text-align: center;
    padding: 96px 0;
}
.final-cta h2 { max-width: 24ch; margin: 0 auto 14px; }
.final-cta p { color: rgba(255, 255, 255, 0.65); margin-bottom: 34px; }
.final-cta .hero-actions { justify-content: center; }

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
    background: #0a1530;
    color: rgba(255, 255, 255, 0.8);
    border-top: 1px solid var(--line-dark);
}
.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr 1fr;
    gap: 40px;
    padding: 56px 24px 44px;
}
.footer-brand img { height: 38px; width: auto; margin-bottom: 16px; }
.footer-brand p { font-size: 0.92rem; color: rgba(255, 255, 255, 0.55); }
.footer-col h3 {
    font-family: var(--font-sans);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: rgba(255, 255, 255, 0.45);
    margin-bottom: 14px;
}
.footer-col a {
    display: block;
    padding: 5px 0;
    font-size: 0.95rem;
    transition: color 0.15s ease;
}
.footer-col a:hover { color: #9dc0ff; }
.footer-col p { font-size: 0.92rem; color: rgba(255, 255, 255, 0.55); }
.footer-bottom { border-top: 1px solid var(--line-dark); padding: 18px 0; }
.footer-bottom p { margin: 0; font-size: 13px; color: rgba(255, 255, 255, 0.4); }

/* ==========================================================================
   Reveal animations
   ========================================================================== */
.reveal {
    opacity: 0;
    transform: translateY(26px);
    transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1), transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
    transition-delay: calc(var(--d, 0) * 90ms);
}
.reveal[data-delay="1"] { --d: 1; }
.reveal[data-delay="2"] { --d: 2; }
.reveal[data-delay="3"] { --d: 3; }
.reveal[data-delay="4"] { --d: 4; }
.reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .reveal { opacity: 1; transform: none; transition: none; }
    .g-item img, .step, .btn-primary { transition: none; }
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (min-width: 769px) {
    .desktop-br { display: inline; }
}

@media (max-width: 1080px) {
    .galerija-grid { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 200px; }
    .why-grid { grid-template-columns: repeat(2, 1fr); }
    .steps { grid-template-columns: repeat(2, 1fr); }
    .o-nama-grid { grid-template-columns: 1fr; gap: 40px; }
    .kontakt-grid { grid-template-columns: 1fr; gap: 44px; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
    .main-nav { display: none; }
    .nav-toggle { display: flex; }
    .header-cta { display: none; }

    .section { padding: 68px 0; }
    .hero-content { padding: 96px 24px 72px; }
    .hero-actions .btn-lg { width: 100%; }

    .trust-grid { grid-template-columns: repeat(2, 1fr); gap: 20px 12px; }

    .galerija-grid { grid-template-columns: 1fr 1fr; grid-auto-rows: 150px; gap: 12px; }
    .g-item.g-wide { grid-column: span 2; }

    .why-grid { grid-template-columns: 1fr; gap: 24px; }
    .steps { grid-template-columns: 1fr; }

    .form-row { grid-template-columns: 1fr; gap: 0; }
    .kontakt-form { padding: 26px 22px 24px; }
    .map-wrap { height: 300px; }

    .footer-grid { grid-template-columns: 1fr; gap: 30px; padding: 44px 24px 34px; }

    .final-cta { padding: 72px 0; }
    .final-cta .hero-actions { flex-direction: column; align-items: stretch; max-width: 360px; margin: 0 auto; }
}
