/* ==========================================================================
   NovaCorp — hero landing page
   Reference design: 1920 x 1000. All fixed values below are the design values;
   clamp(min, <vw of 1920>, design) keeps the layout proportional while it
   scales down, and stops it growing past the reference width.
   ========================================================================== */

/* Fonts ------------------------------------------------------------------ */
@font-face {
  font-family: 'Google Sans Flex';
  font-style: normal;
  font-weight: 300 700;
  font-stretch: 100%;
  font-display: swap;
  src: url('../fonts/google-sans-flex-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Google Sans Flex';
  font-style: normal;
  font-weight: 300 700;
  font-stretch: 100%;
  font-display: swap;
  src: url('../fonts/google-sans-flex-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* Tokens ----------------------------------------------------------------- */
:root {
  --side: clamp(20px, 12.5vw, 240px);   /* 240px gutter at 1920 */
  --panel: rgba(255, 255, 255, 0.1);
  --radius: 10px;
  --ink: #fff;
  --font: 'Google Sans Flex', 'Google Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: #06080b;
  color: var(--ink);
  font-family: var(--font);
  font-variation-settings: 'GRAD' 0, 'ROND' 0, 'wdth' 100;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img, svg, video { display: block; }

a { color: inherit; text-decoration: none; }

:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
  border-radius: 4px;
}

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* Hero shell ------------------------------------------------------------- */
.hero {
  position: relative;
  min-height: 100svh;
  display: grid;
  grid-template-rows: auto 1fr auto;
  isolation: isolate;
}

.hero__media {
  position: absolute;
  inset: 0;
  z-index: -2;
  overflow: hidden;
  background: #06080b;
}

.hero__media video,
.hero__media .hero__poster {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero__media video {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 600ms ease;
}

.hero__media video.is-ready { opacity: 1; }

/* 50% black wash from the design, plus a soft left scrim so the headline
   keeps its contrast over the brighter shots in the footage. */
.hero__scrim {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.35) 0%, rgba(0, 0, 0, 0) 60%),
    rgba(0, 0, 0, 0.5);
}

/* Header ----------------------------------------------------------------- */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: clamp(20px, 1.5625vw, 30px) var(--side) 0;
}

.site-header__logo {
  width: clamp(150px, 12.70833vw, 244px);
  height: auto;
}

.site-header__right {
  display: flex;
  align-items: center;
  gap: clamp(14px, 2.13542vw, 41px);
}

.site-header__mail {
  font-size: clamp(14px, 0.9375vw, 18px);
  line-height: 28px;
  font-weight: 500;
  white-space: nowrap;
  transition: opacity 150ms ease;
}

.site-header__mail:hover { opacity: 0.75; }

/* Language switcher (details/summary — works without JS) ------------------ */
.lang {
  position: relative;
  flex: none;
}

.lang__toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: clamp(62px, 3.64583vw, 70px);
  height: clamp(34px, 2.08333vw, 40px);
  padding: 0 12px 0 11px;
  border: 1px solid #fff;
  border-radius: 6px;
  font-size: clamp(14px, 0.9375vw, 18px);
  font-weight: 500;
  line-height: 1;
  cursor: pointer;
  list-style: none;
  user-select: none;
  transition: background-color 150ms ease;
}

.lang__toggle::-webkit-details-marker { display: none; }
.lang__toggle:hover { background: rgba(255, 255, 255, 0.12); }

.lang__chevron {
  width: 14.1426px;
  height: 8.48535px;
  flex: none;
  transition: transform 200ms ease;
}

.lang[open] .lang__chevron { transform: rotate(180deg); }

.lang__menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 100%;
  margin: 0;
  padding: 4px;
  list-style: none;
  background: rgba(10, 13, 18, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 6px;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  z-index: 10;
}

.lang__menu a {
  display: block;
  padding: 7px 10px;
  border-radius: 4px;
  font-size: clamp(14px, 0.9375vw, 18px);
  font-weight: 500;
  line-height: 1.2;
  white-space: nowrap;
  transition: background-color 150ms ease;
}

.lang__menu a:hover { background: rgba(255, 255, 255, 0.14); }
.lang__menu a[aria-current='true'] { background: rgba(255, 255, 255, 0.1); }

