/* Stan na dan Beograd — shared base: tokens, LED cove frame, nav, buttons, footer.
   Concept "Prekidač": every room is lit by its LED strip; the site frame is that strip. */
@property --led {
  syntax: '<color>';
  inherits: true;
  initial-value: #b36bff;
}

:root {
  --ink: #08080a;
  --ink-2: #111115;
  --ink-3: #1a1a20;
  --line: rgba(238, 236, 232, 0.12);
  --marble: #eeece8;
  --mute: #9a98a2;
  --led: #b36bff;
  --led-soft: color-mix(in oklab, var(--led) 32%, transparent);
  --led-faint: color-mix(in oklab, var(--led) 12%, transparent);
  --f-display: 'Syne', system-ui, sans-serif;
  --f-body: 'Golos Text', system-ui, sans-serif;
  --t-xs: 0.78rem;
  --t-sm: 0.9rem;
  --t-base: clamp(1rem, 0.96rem + 0.2vw, 1.08rem);
  --t-lg: clamp(1.2rem, 1rem + 0.8vw, 1.5rem);
  --t-xl: clamp(2rem, 1.2rem + 3.4vw, 3.8rem);
  --t-hero: clamp(3.2rem, 1rem + 9vw, 9.5rem);
  --gap: clamp(1rem, 0.6rem + 1.8vw, 2rem);
  --pad: clamp(1.25rem, 0.5rem + 4vw, 4.5rem);
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --r: 14px;
  color-scheme: dark;
  transition: --led 0.9s var(--ease);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--ink);
  color: var(--marble);
  font: 400 var(--t-base)/1.6 var(--f-body);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
img { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; color: inherit; }
h1, h2, h3 { font-family: var(--f-display); font-weight: 700; line-height: 0.95; letter-spacing: -0.02em; margin: 0; }
p { margin: 0; }
:focus-visible { outline: 2px solid var(--led); outline-offset: 3px; border-radius: 6px; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Grain so the darks never band */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 90;
  opacity: 0.06;
  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='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ── The LED cove: a light strip around the viewport, coloured by the room in view ── */
.cove {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 80;
  overflow: visible;
}
.cove rect {
  x: 9px;
  y: 9px;
  width: calc(100% - 18px);
  height: calc(100% - 18px);
  rx: 18px;
  fill: none;
  stroke: var(--led);
  stroke-width: 1.5px;
  stroke-dasharray: 1;
  stroke-dashoffset: 0;
  filter: drop-shadow(0 0 6px var(--led)) drop-shadow(0 0 22px var(--led-soft));
  transition: stroke-dashoffset 2.2s var(--ease), opacity 0.6s;
}
.is-dark .cove rect { stroke-dashoffset: 1; opacity: 0.2; }
@media (max-width: 640px) { .cove rect { x: 5px; y: 5px; width: calc(100% - 10px); height: calc(100% - 10px); rx: 14px; } }

/* ── Nav ── */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 70;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.35rem var(--pad);
  transition: background 0.4s, backdrop-filter 0.4s, padding 0.4s var(--ease);
}
.nav.is-scrolled {
  padding-block: 0.9rem;
  background: rgba(8, 8, 10, 0.62);
  backdrop-filter: blur(14px) saturate(1.3);
  -webkit-backdrop-filter: blur(14px) saturate(1.3);
}
.brand { display: flex; align-items: baseline; gap: 0.55rem; text-decoration: none; }
.brand b { font: 800 1.05rem/1 var(--f-display); letter-spacing: 0.02em; white-space: nowrap; }
@media (max-width: 480px) { .brand span { display: none; } .nav .btn { min-height: 40px; padding: 0.55rem 1rem; } }
.brand span { font: 500 0.66rem/1 var(--f-body); letter-spacing: 0.32em; color: var(--mute); }
.brand i { width: 7px; height: 7px; border-radius: 50%; background: var(--led); box-shadow: 0 0 10px var(--led); align-self: center; }
.nav ul { display: flex; gap: clamp(1rem, 2.4vw, 2.2rem); list-style: none; margin: 0; padding: 0; }
.nav ul a { text-decoration: none; font-size: var(--t-sm); color: var(--mute); transition: color 0.25s; }
.nav ul a:hover, .nav ul a[aria-current='page'] { color: var(--marble); }
@media (max-width: 760px) { .nav ul { display: none; } }

/* ── Buttons ── */
.btn {
  --b: var(--led);
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  min-height: 46px;
  padding: 0.7rem 1.35rem;
  border-radius: 999px;
  border: 1px solid color-mix(in oklab, var(--b) 70%, white 10%);
  background: color-mix(in oklab, var(--b) 18%, var(--ink));
  color: var(--marble);
  font: 600 var(--t-sm)/1 var(--f-body);
  letter-spacing: 0.01em;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 0 0 0 var(--led-soft), inset 0 0 18px var(--led-faint);
  transition: box-shadow 0.35s var(--ease), background 0.35s, transform 0.2s;
}
.btn:hover { background: color-mix(in oklab, var(--b) 30%, var(--ink)); box-shadow: 0 0 28px -4px var(--led-soft), inset 0 0 22px var(--led-faint); }
.btn:active { transform: scale(0.97); }
.btn[disabled] { opacity: 0.4; pointer-events: none; }
.btn--solid { background: var(--led); color: #0a0a0c; border-color: transparent; }
.btn--solid:hover { background: color-mix(in oklab, var(--led) 85%, white); }
.btn--ghost { border-color: var(--line); background: transparent; box-shadow: none; }
.btn--ghost:hover { border-color: var(--led); background: var(--led-faint); }
.btn svg { width: 16px; height: 16px; flex: none; }

.eyebrow { font: 600 var(--t-xs)/1 var(--f-body); letter-spacing: 0.24em; text-transform: uppercase; color: var(--mute); }
.eyebrow::before { content: ''; display: inline-block; width: 18px; height: 1px; background: var(--led); vertical-align: middle; margin-right: 0.7rem; box-shadow: 0 0 8px var(--led); }

/* ── Footer ── */
.footer {
  padding: clamp(3rem, 8vw, 6rem) var(--pad) 2.4rem;
  border-top: 1px solid var(--line);
  display: grid;
  gap: 2.5rem;
}
.footer__big { font: 800 clamp(2.6rem, 9vw, 8rem)/0.85 var(--f-display); letter-spacing: -0.04em; }
.footer__big span { color: transparent; -webkit-text-stroke: 1px color-mix(in oklab, var(--led) 70%, white); }
.footer__row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem 2rem; color: var(--mute); font-size: var(--t-sm); }
.footer__row a { text-decoration: none; }
.footer__row a:hover { color: var(--marble); }
.footer__credit a { color: var(--marble); }
.footer--slim { padding-top: 2rem; }

/* ── Reveal on scroll ── */
.rv { opacity: 0; transform: translateY(26px); transition: opacity 1s var(--ease), transform 1s var(--ease); }
.rv.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  :root { transition: none; }
  html { scroll-behavior: auto; }
  .rv { opacity: 1; transform: none; transition: none; }
  .cove rect { transition: none; }
}

/* Legibility of the transparent nav over bright room photos */
.nav:not(.is-scrolled) { background: linear-gradient(rgba(8, 8, 10, 0.7), rgba(8, 8, 10, 0)); }
.nav:not(.is-scrolled) ul a { color: rgba(238, 236, 232, 0.86); text-shadow: 0 1px 10px rgba(0, 0, 0, 0.9); }
