/* ==========================================================================
   GTS d.o.o. — base.css
   Design tokeni, reset, tipografija i zajedničke pomoćne klase.
   ========================================================================== */

:root {
  --bg: #0B0A09;
  --surface: #161412;
  --ink: #F5F1EB;
  --cream: #EDE6DC;
  --body: #DAD3C8;
  --soft: #C9C2B8;
  --muted: #8C857C;
  --accent: #B8905F;
  --line: rgba(237, 230, 220, .12);
  --line-strong: rgba(237, 230, 220, .14);

  --ease: cubic-bezier(.16, 1, .3, 1);
  --container: 1280px;
  --gutter: 48px;
  --section-y: clamp(64px, 7.5vw, 128px);

  --font: 'Poppins', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-display: 'Archivo', 'Arial Narrow', Arial, sans-serif;
  --font-serif: 'Instrument Serif', Georgia, serif;
}

/* ---------- Reset ---------- */

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-weight: 300;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

body.is-locked { overflow: hidden; }

h1, h2, h3, h4, p, figure, ul, ol { margin: 0; padding: 0; }
ul, ol { list-style: none; }
img, svg { display: block; max-width: 100%; }
img { height: auto; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
input, select, textarea { font: inherit; color: inherit; border-radius: 0; }

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

::selection { background: var(--accent); color: var(--bg); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

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

.skip-link {
  position: fixed; top: 8px; left: 8px; z-index: 100;
  padding: 12px 16px; background: var(--cream); color: var(--bg);
  transform: translateY(-200%);
}
.skip-link:focus { transform: none; color: var(--bg); }

/* ---------- Raspored ---------- */

.site { position: relative; z-index: 1; background: var(--bg); color: var(--ink); overflow-x: clip; }

.container { width: min(var(--container), calc(100% - var(--gutter))); margin-inline: auto; }

.section { padding-block: var(--section-y); }
.section--ruled { border-top: 1px solid var(--line); }

/* ---------- Tipografija ---------- */

.eyebrow {
  display: flex; align-items: center; gap: 12px;
  font-size: 12px; font-weight: 400; letter-spacing: .15em; text-transform: uppercase;
  color: var(--muted);
}
.eyebrow::before { content: ''; flex: none; width: 24px; height: 1px; background: var(--accent); }
.eyebrow--wide::before { width: 48px; }

.display { font-weight: 500; letter-spacing: -0.03em; line-height: 1; }
.display em, .italic { font-style: italic; font-weight: 200; }

.lead { font-size: 16px; line-height: 1.6; color: var(--muted); }

/* Podvučeni link sa animiranom linijom */
.link-line {
  color: var(--ink);
  padding-bottom: 4px;
  background: linear-gradient(var(--accent), var(--accent)) 0 100% / 0 1px no-repeat;
  transition: background-size .5s var(--ease);
}
.link-line:hover { color: var(--ink); background-size: 100% 1px; }
.link-line--open { background-size: 100% 1px; }
.link-line--open:hover { background-size: 0 1px; }

/* ---------- Dugmad ---------- */

.btn {
  display: inline-flex; align-items: center; gap: 12px;
  height: 56px; padding: 0 32px;
  font-size: 15px; font-weight: 500;
  transition: background .4s, border-color .4s, gap .4s;
}
.btn--primary { background: var(--cream); color: var(--bg); }
.btn--primary:hover { background: #fff; color: var(--bg); gap: 20px; }
.btn--ghost { border: 1px solid rgba(237, 230, 220, .45); color: var(--ink); font-weight: 400; }
.btn--ghost:hover { background: rgba(237, 230, 220, .14); border-color: var(--cream); color: var(--ink); }
.btn--sm { height: 52px; }

/* Dugme sa ikonicom (merenje) */
.cta-pill { display: inline-flex; align-items: stretch; height: 44px; color: var(--bg); font-size: 13px; font-weight: 500; letter-spacing: .04em; flex: none; }
.cta-pill:hover { color: var(--bg); }
.cta-pill__icon { display: flex; align-items: center; justify-content: center; width: 44px; background: var(--accent); }
.cta-pill__label { display: flex; align-items: center; gap: 12px; padding: 0 20px; background: var(--cream); transition: gap .4s; }
.cta-pill:hover .cta-pill__label { gap: 18px; }
.cta-pill--lg { height: 56px; font-size: 14px; }
.cta-pill--lg .cta-pill__icon { width: 56px; }
.cta-pill--lg .cta-pill__label { padding: 0 24px; }

.square-btn {
  display: flex; align-items: center; justify-content: center;
  width: 56px; height: 56px; border: 1px solid rgba(237, 230, 220, .3);
  color: var(--ink); font-size: 20px;
  transition: background .4s, color .4s, border-color .4s;
}
.square-btn:hover { background: var(--cream); color: var(--bg); border-color: var(--cream); }
.square-btn--sm { width: 48px; height: 48px; font-size: 18px; }

/* ---------- Dekorativni okviri ---------- */

/* Četiri ugaone oznake u akcentnoj boji */
.frame { position: relative; }
.frame::after {
  content: ''; position: absolute; inset: -8px; pointer-events: none;
  background:
    linear-gradient(var(--accent), var(--accent)) 0 0 / 24px 1px,
    linear-gradient(var(--accent), var(--accent)) 0 0 / 1px 24px,
    linear-gradient(var(--accent), var(--accent)) 100% 0 / 24px 1px,
    linear-gradient(var(--accent), var(--accent)) 100% 0 / 1px 24px,
    linear-gradient(var(--accent), var(--accent)) 0 100% / 24px 1px,
    linear-gradient(var(--accent), var(--accent)) 0 100% / 1px 24px,
    linear-gradient(var(--accent), var(--accent)) 100% 100% / 24px 1px,
    linear-gradient(var(--accent), var(--accent)) 100% 100% / 1px 24px;
  background-repeat: no-repeat;
}

.thumb { overflow: hidden; background: var(--surface); border: 1px solid var(--line); }
.thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.8s var(--ease); }
.thumb:hover img { transform: scale(1.06); }

/* Kotna linija (dimenzija) */
.dim { display: flex; align-items: center; gap: 12px; height: 24px; color: var(--accent); }
.dim__tick { flex: none; width: 1px; height: 14px; background: currentColor; transform: rotate(30deg); }
.dim__line { flex: 1; height: 1px; background: currentColor; opacity: .7; transform-origin: left; }
.dim__line--end { transform-origin: right; }
.dim__label { font-size: 10px; font-weight: 400; letter-spacing: .25em; text-transform: uppercase; white-space: nowrap; }

.dim--v { flex-direction: column; width: 24px; height: 100%; }
.dim--v .dim__tick { width: 14px; height: 1px; }
.dim--v .dim__line { flex: 1; width: 1px; height: auto; transform-origin: top; }
.dim--v .dim__line--end { transform-origin: bottom; }
.dim--v .dim__label { writing-mode: vertical-rl; }

/* ---------- Animacije pri skrolu ---------- */
/* Početno stanje se primenjuje samo kada je JS aktivan (klasa .js na <html>). */

.js [data-reveal] {
  opacity: 0; transform: translate3d(0, 32px, 0);
  transition: opacity 1.1s var(--ease) calc(var(--d, 0) * 100ms),
              transform 1.1s var(--ease) calc(var(--d, 0) * 100ms),
              background-color .6s, border-color .5s;
}
.js [data-reveal].is-in { opacity: 1; transform: none; }

.js [data-grow] { transform: scaleX(0); transition: transform 1.6s var(--ease) calc(var(--d, 0) * 180ms); }
.js [data-grow].is-in { transform: none; }
.js .dim--v [data-grow] { transform: scaleY(0); }
.js .dim--v [data-grow].is-in { transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
  .js [data-reveal], .js [data-grow] { opacity: 1; transform: none; }
}

@media (pointer: coarse) {
  html { scroll-behavior: auto; overflow-anchor: none; }
  .hero__bg { will-change: auto; }
}
@media (max-width: 899px) {
  html { scroll-behavior: auto; overflow-anchor: none; }
  .hero__bg { will-change: auto; transform: none !important; }
}
@media (max-width: 899px) { html { scrollbar-gutter: stable; } }
