/* =============================================================================
   COMPONENTS — копчиња, навигација, картички, placeholder-и, значка, lightbox
   ============================================================================= */

/* -----------------------------------------------------------------------------
   КОПЧИЊА
   Сите се минимум 44px високи (тап-цел).
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  min-height: 48px;
  padding: var(--space-3) var(--space-6);
  border-radius: var(--r-pill);
  font-family: var(--font-body);
  font-weight: 700;
  font-size: var(--fs-body);
  line-height: 1.2;
  text-decoration: none;
  text-align: center;
  cursor: pointer;
  transition:
    transform var(--dur-fast) var(--ease-out),
    box-shadow var(--dur-fast) var(--ease-out),
    background-color var(--dur-fast) var(--ease-out),
    color var(--dur-fast) var(--ease-out);
}

.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0) scale(0.98); transition-duration: var(--dur-press); }

/* Стрелката се поместува малку на hover — најмалиот можен знак на живост */
.btn__arrow {
  display: inline-block;
  transition: transform 180ms var(--ease-out);
}
.btn:hover .btn__arrow { transform: translateX(3px); }

.btn--primary {
  background: var(--fill-purple);
  color: #fff;
  box-shadow: var(--shadow-sm);
}
.btn--primary:hover { box-shadow: var(--shadow-md); }

.btn--coral {
  background: var(--fill-coral);
  color: var(--on-fill-dark);
  box-shadow: var(--shadow-sm);
}
.btn--coral:hover { box-shadow: var(--shadow-md); }

.btn--outline {
  background: transparent;
  color: var(--text-purple);
  box-shadow: inset 0 0 0 2px currentColor;
}
.btn--outline:hover { background: rgba(84, 58, 115, 0.07); }

/* Врз обоена позадина: бело копче што го зема тонот на бендот како текст */
.band .btn--onband {
  background: var(--bg);
  color: var(--ink);
  box-shadow: var(--shadow-sm);
}
/* Врз коралниот бенд виолетовиот текст паѓа на 3.1:1; ink е 4.9:1. */
[data-color="coral"] .btn--outline { color: var(--tone-fg); }
[data-color="purple"] .btn--outline,
[data-color="blue"] .btn--outline { color: #fff; }

.btn--sm { min-height: 44px; padding: var(--space-2) var(--space-5); font-size: var(--fs-small); }

/* Текстуален линк со стрелка */
.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  min-height: 44px;
  font-weight: 700;
  color: var(--text-purple);
  text-decoration: none;
  border-bottom: 2px solid currentColor;
  padding-bottom: 2px;
  transition: gap var(--dur-base) var(--ease-out);
}
.link-arrow:hover { gap: var(--space-3); }
/* Врз СЕКОЈА обоена подлога (бенд или картичка) линкот мора да ја земе бојата
   на текстот на таа подлога. Виолетово врз корал е само 3.1:1 — паѓа. */
[data-color] .link-arrow { color: inherit; }

/* -----------------------------------------------------------------------------
   ХЕДЕР И НАВИГАЦИЈА
   -------------------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: var(--z-header);
  background: rgba(251, 247, 238, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-5);
  min-height: 64px;
  padding-block: var(--space-2);
}

.brand {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  text-decoration: none;
}
.brand img { width: 76px; height: auto; }

.nav { display: none; }

@media (min-width: 980px) {
  .nav {
    display: flex;
    align-items: center;
    gap: clamp(var(--space-3), 1.4vw, var(--space-5));
  }
}

.nav__link {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding-inline: var(--space-1);
  font-weight: 600;
  font-size: var(--fs-small);
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
}

/* Подвлекување што расте од лево */
.nav__link::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: 12px;
  height: 2px;
  background: var(--fill-coral);
  border-radius: 2px;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--dur-base) var(--ease-out);
}
.nav__link:hover::after { transform: scaleX(1); }

/* Активната страница е веќе подвлечена — статично, не анимирано */
.nav__link[aria-current="page"] { color: var(--text-purple); }
.nav__link[aria-current="page"]::after {
  transform: scaleX(1);
  background: var(--fill-purple);
}

.nav__cta { margin-left: var(--space-2); }

/* Hamburger */
.nav-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px; height: 48px;
  border-radius: var(--r-pill);
  color: var(--ink);
  transition: background-color var(--dur-fast) var(--ease-out);
}
.nav-toggle:hover { background: rgba(46, 36, 56, 0.06); }
@media (min-width: 980px) { .nav-toggle { display: none; } }

