/* ============================================================
   JAKIVA studio — web · style.css
   Tokeny z design systemu v0.2 · jediný akcent = bronz
   Warm-paper editorial · Fraunces + Archivo · galerijní klid
   ============================================================ */

/* Archivo — self-hosted (latin + latin-ext), váhy 400/500/600 */
@font-face { font-family:"Archivo"; font-style:normal; font-weight:400; font-display:swap; src:url("../fonts/archivo-400-latin-ext.woff2") format("woff2"); unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family:"Archivo"; font-style:normal; font-weight:400; font-display:swap; src:url("../fonts/archivo-400-latin.woff2") format("woff2"); unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family:"Archivo"; font-style:normal; font-weight:500; font-display:swap; src:url("../fonts/archivo-500-latin-ext.woff2") format("woff2"); unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family:"Archivo"; font-style:normal; font-weight:500; font-display:swap; src:url("../fonts/archivo-500-latin.woff2") format("woff2"); unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family:"Archivo"; font-style:normal; font-weight:600; font-display:swap; src:url("../fonts/archivo-600-latin-ext.woff2") format("woff2"); unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family:"Archivo"; font-style:normal; font-weight:600; font-display:swap; src:url("../fonts/archivo-600-latin.woff2") format("woff2"); unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }

@font-face {
  font-family: "Fraunces";
  font-style: normal;
  font-weight: 100 900;
  font-stretch: 100%;
  font-display: swap;
  src: url("../fonts/Fraunces-VariableFont_SOFT_WONK_opsz_wght.ttf") format("truetype-variations");
}
@font-face {
  font-family: "Fraunces";
  font-style: italic;
  font-weight: 100 900;
  font-stretch: 100%;
  font-display: swap;
  src: url("../fonts/Fraunces-Italic-VariableFont_SOFT_WONK_opsz_wght.ttf") format("truetype-variations");
}

:root {
  /* warm light base */
  --bg:        #F6F2EA;
  --surface:   #FDFBF6;
  --surface-2: #EFEADF;
  --line:      #E2DCCF;
  --text:      #211D17;
  --muted:     #6F675B;
  --faint:     #A69D8E;

  /* single accent = bronze (per zadání §8) */
  --accent:      #9E7544;
  --accent-soft: rgba(158,117,68,.12);
  --accent-grad: linear-gradient(180deg, #A87E4C 0%, #8E6739 100%);

  /* type */
  --display: "Fraunces", Georgia, "Times New Roman", serif;
  --sans:    "Archivo", system-ui, -apple-system, sans-serif;

  /* spacing (4px base) */
  --s1:4px; --s2:8px; --s3:12px; --s4:16px; --s5:24px;
  --s6:32px; --s7:48px; --s8:64px; --s9:96px; --s10:128px;

  /* radii */
  --r-xs:4px; --r-sm:6px; --r-md:8px; --r-lg:10px; --r-pill:100px;

  /* elevation — whisper quiet */
  --shadow-sm: 0 1px 2px rgba(33,29,23,.05);
  --shadow-md: 0 8px 30px rgba(33,29,23,.07);

  --maxw: 1180px;
  --ease: cubic-bezier(.22,.61,.36,1);
}

/* ---------- reset ---------- */
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; }
a { color: inherit; }
::selection { background: var(--accent-soft); }

/* film-grain overlay */
body::after {
  content: "";
  position: fixed; inset: 0;
  pointer-events: none; z-index: 9999;
  opacity: .04; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- layout ---------- */
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--s5); }
.section { padding: var(--s9) 0; border-top: 1px solid var(--line); }

