:root {
  --ink: #000000;
  --paper: #F4F5F3;
  --white: #FFFFFF;
  --graphite: #55595C;
  --rule: #D6D9D5;
  --lens: #2F4A6D;

  --font: "Schibsted Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
  --gutter: clamp(16px, 4vw, 48px);
  --max: 1200px;
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }

:focus-visible {
  outline: 2px solid var(--lens);
  outline-offset: 3px;
}

.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* ---------- Header ---------- */

.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px var(--gutter);
  background: color-mix(in srgb, var(--paper) 82%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.logo {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-end;
  text-decoration: none;
  line-height: 1;
}
.logo-small {
  font-size: 0.5625rem;
  font-weight: 500;
  letter-spacing: 0.32em;
  margin-right: -0.32em;
  margin-bottom: 2px;
}
.logo-word {
  font-size: 1.75rem;
  font-weight: 500;
  letter-spacing: -0.02em;
}

.nav {
  display: flex;
  align-items: center;
  gap: clamp(14px, 2.4vw, 32px);
  font-size: 0.9375rem;
  font-weight: 500;
}
.nav a { text-decoration: none; }
.nav a:not(.nav-call):hover { text-decoration: underline; text-underline-offset: 4px; }
.nav-call {
  padding: 9px 16px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--white);
}
.nav-call:hover { background: var(--lens); }

/* ---------- Hero ---------- */

.hero {
  position: relative;
  height: 260vh;
}

.hero-stage {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100svh;
  display: grid;
  grid-template-rows: 1fr auto;
  align-items: center;
  justify-items: center;
  padding: 96px var(--gutter) 40px;
  overflow: hidden;
}

.chart-wrap {
  display: grid;
  /* pomak ulijevo da slova ostanu centrirana unatoč stupcu s oznakama */
  margin-left: calc(-1 * (2.5rem + clamp(16px, 4vw, 56px)));
}
.chart-wrap > .chart { grid-area: 1 / 1; }

.chart {
  display: grid;
  grid-template-columns: auto auto;
  column-gap: clamp(16px, 4vw, 56px);
  row-gap: clamp(8px, 2vh, 24px);
  filter: blur(calc(var(--blur, 0) * 1px));
  will-change: filter;
}

/* Oštra kopija tablice, vidljiva samo unutar leće */
.chart-lens {
  filter: none;
  clip-path: circle(var(--lr, 0px) at var(--lx, 50%) var(--ly, 50%));
}

.lens-ring {
  position: absolute;
  top: 0;
  left: 0;
  width: calc(var(--lr, 0px) * 2);
  height: calc(var(--lr, 0px) * 2);
  border: 1.5px solid var(--ink);
  border-radius: 50%;
  box-shadow: 0 0 0 6px color-mix(in srgb, var(--ink) 6%, transparent);
  transform: translate(calc(var(--rx, -999px) - var(--lr, 0px)), calc(var(--ry, -999px) - var(--lr, 0px)));
  opacity: var(--ring-o, 0);
  pointer-events: none;
}

.chart-row { display: contents; }
.chart-row .letters {
  justify-self: center;
  font-weight: 800;
  line-height: 0.9;
  letter-spacing: 0.18em;
  margin-right: -0.18em;
}
.chart-row .acuity {
  width: 2.5rem;
  align-self: center;
  text-align: right;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--graphite);
  white-space: nowrap;
}

.r1 { font-size: min(26vh, 40vw); }
.r2 { font-size: min(12vh, 17vw); }
.r3 { font-size: min(7vh, 10vw); }
.r4 { font-size: min(2.6vh, 3.6vw); }
.r4 .letters { letter-spacing: 0.3em; margin-right: -0.3em; }

.readout {
  position: absolute;
  right: var(--gutter);
  top: 50%;
  transform: translateY(-50%);
  width: 168px;
  font-variant-numeric: tabular-nums;
  color: var(--lens);
}
.readout-top {
  display: flex;
  align-items: baseline;
  gap: 6px;
}
.readout-label {
  margin-right: auto;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--graphite);
}
.readout-value { font-size: 1.5rem; font-weight: 600; }
.readout-unit { font-size: 0.8125rem; font-weight: 500; }

/* Ljestvica u koracima od 0.25 dpt: 11 crtica od −2.50 do 0.00 */
.scale {
  position: relative;
  height: 12px;
  margin-top: 10px;
  background:
    linear-gradient(var(--graphite), var(--graphite)) left bottom / 100% 1px no-repeat,
    repeating-linear-gradient(90deg, var(--graphite) 0 1px, transparent 1px calc((100% - 1px) / 10)) left bottom / 100% 6px no-repeat;
  opacity: 0.9;
}
.scale-marker {
  position: absolute;
  bottom: 0;
  left: calc(var(--m, 0) * (100% - 2px));
  width: 2px;
  height: 12px;
  background: var(--lens);
}
.scale-labels {
  display: flex;
  justify-content: space-between;
  margin-top: 6px;
  font-size: 0.6875rem;
  color: var(--graphite);
}