.nav-toggle__bars,
.nav-toggle__bars::before,
.nav-toggle__bars::after {
  display: block;
  width: 22px; height: 2px;
  background: currentColor;
  border-radius: 2px;
  transition: transform var(--dur-base) var(--ease-out), opacity var(--dur-fast) var(--ease-out);
}
.nav-toggle__bars { position: relative; }
.nav-toggle__bars::before { content: ''; position: absolute; top: -7px; }
.nav-toggle__bars::after  { content: ''; position: absolute; top: 7px; }

[aria-expanded="true"] .nav-toggle__bars { background: transparent; }
[aria-expanded="true"] .nav-toggle__bars::before { transform: translateY(7px) rotate(45deg); }
[aria-expanded="true"] .nav-toggle__bars::after  { transform: translateY(-7px) rotate(-45deg); }

/* -----------------------------------------------------------------------------
   МОБИЛНО МЕНИ (drawer)
   Влез 250ms, излез 180ms — излегувањето е секогаш побрзо од влегувањето.
   -------------------------------------------------------------------------- */
.drawer {
  position: fixed;
  inset: 0;
  z-index: var(--z-drawer);
  display: flex;
  flex-direction: column;
  padding: var(--space-6) var(--gutter) var(--space-8);
  background: var(--bg);
  overflow-y: auto;
  opacity: 0;
  transform: translateY(-8px);
  visibility: hidden;
  transition:
    opacity 180ms var(--ease-out),
    transform 180ms var(--ease-out),
    visibility 0s linear 180ms;
}
.drawer.is-open {
  opacity: 1;
  transform: none;
  visibility: visible;
  transition:
    opacity 250ms var(--ease-out),
    transform 250ms var(--ease-out),
    visibility 0s;
}
@media (min-width: 980px) { .drawer { display: none; } }

.drawer__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-7);
}

.drawer__close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px; height: 48px;
  border-radius: var(--r-pill);
  font-size: 1.6rem;
  line-height: 1;
}
.drawer__close:hover { background: rgba(46, 36, 56, 0.06); }

.drawer__nav { display: flex; flex-direction: column; gap: var(--space-1); }

.drawer__link {
  display: flex;
  align-items: center;
  min-height: 56px;
  padding: var(--space-2) var(--space-3);
  border-radius: var(--r-md);
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 600;
  text-decoration: none;
  transition: background-color var(--dur-fast) var(--ease-out);
}
.drawer__link:hover { background: var(--fill-cream-deep); }
.drawer__link[aria-current="page"] { color: var(--text-purple); background: var(--fill-lavender); }

.drawer__foot { margin-top: auto; padding-top: var(--space-7); }

/* -----------------------------------------------------------------------------
   ПОТПИС-ФОРМИ
   -------------------------------------------------------------------------- */

/* Лак — заоблено горе, благо долу. Главната форма за слики. */
.arch { border-radius: var(--r-arch); overflow: hidden; }
.leaf { border-radius: var(--r-leaf); overflow: hidden; }
.rounded { border-radius: var(--r-lg); overflow: hidden; }

/* Потпис-момент: лакот се открива одоздола нагоре.
   Работи идентично и за placeholder плочка и за вистинска слика. */
.js-reveal .arch-reveal { clip-path: inset(100% 0 0 0); }
.js-reveal .arch-reveal.is-visible {
  clip-path: inset(0 0 0 0);
  transition: clip-path var(--dur-signature) var(--ease-out);
}

/* Брановидна линија под насловот */
.wave { display: block; width: clamp(96px, 16vw, 140px); height: auto; margin-top: var(--space-3); color: var(--fill-coral); opacity: .85; }
.band .wave { color: currentColor; opacity: 0.6; }
.wave path { stroke-dasharray: 240; stroke-dashoffset: 0; }
.js-reveal .wave[data-reveal] path { stroke-dashoffset: 240; }
.js-reveal .wave[data-reveal].is-visible path {
  stroke-dashoffset: 0;
  transition: stroke-dashoffset 600ms var(--ease-out) 120ms;
}

/* -----------------------------------------------------------------------------
   PLACEHOLDER ЗА СЛИКА
   Ова е причината зошто сајтот изгледа завршен иако сѐ уште нема фотографии.
   -------------------------------------------------------------------------- */
