/* ============================================================
   Matej Delić — softver · blockchain · fintech
   Tamna premium paleta · motiv Jadrana · mobile-first
   ============================================================ */

:root {
  --bg: #05080f;
  --bg-2: #08101f;
  --panel: #0b1324;
  --panel-2: rgba(13, 20, 38, 0.72);
  --line: #1b2740;
  --line-soft: rgba(139, 160, 191, 0.14);
  --text: #dbe4f2;
  --muted: #93a4c2;
  --accent: #4fd1c5;
  --accent-deep: #3bb5a9;
  --accent-soft: rgba(79, 209, 197, 0.12);
  --gold: #f5c26b;
  --danger: #ff7a7a;
  --radius: 18px;
  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --header-h: 72px;
  --max-w: 1120px;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 12px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection { background: rgba(79, 209, 197, 0.28); color: #ffffff; }

img, svg { display: block; max-width: 100%; }

a { color: var(--accent); text-decoration: none; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: -0.015em;
  margin: 0;
  text-wrap: balance;
}

h2 em, h1 em {
  font-style: italic;
  font-weight: 400;
  background: linear-gradient(92deg, var(--accent) 10%, #8be8dc 50%, var(--gold) 95%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

p { margin: 0; }

ul, ol { margin: 0; padding: 0; list-style: none; }

.container {
  width: 100%;
  max-width: var(--max-w);
  margin-inline: auto;
  padding-inline: 1.25rem;
}

/* ---------- Skip link ---------- */
.skip-link {
  position: absolute;
  left: 1rem;
  top: -100px;
  z-index: 200;
  background: var(--accent);
  color: #03201c;
  font-weight: 600;
  padding: 0.7rem 1.1rem;
  border-radius: 10px;
  transition: top 0.2s ease;
}
.skip-link:focus { top: 1rem; }

/* ---------- Header ---------- */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  transition: background 0.35s ease, border-color 0.35s ease, backdrop-filter 0.35s ease;
  border-bottom: 1px solid transparent;
}
.site-header.scrolled {
  background: rgba(5, 8, 15, 0.82);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom-color: var(--line);
}
.header-inner {
  max-width: var(--max-w);
  margin-inline: auto;
  height: var(--header-h);
  padding-inline: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--text);
}
.brand-mark { width: 30px; height: 30px; color: var(--accent); flex: none; }
.brand-text {
  display: flex;
  flex-direction: column;
  font-weight: 600;
  font-size: 0.98rem;
  line-height: 1.2;
}
.brand-text small {
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.site-nav {
  display: none;
  align-items: center;
  gap: 0.35rem;
}
.site-nav a {
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 500;
  padding: 0.5rem 0.85rem;
  border-radius: 999px;
  transition: color 0.2s ease, background 0.2s ease;
}
.site-nav a:hover { color: var(--text); background: rgba(139, 160, 191, 0.08); }
.site-nav .nav-cta {
  color: var(--accent);
  border: 1px solid rgba(79, 209, 197, 0.4);
  margin-left: 0.5rem;
}
.site-nav .nav-cta:hover { background: var(--accent-soft); }

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

.nav-mobile {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease;
  background: rgba(5, 8, 15, 0.95);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.nav-mobile.open { max-height: 380px; }
.nav-mobile a {
  display: block;
  padding: 0.95rem 1.5rem;
  color: var(--text);
  font-weight: 500;
  border-top: 1px solid rgba(139, 160, 191, 0.08);
}
.nav-mobile a:first-child { border-top: none; }
.nav-mobile .nav-mobile-cta { color: var(--accent); font-weight: 600; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  padding: 0.9rem 1.6rem;
  border-radius: 999px;
  font-family: var(--font-body);
  font-size: 0.98rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.22s ease, box-shadow 0.22s ease, background 0.22s ease, border-color 0.22s ease, color 0.22s ease;
}
.btn-primary {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-deep) 100%);
  color: #03201c;
  box-shadow: 0 12px 34px -14px rgba(79, 209, 197, 0.55);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 42px -14px rgba(79, 209, 197, 0.65);
}
.btn-ghost {
  background: rgba(13, 20, 38, 0.45);
  border-color: var(--line);
  color: var(--text);
}
.btn-ghost:hover { border-color: rgba(79, 209, 197, 0.55); color: var(--accent); transform: translateY(-2px); }
.btn-block { width: 100%; }
.btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.btn-map { justify-content: flex-start; width: fit-content; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  overflow: hidden;
  background:
    radial-gradient(1100px 520px at 80% 6%, rgba(79, 209, 197, 0.10), transparent 62%),
    radial-gradient(900px 520px at 10% 92%, rgba(245, 194, 107, 0.06), transparent 60%),
    linear-gradient(180deg, #05080f 0%, #071020 55%, #0a1730 100%);
}
.hero-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.hero-cable {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.85;
}
.cable-core { filter: drop-shadow(0 0 10px rgba(79, 209, 197, 0.35)); }
.cable-flow { animation: cable-flow 7s linear infinite; }
@keyframes cable-flow { to { stroke-dashoffset: -300; } }
.cable-labels text { font-family: var(--font-body); font-size: 11px; }
.cable-labels { opacity: 0.75; }

.hero-coord {
  position: absolute;
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 300;
  font-size: clamp(3.2rem, 10vw, 7.5rem);
  color: rgba(147, 164, 194, 0.055);
  user-select: none;
  right: -1%;
  top: 10%;
  white-space: nowrap;
}
.hero-coord-b {
  left: -2%;
  right: auto;
  top: auto;
  bottom: 6%;
  font-size: clamp(2.4rem, 7vw, 5.5rem);
}

.hero-inner {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: var(--max-w);
  margin-inline: auto;
  padding: calc(var(--header-h) + 9vh) 1.25rem 7rem;
}

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1.4rem;
}
.kicker::before {
  content: "";
  width: 34px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent));
}