/* ---------- type roles ---------- */
.eyebrow {
  font-size: 12px; font-weight: 600; text-transform: uppercase;
  letter-spacing: .22em; color: var(--accent);
}
.display-xl {
  font-family: var(--display); font-weight: 300;
  font-size: clamp(3rem, 8vw, 6rem); line-height: .98;
  letter-spacing: -.02em; font-optical-sizing: auto;
}
.h-sec {
  font-family: var(--display); font-weight: 300;
  font-size: clamp(2rem, 5vw, 3.2rem); line-height: 1.06;
  letter-spacing: -.015em;
}
.lede {
  color: var(--muted); font-size: clamp(1.05rem, 2vw, 1.28rem);
  line-height: 1.5;
}
em.soft { font-style: italic; color: var(--muted); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px; cursor: pointer;
  font-family: var(--sans); font-weight: 600; font-size: 14px; letter-spacing: .02em;
  padding: 13px 26px; border-radius: var(--r-pill); text-decoration: none;
  border: 1px solid transparent; white-space: nowrap;
  transition: filter .2s, transform .2s, background .2s, border-color .2s, box-shadow .2s;
}
.btn-solid {
  background: var(--accent-grad); color: #fff;
  box-shadow: 0 1px 2px rgba(33,29,23,.10);
}
.btn-solid:hover { filter: brightness(1.06); transform: translateY(-1px); box-shadow: 0 6px 18px rgba(158,117,68,.24); }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--line); }
.btn-ghost:hover { background: var(--surface-2); border-color: var(--muted); }
.btn-ghost.on-dark { color: #fff; border-color: rgba(255,255,255,.45); }
.btn-ghost.on-dark:hover { background: rgba(255,255,255,.12); border-color: #fff; }

/* ---------- link arrow ---------- */
.link-arrow {
  color: var(--text); text-decoration: none; font-weight: 500;
  border-bottom: 1px solid var(--accent); padding-bottom: 2px;
  display: inline-block; transition: color .2s;
}
.link-arrow:hover { color: var(--accent); }
.link-arrow::after { content: " →"; }

/* ---------- tags ---------- */
.tag {
  font-size: 11.5px; letter-spacing: .06em; text-transform: uppercase;
  color: var(--muted); background: transparent; border: 1px solid var(--line);
  padding: 6px 14px; border-radius: var(--r-pill); user-select: none;
  display: inline-flex; align-items: center;
}
.tag.btn-like { cursor: pointer; transition: all .2s; }
.tag.btn-like:hover { background: var(--surface-2); }
.tag.active { color: var(--surface); background: var(--text); border-color: var(--text); }

/* ---------- render placeholder (no real imagery supplied) ---------- */
.slot {
  position: relative; width: 100%; overflow: hidden;
  background: var(--surface-2); border: 1px solid var(--line);
  border-radius: var(--r-md); display: flex; align-items: flex-end;
}
.slot::before {
  content: ""; position: absolute; inset: 0; opacity: .5;
  background-image: repeating-linear-gradient(135deg, transparent 0 18px, rgba(166,157,142,.10) 18px 19px);
}
.slot .slot-label {
  position: relative; padding: var(--s4) var(--s5);
  display: inline-flex; align-items: center; gap: 8px;
  color: var(--faint); font-size: 12px; letter-spacing: .1em; text-transform: uppercase;
}
.slot .slot-label svg { width: 14px; height: 14px; }

/* ---------- nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(246,242,234,.82); backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent; transition: border-color .3s;
}
.nav.scrolled { border-bottom-color: var(--line); }
.nav > .wrap { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand {
  font-family: var(--display); font-weight: 500; font-size: 20px;
  letter-spacing: .01em; text-decoration: none; color: var(--text);
}
.brand .dot { color: var(--accent); }
/* case study — poetický název projektu jako podtitul pod klíčovým H1 */
.cs-poetic { font-family: var(--display); font-weight: 300; font-style: italic; font-size: clamp(1.3rem, 2.6vw, 2rem); line-height: 1.1; letter-spacing: -.01em; color: var(--accent); margin-top: var(--s3); }
/* case study — textová sekce (sdílené; část stránek ji má i inline) */
.cs-section { display: grid; grid-template-columns: 64px 1fr; gap: var(--s5); max-width: 920px; margin: 0 0 var(--s9); }
.cs-section .sn { font-family: var(--display); font-size: 15px; color: var(--accent); padding-top: 6px; font-variant-numeric: tabular-nums; }
.cs-section h2 { font-family: var(--display); font-weight: 400; font-size: clamp(1.5rem,3vw,2rem); letter-spacing: -.01em; margin-bottom: var(--s4); }
.cs-section p { color: var(--muted); font-size: 16.5px; line-height: 1.7; max-width: none; margin-bottom: var(--s4); }
@media (max-width:760px){ .cs-section { grid-template-columns: 1fr; gap: var(--s2); } .cs-section .sn { padding-top: 0; } }
.nav-links { display: flex; gap: var(--s6); list-style: none; }
.nav-links a {
  color: var(--muted); text-decoration: none; font-size: 13px; letter-spacing: .04em;
  text-transform: uppercase; transition: color .2s;
}
.nav-links a:hover { color: var(--text); }
.nav-links a { position: relative; }
.nav-links a.active { color: var(--text); }
.nav-links a.active::after { content: ""; position: absolute; left: 0; right: 0; bottom: -5px; height: 1.5px; background: var(--accent); border-radius: 1px; }
.mobile-menu a.active { color: var(--accent); }
.burger { display: none; background: transparent; border: none; color: var(--text); cursor: pointer; padding: 4px; }
.burger svg { width: 24px; height: 24px; }
.mobile-menu { display: none; }
.mobile-menu.open { display: block; }
.mobile-menu ul { list-style: none; display: flex; flex-direction: column; gap: var(--s4); padding-bottom: var(--s5); }
.mobile-menu a { font-family: var(--display); font-size: 20px; text-decoration: none; color: var(--text); }

@media (max-width: 760px) {
  .nav-links { display: none; }
  .burger { display: inline-flex; }
}

/* ---------- reveal ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ---------- footer ---------- */
.footer { border-top: 1px solid var(--line); padding: var(--s8) 0; color: var(--faint); font-size: 13px; }
.footer .wrap { display: flex; justify-content: space-between; flex-wrap: wrap; gap: var(--s4); align-items: center; }
.footer .brand { font-size: 18px; }

/* ---------- back to top ---------- */
.to-top {
  position: fixed; right: clamp(16px, 3vw, 32px); bottom: clamp(16px, 3vw, 32px);
  z-index: 90; width: 52px; height: 52px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--accent-grad); color: #fff; text-decoration: none;
  box-shadow: 0 6px 20px rgba(158,117,68,.30);
  opacity: 0; visibility: hidden; transform: translateY(12px);
  transition: opacity .3s var(--ease), transform .3s var(--ease), visibility .3s, filter .2s;
}
.to-top.show { opacity: 1; visibility: visible; transform: none; }
.to-top:hover { filter: brightness(1.07); transform: translateY(-2px); }
.to-top svg { width: 22px; height: 22px; }
@media (prefers-reduced-motion: reduce) { .to-top { transition: opacity .3s, visibility .3s; } }

/* ---------- lightbox gallery ---------- */
[data-lightbox] { cursor: zoom-in; }
.lightbox {
  position: fixed; inset: 0; z-index: 1000; display: none;
  align-items: center; justify-content: center;
  background: rgba(18,14,10,.93); backdrop-filter: blur(4px);
  padding: clamp(16px, 4vw, 60px);
}
.lightbox.open { display: flex; }
.lightbox .lb-stage { margin: 0; display: flex; flex-direction: column; align-items: center; gap: var(--s4); max-width: 100%; }
.lightbox [data-lb-img] { max-width: 100%; max-height: 82vh; width: auto; height: auto; border-radius: var(--r-sm); box-shadow: 0 24px 70px rgba(0,0,0,.55); }
.lightbox [data-lb-cap] { color: rgba(251,248,241,.82); font-size: 14px; letter-spacing: .02em; text-align: center; max-width: 60ch; }
.lightbox button {
  position: absolute; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.25);
  color: #FBF8F1; width: 52px; height: 52px; border-radius: 50%; cursor: pointer;
  display: flex; align-items: center; justify-content: center; transition: background .2s, border-color .2s;
}
.lightbox button:hover { background: rgba(255,255,255,.18); border-color: #fff; }
.lightbox button svg { width: 22px; height: 22px; }
.lightbox .lb-close { top: clamp(14px,3vw,28px); right: clamp(14px,3vw,28px); }
.lightbox .lb-prev { left: clamp(12px,3vw,28px); top: 50%; transform: translateY(-50%); }
.lightbox .lb-next { right: clamp(12px,3vw,28px); top: 50%; transform: translateY(-50%); }
.lightbox .lb-count { position: absolute; bottom: clamp(14px,3vw,26px); left: 50%; transform: translateX(-50%); color: rgba(251,248,241,.6); font-size: 13px; letter-spacing: .12em; }
@media (max-width: 600px) {
  .lightbox button { width: 44px; height: 44px; }
  .lightbox .lb-prev { left: 8px; } .lightbox .lb-next { right: 8px; }
}