.ph {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  background: var(--ph-bg, var(--fill-cream-deep));
  color: var(--on-fill-dark);
  text-align: center;
  overflow: hidden;
}
.ph::after {
  content: '';
  position: absolute;
  inset: 10px;
  border: 2px dashed rgba(46, 36, 56, 0.26);
  border-radius: inherit;
  pointer-events: none;
}
.ph__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-5);
  max-width: 22ch;
}
.ph__icon { width: 34px; height: 34px; opacity: 0.55; }
.ph__label {
  font-family: var(--font-accent);
  font-size: 1.15rem;
  font-weight: 600;
  line-height: 1.25;
  opacity: 0.72;
}

/* Секој placeholder добива своја боја од палетата — така делот изгледа
   намерно обоен, а не како низа сиви кутии. */
.ph--coral  { --ph-bg: #F6C4B5; }
.ph--yellow { --ph-bg: #F4F5B8; }
.ph--teal   { --ph-bg: #B6E6E5; }
.ph--green  { --ph-bg: #E8F3D6; }
.ph--orange { --ph-bg: #FAD9BC; }
.ph--purple { --ph-bg: #CFC3DE; }
.ph--blue   { --ph-bg: #C6D0EA; }
/* Неутрален тон за видео-плочки: тие седат врз обоени бенди, па сопствената
   боја би се судрила со подлогата. Бојата ја носи бендот, не плочката. */
.ph--cream  { --ph-bg: #F4EDDF; }

/* -----------------------------------------------------------------------------
   РАМКА ЗА СЛИКА
   Рамката НИКОГАШ не мрда. Само сликата внатре се зумира.
   Затоа нема layout shift при hover.
   -------------------------------------------------------------------------- */
.frame {
  position: relative;
  overflow: hidden;
  background: var(--fill-cream-deep);
}
.frame > img,
.frame > video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 300ms var(--ease-out);
}
.frame > video { background: #000; }
.frame--4x5  { aspect-ratio: 4 / 5; }
.frame--3x4  { aspect-ratio: 3 / 4; }
.frame--1x1  { aspect-ratio: 1 / 1; }
.frame--16x9 { aspect-ratio: 16 / 9; }
.frame--arch { aspect-ratio: 4 / 5; border-radius: var(--r-arch); }

/* -----------------------------------------------------------------------------
   ЗАШТИТА НА ФОТОГРАФИИТЕ
   Воден жиг: белото лого (images/watermark.png, исечено од logo.png) на 30%
   во долниот лев агол. Слој врз сликата, не во самиот фајл: screenshot го
   содржи, а фотографиите остануваат недопрени. Само рамки со <img>, не
   видеа ни placeholder-и. Односот 416 / 264 е големината на watermark.png.
   Lightbox-от го поставува својот жиг од js/gallery.js, по истите мери;
   мрежата на „За мене" го носи на натписот, во истиот агол (css/pages.css).
   -------------------------------------------------------------------------- */
.frame:has(> img)::after,
.hero-slider::after,
.lightbox__mark {
  content: '';
  position: absolute;
  z-index: 2;
  width: clamp(24px, 7%, 44px);
  aspect-ratio: 416 / 264;
  background: url('../images/watermark.png') no-repeat left bottom / contain;
  opacity: 0.3;
  pointer-events: none;
}
/* Фиксни 12px од аголот, не процент: со процент жигот на големите слики
   бегаше далеку од аголот. 12px го чисти и најзаоблениот долен агол (36px). */
.frame:has(> img)::after,
.hero-slider::after {
  left: 12px;
  bottom: 12px;
}
/* Светол агол под жигот (js/ui.js го означува <img> со data-wm-dark): истото
   лого, црно наместо бело, за да не се изгуби врз бела позадина. */
.frame:has(> img[data-wm-dark])::after,
.hero-slider:has(.is-active img[data-wm-dark])::after,
.lightbox__stage:has(> img[data-wm-dark]) .lightbox__mark {
  filter: brightness(0);
}

/* Без влечење и без менито „Зачувај слика" на долг притисок (iOS).
   Десниот клик го блокира js/ui.js, со истиот список селектори. */
.frame img,
.hero-slider img,
.lightbox__img,
.about-hero__portrait img {
  -webkit-user-drag: none;
  -webkit-touch-callout: none;
  user-select: none;
}

/* -----------------------------------------------------------------------------
   КАРТИЧКИ
   -------------------------------------------------------------------------- */
/* Бојата живее во површината за сликата, не зад текстот.
   Порано целата картичка беше заситена боја со ситен текст врз неа — истата
   палета, но многу помирна и почитлива вака. */
.card {
  display: flex;
  flex-direction: column;
  background: #FFFFFF;
  color: var(--ink);
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  text-decoration: none;
  transition:
    transform var(--dur-base) var(--ease-out),
    box-shadow var(--dur-base) var(--ease-out);
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }

/* Тенка лента од бојата на картичката, за да остане обележана */
.card__media { position: relative; border-bottom: 4px solid var(--tone-bg, transparent); }
.card__body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: var(--space-5) var(--space-5) var(--space-6);
}
.card__title { margin-bottom: var(--space-2); font-size: var(--fs-h3); }
.card__text { margin: 0; color: var(--ink-muted); }

/* Целата картичка е кликлива, но насловот останува вистински <h3>.
   Линкот се растегнува преку целата картичка со ::after — тап-целта е цела
   картичка, а структурата на насловите останува исправна. */
.card { position: relative; }

.card__more {
  margin: auto 0 0;
  padding-top: var(--space-5);
}
.card__more a {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  min-height: 44px;
  font-weight: 700;
  color: var(--text-purple);
  text-decoration: none;
}
.card__more a::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
}
.card:hover .card__more .btn__arrow { transform: translateX(3px); }

/* Фокусниот прстен мора да ја обележи ЦЕЛАТА картичка, не ситниот линк —
   инаку изгледа како прстенот да лебди без причина. */
.card:focus-within { outline: 3px solid var(--text-purple); outline-offset: 2px; }
.card__more a:focus-visible { outline: none; }

/* Цитат картичка за рецензии */
.quote {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  padding: var(--space-6);
  background: var(--bg);
  color: var(--ink);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
  transition: transform var(--dur-base) var(--ease-out), box-shadow var(--dur-base) var(--ease-out);
}
.quote:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.quote__mark {
  font-family: var(--font-display);
  font-size: 1.8rem;
  line-height: 0.7;
  /* Затемнетата корална, не fill-коралната: #E87153 на крем е 2.84:1. */
  color: var(--text-coral);
}
/* white-space: pre-line — некои вистински рецензии се напишани во повеќе
   параграфи (празен ред меѓу нив); без ова секоја празнина би се стопила во
   еден проред и текстот би излегол како едно нечитливо ѕидче. */
.quote__text { flex: 1; margin: 0; font-size: var(--fs-lead); white-space: pre-line; }
.quote__foot { display: flex; align-items: baseline; gap: var(--space-2); flex-wrap: wrap; }
.quote__name { font-weight: 700; }
.quote__source { font-size: var(--fs-small); color: var(--ink-muted); }

.quote__flag {
  align-self: flex-start;
  padding: 2px var(--space-2);
  border-radius: var(--r-sm);
  background: var(--fill-yellow);
  color: var(--on-fill-dark);
  font-size: 0.8125rem;
  font-weight: 700;
}

/* -----------------------------------------------------------------------------
   ФИЛТЕР ЧИПОВИ
   -------------------------------------------------------------------------- */
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}
.chip {
  min-height: 44px;
  padding: var(--space-2) var(--space-5);
  border-radius: var(--r-pill);
  background: transparent;
  color: var(--ink);
  font-weight: 600;
  font-size: var(--fs-small);
  box-shadow: inset 0 0 0 2px var(--line-strong);
  transition:
    background-color var(--dur-fast) var(--ease-out),
    color var(--dur-fast) var(--ease-out),
    box-shadow var(--dur-fast) var(--ease-out),
    transform var(--dur-fast) var(--ease-out);
}
.chip:hover { background: var(--fill-cream-deep); }
.chip:active { transform: scale(0.97); transition-duration: var(--dur-press); }
.chip[aria-pressed="true"] {
  background: var(--fill-purple);
  color: #fff;
  box-shadow: inset 0 0 0 2px var(--fill-purple);
}

/* -----------------------------------------------------------------------------
   LIGHTBOX
   -------------------------------------------------------------------------- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: var(--z-lightbox);
  display: grid;
  /* minmax(0, 1fr), не 1fr: обичното 1fr = minmax(auto, 1fr), па редот со
     сликата растеше до полната висина на портретна фотографија и ја туркаше
     под лентата со стрелки (сликата излегуваше „полукропната"). Со minmax(0,…)
     редот останува ограничен на екранот и max-height:100% на сликата важи. */
  grid-template-rows: auto minmax(0, 1fr) auto;
  padding: var(--space-4);
  background: rgba(30, 22, 38, 0.94);
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--dur-base) var(--ease-out), visibility 0s linear var(--dur-base);
}
.lightbox.is-open {
  opacity: 1;
  visibility: visible;
  transition: opacity var(--dur-base) var(--ease-out), visibility 0s;
}

.lightbox__bar { display: flex; justify-content: flex-end; }

.lightbox__stage {
  /* flex, не grid: кај grid, единствениот имплицитен ред е `auto` и растеше
     до полната висина на сликата, па max-height:100% на сликата се мереше
     според тој преголем ред. Кај flex со дефинирана висина, max-height:100%
     на сликата важи спрема самиот stage. */
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 0;
  overflow: hidden;
  padding: var(--space-2);
  position: relative;   /* основа за .lightbox__mark (воден жиг) */
}
.lightbox__img {
  max-width: min(100%, 1100px);
  max-height: 100%;
  width: auto;
  height: auto;
  border-radius: var(--r-md);
  opacity: 0;
  transform: scale(0.96);
}
.lightbox.is-open .lightbox__img {
  opacity: 1;
  transform: none;
  transition: opacity 250ms var(--ease-out), transform 250ms var(--ease-out);
}

.lightbox__foot {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-4);
  color: #fff;
}
.lightbox__count { font-variant-numeric: tabular-nums; font-size: var(--fs-small); opacity: 0.7; }

.lightbox__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px; height: 48px;
  border-radius: var(--r-pill);
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  font-size: 1.35rem;
  line-height: 1;
  transition: background-color var(--dur-fast) var(--ease-out), transform var(--dur-fast) var(--ease-out);
}
.lightbox__btn:hover { background: rgba(255, 255, 255, 0.26); }
.lightbox__btn:active { transform: scale(0.94); }
.lightbox__btn:focus-visible { outline-color: #fff; }

body.is-locked { overflow: hidden; }

/* -----------------------------------------------------------------------------
   ФУТЕР
   -------------------------------------------------------------------------- */
.site-footer {
  background: var(--fill-purple);
  color: #fff;
  padding-block: var(--space-8) var(--space-6);
}
.site-footer a { color: #fff; }

.footer__grid {
  display: grid;
  gap: var(--space-7);
  grid-template-columns: 1fr;
}
@media (min-width: 760px) {
  .footer__grid { grid-template-columns: 1.4fr 1fr 1fr; gap: var(--space-6); }
}

.footer__logo {
  width: 130px;
  background: var(--bg);
  padding: var(--space-3);
  border-radius: var(--r-md);
}

.footer__title {
  margin: 0 0 var(--space-3);
  font-family: var(--font-body);
  font-size: var(--fs-small);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  opacity: 0.72;
}

.footer__list { display: flex; flex-direction: column; gap: 2px; }
.footer__list a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  text-decoration: none;
  opacity: 0.92;
  transition: opacity var(--dur-fast) var(--ease-out);
}
.footer__list a:hover { opacity: 1; text-decoration: underline; }

.footer__bottom {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3) var(--space-5);
  align-items: center;
  justify-content: space-between;
  margin-top: var(--space-7);
  padding-top: var(--space-5);
  border-top: 1px solid rgba(255, 255, 255, 0.22);
  font-size: var(--fs-small);
  opacity: 0.8;
}

/* Правни линкови во долниот ред на футерот.
   Тап-целта мора да остане 44px и тука, инаку линковите се најтешките за
   погодување на целиот сајт. */
.footer__legal {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2);
  margin: 0;
}
.footer__legal a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  opacity: 0.92;
}
.footer__legal a:hover { opacity: 1; }
/* 0.8, не помалку: на 0.6 точката паѓа на 3.51:1 наспроти виолетовата. */
.footer__legal span { opacity: 0.8; }

/* Изјава за авторско право: цела ширина под долниот ред, иста големина и
   тон како него. */
.footer__copyright {
  margin: var(--space-4) 0 0;
  font-size: var(--fs-small);
  opacity: 0.8;
}

/* Кружни иконки за социјални мрежи */
.social { display: flex; gap: var(--space-2); }
.social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px; height: 44px;
  border-radius: var(--r-pill);
  background: rgba(255, 255, 255, 0.14);
  transition: background-color var(--dur-fast) var(--ease-out), transform var(--dur-fast) var(--ease-out);
}
.social a:hover { background: rgba(255, 255, 255, 0.26); transform: translateY(-1px); }
.social svg { width: 20px; height: 20px; }