.hero-copy {
  text-align: center;
  max-width: 34rem;
  opacity: var(--copy-o, 1);
  filter: blur(calc(var(--copy-b, 0) * 1px));
  transform: translateY(calc(var(--copy-y, 0) * 1px));
}
.hero-copy h1 {
  margin: 0 0 8px;
  font-size: clamp(2rem, 4.4vw, 3.25rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.05;
}
.hero-copy p {
  margin: 0 0 24px;
  color: var(--graphite);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

.btn {
  display: inline-block;
  padding: 13px 22px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.9375rem;
  text-decoration: none;
  transition: background-color .2s, color .2s, border-color .2s;
}
.btn-solid { background: var(--ink); color: var(--white); border: 1.5px solid var(--ink); }
.btn-solid:hover { background: var(--lens); border-color: var(--lens); }
.btn-line { border: 1.5px solid var(--ink); }
.btn-line:hover { background: var(--ink); color: var(--white); }

.scroll-hint {
  position: absolute;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%);
  margin: 0;
  font-size: 0.8125rem;
  color: var(--graphite);
  opacity: var(--hint-o, 1);
  white-space: nowrap;
}

/* ---------- Scroll focus (sekcije) ---------- */

[data-focus] {
  filter: blur(calc(var(--b, 0) * 1px));
  opacity: calc(1 - var(--b, 0) / 20);
}

/* ---------- Usluge ---------- */

.services { padding: clamp(80px, 14vh, 160px) 0; }

.services-grid {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: clamp(32px, 6vw, 96px);
  align-items: start;
}

.section-title {
  margin: 0;
  font-size: clamp(1.75rem, 3.4vw, 2.75rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.05;
}
.services .section-title { position: sticky; top: 120px; }

.service-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1.5px solid var(--ink);
}
.service-list li {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) 1.4fr;
  gap: 8px 32px;
  padding: 28px 0;
  border-bottom: 1px solid var(--rule);
}
.service-list h3 {
  margin: 0;
  font-size: clamp(1.25rem, 2vw, 1.5rem);
  font-weight: 600;
  letter-spacing: -0.015em;
}
.service-list p {
  margin: 0;
  color: var(--graphite);
  max-width: 40ch;
}

/* ---------- Narudžba ---------- */

.book {
  padding: 0 0 clamp(80px, 14vh, 160px);
}
.book-inner {
  display: grid;
  justify-items: start;
}
.book-title {
  margin: 0 0 4px;
  font-size: clamp(1.125rem, 1.6vw, 1.3125rem);
  font-weight: 500;
  color: var(--graphite);
}
.book-phone {
  font-size: clamp(3rem, 11vw, 9.5rem);
  font-weight: 800;
  letter-spacing: -0.045em;
  line-height: 1;
  text-decoration: none;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  transition: color .2s;
}
.book-phone:hover { color: var(--lens); }
.book-note {
  margin: 16px 0 0;
  max-width: 34rem;
  color: var(--graphite);
}

/* ---------- Statement ---------- */

.statement {
  background: var(--ink);
  color: var(--white);
  padding: clamp(96px, 18vh, 200px) 0;
  overflow: hidden;
}
.statement-tag {
  margin: 0 0 clamp(32px, 6vh, 64px);
  font-size: clamp(2.5rem, 9.5vw, 8.5rem);
  font-weight: 800;
  letter-spacing: -0.045em;
  line-height: 0.95;
  overflow-wrap: anywhere;
}
.statement-body {
  max-width: 38rem;
  margin-left: auto;
  font-size: clamp(1.125rem, 1.6vw, 1.3125rem);
  line-height: 1.55;
  color: #C9CCCF;
}
.statement-body p { margin: 0; }

/* ---------- Kontakt ---------- */

.contact { padding: clamp(80px, 14vh, 160px) 0; }

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.25fr;
  gap: clamp(32px, 6vw, 96px);
  align-items: stretch;
}

.contact-list {
  margin: 40px 0 0;
  border-top: 1.5px solid var(--ink);
}
.contact-list > div {
  display: grid;
  grid-template-columns: 9rem 1fr;
  gap: 16px;
  padding: 18px 0;
  border-bottom: 1px solid var(--rule);
}
.contact-list dt { color: var(--graphite); font-size: 0.9375rem; }
.contact-list dd { margin: 0; font-weight: 500; }
.contact-list a { text-decoration: none; }
.contact-list a:hover { text-decoration: underline; text-underline-offset: 4px; }

.socials {
  display: flex;
  gap: 12px;
  margin-top: 28px;
}
.socials a {
  padding: 9px 16px;
  border: 1.5px solid var(--ink);
  border-radius: 999px;
  font-size: 0.9375rem;
  font-weight: 500;
  text-decoration: none;
}
.socials a:hover { background: var(--ink); color: var(--white); }

.map {
  min-height: 420px;
  border-radius: 20px;
  overflow: hidden;
  background: var(--rule);
}
.map iframe {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 420px;
  border: 0;
  filter: grayscale(1) contrast(1.05);
}

/* ---------- Footer ---------- */

.site-footer {
  border-top: 1px solid var(--rule);
  padding: 28px 0;
  font-size: 0.875rem;
  color: var(--graphite);
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 32px;
}
.logo-footer { color: var(--ink); }
.logo-footer .logo-word { font-size: 1.25rem; }
.footer-contact { font-style: normal; line-height: 1.6; }
.footer-contact a,
.footer-social a { text-decoration: none; }
.footer-contact a:hover,
.footer-social a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.footer-social { display: flex; gap: 20px; }

/* ---------- Responsive ---------- */

@media (max-width: 820px) {
  .nav a:not(.nav-call) { display: none; }
  .services-grid,
  .contact-grid { grid-template-columns: 1fr; }
  .services .section-title { position: static; }
  .service-list li { grid-template-columns: 1fr; }
  .readout {
    top: 92px;
    width: 128px;
    transform: none;
  }
  .readout-label { display: none; }
  .readout-top { justify-content: flex-end; }
  .readout-value { font-size: 1.25rem; }
  .chart-wrap { margin-left: 0; }
  .chart { grid-template-columns: auto; }
  .chart-row .acuity { display: none; }
}

@media (max-width: 480px) {
  .contact-list > div { grid-template-columns: 1fr; gap: 2px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero { height: auto; }
  .hero-stage { position: relative; }
  .readout, .scroll-hint, .lens-ring { display: none; }
}
