/* ==========================================================
   NewDesign — glavni stilovi
   ========================================================== */

:root {
  /* Tamnosiva s hladnim podtonom — ne čista crna */
  --bg: #0b0c10;
  --bg-2: #101218;
  --surface: #14161d;
  --surface-2: #1a1d26;
  --paper: #f2f1ed;     /* svijetle sekcije */
  --accent-2: #4fd6ff;  /* tirkizni odsjaj, samo u svjetlu i gradijentima */
  --glow: rgba(53, 99, 255, 0.45);
  --line: rgba(255, 255, 255, 0.08);
  --line-2: rgba(255, 255, 255, 0.14);
  --text: #f4f4f5;
  --text-2: #a1a1aa;
  --text-3: #8b8b94; /* ≥ 4.5:1 i na --bg i na --surface */
  --accent: #3563ff;
  --accent-hover: #4a74ff;
  --accent-text: #8aa6ff;
  --accent-soft: rgba(53, 99, 255, 0.14);
  --danger: #ff7a7a;
  --success: #6ee7a8;

  --font-sans: "Inter Tight", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-serif: "Instrument Serif", ui-serif, Georgia, serif;

  --radius: 20px;
  --radius-sm: 12px;
  --header-h: 72px;
  --gutter: clamp(1.25rem, 5vw, 2.5rem);
  --section-y: clamp(5.5rem, 12vw, 10rem);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in: cubic-bezier(0.55, 0, 1, 0.45);
  --dur-fast: 0.2s;
  --dur: 0.3s;
  --dur-slow: 0.6s;
  --target: 24px; /* najmanja dodirna površina (WCAG 2.2); na dodirnim zaslonima 44px */

  color-scheme: dark;
}
@media (pointer: coarse) {
  :root { --target: 44px; }
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + 8px);
}
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
/* Nepomična atmosfera iza svega: blago svjetlo i fino zrno (ništa se ne animira). */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(70rem 45rem at 90% -10%, rgba(53, 99, 255, 0.09), transparent 60%),
    radial-gradient(55rem 40rem at -15% 55%, rgba(79, 214, 255, 0.04), transparent 60%),
    linear-gradient(180deg, #0b0c10 0%, #0e1016 55%, #0b0c10 100%);
}
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 300;
  pointer-events: none;
  opacity: 0.04;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
body.menu-open { overflow: hidden; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; padding: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; }
a, button, label, select, summary { touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
::selection { background: var(--accent); color: #fff; }
[hidden] { display: none !important; }

/* Obris prati zaobljenje elementa (gumbi ostaju „pilule”). */
:focus-visible {
  outline: 2px solid var(--accent-text);
  outline-offset: 3px;
}

.skip-link {
  position: fixed;
  top: 12px; left: 12px;
  z-index: 200;
  padding: 0.7rem 1rem;
  background: var(--text);
  color: var(--bg);
  border-radius: 10px;
  font-weight: 600;
  transform: translateY(-150%);
  transition: transform 0.2s;
}
.skip-link:focus { transform: none; }

.container {
  width: 100%;
  max-width: 1240px;
  margin-inline: auto;
  padding-inline: var(--gutter);
}

em { font-family: var(--font-serif); font-style: italic; font-weight: 400; letter-spacing: -0.01em; }

/* ---------- Logo ---------- */
.logo {
  display: inline-flex;
  align-items: baseline;
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: -0.03em;
  line-height: 1;
}
.logo span { font-weight: 400; color: var(--text-2); }
.logo i {
  width: 0.32em; height: 0.32em;
  margin-left: 0.12em;
  background: var(--accent);
  border-radius: 2px;
}
.logo--lg { font-size: 1.75rem; }
.header .logo, .footer .logo { padding-block: 12px; } /* veća površina za klik/dodir */

/* ---------- Buttons ---------- */
.btn {
  --h: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  height: var(--h);
  padding-inline: 1.35rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.975rem;
  letter-spacing: -0.01em;
  white-space: nowrap;
  transition: background-color 0.25s var(--ease), border-color 0.25s var(--ease), color 0.25s, transform 0.25s var(--ease);
}
.btn--sm { --h: 40px; padding-inline: 1.1rem; font-size: 0.9rem; }
.btn--lg { --h: 56px; padding-inline: 1.75rem; font-size: 1.025rem; }
.btn--block { width: 100%; }
.btn--primary { background: var(--accent); color: #fff; }
.btn--primary:hover { background: var(--accent-hover); }
.btn--ghost { border: 1px solid var(--line-2); color: var(--text); }
.btn--ghost:hover { border-color: rgba(255, 255, 255, 0.35); background: rgba(255, 255, 255, 0.04); }
.btn:active { transform: scale(0.98); }
.btn__arrow {
  width: 18px; height: 18px;
  fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
  transition: transform 0.3s var(--ease);
}
.btn:hover .btn__arrow { transform: translateX(3px); }
.btn[disabled] { opacity: 0.6; cursor: progress; }
.btn.is-loading .btn__arrow { display: none; }
.btn.is-loading::after {
  content: "";
  width: 16px; height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text);
  min-height: 44px;
  border-bottom: 1px solid var(--line-2);
  transition: border-color 0.25s, color 0.25s;
}
.link-arrow svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; transition: transform 0.3s var(--ease); }
.link-arrow:hover { color: var(--accent-text); border-color: var(--accent-text); }
.link-arrow:hover svg { transform: translateX(3px); }

/* ---------- Header ---------- */
.header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  height: var(--header-h);
  border-bottom: 1px solid transparent;
  transition: background-color 0.3s, border-color 0.3s, backdrop-filter 0.3s;
}
.header.is-scrolled,
body.menu-open .header {
  background: rgba(10, 10, 11, 0.78);
  -webkit-backdrop-filter: saturate(160%) blur(16px);
  backdrop-filter: saturate(160%) blur(16px);
  border-bottom-color: var(--line);
}
.header__inner {
  height: 100%;
  display: flex;
  align-items: center;
  gap: 2rem;
}
.header__inner .logo { margin-right: auto; }
.nav__list { display: flex; gap: 0.25rem; }
.nav__link {
  position: relative;
  display: block;
  padding: 0.5rem 0.85rem;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-2);
  border-radius: 999px;
  transition: color 0.2s, background-color 0.2s;
}
.nav__link:hover { color: var(--text); background: rgba(255, 255, 255, 0.05); }
.nav__link.is-active { color: var(--text); }
.nav__link.is-active::after {
  content: "";
  position: absolute;
  left: 50%; bottom: 1px;
  width: 4px; height: 4px;
  margin-left: -2px;
  border-radius: 50%;
  background: var(--accent);
}