.hero h1 {
  font-size: clamp(2.7rem, 8vw, 4.9rem);
  margin-bottom: 1.4rem;
}

.lead {
  max-width: 34rem;
  font-size: clamp(1.02rem, 2.2vw, 1.22rem);
  line-height: 1.6;
  color: var(--muted);
  margin-bottom: 2.2rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-bottom: 3.2rem;
}

.hero-facts {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  max-width: 30rem;
  border-top: 1px solid var(--line-soft);
  padding-top: 1.4rem;
}
.hero-facts > div {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 0.45rem;
  border-bottom: 1px solid rgba(139, 160, 191, 0.07);
}
.hero-facts dt {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}
.hero-facts dd { margin: 0; font-weight: 500; font-size: 0.95rem; }

.scroll-hint {
  position: absolute;
  left: 50%;
  bottom: 1.4rem;
  transform: translateX(-50%);
  z-index: 2;
  color: var(--muted);
  animation: hint-bob 2.4s ease-in-out infinite;
}
.scroll-hint svg { width: 26px; height: 26px; }
@keyframes hint-bob {
  0%, 100% { transform: translate(-50%, 0); opacity: 0.7; }
  50% { transform: translate(-50%, 8px); opacity: 1; }
}

/* ---------- Sekcije ---------- */
.section {
  padding-block: clamp(4.5rem, 10vw, 7.5rem);
  position: relative;
}
.section-alt {
  background:
    radial-gradient(800px 380px at 85% 0%, rgba(79, 209, 197, 0.05), transparent 60%),
    linear-gradient(180deg, #060c18 0%, #08101f 100%);
  border-block: 1px solid var(--line-soft);
}

.section-head { margin-bottom: clamp(2.5rem, 6vw, 4rem); max-width: 46rem; }
.section-head h2 {
  font-size: clamp(1.9rem, 4.6vw, 3rem);
  margin-top: 0.8rem;
  margin-bottom: 1.1rem;
}
.section-lead { color: var(--muted); font-size: 1.02rem; max-width: 40rem; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--accent);
}
.eyebrow::before {
  content: "";
  width: 26px;
  height: 1px;
  background: var(--accent);
}

