/* layout.css: the page frame. Wrapper, section rhythm, header, hero, closing banner, footer
   and the responsive rules that belong to them. Smaller parts live in components.css.
   Breakpoints in use: 300, 340, 350, 379, 420, 560, 640, 820, 900, 980, 1000, 1079, 1100 (tour), 1199, 1240, 1279. */

/* ---------- frame ---------- */
.wrap {
  max-width: var(--wrap);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: max(20px, env(safe-area-inset-right, 0px));
}

section { padding-block: clamp(64px, 9vw, 120px); }
.band { background: var(--band); }

.eyebrow {
  font-size: 13px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--green-hi);
}
.lead { color: var(--ink2); font-size: 1.1rem; max-width: 34em; }

h2 { font-size: var(--step-h2); font-weight: 800; line-height: 1.12; }
h2 em { font-style: normal; color: var(--green-hi); }
h2.h2-fit { font-size: min(var(--step-h2), 2.4rem); }

.section-head { display: grid; gap: 14px; margin-bottom: clamp(36px, 5vw, 56px); max-width: 720px; }
.section-head.flush { margin-bottom: 0; }

/* ---------- header ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  padding-top: env(safe-area-inset-top, 0px);
  background: color-mix(in srgb, var(--page) 86%, transparent);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s;
}
.topbar.scrolled { border-bottom-color: var(--line); }
.topbar .wrap { display: flex; align-items: center; gap: 24px; height: var(--header-h); }

.brand {
  display: flex; align-items: center; gap: 10px;
  text-decoration: none; font-weight: 800; font-size: 20px; letter-spacing: -0.02em;
}
.brand-mark {
  width: 34px; height: 34px; border-radius: 10px; flex: none;
  background: var(--green); display: grid; place-items: center; color: #fff;
}
.brand-mark .ms { font-size: 21px; }

.nav { display: flex; gap: 4px; margin-left: auto; }
.nav a {
  text-decoration: none; color: var(--ink2); font-weight: 600; font-size: 15px;
  padding: 8px 14px; border-radius: 999px; transition: color 0.15s, background 0.15s;
}
.nav a:hover { color: var(--ink); background: var(--floating); }

.menu-btn {
  display: none; margin-left: auto; width: 44px; height: 44px; border-radius: 50%;
  border: 0; background: var(--floating); color: var(--ink); cursor: pointer; place-items: center;
}
.mobile-nav { display: none; }

/* ---------- hero ---------- */
.hero {
  position: relative; isolation: isolate; overflow: hidden;
  padding-block: clamp(40px, 7vw, 96px) clamp(56px, 8vw, 110px);
}
.hero .wrap {
  display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: clamp(32px, 5vw, 72px); align-items: center;
}
.hero-copy { display: grid; gap: 26px; }
.hero h1 { font-size: var(--step-hero); font-weight: 800; line-height: 1.02; letter-spacing: -0.035em; }
.hero h1 em { font-style: normal; color: var(--green-hi); }
/* Keeps "na jednom mjestu." together so the headline breaks into three even rows. On very narrow
   screens it is too wide for one line (it needs ~337px: it fits from ~380px up), so it may wrap. */
.nowrap { white-space: nowrap; }
@media (max-width: 379px) {
  .nowrap { white-space: normal; }
  /* Without this the column grows to fit the longest unbroken text and the hero is cut off. Scoped to
     small screens on purpose: on desktop the approved wrapping of the lead depends on the auto track. */
  .hero-copy { grid-template-columns: minmax(0, 1fr); }
}

/* Film grain over the hero. The radial mask is required: without it the hero reads as a
   lighter box against the neighbouring sections. */
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: 5; pointer-events: none;
  background-image: var(--grain); background-size: 200px 200px; opacity: 0.14;
  -webkit-mask-image: radial-gradient(ellipse 70% 65% at 50% 50%, #000 35%, transparent 100%);
  mask-image: radial-gradient(ellipse 70% 65% at 50% 50%, #000 35%, transparent 100%);
}

/* ---------- closing banner ---------- */
.cta-box {
  position: relative; overflow: hidden;
  border-radius: 32px; background: var(--green); padding: clamp(32px, 6vw, 64px);
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 28px; align-items: center;
}
.cta-box h2 { color: #fff; }
.cta-box p { color: #e3eee6; margin-top: 10px; font-size: 1.05rem; }
.cta-box .bg-ico {
  position: absolute; right: -30px; bottom: -60px; font-size: 300px;
  color: rgba(255, 255, 255, 0.06); pointer-events: none;
}

/* ---------- footer ---------- */
.site-footer { padding-block: 48px 40px; border-top: 1px solid var(--line); color: var(--ink2); font-size: 14px; }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 20px 40px; justify-content: space-between; align-items: center; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 6px 22px; }
.site-footer nav a { text-decoration: none; }
.site-footer nav a:hover { color: var(--ink); }
.site-footer .copy { width: 100%; }
.mail { color: var(--ink); text-decoration: none; }
.mail:hover { text-decoration: underline; }
.legal { width: 100%; max-width: 90ch; font-size: 12px; line-height: 1.5; color: var(--ink3); }

/* ---------- responsive ---------- */
@media (max-width: 980px) {
  .hero .wrap { grid-template-columns: minmax(0, 1fr); }
  .hero .stores { justify-content: center; }
}

@media (max-width: 820px) {
  .nav, .topbar .btn-green { display: none; }
  .menu-btn { display: grid; }
  .mobile-nav {
    display: grid; gap: 4px; background: var(--page); border-bottom: 1px solid var(--line);
    padding: 8px max(20px, env(safe-area-inset-right, 0px)) 18px var(--gutter);
  }
  .mobile-nav a { text-decoration: none; font-weight: 700; padding: 12px 4px; border-bottom: 1px solid var(--line); }
  .mobile-nav a:last-child { border: 0; }
  /* closing banner: everything centred once it stacks */
  .cta-box { grid-template-columns: minmax(0, 1fr); justify-items: center; text-align: center; }
  .cta-box .stores { justify-content: center; }
  /* footer: brand, contact, then the two legal links one under the other */
  .site-footer .wrap { flex-direction: column; align-items: flex-start; gap: 18px; }
  .site-footer nav { order: 1; flex-direction: column; gap: 10px; }
  .site-footer .copy { order: 2; }
}