.burger {
  display: none;
  position: relative;
  width: 44px; height: 44px;
  margin-right: -10px;
  border-radius: 12px;
}
.burger span {
  position: absolute;
  left: 11px; right: 11px;
  height: 1.75px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.35s var(--ease), top 0.35s var(--ease);
}
.burger span:nth-child(1) { top: 17px; }
.burger span:nth-child(2) { top: 25px; }
.burger[aria-expanded="true"] span:nth-child(1) { top: 21px; transform: rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2) { top: 21px; transform: rotate(-45deg); }

.mobile-menu {
  position: fixed;
  inset: var(--header-h) 0 0 0;
  z-index: 99;
  background: var(--bg);
  overflow-y: auto;
  overscroll-behavior: contain;
  opacity: 0;
  /* zatvaranje je brže od otvaranja */
  transition: opacity var(--dur-fast) var(--ease-in);
}
.mobile-menu.is-open { opacity: 1; transition: opacity var(--dur) var(--ease); }
.mobile-menu__inner {
  min-height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 2.5rem;
  padding-block: 2rem 2.5rem;
}
.mobile-menu__list li { border-bottom: 1px solid var(--line); }
.mobile-menu__list a {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  padding-block: 1.05rem;
  font-size: clamp(1.9rem, 8vw, 2.6rem);
  font-weight: 500;
  letter-spacing: -0.035em;
  line-height: 1.1;
  transform: translateY(12px);
  opacity: 0;
  transition: transform 0.5s var(--ease), opacity 0.5s var(--ease), color 0.2s;
}
.mobile-menu__list a span { font-size: 0.8rem; font-weight: 500; color: var(--text-3); letter-spacing: 0; font-variant-numeric: tabular-nums; }
.mobile-menu__list a:hover { color: var(--accent-text); }
.mobile-menu.is-open .mobile-menu__list a { transform: none; opacity: 1; }
.mobile-menu.is-open .mobile-menu__list li:nth-child(2) a { transition-delay: 0.04s; }
.mobile-menu.is-open .mobile-menu__list li:nth-child(3) a { transition-delay: 0.08s; }
.mobile-menu.is-open .mobile-menu__list li:nth-child(4) a { transition-delay: 0.12s; }
.mobile-menu.is-open .mobile-menu__list li:nth-child(5) a { transition-delay: 0.16s; }

@media (max-width: 900px) {
  .nav, .header__cta { display: none; }
  .burger { display: block; }
}

/* ---------- Common section parts ---------- */
.section { padding-block: var(--section-y); position: relative; }
.section + .section { border-top: 1px solid var(--line); }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-2);
  letter-spacing: 0.01em;
}
.eyebrow .dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}
.eyebrow__num {
  font-variant-numeric: tabular-nums;
  color: var(--accent-text);
  padding-right: 0.6rem;
  border-right: 1px solid var(--line-2);
}

.section-head { max-width: 760px; margin-bottom: clamp(3rem, 6vw, 4.5rem); }
.section-head--split {
  max-width: none;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 2rem 4rem;
  align-items: end;
}
.section-title {
  margin-top: 1.1rem;
  font-size: clamp(2.35rem, 5.4vw, 4.25rem);
  font-weight: 600;
  line-height: 1.02;
  letter-spacing: -0.045em;
  text-wrap: balance;
}
.section-title em { color: var(--accent-text); font-size: 1.06em; }
.section-lead {
  margin-top: 1.4rem;
  max-width: 56ch;
  font-size: clamp(1.05rem, 1.4vw, 1.2rem);
  color: var(--text-2);
  text-wrap: pretty;
}
.section-head--split .section-lead { margin-top: 0; }

@media (max-width: 860px) {
  .section-head--split { grid-template-columns: 1fr; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding-top: calc(var(--header-h) + clamp(3rem, 8vw, 6.5rem));
  padding-bottom: clamp(4rem, 8vw, 6rem);
  overflow: hidden;
  isolation: isolate;
}
.hero__grid-bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(to right, rgba(255, 255, 255, 0.045) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.045) 1px, transparent 1px);
  background-size: 72px 72px;
  -webkit-mask-image: radial-gradient(ellipse 70% 55% at 60% 30%, #000 20%, transparent 75%);
  mask-image: radial-gradient(ellipse 70% 55% at 60% 30%, #000 20%, transparent 75%);
}
.hero__grid-bg::after {
  content: "";
  position: absolute;
  width: 60vw; height: 60vw;
  max-width: 820px; max-height: 820px;
  right: -10%; top: 25%;
  background: radial-gradient(closest-side, rgba(53, 99, 255, 0.28), transparent);
  filter: blur(20px);
}
.hero__title {
  margin-top: 1.5rem;
  max-width: 13ch;
  font-size: clamp(3rem, 9.2vw, 7.6rem);
  font-weight: 600;
  line-height: 0.95;
  letter-spacing: -0.055em;
  text-wrap: balance;
}
.hero__title em {
  color: var(--accent-text);
  font-size: 1.08em;
  letter-spacing: -0.02em;
  padding-right: 0.04em;
}
.hero__row {
  margin-top: clamp(2rem, 4vw, 3rem);
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 2rem 3rem;
}
.hero__lead {
  max-width: 46ch;
  font-size: clamp(1.1rem, 1.6vw, 1.3rem);
  line-height: 1.55;
  color: var(--text-2);
  text-wrap: pretty;
}
.hero__ctas { display: flex; flex-wrap: wrap; gap: 0.75rem; }

.hero__stage {
  position: relative;
  margin-top: clamp(3.5rem, 7vw, 5.5rem);
  padding-right: 12%;
  padding-bottom: 4%;
}
.hero__laptop { width: 100%; max-width: 980px; margin-inline: auto 0; }
.hero__phone {
  position: absolute;
  right: 0; bottom: 0;
  width: clamp(120px, 21%, 230px);
}
.hero__chip {
  position: absolute;
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.65rem 0.95rem;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text);
  background: rgba(20, 20, 22, 0.82);
  border: 1px solid var(--line-2);
  border-radius: 999px;
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  box-shadow: 0 20px 40px -20px rgba(0, 0, 0, 0.8);
}
.hero__chip--a { left: 3%; top: -3.5%; }
.hero__chip--b { right: 14%; top: -3.5%; color: var(--text-2); }
.hero__chip-icons { display: inline-flex; gap: 2px; color: var(--accent-text); }
.hero__chip-icons svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