/* ---------- Stupovi ekspertize ---------- */
.pillars {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.1rem;
}
.pillar {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 1.8rem 1.6rem;
  background: linear-gradient(180deg, rgba(16, 26, 48, 0.8), rgba(9, 15, 28, 0.9));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  transition: transform 0.28s ease, border-color 0.28s ease, box-shadow 0.28s ease;
  overflow: hidden;
}
.pillar::after {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), transparent 65%);
  opacity: 0.55;
}
.pillar:hover {
  transform: translateY(-5px);
  border-color: rgba(79, 209, 197, 0.45);
  box-shadow: 0 26px 54px -32px rgba(79, 209, 197, 0.3);
}
.pillar-icon {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 15px;
  background: var(--accent-soft);
  color: var(--accent);
  margin-bottom: 1.3rem;
}
.pillar-icon svg {
  width: 28px;
  height: 28px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.pillar h3 { font-size: 1.5rem; margin-bottom: 0.7rem; }
.pillar > p { color: var(--muted); font-size: 0.96rem; margin-bottom: 1.2rem; }
.pillar ul { display: grid; gap: 0.62rem; }
.pillar li {
  position: relative;
  padding-left: 1.1rem;
  font-size: 0.92rem;
  line-height: 1.5;
  color: var(--text);
}
.pillar li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
}

/* ---------- Zašto ja ---------- */
.reasons {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.4rem;
}
.reason { display: flex; gap: 1.4rem; }
.reason-num {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 300;
  font-size: 2.6rem;
  line-height: 1;
  color: rgba(79, 209, 197, 0.55);
  flex: none;
  width: 3.4rem;
}
.reason h3 { font-size: 1.35rem; margin-bottom: 0.55rem; }
.reason p { color: var(--muted); font-size: 0.97rem; max-width: 34rem; }

