/* ==========================================================
   Sanja Bjelobrk — portfolio
   ========================================================== */

:root {
  --bg: #ffffff;
  --bg-soft: #f4f4f4;
  --bg-dark: #1a1a1a;
  --ink: #141414;
  --text: #5a5a5a;
  --muted: #9a9a9a;
  --line: #e6e6e6;
  --font: "IBM Plex Sans", "Helvetica Neue", Arial, sans-serif;
  --ease: cubic-bezier(.22, .61, .36, 1);
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --gutter: clamp(16px, 4vw, 56px);
  --max: 1320px;
  --header-h: 84px;
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; }

h1, h2, h3, h4 {
  margin: 0;
  color: var(--ink);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -.02em;
}

p { margin: 0 0 1.2em; }
p:last-child { margin-bottom: 0; }

::selection { background: var(--ink); color: #fff; }

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

.section { padding: clamp(80px, 11vw, 160px) 0; }

/* ---------- small elements ---------- */

.label {
  display: inline-block;
  padding: 4px 12px;
  border: 1px solid var(--line);
  border-radius: 3px;
  font-size: 13px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
}

.label--dark { background: #fff; border-color: #fff; color: var(--ink); }

.eyebrow {
  display: block;
  margin-bottom: 20px;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
}

.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 18px 34px;
  background: var(--ink);
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  overflow: hidden;
  isolation: isolate;
  transition: color .5s var(--ease);
}

.btn::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: #3a3a3a;
  transform: scaleY(0);
  transform-origin: bottom;
  transition: transform .5s var(--ease);
}

.btn:hover::before { transform: scaleY(1); }

.btn--light { background: #fff; color: var(--ink); }
.btn--light::before { background: #e9e9e9; }

.btn--outline {
  background: transparent;
  color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--ink);
}
.btn--outline::before { background: var(--ink); }
.btn--outline:hover { color: #fff; }

.link-line {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-weight: 600;
  font-size: 15px;
}

.link-line::after {
  content: "";
  width: 18px;
  height: 1px;
  background: currentColor;
  transition: width .4s var(--ease);
}

.link-line:hover::after { width: 36px; }

/* ---------- header ---------- */

.header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  height: var(--header-h);
  transition: transform .5s var(--ease), background .4s var(--ease), box-shadow .4s var(--ease);
}

.header.is-scrolled {
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 1px 0 var(--line);
}

.header.is-hidden { transform: translateY(-100%); }

/* Na vrhu strane header se invertuje, pa je čitljiv i preko fotografije. */
.header:not(.is-scrolled) { mix-blend-mode: difference; }
.header:not(.is-scrolled) .logo,
.header:not(.is-scrolled) .nav a { color: #fff; }
.header:not(.is-scrolled) .logo span { color: #fff; opacity: .6; }
.header:not(.is-scrolled) .burger span { background: #fff; }
/* backdrop-filter i transform bi zarobili fiksni mobilni meni unutar headera */
.menu-open .header { mix-blend-mode: normal; backdrop-filter: none; -webkit-backdrop-filter: none; transform: none; }
.menu-open .header .logo, .menu-open .header .nav a { color: var(--ink); }
.menu-open .header .burger span { background: var(--ink); }

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  max-width: none;
}

.logo {
  position: relative;
  z-index: 60;
  font-size: 21px;
  font-weight: 600;
  letter-spacing: -.02em;
  color: var(--ink);
  white-space: nowrap;
}

.logo span { color: var(--muted); }

.nav { display: flex; align-items: center; gap: 40px; }

.nav a {
  position: relative;
  font-size: 15px;
  font-weight: 500;
  color: var(--ink);
}

.nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 100%;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform .4s var(--ease);
}

.nav a:hover::after,
.nav a.is-active::after { transform: scaleX(1); transform-origin: left; }

.burger {
  display: none;
  width: 44px;
  height: 44px;
  position: relative;
  z-index: 60;
}

.burger span {
  position: absolute;
  left: 11px;
  right: 11px;
  height: 1.5px;
  background: var(--ink);
  transition: transform .4s var(--ease), top .4s var(--ease), opacity .3s;
}

.burger span:nth-child(1) { top: 16px; }
.burger span:nth-child(2) { top: 22px; }
.burger span:nth-child(3) { top: 28px; }

.menu-open .burger span:nth-child(1) { top: 22px; transform: rotate(45deg); }
.menu-open .burger span:nth-child(2) { opacity: 0; }
.menu-open .burger span:nth-child(3) { top: 22px; transform: rotate(-45deg); }

/* ---------- hero ---------- */

.hero {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 100vh;
  min-height: 100svh;
  background: var(--bg-soft);
  overflow: hidden;
}

.hero__topo {
  position: absolute;
  left: -120px;
  top: -140px;
  width: 640px;
  opacity: .07;
  pointer-events: none;
}

.hero__content {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: calc(var(--header-h) + 40px) clamp(24px, 6vw, 110px) 80px var(--gutter);
}

.hero__title {
  font-size: clamp(38px, 4.2vw, 66px);
  line-height: 1.08;
  margin-bottom: 30px;
  max-width: 15ch;
}

.hero__name {
  margin-bottom: 6px;
  color: var(--ink);
  font-weight: 600;
  font-size: 16px;
}

.hero__tags {
  margin-bottom: 26px;
  font-size: 14px;
  letter-spacing: .04em;
  color: var(--muted);
}

.hero__lead { max-width: 480px; margin-bottom: 44px; font-size: 15.5px; }

.hero__social {
  display: flex;
  gap: 28px;
  margin-top: 44px;
  font-size: 14px;
  color: var(--ink);
}

.hero__social a { transition: opacity .3s; }
.hero__social a:hover { opacity: .5; }

.hero__media { position: relative; overflow: hidden; }

.hero__media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 72% 40%;
  transform: scale(1.12);
  animation: heroZoom 2.4s var(--ease-out) .1s forwards;
}

@keyframes heroZoom { to { transform: scale(1); } }

.hero__scroll {
  position: absolute;
  left: var(--gutter);
  bottom: 34px;
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 12px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
}

.hero__scroll i {
  position: relative;
  width: 1px;
  height: 46px;
  background: var(--line);
  overflow: hidden;
}

.hero__scroll i::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--ink);
  animation: scrollLine 2s var(--ease) infinite;
}

