/* ============================================================
   IMPASTORY — design system v2 "printed matter"
   Reference: liyakedar.com — papír + inkoust, obrazy dělají
   layout, UI je jen typografie a tenké linky.
   Paleta: teplý papír, ultramarínový inkoust (pigment olejomalby),
   rumělka jen jako drobný akcent.
   ============================================================ */

:root {
  --paper: #f1eee6;        /* teplý papír / plátno */
  --paper-2: #eae6dc;
  --ink: #1e3ab0;          /* ultramarín — inkoust všeho textu */
  --ink-soft: rgba(30, 58, 176, 0.6);
  --rule: rgba(30, 58, 176, 0.4);      /* tenké linky */
  --rule-strong: var(--ink);
  --vermilion: #c2442d;    /* rumělka — jen drobné akcenty */
  --grot: "Archivo", "Helvetica Neue", Helvetica, sans-serif;
  --serif: "Fraunces", Georgia, serif;
  --mono: "IBM Plex Mono", "SF Mono", Menlo, monospace;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--grot);
  font-size: 16px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}

img, svg { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
u, .u {
  text-decoration: underline;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 0.18em;
}

/* ---------- linky (rules) ---------- */

.rule { border: none; border-top: 1px solid var(--rule); }

/* ---------- header ---------- */

.masthead {
  position: sticky; top: 0; z-index: 100;
  background: var(--paper);
  display: flex; align-items: baseline; justify-content: space-between;
  padding: 14px 20px 10px;
  border-bottom: 1px solid var(--rule);
}
.logo {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 500;
  font-size: 1.3rem;
  letter-spacing: 0.01em;
  display: inline-flex;
  align-items: center;
  gap: 9px;
}
.logo .logo-mark { height: 21px; width: auto; }
.masthead nav { display: flex; gap: 28px; align-items: baseline; }
.masthead nav a {
  font-size: 0.78rem; font-weight: 500;
  letter-spacing: 0.14em; text-transform: uppercase;
}
.masthead nav a:hover { text-decoration: underline; text-underline-offset: 0.2em; }

.masthead .cart { font-weight: 600; }
.masthead .cart .count {
  font-family: var(--mono); font-weight: 400;
  font-size: 0.72rem; letter-spacing: 0;
}

/* ---------- statement (hero) ---------- */

.statement {
  padding: 34px 20px 40px;
}
.statement h1 {
  font-family: var(--grot);
  font-weight: 500;
  font-size: clamp(1.45rem, 3.4vw, 2.7rem);
  line-height: 1.22;
  letter-spacing: 0.005em;
  text-transform: uppercase;
  max-width: 26em;
}
.statement .aside {
  margin-top: 18px;
  font-family: var(--serif); font-style: italic;
  font-size: 1.02rem; color: var(--ink-soft);
}
.statement h1 a, .statement .aside a {
  text-decoration: underline;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 0.18em;
  transition: color 0.15s;
}
.statement h1 a:hover, .statement .aside a:hover { color: var(--vermilion); }

/* ---------- sloupcové stripy s obrazy ---------- */

.strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}
.strip + .strip { border-top: none; }

.col {
  display: flex; flex-direction: column;
  border-right: 1px solid var(--rule);
  min-width: 0;
}
.col:last-child { border-right: none; }

.col .art-stack {
  display: flex; flex-direction: column; gap: 0;
  flex: 1;
}
.col .art { border-radius: 0; }
.col .art.tall { height: 62vh; min-height: 380px; }
.col .art.short { height: 26vh; min-height: 160px; }
.col .art.fill { flex: 1; min-height: 380px; }

/* rovnoměrný stack — všechna díla kolekce pod sebou */
.art-stack.even .art {
  flex: 1 1 0; min-height: 0;
  border-bottom: 1px solid var(--rule);
}
.art-stack.even .art:last-child { border-bottom: none; }

/* štítek na sloupci kolekce */
.col .flag {
  position: absolute; top: 12px; left: 12px; z-index: 2;
  font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.14em;
  text-transform: uppercase;
  background: var(--paper); color: var(--ink);
  border: 1px solid var(--ink);
  padding: 6px 10px;
}