/* ---------- Način rada ---------- */
.steps {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}
.step {
  position: relative;
  padding: 1.6rem 1.5rem 1.6rem 1.5rem;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.step-num {
  display: block;
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 300;
  font-size: 1.9rem;
  color: var(--gold);
  margin-bottom: 0.8rem;
  line-height: 1;
}
.step h3 { font-size: 1.18rem; margin-bottom: 0.5rem; }
.step p { color: var(--muted); font-size: 0.92rem; line-height: 1.55; }

/* ---------- Tehnologije ---------- */
.tech {
  padding-block: 2.6rem;
  border-block: 1px solid var(--line-soft);
  background: rgba(8, 13, 26, 0.6);
  overflow: hidden;
}
.tech-marquee {
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.tech-track {
  display: flex;
  width: max-content;
  animation: tech-scroll 42s linear infinite;
}
.tech-track span {
  white-space: nowrap;
  padding: 0.4rem 1.5rem;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--muted);
  border-right: 1px solid var(--line);
}
.tech-track span:first-child { border-left: 1px solid var(--line); }
@keyframes tech-scroll { to { transform: translateX(-50%); } }
.tech-note {
  max-width: 34rem;
  margin: 1.6rem auto 0;
  text-align: center;
  color: var(--muted);
  font-size: 0.85rem;
  padding-inline: 1.25rem;
}

/* ---------- Kontakt ---------- */
.section-contact {
  background:
    radial-gradient(900px 480px at 12% 100%, rgba(79, 209, 197, 0.07), transparent 60%),
    linear-gradient(180deg, #05080f 0%, #07101f 100%);
}
.contact-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.4rem;
}
.contact-card {
  display: flex;
  flex-direction: column;
  gap: 1.6rem;
  padding: 1.8rem 1.6rem;
  background: linear-gradient(180deg, rgba(16, 26, 48, 0.75), rgba(9, 15, 28, 0.9));
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.contact-label {
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
}
.contact-email {
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(1.3rem, 3.4vw, 1.85rem);
  color: var(--accent);
  word-break: break-all;
  transition: color 0.2s ease;
}
.contact-email:hover { color: var(--gold); }

.contact-facts {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.9rem;
  border-top: 1px solid var(--line-soft);
  padding-top: 1.3rem;
}
.contact-facts div { display: flex; flex-direction: column; gap: 0.15rem; }
.contact-facts dt {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}
.contact-facts dd { margin: 0; font-weight: 500; font-size: 0.95rem; }

.contact-form {
  display: grid;
  gap: 1.1rem;
  padding: 1.8rem 1.6rem;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.field { display: grid; gap: 0.45rem; }
.field label { font-size: 0.82rem; font-weight: 600; color: var(--text); }
.field input,
.field textarea {
  width: 100%;
  padding: 0.85rem 1rem;
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--text);
  background: rgba(9, 15, 28, 0.75);
  border: 1px solid var(--line);
  border-radius: 12px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.field textarea { resize: vertical; min-height: 120px; }
.field input::placeholder,
.field textarea::placeholder { color: rgba(147, 164, 194, 0.55); }
.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(79, 209, 197, 0.18);
}
.field input[aria-invalid="true"],
.field textarea[aria-invalid="true"] { border-color: var(--danger); }
.field .field-error {
  font-size: 0.78rem;
  color: var(--danger);
  display: none;
}
.field.has-error .field-error { display: block; }
.form-note {
  font-size: 0.8rem;
  color: var(--muted);
  text-align: center;
}

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--line);
  background: #04060c;
  padding-block: 2.6rem;
}
.footer-inner {
  display: flex;
  flex-direction: column;
  gap: 1.4rem;
  align-items: flex-start;
}
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  color: var(--muted);
  font-size: 0.9rem;
}
.footer-brand .brand-mark { color: var(--accent); width: 26px; height: 26px; }
.footer-nav { display: flex; flex-wrap: wrap; gap: 0.4rem 1.4rem; }
.footer-nav a { color: var(--muted); font-size: 0.88rem; transition: color 0.2s ease; }
.footer-nav a:hover { color: var(--accent); }
.footer-meta {
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.7;
}

/* ---------- Reveal animacije ---------- */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.2, 0.7, 0.2, 1);
  transition-delay: var(--d, 0s);
}
.reveal.in {
  opacity: 1;
  transform: none;
}

/* ---------- Responsive: tablet ---------- */
@media (min-width: 640px) {
  .hero-facts { flex-direction: row; gap: 2.2rem; }
  .hero-facts > div { flex-direction: column; gap: 0.1rem; border-bottom: none; padding-block: 0; }
  .reasons { gap: 1.6rem; }
  .contact-facts { grid-template-columns: 1fr 1fr; }
  .footer-inner { flex-direction: row; align-items: center; justify-content: space-between; flex-wrap: wrap; }
}

/* ---------- Responsive: desktop ---------- */
@media (min-width: 960px) {
  :root { --header-h: 76px; }
  .site-nav { display: flex; }
  .nav-toggle { display: none; }
  .nav-mobile { display: none; }

  .pillars { grid-template-columns: repeat(3, 1fr); gap: 1.4rem; }

  .reasons { grid-template-columns: repeat(3, 1fr); gap: 2.6rem; }
  .reason { flex-direction: column; gap: 1rem; }
  .reason-num { width: auto; }
  .reason p { max-width: none; }

  .steps { grid-template-columns: repeat(4, 1fr); gap: 1.2rem; }

  .contact-grid { grid-template-columns: 5fr 7fr; gap: 1.4rem; }
  .contact-card { padding: 2.2rem 2rem; }
  .contact-form { padding: 2.2rem 2rem; }
}

/* ---------- Smanjeno kretanje ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation-duration: 0.001s !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001s !important;
  }
  .reveal { opacity: 1; transform: none; }
}