@keyframes scrollLine {
  0% { transform: translateY(-100%); }
  100% { transform: translateY(100%); }
}

/* ---------- intro ---------- */

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(40px, 7vw, 120px);
  align-items: start;
}

.split__title { font-size: clamp(30px, 3.1vw, 46px); }

.split__body { padding-top: 10px; }
.split__body .link-line { margin-top: 18px; }

/* ---------- works slider ---------- */

.works { padding-bottom: clamp(80px, 11vw, 160px); }

.works__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 48px;
}

.works__head h2 { font-size: clamp(30px, 3.1vw, 46px); }

.slider-nav { display: flex; gap: 10px; }

.slider-nav button {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  color: var(--ink);
  transition: background .35s var(--ease), color .35s var(--ease), border-color .35s;
}

.slider-nav button:hover { background: var(--ink); border-color: var(--ink); color: #fff; }
.slider-nav svg { width: 18px; height: 18px; }

.slider {
  display: flex;
  gap: clamp(16px, 2.4vw, 36px);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding-left: var(--gutter);
  padding: 0 var(--gutter) 6px;
  scrollbar-width: none;
  cursor: grab;
}

.slider::-webkit-scrollbar { display: none; }
.slider.is-dragging { cursor: grabbing; scroll-snap-type: none; }
.slider.is-dragging a { pointer-events: none; }

.work-card {
  flex: 0 0 clamp(270px, 34vw, 500px);
  scroll-snap-align: start;
  user-select: none;
}

.work-card__img {
  position: relative;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: var(--bg-soft);
  margin-bottom: 22px;
}

.work-card__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1.1s var(--ease-out);
  -webkit-user-drag: none;
}

.work-card:hover .work-card__img img { transform: scale(1.06); }

.work-card__img::after {
  content: "Pogledaj";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 100px;
  height: 100px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #fff;
  color: var(--ink);
  font-size: 13px;
  font-weight: 500;
  transform: translate(-50%, -50%) scale(0);
  transition: transform .5s var(--ease-out);
}

.work-card:hover .work-card__img::after { transform: translate(-50%, -50%) scale(1); }

.work-card h3 { font-size: 21px; margin-bottom: 4px; }
.work-card span { font-size: 14px; color: var(--muted); }

/* ---------- dark quote ---------- */

.dark {
  position: relative;
  background: var(--bg-dark);
  color: #bdbdbd;
  overflow: hidden;
  text-align: center;
}

.dark__topo {
  position: absolute;
  inset: -20%;
  background: url("../topo.svg") center / 900px repeat;
  opacity: .05;
  pointer-events: none;
}

.dark .container { position: relative; }

.quote {
  max-width: 860px;
  margin: 34px auto 30px;
  color: #fff;
  font-size: clamp(24px, 2.7vw, 38px);
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: -.015em;
}