.hero__facts {
  margin-top: clamp(3rem, 6vw, 4.5rem);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--line);
}
.hero__facts li {
  padding: 1.25rem 1rem 0 0;
  font-size: 0.95rem;
  color: var(--text-2);
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.hero__facts li::before {
  content: "";
  width: 6px; height: 6px;
  flex: none;
  background: var(--accent);
  border-radius: 2px;
}

@media (max-width: 760px) {
  .hero__stage { padding-right: 16%; }
  .hero__phone { width: 30%; }
  .hero__chip--a { display: none; }
  .hero__chip--b { right: auto; left: 0; top: -2.75rem; }
  .hero__facts { grid-template-columns: 1fr 1fr; gap: 0 1rem; }
  .hero__ctas { width: 100%; }
  .hero__ctas .btn { flex: 1 1 220px; }
}

/* ---------- Device frames ---------- */
.laptop__screen {
  position: relative;
  padding: 1.6% 1.6% 2.2%;
  background: #0d0d0f;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-bottom: 0;
  border-radius: 18px 18px 0 0;
  box-shadow: 0 50px 100px -40px rgba(0, 0, 0, 0.9), 0 0 0 1px rgba(0, 0, 0, 0.6) inset;
}
.laptop__screen::before {
  content: "";
  position: absolute;
  top: 0.55%; left: 50%;
  width: 6px; height: 6px;
  margin-left: -3px;
  border-radius: 50%;
  background: #222226;
}
.laptop__display {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-radius: 4px;
  container-type: inline-size;
  background: #111;
}
.laptop__base {
  position: relative;
  height: clamp(10px, 1.9vw, 20px);
  margin-inline: -7%;
  background: linear-gradient(#3a3a3f, #1c1c1f 55%, #0f0f11);
  border-radius: 2px 2px 14px 14px / 2px 2px 100% 100%;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.12) inset;
}
.laptop__base::before {
  content: "";
  position: absolute;
  top: 0; left: 50%;
  width: 16%; height: 38%;
  transform: translateX(-50%);
  background: #121214;
  border-radius: 0 0 8px 8px;
}

.phone {
  padding: 3.2%;
  background: #0b0b0c;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 16% / 7.5%;
  box-shadow: 0 40px 80px -30px rgba(0, 0, 0, 0.95), 0 0 0 1px #000 inset;
}
.phone__display {
  position: relative;
  aspect-ratio: 9 / 19.5;
  overflow: hidden;
  border-radius: 13% / 6%;
  container-type: inline-size;
  background: #111;
}
.phone__display::before {
  content: "";
  position: absolute;
  z-index: 5;
  top: 2.2%; left: 50%;
  width: 30%; height: 3.2%;
  transform: translateX(-50%);
  background: #000;
  border-radius: 999px;
}

.browser {
  overflow: hidden;
  border-radius: 12px;
  background: #18181b;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 50px 90px -40px rgba(0, 0, 0, 0.75);
}
.browser__bar {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 30px;
  padding-inline: 12px;
  background: #1f1f23;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.browser__bar i { width: 9px; height: 9px; border-radius: 50%; background: #3a3a40; }
.browser__bar span {
  margin-inline: auto;
  transform: translateX(-18px);
  font-size: 11px;
  color: #8b8b94;
  padding: 3px 14px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.05);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 60%;
}
.browser--light { background: #f4f4f5; border-color: rgba(255, 255, 255, 0.2); }
.browser--light .browser__bar { background: #ececee; border-bottom-color: rgba(0, 0, 0, 0.06); }
.browser--light .browser__bar i { background: #d0d0d5; }
.browser--light .browser__bar span { color: #6b6b74; background: rgba(0, 0, 0, 0.05); }
.browser__display { aspect-ratio: 16 / 10; overflow: hidden; container-type: inline-size; }

/* ---------- Services ---------- */
.services__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
}
.service-card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: clamp(1.6rem, 3vw, 2.5rem);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: border-color 0.35s var(--ease), transform 0.35s var(--ease), background-color 0.35s;
}
.service-card:hover { border-color: var(--line-2); background: var(--surface-2); transform: translateY(-4px); }
.service-card__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2.75rem;
}
.service-card__num { font-size: 0.875rem; color: var(--text-3); font-variant-numeric: tabular-nums; }
.service-card__icon {
  width: 40px; height: 40px;
  fill: none; stroke: var(--accent-text); stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round;
  transition: transform 0.4s var(--ease);
}
.service-card:hover .service-card__icon { transform: rotate(-6deg) scale(1.06); }
.service-card__title {
  font-size: clamp(1.5rem, 2.4vw, 1.9rem);
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1.12;
}
.service-card__desc { margin-top: 0.75rem; color: var(--text-2); max-width: 46ch; }
.service-card__note { margin-top: 1.5rem; font-size: 0.9rem; color: var(--text-3); }
.service-card__note + .checklist { margin-top: 0.75rem; }
.service-card__disclaimer {
  margin-top: 1.25rem;
  padding: 0.85rem 1rem;
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--text-2);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}
.service-card__foot {
  margin-top: auto;
  padding-top: 2rem;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.price {
  font-size: clamp(1.85rem, 3vw, 2.3rem);
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.price__from, .price__per { font-size: 0.95rem; font-weight: 500; letter-spacing: 0; color: var(--text-2); }
.price__from { margin-right: 0.2rem; }

.checklist { margin-top: 1.5rem; display: grid; gap: 0.6rem; }
.checklist li {
  position: relative;
  padding-left: 1.75rem;
  font-size: 0.975rem;
  line-height: 1.45;
}
.checklist li::before {
  content: "";
  position: absolute;
  left: 0; top: 0.15em;
  width: 1.1rem; height: 1.1rem;
  border-radius: 50%;
  background: var(--accent-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M6 10.5l2.6 2.5L14 7.5' fill='none' stroke='%238aa6ff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 80% no-repeat;
}

.service-card--feature {
  background: linear-gradient(180deg, rgba(53, 99, 255, 0.1), rgba(53, 99, 255, 0) 55%), var(--surface);
  border-color: rgba(53, 99, 255, 0.35);
}
.service-card--feature:hover { border-color: rgba(53, 99, 255, 0.6); background: linear-gradient(180deg, rgba(53, 99, 255, 0.13), rgba(53, 99, 255, 0) 55%), var(--surface-2); }
.badge {
  display: inline-block;
  padding: 0.35rem 0.75rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent-text);
  background: var(--accent-soft);
  border-radius: 999px;
}

.services__note {
  margin-top: 1.5rem;
  display: flex;
  gap: 0.9rem;
  padding: 1.15rem 1.35rem;
  border: 1px dashed var(--line-2);
  border-radius: var(--radius-sm);
  color: var(--text-2);
  font-size: 0.95rem;
}
.services__note svg { width: 20px; height: 20px; flex: none; margin-top: 0.15em; fill: none; stroke: var(--text-2); stroke-width: 1.6; stroke-linecap: round; }

@media (max-width: 820px) {
  .services__grid { grid-template-columns: 1fr; }
}

/* ---------- Portfolio ---------- */
.projects { display: grid; gap: clamp(4rem, 9vw, 7.5rem); }
.project {
  display: grid;
  grid-template-columns: 1.45fr 1fr;
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}
.project--reverse { grid-template-columns: 1fr 1.45fr; }
.project--reverse .project__stage { order: 2; }
.project__stage {
  position: relative;
  padding: clamp(1.5rem, 4.5vw, 3.75rem) clamp(2.5rem, 9vw, 6.5rem) clamp(1.5rem, 4.5vw, 3.75rem) clamp(1.25rem, 4vw, 3rem);
  border-radius: calc(var(--radius) + 8px);
  overflow: hidden;
  background: var(--stage);
  isolation: isolate;
}
.project__stage::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: radial-gradient(ellipse 80% 60% at 30% 0%, rgba(255, 255, 255, 0.12), transparent 60%);
}
.project__stage .browser { transition: transform 0.6s var(--ease); }
.project__phone {
  position: absolute;
  right: clamp(1rem, 3vw, 2.25rem);
  bottom: clamp(-2.5rem, -3vw, -1rem);
  width: clamp(92px, 22%, 170px);
  transition: transform 0.6s var(--ease);
}
.project:hover .browser { transform: translateY(-6px); }
.project:hover .project__phone { transform: translateY(-14px); }

.project--torque { --stage: #1b120e; }
.project--torque .project__stage::before { background: radial-gradient(ellipse 80% 60% at 30% 0%, rgba(255, 90, 31, 0.28), transparent 65%); }
.project--mira { --stage: #2a211d; }
.project--mira .project__stage::before { background: radial-gradient(ellipse 80% 60% at 70% 0%, rgba(214, 170, 146, 0.3), transparent 65%); }
.project--drvo { --stage: #14231b; }
.project--drvo .project__stage::before { background: radial-gradient(ellipse 80% 60% at 30% 0%, rgba(185, 129, 74, 0.28), transparent 65%); }

.project__tag {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.75rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-2);
  border: 1px solid var(--line-2);
  border-radius: 999px;
}
.project__tag::before { content: ""; width: 6px; height: 6px; border-radius: 50%; border: 1.5px solid var(--text-2); }
.project__title {
  margin-top: 1.25rem;
  font-size: clamp(2.2rem, 4vw, 3.25rem);
  font-weight: 600;
  letter-spacing: -0.045em;
  line-height: 1;
}
.project__industry { margin-top: 0.6rem; font-family: var(--font-serif); font-style: italic; font-size: 1.35rem; color: var(--accent-text); }
.project__desc { margin-top: 1.25rem; color: var(--text-2); max-width: 46ch; }
.project__meta { margin-top: 1.75rem; border-top: 1px solid var(--line); }
.project__meta li {
  display: grid;
  grid-template-columns: 7.5rem 1fr;
  gap: 1rem;
  padding-block: 0.85rem;
  border-bottom: 1px solid var(--line);
  font-size: 0.925rem;
}
.project__meta li > span:first-child { color: var(--text-3); }
.swatches { display: flex; gap: 6px; }
.swatches i { width: 22px; height: 22px; border-radius: 50%; background: var(--c); border: 1px solid rgba(255, 255, 255, 0.18); }

@media (max-width: 900px) {
  .project, .project--reverse { grid-template-columns: 1fr; }
  .project--reverse .project__stage { order: 0; }
  .project__stage { padding-bottom: clamp(2.5rem, 8vw, 3.75rem); }
  .project__phone { bottom: -1.25rem; }
}

/* ---------- About ---------- */
.about__grid {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: clamp(3rem, 7vw, 6rem);
  align-items: start;
}
.about__text { margin-top: 1.5rem; font-size: clamp(1.05rem, 1.35vw, 1.175rem); color: var(--text-2); max-width: 60ch; text-wrap: pretty; }
.about__text:first-of-type { color: var(--text); }
.values { margin-top: 2.5rem; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
.values li { padding-top: 1rem; border-top: 1px solid var(--line-2); font-size: 0.925rem; color: var(--text-2); line-height: 1.5; }
.values li span { display: block; margin-bottom: 0.35rem; font-weight: 600; color: var(--text); font-size: 1rem; }

.founders { display: grid; gap: 1rem; position: sticky; top: calc(var(--header-h) + 2rem); }
.founder {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 1.5rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: border-color 0.3s, background-color 0.3s;
}
.founder:hover { border-color: var(--line-2); background: var(--surface-2); }
.founder__mono {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: clamp(84px, 9vw, 112px);
  aspect-ratio: 1;
  border-radius: 18px;
  background: var(--bg);
  border: 1px solid var(--line-2);
  font-size: clamp(2rem, 3.2vw, 2.75rem);
  font-weight: 600;
  letter-spacing: -0.06em;
  line-height: 1;
}
.founder__mono em { color: var(--accent-text); font-size: 1.12em; }
.founder__name { font-size: 1.4rem; font-weight: 600; letter-spacing: -0.03em; line-height: 1.2; }
.founder__role { margin-top: 0.3rem; color: var(--text-2); font-size: 0.95rem; }
.founders__place { display: flex; align-items: center; gap: 0.5rem; padding: 0.5rem 0.25rem; color: var(--text-3); font-size: 0.925rem; }
.founders__place svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; }

@media (max-width: 900px) {
  .about__grid { grid-template-columns: 1fr; }
  .founders { position: static; }
}
@media (max-width: 620px) {
  .values { grid-template-columns: 1fr; gap: 0.25rem; }
}

/* ---------- Process ---------- */
.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
  counter-reset: step;
}
.step {
  position: relative;
  padding: 2rem 1.75rem 2.25rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-2);
  transition: border-color 0.3s, transform 0.35s var(--ease);
}
.step:hover { border-color: var(--line-2); transform: translateY(-4px); }
.step__num {
  display: inline-grid;
  place-items: center;
  width: 44px; height: 44px;
  border-radius: 50%;
  border: 1px solid var(--line-2);
  font-size: 0.875rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--accent-text);
  background: var(--bg);
}
.step:not(:last-child)::after {
  content: "";
  position: absolute;
  top: calc(2rem + 22px);
  left: calc(1.75rem + 52px);
  right: -1.25rem;
  height: 1px;
  background: linear-gradient(to right, var(--line-2), transparent);
}
.step__title { margin-top: 2rem; font-size: 1.35rem; font-weight: 600; letter-spacing: -0.03em; }
.step p { margin-top: 0.6rem; color: var(--text-2); font-size: 0.975rem; }

@media (max-width: 980px) {
  .steps { grid-template-columns: 1fr 1fr; }
  .step:nth-child(2)::after { display: none; }
}
@media (max-width: 560px) {
  .steps { grid-template-columns: 1fr; gap: 0.75rem; }
  .step { display: grid; grid-template-columns: 44px 1fr; column-gap: 1.25rem; padding: 1.5rem; }
  .step::after { display: none; }
  .step__title { margin-top: 0.4rem; }
  .step p { grid-column: 2; }
}

/* ---------- Contact ---------- */
.contact { background: var(--bg-2); }
.contact__grid {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: clamp(3rem, 6vw, 5.5rem);
  align-items: start;
}
.contact__intro { position: sticky; top: calc(var(--header-h) + 2rem); }
.contact__details { margin-top: 2.75rem; border-top: 1px solid var(--line); }
.contact__details > div {
  display: grid;
  grid-template-columns: 7rem 1fr;
  gap: 1rem;
  padding-block: 1rem;
  border-bottom: 1px solid var(--line);
}
.contact__details dt { color: var(--text-3); font-size: 0.925rem; }
.contact__details dd { font-weight: 500; overflow-wrap: anywhere; min-width: 0; }
.contact__details dd a { display: flex; align-items: center; width: fit-content; min-height: var(--target); }
.contact__details dd a + a { margin-top: 0.15rem; }
.footer [data-config="phone"] a { display: flex; width: fit-content; }
.footer [data-config="phone"] a + a { margin-top: 0.6rem; }
.form__privacy { margin-top: 1.25rem; font-size: 0.825rem; color: var(--text-3); }
.form__privacy a { color: var(--text-2); text-decoration: underline; text-underline-offset: 2px; }
.contact__details a:hover { color: var(--accent-text); }

.config-hint {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.2rem 0.6rem;
  font-size: 0.8rem;
  font-weight: 500;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color: #fcd34d;
  background: rgba(252, 211, 77, 0.08);
  border: 1px dashed rgba(252, 211, 77, 0.45);
  border-radius: 6px;
}
.config-muted { color: var(--text-3); font-weight: 400; }

.form {
  padding: clamp(1.5rem, 3.5vw, 2.75rem);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 4px);
}
.form__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.35rem 1.1rem; }
.field { display: flex; flex-direction: column; gap: 0.5rem; min-width: 0; }
.field--full { grid-column: 1 / -1; }
.field label { font-size: 0.925rem; font-weight: 500; }
.req { color: var(--accent-text); }
.opt { margin-left: 0.3rem; font-size: 0.8rem; font-weight: 400; color: var(--text-3); }
.field input[type="text"],
.field input[type="email"],
.field select,
.field textarea {
  width: 100%;
  padding: 0.85rem 1rem;
  background: var(--bg);
  border: 1px solid var(--line-2);
  border-radius: var(--radius-sm);
  font-size: 1rem;
  line-height: 1.4;
  transition: border-color 0.2s, box-shadow 0.2s;
  -webkit-appearance: none;
  appearance: none;
}
.field textarea { resize: vertical; min-height: 140px; }
.field ::placeholder { color: var(--text-3); }
.field input:hover, .field select:hover, .field textarea:hover { border-color: rgba(255, 255, 255, 0.24); }
.field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(53, 99, 255, 0.25);
}
.field input[aria-invalid="true"],
.field select[aria-invalid="true"],
.field textarea[aria-invalid="true"] { border-color: var(--danger); }
.field input[aria-invalid="true"]:focus-visible,
.field select[aria-invalid="true"]:focus-visible,
.field textarea[aria-invalid="true"]:focus-visible { box-shadow: 0 0 0 4px rgba(255, 122, 122, 0.2); border-color: var(--danger); }
.select { position: relative; }
.select::after {
  content: "";
  position: absolute;
  right: 1.1rem; top: 50%;
  width: 8px; height: 8px;
  border-right: 1.6px solid var(--text-2);
  border-bottom: 1.6px solid var(--text-2);
  transform: translateY(-70%) rotate(45deg);
  pointer-events: none;
}
.select select { padding-right: 2.75rem; cursor: pointer; }
.select select option { background: #18181b; color: var(--text); }
.field__hint { font-size: 0.825rem; color: var(--text-3); }
.field__error { font-size: 0.85rem; color: var(--danger); }
.field__error:empty { display: none; }

.field--check { display: grid; grid-template-columns: auto 1fr; column-gap: 0.85rem; align-items: start; }
.field--check input {
  width: 22px; height: 22px;
  margin-top: 0.1rem;
  accent-color: var(--accent);
  cursor: pointer;
}
.field--check label { font-weight: 400; color: var(--text-2); line-height: 1.5; cursor: pointer; }
.field--check label a { color: var(--text); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--line-2); }
.field--check label a:hover { color: var(--accent-text); text-decoration-color: currentColor; }
.field--check .field__error { grid-column: 2; margin-top: 0.4rem; }
.field--check input[aria-invalid="true"] { outline: 2px solid var(--danger); outline-offset: 2px; }

