/*
Theme Name: Kvaternik Atelier
Theme URI: https://kvaternik.medico-home.hr
Author: Medico Home
Description: Posebna, urednička WordPress tema za Orguljarstvo Kvaternik.
Version: 1.0.0
Text Domain: kvaternik
*/

:root {
  --ink: #191916;
  --paper: #f2eee4;
  --paper-deep: #e3dccd;
  --wood: #9d3f2f;
  --wood-dark: #64271f;
  --brass: #c6a05d;
  --line: rgba(25, 25, 22, .18);
  --white: #fffdf7;
  --max: 1440px;
}

@font-face {
  font-family: "Kvaternik Sans";
  src: url("assets/fonts/Inter-Variable.woff2") format("woff2");
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
}

@font-face {
  font-family: "Kvaternik Serif";
  src: url("assets/fonts/Cardo-Regular.woff2") format("woff2");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Kvaternik Serif";
  src: url("assets/fonts/Cardo-Italic.woff2") format("woff2");
  font-style: italic;
  font-weight: 400;
  font-display: swap;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: "Kvaternik Sans", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.65;
  text-rendering: optimizeLegibility;
}
body.menu-open { overflow: hidden; }
a { color: inherit; }
img { display: block; width: 100%; height: auto; }
button, input, textarea { font: inherit; }

.skip-link {
  position: fixed;
  left: 16px;
  top: -100px;
  z-index: 100;
  padding: 12px 18px;
  background: var(--white);
  color: var(--ink);
}
.skip-link:focus { top: 16px; }

.site-header {
  position: absolute;
  inset: 0 0 auto;
  z-index: 20;
  display: grid;
  grid-template-columns: 210px 1fr auto;
  align-items: center;
  gap: 30px;
  max-width: var(--max);
  margin: 0 auto;
  padding: 22px 36px;
  color: var(--white);
}
.brand {
  display: inline-flex;
  align-items: center;
  width: 194px;
  text-decoration: none;
}
.brand img { max-height: 68px; object-fit: contain; object-position: left center; }
.site-nav { justify-self: end; }
.site-nav ul { display: flex; gap: 32px; margin: 0; padding: 0; list-style: none; }
.site-nav a {
  position: relative;
  padding: 8px 0;
  color: rgba(255,253,247,.84);
  font-size: 13px;
  font-weight: 650;
  letter-spacing: .12em;
  text-decoration: none;
  text-transform: uppercase;
}
.site-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 100%;
  bottom: 0;
  height: 1px;
  background: var(--brass);
  transition: right .25s ease;
}
.site-nav a:hover::after, .site-nav a:focus-visible::after { right: 0; }
.header-contact {
  padding: 11px 18px;
  border: 1px solid rgba(255,255,255,.35);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .08em;
  text-decoration: none;
  text-transform: uppercase;
  transition: background .2s ease, color .2s ease;
}
.header-contact:hover, .header-contact:focus-visible { background: var(--white); color: var(--ink); }
.menu-toggle {
  display: none;
  width: 48px;
  height: 48px;
  border: 1px solid rgba(255,255,255,.35);
  border-radius: 50%;
  color: white;
  background: transparent;
  cursor: pointer;
}