.dark cite { font-style: normal; font-size: 14px; }
.dark cite b { display: block; color: #fff; font-weight: 600; font-size: 15px; }

/* ---------- marquee ---------- */

.marquee {
  padding: clamp(60px, 8vw, 120px) 0 0;
  overflow: hidden;
  white-space: nowrap;
}

.marquee__track {
  display: inline-flex;
  animation: marquee 38s linear infinite;
}

.marquee__track span {
  padding-right: .35em;
  font-size: clamp(64px, 10vw, 150px);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -.03em;
  color: transparent;
  -webkit-text-stroke: 1px #cfcfcf;
}

.marquee__track span:nth-child(even) { color: var(--ink); -webkit-text-stroke: 0; }

@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- about ---------- */

.about__grid {
  display: grid;
  grid-template-columns: 5fr 6fr;
  gap: clamp(40px, 7vw, 120px);
  align-items: center;
}

.about__media { position: relative; }

.about__media .frame {
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: var(--bg-soft);
}

.about__media img { width: 100%; height: 100%; object-fit: cover; object-position: 70% 30%; }

.about__media::before {
  content: "";
  position: absolute;
  left: -28px;
  bottom: -28px;
  width: 60%;
  height: 60%;
  border: 1px solid var(--line);
  z-index: -1;
}

.about h2 { font-size: clamp(30px, 3.1vw, 46px); margin: 22px 0 28px; }

.services {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 30px;
  margin: 34px 0 40px;
  padding: 0;
  list-style: none;
}

.services li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  font-size: 15px;
  font-weight: 500;
}

.services li::before {
  content: "";
  width: 6px;
  height: 6px;
  background: var(--ink);
  border-radius: 50%;
  flex: none;
}

/* ---------- contact ---------- */

.contact {
  position: relative;
  background: var(--bg-soft);
  overflow: hidden;
}

.contact__topo {
  position: absolute;
  right: -180px;
  bottom: -220px;
  width: 760px;
  opacity: .06;
  pointer-events: none;
}

.contact .container { position: relative; text-align: center; }

.contact h2 {
  max-width: 14ch;
  margin: 26px auto 26px;
  font-size: clamp(38px, 5.2vw, 80px);
  line-height: 1.05;
}

.contact p { max-width: 560px; margin: 0 auto 46px; }

.contact__actions { display: flex; justify-content: center; flex-wrap: wrap; gap: 14px; }

/* ---------- footer ---------- */

.footer { padding: 34px 0; border-top: 1px solid var(--line); font-size: 14px; }

.footer .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.footer nav { display: flex; gap: 26px; color: var(--ink); }
.footer nav a:hover { opacity: .5; }

.to-top {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 40;
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  background: var(--ink);
  color: #fff;
  opacity: 0;
  transform: translateY(16px);
  pointer-events: none;
  transition: opacity .4s var(--ease), transform .4s var(--ease);
}

.to-top.is-visible { opacity: 1; transform: none; pointer-events: auto; }
.to-top svg { width: 18px; height: 18px; }

/* ==========================================================
   Projekti
   ========================================================== */

.page-head {
  position: relative;
  padding: calc(var(--header-h) + clamp(60px, 9vw, 130px)) 0 clamp(60px, 8vw, 110px);
  background: var(--bg-soft);
  overflow: hidden;
}

.page-head__topo {
  position: absolute;
  right: -160px;
  top: -200px;
  width: 760px;
  opacity: .07;
  pointer-events: none;
}

.page-head .container { position: relative; }

.page-head h1 {
  font-size: clamp(56px, 9vw, 140px);
  line-height: .95;
  letter-spacing: -.04em;
  margin: 22px 0 36px;
}

.page-head p { max-width: 620px; font-size: 17px; }

.identity__list {
  margin: 30px 0 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.identity__list li {
  padding: 8px 18px;
  border: 1px solid var(--line);
  border-radius: 40px;
  font-size: 14px;
  color: var(--ink);
}

/* category cards */

.cat-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(50px, 6vw, 90px) clamp(24px, 4vw, 60px);
}

.cat-card { display: block; }
.cat-card:nth-child(even) { margin-top: clamp(0px, 8vw, 120px); }

.cat-card__img {
  position: relative;
  aspect-ratio: 5 / 4;
  overflow: hidden;
  background: var(--bg-soft);
  margin-bottom: 26px;
}

.cat-card__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1.1s var(--ease-out);
}

.cat-card:hover .cat-card__img img { transform: scale(1.06); }

.cat-card__num {
  position: absolute;
  left: 18px;
  top: 16px;
  padding: 2px 10px;
  background: #fff;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink);
}

