/*
  ==========================================================
  WALL INK STUDIO — STYLE (KNJIGA / POGLAVLJA)
  ----------------------------------------------------------
  TOC:
    00 — Global / tokens / reset
    01 — Header
    02 — Floating logo
    03 — Language UI states
    04 — Sekcije 1/2/3
    05 — Accordion
    06 — Footer
  ==========================================================
*/


/* ==========================================================
  POGLAVLJE 00: GLOBAL / TOKENS / RESET
========================================================== */
:root{
  /* Boje */
  --c-bg: #ffffff;
  --c-text: #0e1a2b;/* tamno plava */
  --c-muted: #6a6a6a;

  /* Tipografija */
  --ff-sans: "Nunito Sans", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;

  /* Skala (mobile-first) */
  --fs-body: 16px;
  --fs-title: 20px;
  --lh-body: 1.75;

  /* Spacing tokens */
  --sp-1: 6px;
  --sp-2: 10px;
  --sp-3: 14px;
  --sp-4: 18px;
  --sp-5: 24px;
  --sp-6: 32px;
  --sp-7: 48px;

  /* Header */
  --header-h: 44px;
  --header-pad-x: 18px;
  --tap: 46px;

  /* Floating logo */
  --logo-top: 18px;
  --logo-left: 18px;
  --logo-h: 85px; /* visina loga */
}

@media (min-width: 1024px){
  :root{
    --logo-h: 110px;
  }
}
*::before,
*::after { box-sizing: border-box; }

html, body { height: 100%; }