/* Hero copy -------------------------------------------------------------- */
.hero__body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  /* Offsets the copy block to the design's optical position (top: 397px). */
  padding: clamp(36px, 5.3125vw, 102px) var(--side) 0;
}

.eyebrow {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  height: clamp(30px, 1.875vw, 36px);
  margin: 0;
  padding: 0 12px;
  border-radius: var(--radius);
  background: var(--panel);
  font-size: clamp(13px, 1.04167vw, 20px);
  font-weight: 500;
  line-height: 1;
}

.hero__title {
  margin: clamp(16px, 1.51042vw, 29px) 0 0;
  max-width: 17ch;
  font-size: clamp(38px, 4.375vw, 84px);
  font-weight: 700;
  line-height: 0.6667;   /* 56 / 84 — matches the design's tight leading */
  letter-spacing: -0.01em;
  text-wrap: balance;
}

.hero__lead {
  margin: clamp(20px, 1.5625vw, 30px) 0 0;
  max-width: min(710px, 100%);
  font-size: clamp(16px, 1.14583vw, 22px);
  font-weight: 500;
  line-height: 1.2727;   /* 28 / 22 */
}

body.lang-ba .hero__lead { max-width: min(670px, 100%); }

/* Optical alignment: pulls the capital B back onto the 240px grid line,
   the way the English design nudges the headline to x=235. The Bosnian
   headline starts with S, whose side bearing already sits on the grid. */
body.lang-en .hero__title { margin-left: -0.0714em; }

/* Clients bar ------------------------------------------------------------ */
.clients {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: clamp(24px, 4.79167vw, 92px);
  height: clamp(96px, 6.25vw, 120px);
  margin: 0 var(--side) clamp(24px, 2.60417vw, 50px);
  padding: 0 clamp(16px, 1.97917vw, 38px) 0 clamp(16px, 1.77083vw, 34px);
  border-radius: var(--radius);
  background: var(--panel);
}

.clients__label {
  flex: none;
  width: clamp(170px, 12.44792vw, 239px);
}

.clients__label strong {
  display: block;
  font-size: clamp(16px, 1.14583vw, 22px);
  font-weight: 700;
  line-height: 24px;
}

.clients__label span {
  display: block;
  font-size: clamp(13px, 0.9375vw, 18px);
  font-weight: 300;
  line-height: 24px;
}

.clients__logos {
  display: flex;
  align-items: center;
  gap: clamp(24px, 5.67708vw, 109px);
}

.clients__logos img {
  height: auto;
  opacity: 0.95;
}

.clients__logos img[data-logo='fides']            { width: clamp(76px, 6.66667vw, 128px); }
.clients__logos img[data-logo='shoply']           { width: clamp(80px, 7.08333vw, 136px); }
.clients__logos img[data-logo='realtyflow']       { width: clamp(130px, 11.61458vw, 223px); }
.clients__logos img[data-logo='elektricnavozila'] { width: clamp(130px, 11.61458vw, 223px); }

/* Responsive ------------------------------------------------------------- */
@media (max-width: 1100px) {
  /* The 12.5vw gutter of the 1920 design is too generous below desktop;
     tightening it keeps all four client logos on one row. */
  :root { --side: clamp(20px, 6vw, 96px); }

  .hero__title {
    line-height: 1.04;
    max-width: 22ch;
  }

  .clients {
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 20px;
    height: auto;
    padding: 24px;
  }

  .clients__label { width: auto; }

  .clients__logos {
    flex-wrap: wrap;
    gap: 28px 40px;
    width: 100%;
  }
}

@media (max-width: 720px) {
  .hero { grid-template-rows: auto 1fr auto; }

  .hero__body { padding-top: 32px; padding-bottom: 32px; }

  .site-header { gap: 12px; }

  .site-header__mail { font-size: 13px; }

  .hero__title { max-width: none; }

  .clients {
    align-items: center;
    text-align: center;
  }

  .clients__logos {
    justify-content: center;
    gap: 22px 32px;
  }

  .clients__logos img[data-logo='fides']            { width: 68px; }
  .clients__logos img[data-logo='shoply']           { width: 72px; }
  .clients__logos img[data-logo='realtyflow']       { width: 118px; }
  .clients__logos img[data-logo='elektricnavozila'] { width: 118px; }
}

@media (max-width: 420px) {
  .site-header__mail { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