.hero {
  position: relative;
  min-height: 100svh;
  overflow: hidden;
  color: var(--white);
  background: #1b1b18;
}
.hero-media { position: absolute; inset: 0; }
.hero-media img { height: 100%; object-fit: cover; object-position: center 44%; filter: saturate(.72) contrast(1.08); }
.hero-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(18,16,14,.93) 0%, rgba(18,16,14,.68) 42%, rgba(18,16,14,.16) 74%),
    linear-gradient(0deg, rgba(18,16,14,.72) 0%, transparent 45%);
}
.hero-pipes {
  position: absolute;
  inset: 0 4vw auto auto;
  display: flex;
  align-items: flex-start;
  height: 73%;
  gap: clamp(7px, .85vw, 16px);
  opacity: .32;
  pointer-events: none;
}
.hero-pipes i {
  display: block;
  width: clamp(10px, 1.35vw, 24px);
  height: var(--h);
  border: 1px solid rgba(242,238,228,.7);
  border-top: 0;
  border-radius: 0 0 16px 16px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.18), transparent);
}
.hero-inner {
  position: relative;
  z-index: 2;
  display: flex;
  min-height: 100svh;
  max-width: var(--max);
  margin: 0 auto;
  padding: 178px 36px 78px;
  align-items: flex-end;
}
.hero-copy { width: min(820px, 72vw); }
.eyebrow {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 0 0 28px;
  font-size: 12px;
  font-weight: 750;
  letter-spacing: .2em;
  text-transform: uppercase;
}
.eyebrow::before { content: ""; width: 42px; height: 1px; background: currentColor; opacity: .72; }
.hero h1 {
  max-width: 780px;
  margin: 0;
  font-family: "Kvaternik Serif", Georgia, serif;
  font-size: clamp(58px, 8.4vw, 128px);
  font-weight: 400;
  line-height: .85;
  letter-spacing: -.055em;
}
.hero h1 em { color: var(--brass); font-weight: 400; }
.hero-lead {
  max-width: 570px;
  margin: 34px 0 0;
  color: rgba(255,253,247,.77);
  font-size: clamp(17px, 1.6vw, 22px);
  line-height: 1.55;
}
.hero-bottom {
  position: absolute;
  z-index: 3;
  right: 36px;
  bottom: 36px;
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .15em;
  text-transform: uppercase;
  writing-mode: vertical-rl;
}
.hero-bottom::after { content: ""; width: 1px; height: 50px; background: rgba(255,255,255,.45); }