.cat-card h3 { font-size: clamp(24px, 2.2vw, 32px); margin-bottom: 12px; }
.cat-card p { max-width: 520px; margin-bottom: 18px; font-size: 15px; }

/* gallery */

.gallery-sec { padding-top: 0; }

.tabs-wrap {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(255, 255, 255, .95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  transition: top .5s var(--ease);
}

.header:not(.is-hidden) ~ main .tabs-wrap { top: var(--header-h); }

.tabs {
  display: flex;
  gap: 34px;
  overflow-x: auto;
  scrollbar-width: none;
}

.tabs::-webkit-scrollbar { display: none; }

.tabs button {
  position: relative;
  padding: 24px 0;
  white-space: nowrap;
  font-size: 15px;
  font-weight: 500;
  color: var(--muted);
  transition: color .3s;
}

.tabs button::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  background: var(--ink);
  transform: scaleX(0);
  transition: transform .45s var(--ease);
}

.tabs button:hover { color: var(--ink); }
.tabs button.is-active { color: var(--ink); }
.tabs button.is-active::after { transform: scaleX(1); }

.cat-view { padding-top: clamp(50px, 6vw, 90px); }

.cat-view__head {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px clamp(40px, 7vw, 120px);
  align-items: end;
  margin-bottom: clamp(36px, 4vw, 56px);
}

.cat-view__head h2 { font-size: clamp(36px, 4.6vw, 68px); letter-spacing: -.03em; }
.cat-view__head h2 sup { font-size: .32em; color: var(--muted); font-weight: 500; vertical-align: top; margin-left: 8px; letter-spacing: 0; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 40px; }

.chips button {
  padding: 8px 18px;
  border: 1px solid var(--line);
  border-radius: 40px;
  font-size: 14px;
  color: var(--ink);
  transition: background .3s, color .3s, border-color .3s;
}

.chips button:hover { border-color: var(--ink); }
.chips button.is-active { background: var(--ink); border-color: var(--ink); color: #fff; }

.group + .group { margin-top: clamp(60px, 7vw, 100px); }

.group__title {
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin-bottom: 26px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
  font-size: clamp(22px, 2vw, 28px);
}

.group__title small { font-size: 14px; font-weight: 400; color: var(--muted); letter-spacing: 0; }

.subgroup + .subgroup { margin-top: 44px; }

.subgroup__title {
  margin-bottom: 18px;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
}

.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(10px, 1.4vw, 20px);
}

.tile {
  position: relative;
  display: block;
  aspect-ratio: 1;
  overflow: hidden;
  background: var(--bg-soft);
  cursor: zoom-in;
}

.tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1s var(--ease-out), opacity .6s var(--ease);
  opacity: 0;
}

.tile img.is-loaded { opacity: 1; }

.tile::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(20, 20, 20, .0);
  transition: background .5s var(--ease);
}

.tile:hover img { transform: scale(1.05); }
.tile:hover::after { background: rgba(20, 20, 20, .08); }

.tile__zoom {
  position: absolute;
  right: 14px;
  bottom: 14px;
  z-index: 2;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  background: #fff;
  color: var(--ink);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity .4s var(--ease), transform .4s var(--ease);
}

.tile__zoom svg { width: 16px; height: 16px; }
.tile:hover .tile__zoom { opacity: 1; transform: none; }

.cat-pager {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin-top: clamp(70px, 8vw, 120px);
  padding-top: 34px;
  border-top: 1px solid var(--line);
}

.cat-pager button { text-align: left; }
.cat-pager button:last-child { text-align: right; margin-left: auto; }
.cat-pager small { display: block; font-size: 13px; color: var(--muted); letter-spacing: .1em; text-transform: uppercase; }
.cat-pager b { font-size: clamp(20px, 2.2vw, 30px); color: var(--ink); font-weight: 600; letter-spacing: -.02em; transition: opacity .3s; }
.cat-pager button:hover b { opacity: .5; }

.fade-swap { animation: fadeSwap .7s var(--ease-out); }
@keyframes fadeSwap { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }

/* lightbox */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  background: rgba(14, 14, 14, .96);
  opacity: 0;
  visibility: hidden;
  transition: opacity .4s var(--ease), visibility .4s;
}

.lightbox.is-open { opacity: 1; visibility: visible; }

.lightbox__stage {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  padding: 80px clamp(16px, 8vw, 120px);
  touch-action: pan-y;
}

.lightbox__img {
  max-width: 100%;
  max-height: calc(100vh - 160px);
  max-height: calc(100dvh - 160px);
  object-fit: contain;
  transition: opacity .35s var(--ease), transform .5s var(--ease-out);
}

.lightbox__img.is-loading { opacity: 0; transform: scale(.97); }