.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.form__foot {
  margin-top: 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}
.form__required { font-size: 0.85rem; color: var(--text-3); }
.form__status:empty { display: none; }
.form__status {
  margin-top: 1.5rem;
  padding: 1.1rem 1.25rem;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  line-height: 1.55;
  border: 1px solid var(--line-2);
}
.form__status:focus { outline: none; }
.form__status strong { display: block; margin-bottom: 0.25rem; font-size: 1rem; }
.form__status p + p { margin-top: 0.5rem; }
.form__status a { text-decoration: underline; text-underline-offset: 3px; }
.form__status code { font-size: 0.85em; padding: 0.1rem 0.35rem; border-radius: 4px; background: rgba(255, 255, 255, 0.08); }
.form__status--success { border-color: rgba(110, 231, 168, 0.4); background: rgba(110, 231, 168, 0.07); }
.form__status--success strong { color: var(--success); }
.form__status--error { border-color: rgba(255, 122, 122, 0.4); background: rgba(255, 122, 122, 0.07); }
.form__status--error strong { color: var(--danger); }
.form__status--warning { border-color: rgba(252, 211, 77, 0.4); background: rgba(252, 211, 77, 0.06); }
.form__status--warning strong { color: #fcd34d; }

@media (max-width: 960px) {
  .contact__grid { grid-template-columns: 1fr; }
  .contact__intro { position: static; }
}
@media (max-width: 560px) {
  .form__grid { grid-template-columns: 1fr; }
  .form__foot .btn { width: 100%; }
  .contact__details > div { grid-template-columns: 5.5rem 1fr; }
}

/* ---------- Footer ---------- */
.footer { padding-top: clamp(4rem, 8vw, 6rem); border-top: 1px solid var(--line); }
.footer__top {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr;
  gap: 2.5rem;
  padding-bottom: 3.5rem;
}
.footer__brand p { margin-top: 0.5rem; max-width: 36ch; color: var(--text-2); font-size: 0.975rem; }
.footer__heading { font-size: 0.85rem; font-weight: 500; color: var(--text-3); margin-bottom: 1rem; }
.footer__col ul { display: grid; gap: 0.6rem; }
.footer__col li { font-size: 0.975rem; overflow-wrap: anywhere; }
.footer__col a,
.footer__bottom a { display: inline-flex; align-items: center; min-height: var(--target); }
.footer__col a { color: var(--text-2); transition: color 0.2s; }
@media (pointer: coarse) {
  .footer__col ul { gap: 0; }
  .footer__col [data-config="phone"] a + a { margin-top: 0; }
}
.footer__col a:hover { color: var(--text); }
.footer__bottom {
  display: flex;
  align-items: center;
  gap: 1.5rem 2rem;
  flex-wrap: wrap;
  padding-block: 1.75rem;
  border-top: 1px solid var(--line);
  font-size: 0.9rem;
  color: var(--text-3);
}
.footer__bottom a { transition: color 0.2s; }
.footer__bottom a:hover { color: var(--text); }
.footer__top-link { margin-left: auto; display: inline-flex; align-items: center; gap: 0.4rem; }
.footer__top-link svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

@media (max-width: 900px) {
  .footer__top { grid-template-columns: 1fr 1fr; }
  .footer__brand { grid-column: 1 / -1; }
}
@media (max-width: 480px) {
  .footer__top { grid-template-columns: 1fr; }
}

/* ==========================================================
   Redizajn — svjetlo, dubina i pokret
   Animira se samo transform/opacity; sve ukrasno je aria-hidden.
   ========================================================== */

/* ---------- Header: plutajuća kapsula ---------- */
.header,
.header.is-scrolled,
body.menu-open .header {
  background: transparent;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  border-bottom-color: transparent;
}
.header .container.header__inner {
  width: calc(100% - 2 * var(--gutter) + 1.5rem);
  max-width: calc(1240px - 2 * var(--gutter) + 1.5rem);
  height: calc(var(--header-h) - 16px);
  margin-top: 8px;
  padding-inline: 0.75rem 0.5rem;
  border: 1px solid transparent;
  border-radius: 999px;
  transition: background-color var(--dur) var(--ease), border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.header.is-scrolled .header__inner,
body.menu-open .header .header__inner {
  background: rgba(20, 22, 29, 0.72);
  -webkit-backdrop-filter: saturate(160%) blur(18px);
  backdrop-filter: saturate(160%) blur(18px);
  border-color: var(--line-2);
  box-shadow: 0 18px 40px -20px rgba(0, 0, 0, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}
.burger { margin-right: 0; }

/* ---------- Gumbi ---------- */
.btn--primary {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  background: linear-gradient(135deg, #4069ff 0%, #3563ff 45%, #2a52e8 100%);
  box-shadow: 0 10px 28px -12px var(--glow), inset 0 1px 0 rgba(255, 255, 255, 0.22);
  transition: box-shadow var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.btn--primary::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(105deg, transparent 35%, rgba(255, 255, 255, 0.28) 50%, transparent 65%);
  transform: translateX(-110%);
  transition: transform 0.8s var(--ease);
}
.btn--ghost {
  background: rgba(255, 255, 255, 0.02);
  transition: border-color var(--dur) var(--ease), background-color var(--dur) var(--ease), transform var(--dur) var(--ease);
}
@media (hover: hover) {
  .btn--primary:hover { background: linear-gradient(135deg, #4a72ff 0%, #3d69ff 45%, #2f58ee 100%); box-shadow: 0 16px 36px -12px rgba(53, 99, 255, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.28); transform: translateY(-1px); }
  .btn--primary:hover::before { transform: translateX(110%); }
  .btn--ghost:hover { border-color: rgba(138, 166, 255, 0.55); background: rgba(53, 99, 255, 0.08); transform: translateY(-1px); }
}
.btn:active { transform: scale(0.98); }

/* ---------- Hero: aurora, svjetlo, dubina ---------- */
.hero__grid-bg::after { display: none; }
.hero__aurora {
  position: absolute;
  inset: 0;
  z-index: -2;
  overflow: hidden;
  pointer-events: none;
}
.hero__aurora span {
  position: absolute;
  border-radius: 50%;
  will-change: transform;
  animation: aurora 22s var(--ease) infinite alternate;
}
.hero__aurora span:nth-child(1) {
  width: 62vw; height: 62vw; max-width: 900px; max-height: 900px;
  right: -14%; top: 4%;
  background: radial-gradient(closest-side, rgba(53, 99, 255, 0.34), rgba(53, 99, 255, 0.08) 55%, transparent);
}
.hero__aurora span:nth-child(2) {
  width: 42vw; height: 42vw; max-width: 620px; max-height: 620px;
  right: 22%; top: 30%;
  background: radial-gradient(closest-side, rgba(79, 214, 255, 0.16), transparent);
  animation-duration: 28s;
  animation-delay: -8s;
}
.hero__aurora span:nth-child(3) {
  width: 38vw; height: 38vw; max-width: 560px; max-height: 560px;
  left: -12%; top: -8%;
  background: radial-gradient(closest-side, rgba(120, 140, 255, 0.12), transparent);
  animation-duration: 32s;
  animation-delay: -15s;
}
@keyframes aurora {
  0%   { transform: translate3d(0, 0, 0) scale(1); }
  50%  { transform: translate3d(-6%, 5%, 0) scale(1.08); }
  100% { transform: translate3d(4%, -4%, 0) scale(0.96); }
}
.hero__spot {
  position: absolute;
  left: 0; top: 0;
  z-index: -1;
  width: 640px; height: 640px;
  margin: -320px 0 0 -320px;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(138, 166, 255, 0.12), transparent);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.6s var(--ease);
}
.hero.has-pointer .hero__spot { opacity: 1; }

.hero__title em,
.section-title em {
  background: linear-gradient(100deg, #8aa6ff 0%, #b9c9ff 30%, #7fdcff 55%, #8aa6ff 80%);
  background-size: 220% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: sheen 9s linear infinite;
}
@keyframes sheen { to { background-position: -220% 0; } }

/* Naslov se otkriva riječ po riječ (samo kad JS razdvoji riječi). */
.js .hero__title { opacity: 0; }
.js .hero__title.is-in { opacity: 1; }
.hero__title .w {
  display: inline-block;
  overflow: hidden;
  vertical-align: top;
  padding: 0 0.06em 0.1em;
  margin: 0 -0.06em -0.1em;
}
.hero__title .w > span { display: inline-block; }
.hero__title.is-split .w > span { transform: translateY(108%); }
.hero__title.is-split.is-in .w > span {
  transform: none;
  transition: transform 0.9s var(--ease) calc(var(--i, 0) * 70ms + 0.05s);
}

.hero__laptop, .hero__phone { transition: transform 0.7s var(--ease); }
.hero__phone { animation: float 7s ease-in-out infinite; }
.hero__chip { animation: float 8s ease-in-out infinite; }
.hero__chip--b { animation-delay: -3s; }
@keyframes float { 50% { translate: 0 -10px; } }
.hero__laptop .laptop__screen { box-shadow: 0 60px 120px -40px rgba(0, 0, 0, 0.95), 0 0 80px -30px var(--glow), 0 0 0 1px rgba(0, 0, 0, 0.6) inset; }

/* ---------- Traka usluga ---------- */
.marquee {
  position: relative;
  overflow: hidden;
  padding-block: 1.35rem;
  border-block: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.012);
  --fade: #0c0d12;
}
/* Blijeđenje rubova slojevima umjesto CSS maske (maska se u nekim preglednicima ne iscrta). */
.marquee::before,
.marquee::after {
  content: "";
  position: absolute;
  top: 0; bottom: 0;
  z-index: 1;
  width: 12%;
  pointer-events: none;
}
.marquee::before { left: 0; background: linear-gradient(90deg, var(--fade), transparent); }
.marquee::after { right: 0; background: linear-gradient(270deg, var(--fade), transparent); }
.marquee__track {
  display: flex;
  align-items: center;
  gap: 2.25rem;
  width: max-content;
  animation: marquee 48s linear infinite;
}
.marquee__track span {
  font-size: clamp(1.25rem, 2.4vw, 1.75rem);
  font-weight: 500;
  letter-spacing: -0.03em;
  color: var(--text-2);
  white-space: nowrap;
}
.marquee__track em { color: var(--text); }
.marquee__track i { width: 7px; height: 7px; border-radius: 2px; background: var(--accent); transform: rotate(45deg); flex: none; }
@media (hover: hover) { .marquee:hover .marquee__track { animation-play-state: paused; } }
@keyframes marquee { to { transform: translateX(calc(-50% - 1.125rem)); } }

/* Animacije izvan ekrana miruju (štedi bateriju i procesor). */
.is-paused, .is-paused * { animation-play-state: paused !important; }

/* ---------- Prijelazi između sekcija ---------- */
.section + .section { border-top: 0; }
.section:not(.section--light):not(.contact)::before {
  content: "";
  position: absolute;
  top: 0; left: 50%;
  width: min(1100px, 88%);
  height: 1px;
  transform: translateX(-50%);
  background: linear-gradient(90deg, transparent, rgba(138, 166, 255, 0.28), transparent);
}
.marquee + .section::before { display: none; }
.portfolio {
  background:
    radial-gradient(60rem 30rem at 50% 0%, rgba(53, 99, 255, 0.06), transparent 70%),
    linear-gradient(180deg, transparent, rgba(255, 255, 255, 0.018) 15%, rgba(255, 255, 255, 0.018) 85%, transparent);
}

/* ---------- Svjetlo koje prati pokazivač (kartice) ---------- */
.service-card, .founder { isolation: isolate; overflow: hidden; }
.step { isolation: isolate; } /* bez overflow: hidden — spojnica između koraka izlazi iz kartice */
.service-card::before, .founder::before, .step::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 0%), rgba(53, 99, 255, 0.13), transparent 60%);
  opacity: 0;
  transition: opacity var(--dur) var(--ease);
  pointer-events: none;
}
.service-card::after, .founder::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: radial-gradient(260px circle at var(--mx, 50%) var(--my, 0%), rgba(138, 166, 255, 0.75), transparent 65%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
  opacity: 0;
  transition: opacity var(--dur) var(--ease);
  pointer-events: none;
}
.service-card { border-color: rgba(255, 255, 255, 0.07); background: linear-gradient(180deg, rgba(255, 255, 255, 0.025), rgba(255, 255, 255, 0) 40%), var(--surface); }
.service-card--feature { background: linear-gradient(180deg, rgba(53, 99, 255, 0.12), rgba(53, 99, 255, 0) 55%), var(--surface); }
@media (hover: hover) {
  .service-card:hover::before, .service-card:hover::after,
  .founder:hover::before, .founder:hover::after,
  .step:hover::before { opacity: 1; }
  .service-card:hover { box-shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.8); }
  .service-card:hover .link-arrow { color: var(--accent-text); border-color: var(--accent-text); }
}
.service-card__icon {
  padding: 8px;
  width: 56px; height: 56px;
  border-radius: 16px;
  background: rgba(53, 99, 255, 0.08);
  border: 1px solid rgba(138, 166, 255, 0.18);
}

/* ---------- Portfolio ---------- */
.project__stage { transition: transform 0.7s var(--ease), box-shadow 0.7s var(--ease); }
.project__stage::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 3;
  border-radius: inherit;
  background: radial-gradient(500px circle at var(--mx, 50%) var(--my, 30%), rgba(255, 255, 255, 0.09), transparent 55%);
  opacity: 0;
  transition: opacity var(--dur) var(--ease);
  pointer-events: none;
}
@media (hover: hover) {
  .project:hover .project__stage { box-shadow: 0 40px 80px -40px rgba(0, 0, 0, 0.9); }
  .project:hover .project__stage::after { opacity: 1; }
}
.js .project.reveal .project__stage { clip-path: inset(6% 6% 6% 6% round 28px); transition: clip-path 1.1s var(--ease), transform 0.7s var(--ease), box-shadow 0.7s var(--ease); }
.js .project.reveal.is-visible .project__stage { clip-path: inset(0 round 28px); }
.project__title { transition: color var(--dur) var(--ease); }