.intro {
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(0, 1.4fr);
  gap: clamp(60px, 9vw, 150px);
  max-width: 1260px;
  margin: 0 auto;
  padding: clamp(90px, 12vw, 180px) 36px;
}
.section-number {
  display: block;
  margin-bottom: 28px;
  color: var(--wood);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .18em;
}
.intro-label h2, .services h2, .process h2, .contact h2 {
  margin: 0;
  font-family: "Kvaternik Serif", Georgia, serif;
  font-size: clamp(42px, 5.2vw, 78px);
  font-weight: 400;
  line-height: 1.02;
  letter-spacing: -.04em;
}
.intro-text p:first-child {
  margin-top: 0;
  font-family: "Kvaternik Serif", Georgia, serif;
  font-size: clamp(28px, 3vw, 44px);
  line-height: 1.22;
  letter-spacing: -.025em;
}
.intro-text p:last-child { max-width: 650px; color: #5b5851; }

.story-grid {
  display: grid;
  grid-template-columns: 1.08fr .92fr;
  min-height: 760px;
  color: var(--white);
  background: var(--ink);
}
.story-image { position: relative; min-height: 560px; overflow: hidden; }
.story-image img { height: 100%; object-fit: cover; filter: saturate(.7); transition: transform 1.2s cubic-bezier(.2,.7,.2,1); }
.story-grid:hover .story-image img { transform: scale(1.025); }
.story-credit {
  position: absolute;
  right: 16px;
  bottom: 14px;
  padding: 5px 8px;
  color: rgba(255,255,255,.78);
  background: rgba(25,25,22,.72);
  font-size: 9px;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.story-credit a { color: inherit; text-underline-offset: 2px; }
.story-copy {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: clamp(56px, 7vw, 110px);
  background:
    linear-gradient(rgba(255,255,255,.045) 1px, transparent 1px) 0 0 / 100% 72px,
    var(--ink);
}
.story-kicker { color: var(--brass); font-size: 12px; font-weight: 800; letter-spacing: .18em; text-transform: uppercase; }
.story-quote {
  max-width: 620px;
  margin: 70px 0;
  font-family: "Kvaternik Serif", Georgia, serif;
  font-size: clamp(38px, 4.3vw, 70px);
  line-height: 1.04;
  letter-spacing: -.035em;
}
.story-note { max-width: 480px; color: rgba(255,255,255,.62); }

.services { max-width: 1320px; margin: 0 auto; padding: clamp(90px, 12vw, 180px) 36px; }
.services-head { display: grid; grid-template-columns: 1fr 1fr; align-items: end; gap: 40px; margin-bottom: 80px; }
.services-head p { max-width: 510px; margin: 0 0 8px; color: #5b5851; }
.service-list { border-top: 1px solid var(--line); }
.service-item {
  position: relative;
  display: grid;
  grid-template-columns: 100px minmax(220px,.8fr) minmax(300px,1.2fr) 52px;
  gap: 30px;
  align-items: center;
  padding: 34px 0;
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}
.service-item::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--white);
  transform: translateX(-101%);
  transition: transform .45s cubic-bezier(.2,.75,.25,1);
}
.service-item:hover::before { transform: translateX(0); }
.service-no { color: var(--wood); font-size: 12px; font-weight: 800; letter-spacing: .15em; }
.service-item h3 { margin: 0; font-family: "Kvaternik Serif", Georgia, serif; font-size: clamp(30px, 3vw, 46px); font-weight: 400; }
.service-item p { margin: 0; color: #5b5851; }
.service-icon { width: 46px; height: 46px; border: 1px solid var(--line); border-radius: 50%; display: grid; place-items: center; }

.work-gallery {
  display: grid;
  grid-template-columns: 1.25fr .75fr;
  grid-template-rows: 360px 420px;
  gap: 12px;
  padding: 12px;
  background: var(--paper-deep);
}
.work-gallery figure { position: relative; overflow: hidden; margin: 0; }
.work-gallery figure:first-child { grid-row: 1 / 3; }
.work-gallery img { height: 100%; object-fit: cover; filter: saturate(.78) contrast(1.03); transition: transform .8s ease; }
.work-gallery figure:hover img { transform: scale(1.035); }
.work-gallery figcaption {
  position: absolute;
  right: 18px;
  bottom: 18px;
  padding: 7px 11px;
  background: rgba(25,25,22,.82);
  color: white;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.work-gallery .story-credit { right: auto; left: 18px; bottom: 18px; }

.process {
  display: grid;
  grid-template-columns: .9fr 1.1fr;
  gap: clamp(50px, 10vw, 160px);
  max-width: 1260px;
  margin: 0 auto;
  padding: clamp(100px, 13vw, 190px) 36px;
}
.process-copy { position: sticky; top: 50px; align-self: start; }
.process-copy p { max-width: 430px; margin-top: 30px; color: #5b5851; }
.steps { counter-reset: steps; }
.step {
  counter-increment: steps;
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 30px;
  padding: 0 0 58px;
}
.step:not(:last-child) { border-bottom: 1px solid var(--line); margin-bottom: 58px; }
.step::before { content: "0" counter(steps); color: var(--wood); font-size: 12px; font-weight: 800; letter-spacing: .12em; padding-top: 8px; }
.step h3 { margin: 0 0 12px; font-family: "Kvaternik Serif", Georgia, serif; font-size: 34px; font-weight: 400; }
.step p { margin: 0; color: #5b5851; }

.contact {
  position: relative;
  overflow: hidden;
  padding: clamp(90px, 11vw, 160px) 36px 42px;
  color: var(--white);
  background: var(--wood-dark);
}
.contact::after {
  content: "";
  position: absolute;
  right: -5%;
  bottom: -28%;
  width: min(54vw, 760px);
  aspect-ratio: 1;
  border: 1px solid rgba(255,255,255,.11);
  border-radius: 50%;
  box-shadow: 0 0 0 80px rgba(255,255,255,.025), 0 0 0 160px rgba(255,255,255,.018);
  pointer-events: none;
}
.contact-inner { position: relative; z-index: 1; max-width: 1320px; margin: 0 auto; }
.contact h2 { max-width: 930px; font-size: clamp(54px, 8vw, 116px); }
.contact h2 em { color: var(--brass); font-weight: 400; }
.contact-grid {
  display: grid;
  grid-template-columns: 1.2fr .8fr;
  gap: 60px;
  margin-top: 80px;
  padding-top: 32px;
  border-top: 1px solid rgba(255,255,255,.2);
}
.contact-links { display: flex; flex-wrap: wrap; gap: 12px; }
.contact-link {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  border: 1px solid rgba(255,255,255,.3);
  border-radius: 999px;
  text-decoration: none;
}
.contact-link:hover, .contact-link:focus-visible { background: var(--white); color: var(--wood-dark); }
.contact-address { color: rgba(255,255,255,.7); }
.contact-address strong { display: block; margin-bottom: 5px; color: white; }
.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 30px;
  max-width: 1320px;
  margin: 78px auto 0;
  padding-top: 28px;
  border-top: 1px solid rgba(255,255,255,.13);
  color: rgba(255,255,255,.48);
  font-size: 12px;
}

.reveal { opacity: 0; transform: translateY(26px); transition: opacity .75s ease, transform .75s ease; }
.reveal.visible { opacity: 1; transform: none; }

@media (max-width: 980px) {
  .site-header { grid-template-columns: 1fr auto; padding: 18px 22px; }
  .brand { width: 168px; }
  .header-contact { display: none; }
  .menu-toggle { display: grid; place-items: center; }
  .site-nav {
    position: fixed;
    inset: 0;
    z-index: -1;
    display: grid;
    place-items: center;
    background: rgba(25,25,22,.98);
    opacity: 0;
    visibility: hidden;
    transition: opacity .25s, visibility .25s;
  }
  .menu-open .site-nav { opacity: 1; visibility: visible; }
  .site-nav ul { flex-direction: column; align-items: center; gap: 18px; }
  .site-nav a { font-size: 22px; font-family: "Kvaternik Serif", Georgia, serif; letter-spacing: 0; text-transform: none; }
  .hero-inner { padding: 150px 22px 68px; }
  .hero-copy { width: min(720px, 88vw); }
  .hero-bottom { display: none; }
  .intro, .process { grid-template-columns: 1fr; padding-left: 22px; padding-right: 22px; }
  .story-grid { grid-template-columns: 1fr; }
  .story-image { min-height: 70vw; }
  .services { padding-left: 22px; padding-right: 22px; }
  .service-item { grid-template-columns: 56px 1fr 42px; }
  .service-item p { grid-column: 2 / 4; }
  .process-copy { position: static; }
  .contact-grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  body { font-size: 16px; }
  .brand { width: 150px; }
  .hero h1 { font-size: clamp(51px, 16.5vw, 78px); line-height: .9; }
  .hero-lead { max-width: 88%; }
  .hero-media img { object-position: 58% center; }
  .hero-media::after { background: linear-gradient(90deg, rgba(18,16,14,.9), rgba(18,16,14,.4)), linear-gradient(0deg, rgba(18,16,14,.85), transparent 55%); }
  .intro { gap: 44px; }
  .story-copy { padding: 54px 22px; }
  .services-head { grid-template-columns: 1fr; margin-bottom: 50px; }
  .service-item { grid-template-columns: 40px 1fr; gap: 16px; padding: 30px 0; }
  .service-item p { grid-column: 2; }
  .service-icon { display: none; }
  .work-gallery { grid-template-columns: 1fr; grid-template-rows: 78vh 48vh 48vh; }
  .work-gallery figure:first-child { grid-row: auto; }
  .step { grid-template-columns: 38px 1fr; gap: 14px; }
  .contact { padding-left: 22px; padding-right: 22px; }
  .contact-grid { margin-top: 52px; }
  .contact-link { width: 100%; justify-content: center; }
  .site-footer { flex-direction: column; }
}

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

/* Logo concept presentation */
.logo-lab { background: var(--paper); }
.logo-lab-hero {
  display: grid;
  align-items: end;
  min-height: 76vh;
  padding: 180px max(36px, calc((100vw - 1280px) / 2)) 90px;
  color: var(--white);
  background:
    repeating-linear-gradient(90deg, transparent 0 62px, rgba(255,255,255,.035) 62px 63px),
    var(--ink);
}
.logo-lab-hero > div { max-width: 980px; }
.logo-lab-hero h1 {
  margin: 0;
  font-family: "Kvaternik Serif", Georgia, serif;
  font-size: clamp(64px, 9vw, 126px);
  font-weight: 400;
  line-height: .9;
  letter-spacing: -.055em;
}
.logo-lab-hero p:last-child { max-width: 670px; margin: 34px 0 0; color: rgba(255,255,255,.65); font-size: 20px; }
.logo-concepts { max-width: 1280px; margin: 0 auto; padding: 80px 36px 150px; }
.logo-concept {
  display: grid;
  grid-template-columns: .72fr 1.28fr;
  gap: clamp(40px, 7vw, 110px);
  padding: 80px 0;
  border-bottom: 1px solid var(--line);
}
.logo-concept-info { position: relative; align-self: center; }
.logo-concept-info h2 {
  margin: 25px 0 18px;
  font-family: "Kvaternik Serif", Georgia, serif;
  font-size: clamp(44px, 5vw, 70px);
  font-weight: 400;
  line-height: 1;
  letter-spacing: -.04em;
}
.logo-concept-info p { max-width: 430px; color: #5b5851; }
.logo-tag { display: inline-flex; padding: 7px 11px; border: 1px solid var(--line); border-radius: 999px; color: var(--wood); font-size: 10px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.logo-board { overflow: hidden; border: 1px solid var(--line); background: #f8f5ed; }
.logo-lockup { display: flex; align-items: center; justify-content: center; gap: clamp(24px, 4vw, 56px); min-height: 430px; padding: 50px; }
.logo-lockup > img { width: clamp(128px, 15vw, 210px); }
.logo-wordmark { display: flex; flex-direction: column; }
.logo-wordmark strong { font-family: "Kvaternik Serif", Georgia, serif; font-size: clamp(42px, 5vw, 72px); font-weight: 400; line-height: .85; letter-spacing: -.04em; }
.logo-wordmark span { margin-top: 13px; font-size: 11px; font-weight: 750; letter-spacing: .38em; text-transform: uppercase; }
.logo-dark-test { display: grid; grid-template-columns: 72px 1fr auto; align-items: center; gap: 25px; min-height: 126px; padding: 22px 32px; color: var(--white); background: var(--ink); }
.logo-dark-test > img, .logo-size-test img { filter: invert(1); }
.logo-dark-test .logo-wordmark strong { font-size: 36px; }
.logo-dark-test .logo-wordmark span { margin-top: 8px; font-size: 8px; }
.logo-size-test { display: grid; width: 54px; height: 54px; place-items: center; border: 1px solid rgba(255,255,255,.16); }
.logo-size-test img { width: 30px; }
.logo-lab-note { padding: 120px max(36px, calc((100vw - 1000px) / 2)); color: white; background: var(--wood-dark); }
.logo-lab-note h2 { max-width: 780px; margin: 0; font-family: "Kvaternik Serif", Georgia, serif; font-size: clamp(48px, 7vw, 92px); font-weight: 400; line-height: 1; letter-spacing: -.045em; }
.logo-lab-note > p:not(.eyebrow) { max-width: 620px; margin: 28px 0; color: rgba(255,255,255,.68); }
.logo-lab-note a { display: inline-block; margin-top: 20px; font-weight: 700; text-underline-offset: 5px; }

@media (max-width: 850px) {
  .logo-lab-hero { min-height: 70vh; padding: 150px 22px 70px; }
  .logo-concepts { padding: 30px 22px 100px; }
  .logo-concept { grid-template-columns: 1fr; padding: 65px 0; }
  .logo-lockup { flex-direction: column; min-height: 430px; text-align: center; }
  .logo-dark-test { grid-template-columns: 58px 1fr auto; padding: 18px; gap: 14px; }
  .logo-dark-test > img { width: 58px; }
  .logo-dark-test .logo-wordmark strong { font-size: 29px; }
  .logo-lab-note { padding: 90px 22px; }
}

@media (max-width: 480px) {
  .logo-lockup { padding: 34px 20px; }
  .logo-wordmark strong { font-size: 48px; }
  .logo-dark-test .logo-wordmark span { letter-spacing: .18em; }
  .logo-size-test { display: none; }
  .logo-dark-test { grid-template-columns: 50px 1fr; }
}