body{
  margin: 0;
  background: var(--c-bg);
  color: var(--c-text);
  font-family: var(--ff-sans);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  font-weight: 300;
  letter-spacing: 0.01em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a{ color: inherit; text-decoration: none; }
button{ font-family: inherit; }

.wis-main{
  min-height: 60vh;
}


/* ==========================================================
  POGLAVLJE 01: HEADER
========================================================== */

.wis-header{
  height: var(--header-h);
  width: 100%;
  background: transparent;

  /* ⬅️ KLJUČNO: header mora biti iznad floating loga */
  position: relative;
  z-index: 110;
}

.wis-header__inner{
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-left: var(--header-pad-x);
  padding-right: var(--header-pad-x);
}

.wis-header__left{
  width: 1px;
}

.wis-header__right{
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.wis-header__icon{
  width: var(--tap);
  height: var(--tap);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
}

.wis-header__icon svg{
  width: 20px;
  height: 20px;
  fill:rgba(14, 26, 43, 0,65);
  opacity: 1;
  transition: opacity 180ms ease, transform 180ms ease;

}

  .wis-header__icon:hover svg{
    opacity: 0.55;
    transform: scale(1.08);
}

/* ==========================================================
  POGLAVLJE 03: JEZIK UI (switch)
========================================================== */

.wis-lang{
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-left: 12px;
}

.wis-lang__btn{
  appearance: none;
  border: 0;
  background: transparent;
  padding: 0;
  height: var(--tap);
  min-width: 34px;

  font-size: 14px;
  letter-spacing: 0.08em;
  color: var(--c-text);
  opacity: 0.90;
  cursor: pointer;
  transition: opacity 180ms ease;
}

.wis-lang__sep{
  font-size: 13px;
  opacity: 0.25;
}

.wis-lang__btn[aria-pressed="true"]{
  opacity: 0.95;
  text-decoration: underline;
  text-underline-offset: 6px;
  text-decoration-thickness: 1px;
}

  .wis-lang__btn:hover{
    opacity: 0.95;
}


/* ==========================================================
  POGLAVLJE 02: FLOATING LOGO (signature artefakt)
========================================================== */

.wis-logo-artifact{
  position: fixed;
  top: var(--logo-top);
  left: var(--logo-left);
  z-index: 50;

  display: inline-block;
  width: auto;
  height: auto;

  cursor: default;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.wis-logo-artifact:focus{
  outline: none;
}

.wis-logo-artifact img{
  display: block;
  height: var(--logo-h);
  width: auto;
}



/* ==================== POGLAVLJE 04: SEKCIJE ==================== */

.wis-section{
  width: 100%;
  padding-bottom: clamp(1.25rem, 2.5vh, 2rem);
}

.wis-section__image{
  width: 100%;
  height: 62vh;
  min-height: 420px;
  background-color: #ffffff;

  /* ✅ DODANO: da se background slike prikazuju kako treba */
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;

  /* ✅ NOVO: start crno-bijelo */
  filter: grayscale(1);
  will-change: opacity, transform, filter;
}

/* ✅ DODANO: mapiranje slika po sekcijama (bez diranja HTML-a) */
.wis-section:nth-of-type(1) .wis-section__image{
  background-image: url("assets/img/section-1.webp");
}
.wis-section:nth-of-type(2) .wis-section__image{
  background-image: url("assets/img/section-2.webp");
}
.wis-section:nth-of-type(3) .wis-section__image{
  background-image: url("assets/img/section-3.webp");
}

.wis-section__content{
  max-width: 860px;
  margin: 0 auto;
  padding: 48px 18px 80px;
  text-align: center;
}

.wis-title{
  margin: 0 0 14px;
  font-size: 22px;
  font-weight: 300;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.wis-text{
  font-size: clamp(1.05rem, 1.6vw, 1.25rem);
  line-height: 1.65;
  color: rgba(14,26,43,0.80);
  letter-spacing: 0.02em;
  
}

/* Fade-in */
.wis-section__image,
.wis-title,
.wis-text{
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 1000ms ease, transform 1000ms ease, filter 3000ms ease; /* ✅ filter 4000ms */
}

/* prva sekcija brže (kao prije), ali filter isto 4000ms */
.wis-section:first-of-type .wis-section__image{
  transition: opacity 1000ms ease, transform 1000ms ease, filter 3500ms ease; /* ✅ */
}

.wis-section:first-of-type .wis-title,
.wis-section:first-of-type .wis-text{
  transition-duration: 600ms;
}

.wis-section.is-img .wis-section__image{
  opacity: 1;
  transform: translateY(0);
}

/* ✅ boja dolazi kad JS doda .is-color (threshold 0.9) */
.wis-section.is-color .wis-section__image{
  filter: grayscale(0);
}

.wis-section.is-content .wis-title{
  opacity: 1;
  transform: translateY(0);
  transition-delay: 120ms;
}

.wis-section.is-content .wis-text{
  opacity: 1;
  transform: translateY(0);
  transition-delay: 240ms;
}

@media (prefers-reduced-motion: reduce){
  .wis-section__image,
  .wis-title,
  .wis-text{
    opacity: 1;
    transform: none;
    transition: none;
  }

  .wis-section__image{
    filter: none;
  }
}

  /* Mobile – sekcija 1 viša slika */
.wis-section:nth-of-type(1) .wis-section__image{
  height: 73svh;
  min-height: 400px;
}

/* Mobile – sekcija 1: razmak između slike i teksta */
.wis-section:nth-of-type(1) .wis-section__content{
  padding-top: 20px; /* slobodno fino podešavaj */
}


/* ==================== POGLAVLJE 05: ACCORDION ==================== */

.wis-accordion{
  max-width: 980px;
  margin: 0 auto 150px;
  padding: 0 18px;
  text-align: center;

  opacity: 0;
  will-change: opacity;
}

.wis-accordion.is-acc-ready{
  transition: opacity 900ms ease;
}

.wis-accordion.is-acc-visible{
  opacity: 1;
}

/* ✅ Jedan jedini title stil (bez duplikata, bez ::after) */
.wis-acc-title{
  width: 100%;
  background: none;
  border: none;
  border-bottom: 1px solid rgba(14,26,43,0.22); /* tamno plava, ujednačeno */
  padding: 16px 0 22px;

  font-family: var(--ff-sans);
  font-size: 20px;
  font-weight: 300;
  text-transform: uppercase;
  letter-spacing: 0.12em;

  color: var(--c-text);
  cursor: pointer;
}

.wis-acc-panel{
  margin-bottom: 16px;
}

/* ✅ Ne mijenjamo boju linije kad je otvoreno -> nema “deblje” optike */
/* (Ako ikad poželiš naglasiti open, radije opacity na naslov, ne liniju) */

.wis-acc-panel{
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  padding-top: 10px;

  transition: max-height 1300ms ease, opacity 1050ms ease;
  will-change: max-height, opacity;
}

.wis-acc-panel p{
  margin: 0;
  font-size: 18px;
  line-height: 1.65;
  font-weight: 300;
  color: rgba(14,26,43,0.80);
  letter-spacing: 0.02em;
}

.wis-acc-title[aria-expanded="true"] + .wis-acc-panel{
  max-height: 2000px;
  opacity: 1;
}


@media (prefers-reduced-motion: reduce){
  .wis-accordion{
    opacity: 1;
    transition: none !important;
  }
  .wis-acc-panel{
    transition: none !important;
  }
}


/* ==========================================================
  POGLAVLJE 06: FOOTER (branded, minimal)
========================================================== */

.wis-footer{
  width: 100%;
  margin-top: 24px;
}

.wis-footer__inner{
  max-width: 980px;
  margin: 0 auto;
  padding: 0 18px 56px;
  text-align: center;
  font-size: 16.5px;
}

.wis-footer__line{
  width: 100%;
  height: 1px;
  background: rgba(10,20,40,0.22);
}

.wis-footer__line--top{
  margin: 0 0 30px;
}

.wis-footer__line--bottom{
  margin: 0 0 26px;
}

.wis-footer__signature{
  margin: 0 0 18px;
  font-size: 20px;
  font-style: italic;
  color: var(--c-text);
  letter-spacing: 0.02em;
}

.wis-footer__brand{
  margin: 0 0 26px;
  font-size: 17px;
  letter-spacing: 0.08em;
  color: var(--c-text);
  opacity: 0.85;
}

.wis-footer__grid{
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  align-items: center;
  justify-items: center;
  margin: 0 0 30px;
}

.wis-footer__col{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.wis-footer__dot{
  font-size: inherit;
  opacity: 1;
  color: var(--c-text);
}

.wis-footer__link{
  font-size: 18px;
  color: var(--c-text);
  opacity: 0.60;
  text-decoration: none;
  transition: opacity 220ms ease;
}

  .wis-footer__link:hover{
    opacity: 1;
}


.wis-footer__reserved{
  height: 38px;
}

@media (min-width: 900px){
  .wis-footer__grid{
    grid-template-columns: 1fr 1fr;
    justify-items: stretch;
  }
  .wis-footer__col{
    justify-content: center;
  }
}


/* ==========================================================
  LEGAL PAGES (impressum / datenschutz)
========================================================== */

.wis-legal{
  min-height: 100vh;
  background: var(--c-bg);
  color: #0f1a2b;
}

.wis-legal__inner{
  max-width: 860px;
  margin: 0 auto;
  padding: 46px 18px 80px;
}

.wis-legal__back{
  margin: 0 0 22px;
  font-size: 15px;
  letter-spacing: 0.05em;
}

.wis-legal__back a{
  color: #0f1a2b;
  opacity: 0.85;
  transition: opacity 280ms ease;
}

/* hover – uvijek aktivan */
.wis-legal__back a:hover{
  opacity: 1;
}

.wis-legal__title{
  margin: 0 0 22px;
  font-size: 30px;
  font-weight: 500;
  letter-spacing: 0.02em;
}

.wis-legal__content h2{
  margin: 28px 0 12px;
  font-size: 19px;
  font-weight: 500;
}

.wis-legal__content h3{
  margin: 20px 0 10px;
  font-size: 17px;
  font-weight: 500;
}

.wis-legal__content p,
.wis-legal__content li{
  font-size: 17px;
  line-height: 1.75;
  color: #0f1a2b;
  opacity: 0.95;
}

.wis-legal__content a{
  color: #0f1a2b;
  text-decoration: underline;
  text-underline-offset: 6px;
  text-decoration-thickness: 1px;
}

/* ==========================================================
  FORCE LANG VISIBILITY (MORA RADITI)
========================================================== */

[data-lang-block] { display: none !important; }
html[data-lang="de"] [data-lang-block="de"] { display: block !important; }
html[data-lang="en"] [data-lang-block="en"] { display: block !important; }

/* ==========================================================
   DESKTOP LAYOUT — PLAN A
   (NE DIRATI MOBILE, NE DIRATI JS, NE DIRATI HTML)
========================================================== */

@media (min-width: 1024px){

  /* ==================== DESKTOP SLIKE (override) ==================== */
  .wis-section:nth-of-type(1) .wis-section__image{
    background-image: url("assets/img/Section-1-desktop.webp");
  }
  .wis-section:nth-of-type(2) .wis-section__image{
    background-image: url("assets/img/section-2-desktop.webp");
  }
  .wis-section:nth-of-type(3) .wis-section__image{
    background-image: url("assets/img/section-3-desktop.webp");
  }

  /* ==================== OPĆE ==================== */

  .wis-section{
    padding-bottom: 175px;
  }

  .wis-section__content{
    max-width: 860px;
    padding: 56px 0 0;
  }

  .wis-title{
  font-size: clamp(26px, 2.1vw, 32px);
}

.wis-text{
  font-size: clamp(17px, 1.15vw, 19px);
}

  /* ==================== SEKCIJA 1 ==================== */
  /* Tekst gore, slika dolje */

  .wis-section:nth-of-type(1){
    display: grid;
    grid-template-areas:
      "content"
      "image";
    margin-top: 20px;
    row-gap: 45px;
  }

  .wis-section:nth-of-type(1) .wis-section__content{
    grid-area: content;
    padding-top: 0;
    margin-top: 0;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
  }

  .wis-section:nth-of-type(1) .wis-section__image{
    grid-area: image;
    height: 31vh;
    min-height: 335px;
    width: 100%;
    max-width: 1350px;
    margin-left: auto;
    margin-right: auto;
    margin-top: 0;
  }



  /* ==================== SEKCIJA 2 ==================== */
  /* Split layout: tekst lijevo, slika desno */

  .wis-section:nth-of-type(2){
    display: grid;
    align-items: center;
    gap: 64px;
    margin-left: auto;
    margin-right: auto;
    grid-template-columns: 50% 50%;
    max-width: 980px;
    margin-bottom: 40px;
  }

  .wis-section:nth-of-type(2){
    grid-template-areas: "content image";
  }

  .wis-section:nth-of-type(2) .wis-section__content{
    grid-area: content;
    padding: 0;
    text-align: center;
  }

  .wis-section:nth-of-type(2) .wis-section__image{
    grid-area: image;
    height: 48vh;
    min-height: 420px;
  }

  /* ==================== SEKCIJA 3 ==================== */
  /* Kao sekcija 1: slika gore, tekst dolje */

  .wis-section:nth-of-type(3){
    display: block;
    margin-left: auto;
    margin-right: auto;
  }

  .wis-section:nth-of-type(3) .wis-section__image{
    height: 58vh;
    min-height: 480px;
    max-width: 960px;
    margin: 0 auto;
  }

  .wis-section:nth-of-type(3) .wis-section__content{
    padding-top: 90px;
    padding-left: 0;
    padding-right: 0;
    text-align: center;
  }

  /* ==================== TIPOGRAFIJA (desktop finije) ==================== */

  .wis-title{
    font-weight: 380;
  }

  .wis-text{
    font-size: clamp(1.1rem, 1.45vw, 1.3rem);
    font-weight: 350;
  }

  /* ==================== HEADER (desktop) ==================== */

  :root{
    --header-h: 52px;
    --tap: 64px;
  }

  .wis-header__icon svg{
    width: 24px;
    height: 24px;
  }

  .wis-lang__btn{
    font-size: 18px;
  }

  .wis-lang__sep{
    font-size: 14.5px;
  }

  .wis-header__right{
    gap: 20px;
  }

  .wis-header__inner{
    padding-right: 55px;
  }

  /* ACCORDION – desktop: mrvicu veći font */
  .wis-acc-title{
    font-size: 26px; /* bilo ~20 */
    line-height: 1.35; /* drži razmake pod kontrolom */
  }

  .wis-acc-panel p{
    font-size: 20px; /* bilo ~17–18 */
    line-height: 1.65; /* malo kompaktnije */
  }

}

/* ===================== WIS: GALLERY (inline expand) ===================== */

.wis-gallery{
  max-width: 1100px;
  margin: 0 auto 150px;
  padding: 0 18px;
}

.wis-gallery__grid{
  display: grid;
  grid-template-columns: 1fr 1fr; /* 2+2 na mobile i desktop */
  gap: 18px;
  align-items: stretch;
}

.wis-gallery__item{
  position: relative;
  border: 0;
  padding: 0;
  background: transparent;
  cursor: pointer;

  border-radius: 0px;
  overflow: hidden;

  aspect-ratio: 4 / 3; /* MOBILE / default */
  background-image: var(--img);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;

  filter: grayscale(1);
  transition: filter 220ms ease;
}

.wis-gallery__item:focus-visible{
  outline: 2px solid rgba(14,26,43,0.35);
  outline-offset: 3px;
}

.wis-gallery__sr{
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0);
  white-space: nowrap; border: 0;
}

/* Desktop hover -> boja */
  .wis-gallery__item:hover{
    filter: grayscale(0);
}

/* OPEN state: inline expand (ne fullscreen) */
.wis-gallery__item.is-open{
  grid-column: 1 / -1; /* proširi se preko oba stupca */
  aspect-ratio: 4 / 3;
  filter: grayscale(0);
}

/* Mobile: kad je otvoreno, ostale malo "mute" */
.wis-gallery__grid.has-open .wis-gallery__item:not(.is-open){
  opacity: 0.55;
  transition: opacity 180ms ease;
}

/* Desktop click: otvorena slika u boji bez fade (instant) */
.wis-gallery__item.is-open.is-instant{
  transition: none;
  filter: grayscale(0);
}

/* ===================== DESKTOP FINETUNE ===================== */
@media (min-width: 1024px){

  /* željena širina na desktopu */
  .wis-gallery{
    max-width: 960px;
    margin-left: auto;
    margin-right: auto;

    padding-top: 30px;
    padding-bottom: 50px;
  }

  .wis-gallery__grid{
    gap: 22px;
  }

  /* duguljaste pločice na desktopu (manja visina) */
  .wis-gallery__item{
    aspect-ratio: 16 / 9;
  }

  /* (NAMJERNO) nema grid-auto-rows -> da aspect-ratio kontrolira visinu */
}