/* =====================================================================
   TERRA ARHITEKTURA – slogi
   Črno-bela, minimalistična postavitev: fiksen levi stolpec z menijem,
   vsebina desno. Pod 992 px zgornja vrstica + meni čez cel zaslon.
   ===================================================================== */

:root {
  --bg: #ffffff;
  --ink: #111111;
  --muted: #9a9a9a;
  --soft: #ececea;
  --line: #111111;
  --serif: "Newsreader", Georgia, "Times New Roman", serif;
  --sans: "Jost", "Helvetica Neue", Arial, sans-serif;
  --side: 300px;
  --ease: cubic-bezier(0.51, 0.01, 0, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; height: 100%; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 400;
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; margin: 0; padding: 0; }
h1, h2, h3, p { margin: 0; font-weight: 400; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
:focus-visible { outline: 1px solid var(--ink); outline-offset: 3px; }

/* ---------------- BRAND ---------------- */
.brand { display: inline-flex; align-items: flex-end; gap: 14px; color: var(--ink); }
.brand-mark { width: 34px; height: 45px; flex: none; fill: currentColor; }
.brand-mark text { font-family: var(--sans); font-weight: 400; }
.brand-text { display: flex; flex-direction: column; line-height: 1; padding-bottom: 1px; }
.brand-name { font-family: var(--serif); font-size: 20px; font-weight: 400; letter-spacing: .6px; }
.brand-sub { margin-top: 6px; font-size: 10px; letter-spacing: 2.2px; text-transform: uppercase; color: var(--muted); }

/* ---------------- SIDEBAR (namizje) ---------------- */
.sidebar {
  position: fixed; z-index: 50;
  top: 30px; bottom: 34px; left: 36px;
  width: calc(var(--side) - 60px);
  display: flex; flex-direction: column;
}
.sidebar nav { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.sidebar .brand { padding-bottom: 22px; border-bottom: 1px solid var(--line); margin-bottom: 26px; }

.nav-main { font-family: var(--serif); font-size: 16px; letter-spacing: 0.3px; line-height: 1.45; }
.nav-main a { color: var(--muted); transition: color .25s; }
.nav-main a:hover, .nav-main a.is-active { color: var(--ink); }
.nav-main > li + li { margin-top: 10px; }
.nav-main ul { padding: 4px 0 2px 16px; font-size: 14.5px; }

.nav-second { margin-top: auto; font-size: 12px; letter-spacing: 1.6px; text-transform: uppercase; line-height: 2; }
.nav-second a { color: var(--muted); transition: color .25s; }
.nav-second a:hover, .nav-second a.is-active { color: var(--ink); }
.nav-second .nav-group { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--soft); }

/* ---------------- TOPBAR + MENI (mobilno) ---------------- */
.topbar { display: none; }
.mobile-menu { display: none; }

/* ---------------- VSEBINA ---------------- */
.content { margin-left: var(--side); min-height: 100vh; padding: 30px 40px 60px; }
.page-text { display: flex; align-items: center; min-height: calc(100vh - 90px); }
.helper { width: 560px; max-width: 100%; }
.helper.wide { width: 820px; }

h2.page-title { font-family: var(--serif); font-size: 30px; font-weight: 400; letter-spacing: .3px; line-height: 1.2; margin-bottom: 1.4em; }
.lead { font-family: var(--serif); font-size: 19px; line-height: 1.45; margin-bottom: 1.2em; }
.helper p + p { margin-top: 1em; }
.helper a.link { border-bottom: 1px solid currentColor; padding-bottom: 1px; }
.helper a.link:hover { color: var(--muted); }
.small-caps { font-size: 11px; letter-spacing: 2px; text-transform: uppercase; color: var(--muted); }

/* storitve */
.service-list { border-top: 1px solid var(--line); margin-top: 10px; }
.service-list li { display: grid; grid-template-columns: 60px 1fr; gap: 0 20px; padding: 22px 0; border-bottom: 1px solid var(--soft); }
.service-list .num { font-size: 12px; letter-spacing: 2px; color: var(--muted); padding-top: 6px; }
.service-list h3 { font-family: var(--serif); font-size: 19px; font-weight: 400; letter-spacing: .2px; margin-bottom: 4px; }
.service-list p { color: #444; }

/* kontakt */
.contact-grid { display: grid; grid-template-columns: 1fr 1.25fr; gap: 70px; align-items: start; }
.contact-data p { margin-bottom: 1.1em; }
.contact-data strong { font-weight: 500; }
.contact-data a:hover { color: var(--muted); }
.form-field { margin-bottom: 22px; }
.form-field label { display: block; font-size: 11px; letter-spacing: 2px; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; }
.form-field input, .form-field textarea {
  width: 100%; border: 0; border-bottom: 1px solid #cfcfcf; background: transparent;
  font: inherit; color: var(--ink); padding: 6px 0; border-radius: 0; outline: none; transition: border-color .2s;
}
.form-field textarea { min-height: 120px; resize: vertical; }
.form-field input:focus, .form-field textarea:focus { border-bottom-color: var(--ink); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 28px; }
.btn {
  display: inline-block; border: 1px solid var(--ink); padding: 12px 34px;
  font-size: 12px; letter-spacing: 2.4px; text-transform: uppercase; transition: background .25s, color .25s;
}
.btn:hover { background: var(--ink); color: #fff; }
.btn[disabled] { opacity: .5; pointer-events: none; }
.form-msg { margin-top: 14px; min-height: 1.6em; font-size: 14px; }
.form-msg.ok { color: var(--ink); }
.form-msg.err { color: #9b1c1c; }
.recaptcha-note { margin-top: 18px; font-size: 11px; color: var(--muted); line-height: 1.5; }
.recaptcha-note a { text-decoration: underline; }
/* Googlov plavajoči znak reCAPTCHA skrijemo; obvestilo pod obrazcem je po Googlovih pravilih dovolj. */
.grecaptcha-badge { visibility: hidden !important; }

/* ---------------- ZAČETNA STRAN ---------------- */
body.home { overflow: hidden; cursor: pointer; }
.home-slides { position: fixed; inset: 0; background: var(--bg); }
.home-slide { position: absolute; inset: 0; opacity: 0; transition: opacity 1.2s ease; }
.home-slide.is-active { opacity: 1; }
.home-slide img { width: 100%; height: 100%; object-fit: cover; }
.home-slide.contain img { object-fit: contain; padding: 6vh 6vw; }
.home .brand-fixed { position: fixed; z-index: 10; top: 30px; left: 36px; transition: color .6s; }
.home .home-enter {
  position: fixed; z-index: 10; right: 36px; bottom: 30px;
  font-size: 12px; letter-spacing: 2.4px; text-transform: uppercase; transition: color .6s;
}
.home .home-enter span { display: inline-block; transition: transform .4s var(--ease); }
.home .home-enter:hover span { transform: translateX(6px); }
.home-slides::after { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity 1.2s ease;
  background: linear-gradient(180deg, rgba(0,0,0,.32) 0, rgba(0,0,0,0) 22%, rgba(0,0,0,0) 80%, rgba(0,0,0,.28) 100%); }
body.home.tema-svetla .home-slides::after { opacity: 1; }
body.home.tema-svetla .brand-fixed, body.home.tema-svetla .home-enter { color: #fff; }
body.home.tema-svetla .brand-sub { color: rgba(255,255,255,.75); }

/* ---------------- PROJEKTI ---------------- */
body.projects { overflow: hidden; }
.pf-list {
  position: fixed; top: 0; bottom: 0; left: var(--side); right: 0;
  overflow-y: auto; scroll-snap-type: y mandatory; scrollbar-width: none;
}
.pf-list::-webkit-scrollbar { display: none; }
.pf-project { position: relative; height: 100vh; scroll-snap-align: start; scroll-snap-stop: always; }
.pf-track {
  position: absolute; top: 34px; bottom: 34px; left: 0; right: 340px;
  display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth;
  scrollbar-width: none;
}
.pf-track::-webkit-scrollbar { display: none; }
.pf-slide { flex: 0 0 100%; height: 100%; scroll-snap-align: start; }
.pf-slide img { width: 100%; height: 100%; object-fit: contain; user-select: none; -webkit-user-drag: none; }

.pf-track.c-prev { cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='40'%3E%3Cpath d='M25 6 11 20l14 14' fill='none' stroke='%23fff' stroke-width='4'/%3E%3Cpath d='M25 6 11 20l14 14' fill='none' stroke='%23111' stroke-width='1.5'/%3E%3C/svg%3E") 20 20, w-resize; }
.pf-track.c-next { cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='40'%3E%3Cpath d='M15 6l14 14-14 14' fill='none' stroke='%23fff' stroke-width='4'/%3E%3Cpath d='M15 6l14 14-14 14' fill='none' stroke='%23111' stroke-width='1.5'/%3E%3C/svg%3E") 20 20, e-resize; }
.pf-track.c-up { cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='40'%3E%3Cpath d='M6 25 20 11l14 14' fill='none' stroke='%23fff' stroke-width='4'/%3E%3Cpath d='M6 25 20 11l14 14' fill='none' stroke='%23111' stroke-width='1.5'/%3E%3C/svg%3E") 20 20, n-resize; }
.pf-track.c-down { cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='40'%3E%3Cpath d='M6 15l14 14 14-14' fill='none' stroke='%23fff' stroke-width='4'/%3E%3Cpath d='M6 15l14 14 14-14' fill='none' stroke='%23111' stroke-width='1.5'/%3E%3C/svg%3E") 20 20, s-resize; }

.pf-info { position: absolute; right: 40px; bottom: 34px; width: 260px; }
.pf-back { display: inline-block; margin-bottom: 22px; font-size: 11px; letter-spacing: 1.8px; text-transform: uppercase; color: var(--muted); transition: color .25s; }
.pf-back:hover { color: var(--ink); }
.pf-title { font-family: var(--serif); font-size: 23px; font-weight: 400; line-height: 1.2; letter-spacing: .2px; }
.pf-meta { margin-top: 8px; font-size: 12px; letter-spacing: 1.6px; text-transform: uppercase; color: var(--muted); }
.pf-bottom { display: flex; justify-content: space-between; align-items: baseline; margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--line); font-size: 12px; letter-spacing: 1.6px; text-transform: uppercase; }
.pf-desc { margin-top: 16px; font-size: 14px; line-height: 1.65; color: #444; }
.pf-desc + .pf-dots { margin-top: 18px; }
.pf-empty { position: fixed; left: var(--side); right: 0; top: 0; bottom: 0; display: flex; align-items: center; padding: 40px; font-family: var(--serif); font-size: 19px; color: var(--muted); }
.pf-dots { display: none; }

/* ---------------- ARHIV ---------------- */
.archive-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 12px 30px; margin: 30px 0 34px; }
.archive-filter { display: flex; flex-wrap: wrap; gap: 6px 22px; font-size: 12px; letter-spacing: 1.6px; text-transform: uppercase; }
.archive-filter a { color: var(--muted); }
.archive-filter a:hover, .archive-filter a.is-active { color: var(--ink); }
.archive-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 380px), 1fr)); gap: 56px 32px; }
.archive-item { display: block; }
.archive-item .thumb { aspect-ratio: 3 / 2; overflow: hidden; background: var(--soft); }
/* seznam projektov: sivinsko, ob prehodu z miško v barvah */
.archive-item img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(1) contrast(1.02); transition: transform 1.4s var(--ease), filter .8s ease; }
.archive-item:hover img, .archive-item:focus-visible img, .archive-item.v-barvah img { filter: grayscale(0); transform: scale(1.03); }
.archive-item .title { transition: color .3s; }
.archive-item:hover .title { color: var(--muted); }
.archive-item .title { margin-top: 12px; font-family: var(--serif); font-size: 17px; font-weight: 400; letter-spacing: .2px; line-height: 1.2; }
.archive-item .meta { margin-top: 3px; font-size: 11px; letter-spacing: 1.6px; text-transform: uppercase; color: var(--muted); }

/* ---------------- NALAGANJE ---------------- */
.fade-in { animation: fadeIn 1s var(--ease) both; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* =====================================================================
   TABLICA IN TELEFON (< 992 px)
   ===================================================================== */
@media (max-width: 991.98px) {
  :root { --side: 0px; }
  .sidebar { display: none; }

  .topbar {
    display: flex; align-items: center; justify-content: space-between;
    position: fixed; z-index: 60; top: 0; left: 0; right: 0; height: 74px;
    padding: 0 20px; background: var(--bg); border-bottom: 1px solid var(--soft);
  }
  .topbar .brand-mark { width: 27px; height: 36px; }
  .topbar .brand-name { font-size: 18px; }
  .topbar .brand-sub { font-size: 9px; margin-top: 5px; }
  .menu-btn { font-size: 12px; letter-spacing: 2.2px; text-transform: uppercase; padding: 10px 0 10px 12px; }

  .mobile-menu {
    display: flex; flex-direction: column; position: fixed; z-index: 55; inset: 74px 0 0 0;
    padding: 30px 20px 40px; background: var(--bg); overflow-y: auto;
    opacity: 0; visibility: hidden; transform: translateY(-8px);
    transition: opacity .35s, transform .35s var(--ease), visibility 0s .35s;
  }
  body.menu-open { overflow: hidden; }
  body.menu-open .mobile-menu { opacity: 1; visibility: visible; transform: none; transition: opacity .35s, transform .35s var(--ease); }
  .mobile-menu .nav-main { font-size: 23px; }
  .mobile-menu .nav-main ul { font-size: 18px; }
  .mobile-menu .nav-second { margin-top: 36px; font-size: 13px; line-height: 2.3; }

  .content { margin-left: 0; padding: 104px 20px 60px; }
  .page-text { min-height: calc(100vh - 164px); align-items: flex-start; }
  h2.page-title { font-size: 26px; }
  .lead { font-size: 18px; }
  .contact-grid { grid-template-columns: 1fr; gap: 44px; }
  .archive-grid { grid-template-columns: repeat(2, 1fr); gap: 44px 20px; }

  /* začetna */
  .home .brand-fixed { top: 22px; left: 20px; }
  .home .home-enter { right: 20px; bottom: 22px; }
  .home-slide.contain img { padding: 90px 8vw 70px; }

  /* projekti: navaden pomik strani, drsnik s prstom */
  body.projects { overflow: auto; }
  .pf-list { position: static; overflow: visible; scroll-snap-type: none; padding: 74px 0 40px; }
  .pf-project { height: auto; padding: 20px 20px 34px; scroll-margin-top: 74px; }
  .pf-track { position: relative; top: auto; bottom: auto; left: auto; right: auto; aspect-ratio: 3 / 2; cursor: auto !important; }
  .pf-back { margin-bottom: 14px; }
  .pf-info { position: static; width: auto; margin-top: 16px; }
  .pf-title { font-size: 21px; }
  .pf-dots { display: flex; gap: 6px; margin-top: 10px; }
  .pf-dots span { width: 6px; height: 6px; border-radius: 50%; border: 1px solid var(--ink); transition: background .3s; }
  .pf-dots span.on { background: var(--ink); }
  .pf-empty { position: static; padding: 120px 20px 40px; }
}

@media (max-width: 575.98px) {
  body { font-size: 15px; }
  .form-row { grid-template-columns: 1fr; }
  .service-list li { grid-template-columns: 40px 1fr; gap: 0 12px; }
  .archive-grid { grid-template-columns: 1fr; gap: 40px; }
  .pf-track { aspect-ratio: 3 / 2; }
}
@media (max-width: 359.98px) {
  .topbar .brand-sub { display: none; }
}