.lightbox__bar {
  position: absolute;
  inset: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px clamp(16px, 3vw, 34px);
  color: #fff;
  font-size: 14px;
}

.lightbox__bar span { color: #9a9a9a; }
.lightbox__bar b { color: #fff; font-weight: 500; margin-right: 12px; }

.lb-btn {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, .18);
  transition: background .3s, border-color .3s, color .3s;
}

.lb-btn:hover { background: #fff; color: var(--ink); border-color: #fff; }
.lb-btn svg { width: 20px; height: 20px; }

.lightbox__prev, .lightbox__next { position: absolute; top: 50%; transform: translateY(-50%); }
.lightbox__prev { left: clamp(10px, 2vw, 30px); }
.lightbox__next { right: clamp(10px, 2vw, 30px); }

.lightbox__spinner {
  position: absolute;
  width: 34px;
  height: 34px;
  border: 1.5px solid rgba(255, 255, 255, .2);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin .8s linear infinite;
  opacity: 0;
  transition: opacity .3s;
}

.lightbox.is-loading .lightbox__spinner { opacity: 1; }

@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- reveal animations ---------- */

.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 1s var(--ease-out), transform 1.2s var(--ease-out);
  transition-delay: var(--d, 0s);
}

.reveal.is-in { opacity: 1; transform: none; }

.reveal-img { overflow: hidden; }
.reveal-img > * { clip-path: inset(100% 0 0 0); transition: clip-path 1.4s var(--ease-out); transition-delay: var(--d, 0s); }
.reveal-img.is-in > * { clip-path: inset(0 0 0 0); }

.lines .line { display: inline-block; vertical-align: top; overflow: hidden; padding-bottom: .08em; margin-bottom: -.08em; }
.lines .line > span { display: inline-block; transform: translateY(110%); transition: transform 1.1s var(--ease-out); transition-delay: var(--d, 0s); }
.lines.is-in .line > span { transform: none; }

.no-js .reveal, .no-js .reveal-img > * { opacity: 1; transform: none; clip-path: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  html { scroll-behavior: auto; }
  .reveal, .reveal-img > *, .lines .line > span { opacity: 1; transform: none; clip-path: none; }
}

/* ---------- responsive ---------- */

@media (max-width: 1024px) {
  .grid { grid-template-columns: repeat(2, 1fr); }
  .about__grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 860px) {
  :root { --header-h: 70px; }

  .burger { display: block; }

  .nav {
    position: fixed;
    inset: 0;
    z-index: 55;
    flex-direction: column;
    justify-content: center;
    gap: 26px;
    background: #fff;
    opacity: 0;
    visibility: hidden;
    transition: opacity .45s var(--ease), visibility .45s;
  }

  .nav a { font-size: 34px; font-weight: 600; letter-spacing: -.02em; transform: translateY(20px); transition: transform .6s var(--ease-out); }
  .menu-open .nav { opacity: 1; visibility: visible; }
  .menu-open .nav a { transform: none; }
  .menu-open .nav a:nth-child(2) { transition-delay: .05s; }
  .menu-open .nav a:nth-child(3) { transition-delay: .1s; }
  .menu-open .nav a:nth-child(4) { transition-delay: .15s; }
  .nav a::after { display: none; }
  .menu-open { overflow: hidden; }

  .hero { grid-template-columns: 1fr; }
  .hero__media { order: -1; height: 62vh; min-height: 380px; }
  .hero__content { padding: 48px var(--gutter) 70px; }
  .hero__scroll { display: none; }
  .hero__social { margin-top: 40px; }

  .split, .about__grid, .cat-view__head { grid-template-columns: 1fr; }
  .split { gap: 26px; }
  .about__media { max-width: 460px; }
  .about__media::before { left: -14px; bottom: -14px; }

  .cat-grid { grid-template-columns: 1fr; }
  .cat-card:nth-child(even) { margin-top: 0; }

  .works__head { flex-wrap: wrap; }
}

@media (max-width: 560px) {
  body { font-size: 15px; }
  .grid { grid-template-columns: 1fr 1fr; gap: 8px; }
  .services { grid-template-columns: 1fr; }
  .slider-nav button { width: 46px; height: 46px; }
  .tabs { gap: 24px; }
  .btn { padding: 16px 26px; }
  .footer .container { flex-direction: column; text-align: center; }
  .lightbox__prev, .lightbox__next { top: auto; bottom: 20px; transform: none; }
  .lightbox__stage { padding: 70px 12px 90px; }
  .lightbox__img { max-height: calc(100dvh - 170px); }
  .tile__zoom { display: none; }
}