/* strip se třemi sloupci (related) */
.strip.three { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 900px) { .strip.three { grid-template-columns: 1fr; } }

/* kolekce "v ateliéru" — zatím neprodejná */
.caption .soon {
  font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.12em;
  color: var(--ink-soft); float: right;
}
.col.pending .art-stack { opacity: 0.55; filter: saturate(0.75); }

/* na hover obraz lehce "ožije" */
.col { position: relative; }
.col .art-stack { transition: opacity 0.25s; }
a.col:hover .art-stack { opacity: 0.92; }
a.col:hover .caption .title { text-decoration: underline; text-underline-offset: 0.2em; }

.caption {
  padding: 12px 14px 18px;
  border-top: 1px solid var(--rule);
  background: var(--paper);
}
.caption .title {
  font-size: 0.82rem; font-weight: 600;
  letter-spacing: 0.08em; text-transform: uppercase;
}
.caption .sub {
  font-size: 0.78rem; color: var(--ink-soft);
  margin-top: 1px;
}
.caption .tags {
  margin-top: 12px;
  font-family: var(--serif); font-style: italic;
  font-size: 0.82rem; color: var(--ink-soft);
}
.caption .price {
  font-family: var(--mono);
  font-size: 0.78rem;
  float: right;
}

/* ---------- placeholder "olejomalby" ----------
   Fáze 1: gradient + SVG turbulence textura místo renderů  */

.art {
  position: relative; overflow: hidden;
  background-size: cover;
}
.art::after {
  content: ""; position: absolute; inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='p'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.012 0.028' numOctaves='4' seed='7'/%3E%3CfeDiffuseLighting lighting-color='%23fff' surfaceScale='2.6'%3E%3CfeDistantLight azimuth='235' elevation='55'/%3E%3C/feDiffuseLighting%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23p)'/%3E%3C/svg%3E");
  background-size: 300px;
  mix-blend-mode: soft-light;
  opacity: 0.5;
  pointer-events: none;
}
.art::before {
  content: ""; position: absolute; inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='260' height='260'%3E%3Cfilter id='q'%3E%3CfeTurbulence type='turbulence' baseFrequency='0.05 0.012' numOctaves='3' seed='11'/%3E%3CfeDiffuseLighting lighting-color='%23fff' surfaceScale='1.8'%3E%3CfeDistantLight azimuth='120' elevation='60'/%3E%3C/feDiffuseLighting%3E%3C/filter%3E%3Crect width='260' height='260' filter='url(%23q)'/%3E%3C/svg%3E");
  background-size: 260px;
  mix-blend-mode: overlay;
  opacity: 0.28;
  pointer-events: none;
  z-index: 1;
}

/* reálná díla — bez fake textury, obraz mluví sám */
.art.real::before, .art.real::after { display: none; }
.art-lineup     { background-image: url("art/the-lineup.jpg"); background-position: center; }
.art-swimmer    { background-image: url("art/swimmer.jpg"); background-position: center; }
.art-basketball { background-image: url("art/basketball.jpg"); background-position: center; }
.art-golf       { background-image: url("art/golf.jpg"); background-position: center; }
.art-ski        { background-image: url("art/ski.jpg"); background-position: center; }
.art-cyclist    { background-image: url("art/cyclist.jpg"); background-position: center; }
.art-pf-guns    { background-image: url("art/pf-guns.jpg"); background-position: center; }
.art-pf-dance   { background-image: url("art/pf-dance.jpg"); background-position: center; }
.art-pf-poster  { background-image: url("art/pf-poster.jpg"); background-position: center; }
.art-pf-diner   { background-image: url("art/pf-diner.jpg"); background-position: center; }
.art-riviera    { background-image: url("art/riviera.jpg"); background-position: center; }
.art-porsche    { background-image: url("art/porsche.jpg"); background-position: center; }
.art-beach      { background-image: url("art/beach.jpg"); background-position: center; }