/* ---------- O nama ---------- */
.founder__mono {
  background: radial-gradient(circle at 30% 20%, rgba(53, 99, 255, 0.25), transparent 60%), var(--bg);
  border-color: rgba(138, 166, 255, 0.22);
}

/* ---------- Svijetla sekcija (proces) ---------- */
.section--light {
  --text: #101218;
  --text-2: #4a4e5a;
  --text-3: #5b5f6b;
  --line: rgba(16, 18, 24, 0.08);
  --line-2: rgba(16, 18, 24, 0.14);
  --accent-text: #2848d8;
  --bg: #ffffff;
  --bg-2: #ffffff;
  margin-inline: clamp(0.5rem, 1.5vw, 1rem);
  border-radius: clamp(24px, 3.5vw, 44px);
  background:
    radial-gradient(50rem 24rem at 85% 0%, rgba(53, 99, 255, 0.09), transparent 70%),
    var(--paper);
  color: var(--text);
}
.section--light ::selection { background: var(--accent); color: #fff; }
.section--light .section-title em { background-image: linear-gradient(100deg, #2848d8 0%, #4f6bff 35%, #1593c4 60%, #2848d8 85%); }
.section--light .step {
  border-color: rgba(16, 18, 24, 0.06);
  box-shadow: 0 1px 0 rgba(16, 18, 24, 0.03), 0 24px 48px -32px rgba(20, 26, 60, 0.35);
}
.section--light .step::before { background: radial-gradient(380px circle at var(--mx, 50%) var(--my, 0%), rgba(53, 99, 255, 0.08), transparent 60%); }
.section--light .step__num { background: var(--paper); border-color: rgba(40, 72, 216, 0.25); }
.section--light .step:not(:last-child)::after { background: linear-gradient(to right, rgba(40, 72, 216, 0.45), transparent); }
.section--light + .section::before { display: none; }
/* Linija između koraka „crta se” kad korak uđe u kadar. */
.js .step.reveal::after { transform: scaleX(0); transform-origin: left; transition: transform 0.9s var(--ease) calc(var(--d, 0s) + 0.25s); }
.js .step.reveal.is-visible::after { transform: scaleX(1); }

/* ---------- Kontakt ---------- */
.contact { background: transparent; overflow: hidden; isolation: isolate; margin-top: clamp(1rem, 3vw, 2rem); }
.contact::after {
  content: "";
  position: absolute;
  z-index: -1;
  width: 70rem; height: 40rem;
  right: -20rem; top: 10%;
  background: radial-gradient(closest-side, rgba(53, 99, 255, 0.12), transparent);
  pointer-events: none;
}
.form {
  background:
    linear-gradient(var(--surface), var(--surface)) padding-box,
    linear-gradient(160deg, rgba(138, 166, 255, 0.45), rgba(255, 255, 255, 0.07) 35%, rgba(255, 255, 255, 0.04) 70%, rgba(79, 214, 255, 0.2)) border-box;
  border: 1px solid transparent;
  box-shadow: 0 40px 80px -40px rgba(0, 0, 0, 0.8);
}

/* ---------- Mobilni izbornik ---------- */
.mobile-menu {
  background:
    radial-gradient(40rem 30rem at 100% 0%, rgba(53, 99, 255, 0.16), transparent 70%),
    var(--bg);
}
.mobile-menu__list a.is-active { color: var(--accent-text); }
.mobile-menu__foot { display: grid; gap: 1.5rem; }
.mobile-menu__label { font-size: 0.875rem; color: var(--text-3); margin-bottom: 0.25rem; }
.mobile-menu__contact [data-config="phone"] { display: flex; flex-wrap: wrap; gap: 0 1.5rem; }
.mobile-menu__contact a { display: inline-flex; align-items: center; min-height: 44px; font-size: 1.15rem; font-weight: 500; }
.mobile-menu__foot { opacity: 0; transform: translateY(12px); transition: opacity 0.5s var(--ease), transform 0.5s var(--ease); }
.mobile-menu.is-open .mobile-menu__foot { opacity: 1; transform: none; transition-delay: 0.2s; }

/* ---------- Podnožje ---------- */
.footer { position: relative; overflow: hidden; }
.footer__wordmark {
  margin-top: -0.5rem;
  font-size: clamp(4.5rem, 19vw, 17rem);
  font-weight: 700;
  letter-spacing: -0.065em;
  line-height: 0.82;
  text-align: center;
  white-space: nowrap;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0) 85%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  user-select: none;
  pointer-events: none;
}
.footer__wordmark em { font-weight: 400; letter-spacing: -0.03em; }

/* ---------- Scroll reveal ---------- */
.js .reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
  transition-delay: var(--d, 0s);
}
.js .reveal.is-visible { opacity: 1; transform: none; }
.js .hero .reveal { transition-duration: var(--dur-slow); }

/* Na dodirnim zaslonima nema pravog „hovera” — kartice ne ostaju podignute nakon dodira. */
@media (hover: none) {
  .service-card:hover, .step:hover { transform: none; }
  .project:hover .browser, .project:hover .project__phone { transform: none; }
  .service-card:hover .service-card__icon, .btn:hover .btn__arrow, .link-arrow:hover svg { transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    transition-delay: 0s !important;
    scroll-behavior: auto !important;
  }
  .js .reveal { opacity: 1; transform: none; }
  /* Konačno, mirno stanje bez pokreta */
  .hero__aurora span, .hero__phone, .hero__chip, .marquee__track,
  .hero__title em, .section-title em { animation: none !important; }
  .marquee__track { transform: none; }
  .js .hero__title { opacity: 1; }
  .js .project.reveal .project__stage { clip-path: none; }
  .js .step.reveal::after { transform: none; }
  .hero__spot { display: none; }
}

/* ---------- Legal page ---------- */
.legal { padding-top: calc(var(--header-h) + 4rem); padding-bottom: 6rem; }
.legal .container { max-width: 780px; }
.legal h1 { font-size: clamp(2.4rem, 6vw, 3.75rem); font-weight: 600; letter-spacing: -0.045em; line-height: 1.05; }
.legal h2 { margin-top: 2.75rem; font-size: 1.4rem; font-weight: 600; letter-spacing: -0.025em; }
.legal p, .legal li { margin-top: 0.9rem; color: var(--text-2); }
.legal ul { padding-left: 1.2rem; list-style: disc; }
.legal li { margin-top: 0.4rem; }
.legal .notice {
  margin-top: 2rem;
  padding: 1rem 1.25rem;
  border: 1px dashed rgba(252, 211, 77, 0.45);
  background: rgba(252, 211, 77, 0.06);
  border-radius: var(--radius-sm);
  color: #fde68a;
}
.legal .back { display: inline-flex; margin-top: 3rem; }