.art-santorini { background: linear-gradient(165deg, #2e7cb8 0%, #6faedb 25%, #e8d9b4 45%, #f2e3bd 52%, #2f649c 72%, #173f6e 100%); }
.art-tokyo     { background: linear-gradient(170deg, #1c1230 0%, #3d2054 28%, #c23a6e 55%, #f09048 74%, #0f0a1e 100%); }
.art-alps      { background: linear-gradient(160deg, #eef3f8 0%, #9fb8ce 28%, #527499 52%, #2c4a68 74%, #152a40 100%); }
.art-nyc       { background: linear-gradient(175deg, #f0a84f 0%, #d96b2f 28%, #8f3f52 55%, #33284e 78%, #120f26 100%); }
.art-venice    { background: linear-gradient(168deg, #f0c17f 0%, #d99b5c 28%, #a86844 52%, #3d6478 76%, #1d3d50 100%); }
.art-iceland   { background: linear-gradient(162deg, #d5ecf2 0%, #74a8bc 32%, #347c6e 56%, #1d4f41 78%, #0c241e 100%); }
.art-paris     { background: linear-gradient(170deg, #d9c3e8 0%, #a687c2 30%, #67557f 55%, #3a3158 78%, #171334 100%); }
.art-kyoto     { background: linear-gradient(165deg, #f2a8b4 0%, #d97b8a 28%, #a04c60 55%, #4f2e40 78%, #1c1220 100%); }

/* ---------- featured — první reálné dílo ---------- */

.featured { display: block; position: relative; border-top: 1px solid var(--rule); }

/* žlutý vintage "razítko" nápis — odkazuje na plakátovou typografii */
.featured .stamp {
  position: absolute; top: 9%; right: 4%; z-index: 3;
  font-family: "Alfa Slab One", "Archivo Black", serif;
  font-size: clamp(1.7rem, 3.6vw, 3.1rem);
  line-height: 0.95;
  text-transform: uppercase;
  text-align: center;
  color: #f0c22f;
  text-shadow:
    2px 2px 0 #7a1f14,
    4px 4px 0 rgba(20, 10, 5, 0.55);
  letter-spacing: 0.02em;
  transform: rotate(-5deg);
  pointer-events: none;
}
@media (max-width: 700px) {
  .featured .stamp { top: 6%; right: 5%; }
}
.featured .featured-art { height: 84vh; min-height: 460px; }

/* teaser kolekce — díla vedle sebe místo jednoho full-bleed obrazu */
.featured .works {
  display: grid; grid-template-columns: repeat(4, 1fr);
}
.featured .works .art {
  height: 46vh; min-height: 280px;
  border-right: 1px solid var(--rule);
}
.featured .works .art:last-child { border-right: none; }
.featured .works { transition: opacity 0.25s; }
.featured:hover .works { opacity: 0.93; }
@media (max-width: 700px) {
  .featured .works { grid-template-columns: repeat(2, 1fr); }
  .featured .works .art { height: 30vh; min-height: 180px; }
  .featured .works .art:nth-child(2) { border-right: none; }
  .featured .works .art:nth-child(-n+2) { border-bottom: 1px solid var(--rule); }
}
.featured .caption {
  display: flex; justify-content: space-between; align-items: baseline;
  gap: 18px; flex-wrap: wrap;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  padding: 12px 20px 16px;
}
.featured .caption .tags { margin-top: 0; }
.featured .caption .no {
  font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.14em;
  color: var(--ink-soft);
}
.featured:hover .caption .title { text-decoration: underline; text-underline-offset: 0.2em; }

/* ---------- mezisekce — typografický proklad ---------- */

.interlude {
  padding: 64px 20px;
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 24px; flex-wrap: wrap;
}
.interlude h2 {
  font-family: var(--grot); font-weight: 500;
  font-size: clamp(1.2rem, 2.4vw, 1.8rem);
  text-transform: uppercase; letter-spacing: 0.01em;
}
.interlude .note {
  font-family: var(--serif); font-style: italic;
  color: var(--ink-soft); font-size: 0.95rem;
}

/* ---------- reveal slider ---------- */

.reveal-wrap {
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}
.reveal {
  position: relative; height: 74vh; min-height: 420px;
  overflow: hidden;
  cursor: ew-resize;
  user-select: none; -webkit-user-select: none;
  touch-action: pan-y;
}
.reveal .layer { position: absolute; inset: 0; }
.reveal .layer-photo {
  background: linear-gradient(165deg, #7db3d8 0%, #a8c8e0 28%, #e8ddc8 45%, #f0e6d0 52%, #4a7ba6 70%, #2d5a8a 100%);
  filter: saturate(0.8);
}
.reveal .layer-paint { clip-path: inset(0 0 0 var(--split, 50%)); }
.reveal .layer-paint .art { position: absolute; inset: 0; }
.reveal-handle {
  position: absolute; top: 0; bottom: 0; left: var(--split, 50%);
  width: 1px; background: var(--paper);
  outline: 1px solid var(--ink);
  z-index: 3;
}
.reveal-handle::after {
  content: "DRAG";
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  background: var(--paper); color: var(--ink);
  border: 1px solid var(--ink);
  font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.14em;
  padding: 7px 12px;
  white-space: nowrap;
}
.reveal-label {
  position: absolute; bottom: 14px; z-index: 2;
  font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.12em;
  text-transform: uppercase;
  background: var(--paper); color: var(--ink);
  border: 1px solid var(--rule);
  padding: 6px 10px;
}
.reveal-label.left { left: 14px; }
.reveal-label.right { right: 14px; }

/* ---------- spec / formáty — tisková tabulka ---------- */

.spec {
  padding: 0 20px 90px;
}
.spec-table { width: 100%; border-collapse: collapse; }
.spec-table tr { border-top: 1px solid var(--rule); }
.spec-table tr:last-child { border-bottom: 1px solid var(--rule); }
.spec-table td {
  padding: 14px 4px;
  font-family: var(--mono); font-size: 0.82rem;
  vertical-align: baseline;
}
.spec-table td:first-child {
  font-family: var(--grot); font-weight: 600;
  font-size: 0.82rem; letter-spacing: 0.1em; text-transform: uppercase;
  width: 32%;
}
.spec-table td:last-child { text-align: right; color: var(--ink-soft); }

/* ---------- footer ---------- */

footer {
  border-top: 1px solid var(--rule);
  padding: 18px 20px 40px;
  display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap;
  font-size: 0.78rem; letter-spacing: 0.06em;
  color: var(--ink-soft);
}
footer .socials { display: flex; gap: 22px; text-transform: uppercase; letter-spacing: 0.14em; font-weight: 500; color: var(--ink); }
footer .socials a:hover { text-decoration: underline; text-underline-offset: 0.2em; }

/* ---------- tlačítko — inkoustový rám ---------- */

.btn {
  display: inline-block;
  font-family: var(--grot); font-weight: 600;
  font-size: 0.82rem; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--ink); background: transparent;
  border: 1px solid var(--ink);
  padding: 14px 30px;
  cursor: pointer;
  transition: background 0.18s, color 0.18s;
  touch-action: manipulation;
}
.btn:hover { background: var(--ink); color: var(--paper); }
.btn:active { transform: translateY(1px); }

/* ---------- produktová stránka ---------- */

.product-head {
  display: grid; grid-template-columns: 1.4fr 1fr;
  gap: 40px;
  padding: 40px 20px 48px;
  align-items: end;
}
@media (max-width: 860px) { .product-head { grid-template-columns: 1fr; align-items: start; } }

.product-head .crumb {
  font-family: var(--mono); font-size: 0.72rem;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--ink-soft); margin-bottom: 22px;
}
.product-head .crumb a:hover { text-decoration: underline; }
.product-head h1 {
  font-weight: 500; text-transform: uppercase;
  font-size: clamp(2.2rem, 5.5vw, 4.2rem);
  line-height: 1.02; letter-spacing: 0.005em;
}
.product-head .sub {
  margin-top: 14px;
  font-family: var(--serif); font-style: italic;
  font-size: 1.05rem; color: var(--ink-soft);
  max-width: 30em;
}

.buy-card { display: grid; gap: 0; }
.buy-card .row {
  display: flex; justify-content: space-between; gap: 14px;
  border-top: 1px solid var(--rule);
  padding: 11px 2px;
  font-family: var(--mono); font-size: 0.8rem;
}
.buy-card .row span:last-child { color: var(--ink-soft); text-align: right; }
.buy-card .row.total {
  border-top: 1px solid var(--rule-strong);
  font-family: var(--grot); font-weight: 600;
  font-size: 0.9rem; letter-spacing: 0.08em; text-transform: uppercase;
}
.buy-card .row.total span:last-child {
  font-family: var(--mono); color: var(--ink); font-size: 1.05rem;
}
.buy-card .btn { margin-top: 18px; text-align: center; }
.buy-card .note {
  margin-top: 10px;
  font-family: var(--serif); font-style: italic;
  font-size: 0.82rem; color: var(--ink-soft); text-align: center;
}

/* galerie díla */
.work-view { border-top: 1px solid var(--rule); }
.work-view .main-art { height: 72vh; min-height: 400px; transition: max-width 0.3s; }
.work-view .main-art.phone { max-width: 380px; margin-inline: auto; border-inline: 1px solid var(--rule); }

.work-bar {
  display: flex; justify-content: space-between; align-items: center;
  gap: 16px; flex-wrap: wrap;
  padding: 12px 20px;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}
.thumbs { display: flex; gap: 10px; }
.thumbs .art {
  width: 52px; height: 52px; cursor: pointer;
  outline: 1px solid var(--rule); outline-offset: 2px;
  transition: outline-color 0.15s;
}
.thumbs .art:hover, .thumbs .art.active { outline: 1.5px solid var(--ink); }

.device-toggle { display: flex; gap: 18px; flex-wrap: wrap; }
.device-toggle button {
  font-family: var(--mono); font-size: 0.72rem;
  letter-spacing: 0.12em; text-transform: uppercase;
  background: none; border: none; color: var(--ink-soft);
  cursor: pointer; padding: 6px 2px;
}
.device-toggle button:hover { color: var(--ink); }
.device-toggle button.active {
  color: var(--ink);
  text-decoration: underline; text-underline-offset: 0.3em;
  text-decoration-thickness: 1.5px;
}

/* ---------- košík + objednávka (test mode) ---------- */

.cart-sub {
  font-family: var(--serif); font-style: italic;
  color: var(--ink-soft); font-size: 0.9em;
}
.buy-card .remove {
  background: none; border: none; cursor: pointer;
  color: var(--vermilion); font-size: 1rem; line-height: 1;
  padding: 0 0 0 8px; vertical-align: baseline;
}
.buy-card .remove:hover { font-weight: 700; }
.btn.in-cart { background: var(--ink); color: var(--paper); }
.btn:disabled { opacity: 0.6; cursor: wait; }

.download-row {
  display: flex; justify-content: space-between; align-items: center;
  gap: 20px; padding: 18px 2px;
  border-top: 1px solid var(--rule);
}
.download-row:last-child { border-bottom: 1px solid var(--rule); }
.download-row .dl-title {
  font-weight: 600; font-size: 0.95rem;
  letter-spacing: 0.06em; text-transform: uppercase;
}
.download-row .dl-sub {
  font-family: var(--serif); font-style: italic;
  color: var(--ink-soft); font-size: 0.85rem;
}
.download-row .btn { padding: 11px 20px; font-size: 0.75rem; white-space: nowrap; }

/* ---------- responsivita ---------- */

@media (max-width: 900px) {
  .strip { grid-template-columns: repeat(2, 1fr); }
  .col:nth-child(2) { border-right: none; }
  .col:nth-child(-n+2) { border-bottom: 1px solid var(--rule); }
  .col .art.tall { height: 48vh; }
}
@media (max-width: 520px) {
  .strip { grid-template-columns: 1fr; }
  .col { border-right: none !important; border-bottom: 1px solid var(--rule); }
  .col:last-child { border-bottom: none; }
  .masthead nav { gap: 16px; }
}

/* ---------- animace ---------- */

.fade-up {
  opacity: 0; transform: translateY(16px);
  transition: opacity 0.55s ease-out, transform 0.55s ease-out;
}
.fade-up.visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .fade-up { opacity: 1; transform: none; transition: none; }
  * { animation: none !important; transition-duration: 0.01ms !important; }
}
