/* ============================================================
   Shelbitsky — stylesheet
   Paleta inspirovaná kostkou: měď, tmavě modrá, oliva
   ============================================================ */

:root {
  --bg:        #0e141b;
  --bg-2:      #131c25;
  --surface:   #18222d;
  --surface-2: #1f2c39;
  --line:      #293744;

  --copper:    #c75d2c;
  --copper-lt: #e89154;
  --copper-dk: #8f4220;
  --olive:     #7a7a5c;

  --text:      #eceae3;
  --muted:     #99a4af;

  --maxw: 1140px;
  --radius: 4px;

  --font-head: "Chakra Petch", system-ui, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

.container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
}

a { color: inherit; text-decoration: none; }

.eyebrow {
  font-family: var(--font-head);
  font-size: 0.82rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--copper-lt);
  margin-bottom: 14px;
}

h1, h2, h3 { font-family: var(--font-head); line-height: 1.1; font-weight: 700; }

.accent { color: var(--copper-lt); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  padding: 13px 26px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
  /* ostrý, zkosený roh — inspirace hranou kostky */
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%);
}
.btn-sm { padding: 10px 18px; font-size: 0.88rem; }
.btn-primary { background: var(--copper); color: #fff; }
.btn-primary:hover { background: var(--copper-lt); transform: translateY(-2px); }
.btn-ghost { border-color: var(--line); color: var(--text); background: transparent; }
.btn-ghost:hover { border-color: var(--copper-lt); color: var(--copper-lt); transform: translateY(-2px); }

/* ---------- Wordmark ---------- */
.wordmark {
  font-family: var(--font-head);
  font-weight: 700;
  letter-spacing: 0.14em;
  font-size: 1.18rem;
  color: var(--text);
  white-space: nowrap;
}
.wordmark b { color: var(--copper-lt); font-weight: 700; }
.wordmark.sm { font-size: 1rem; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(14, 20, 27, 0.78);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand-cube { display: block; transition: transform 0.3s ease; }
.brand:hover .brand-cube { transform: rotate(-6deg) scale(1.05); }

.nav { display: flex; align-items: center; gap: 30px; }
.nav a { font-family: var(--font-head); font-size: 0.95rem; color: var(--muted); transition: color 0.2s ease; }
.nav a:hover { color: var(--text); }
.nav .btn { color: var(--text); }
.nav .btn:hover { color: var(--copper-lt); }

.header-right { display: flex; align-items: center; gap: 18px; }

/* Přepínač jazyků */
.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: var(--font-head);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  background: transparent;
  border: 1px solid var(--line);
  color: var(--muted);
  padding: 7px 12px;
  cursor: pointer;
  transition: border-color 0.2s ease;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 7px), calc(100% - 7px) 100%, 0 100%);
}
.lang-switch:hover { border-color: var(--copper-lt); }
.lang-switch i { color: var(--line); font-style: normal; }
.lang-switch span { transition: color 0.2s ease; }
.lang-switch span.active { color: var(--copper-lt); }

.nav-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: 0; cursor: pointer; padding: 8px; }
.nav-toggle span { width: 24px; height: 2px; background: var(--text); transition: 0.25s; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: 110px 0 96px;
  background:
    radial-gradient(900px 500px at 78% -10%, rgba(199, 93, 44, 0.18), transparent 60%),
    radial-gradient(700px 400px at 0% 110%, rgba(122, 122, 92, 0.12), transparent 55%),
    var(--bg);
  overflow: hidden;
}
.grid-overlay {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 64px 64px;
  opacity: 0.13;
  mask-image: radial-gradient(circle at 60% 40%, #000 0%, transparent 75%);
  pointer-events: none;
}
.hero-inner { position: relative; z-index: 1; max-width: 880px; }
.hero-title { font-size: clamp(2.3rem, 6vw, 4.2rem); margin-bottom: 24px; letter-spacing: -0.01em; }
.hero-sub { font-size: 1.15rem; color: var(--muted); max-width: 620px; margin-bottom: 36px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 56px; }

.hero-stats { display: flex; flex-wrap: wrap; gap: 48px; border-top: 1px solid var(--line); padding-top: 28px; }
.hero-stats div { display: flex; flex-direction: column; }
.hero-stats strong { font-family: var(--font-head); font-size: 2rem; color: var(--copper-lt); }
.hero-stats span { font-size: 0.9rem; color: var(--muted); letter-spacing: 0.02em; }

/* ---------- Sections ---------- */
.section { padding: 92px 0; }
.section-alt { background: var(--bg-2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-head { max-width: 680px; margin-bottom: 52px; }
.section-head h2 { font-size: clamp(1.8rem, 4vw, 2.6rem); margin-bottom: 16px; }
.section-lead { color: var(--muted); font-size: 1.08rem; }

/* ---------- Apps grid ---------- */
.apps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 22px;
}
.app-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 28px 26px 26px;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, border-color 0.2s ease;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 18px), calc(100% - 18px) 100%, 0 100%);
}
.app-card:hover { transform: translateY(-4px); border-color: var(--copper-dk); }
.app-card.is-live { border-color: rgba(199, 93, 44, 0.5); }
.app-card.is-live::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--copper);
}

.app-card-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.app-icon {
  width: 50px; height: 50px;
  display: grid; place-items: center;
  background: var(--surface-2);
  border: 1px solid var(--line);
  color: var(--copper-lt);
}
.is-soon .app-icon { color: var(--olive); }
.app-icon.has-logo { background: none; border: none; }
.app-icon.has-logo img { width: 100%; height: 100%; object-fit: contain; display: block; }

.badge {
  font-family: var(--font-head);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 5px 11px;
  border: 1px solid var(--line);
  color: var(--muted);
}
.badge-live { color: var(--copper-lt); border-color: var(--copper-dk); background: rgba(199, 93, 44, 0.1); }

.app-card h3 { font-size: 1.5rem; margin-bottom: 6px; }
.app-tag { font-family: var(--font-head); font-size: 0.86rem; color: var(--copper-lt); letter-spacing: 0.03em; margin-bottom: 14px; }
.is-soon .app-tag { color: var(--olive); }
.app-desc { color: var(--muted); font-size: 0.98rem; margin-bottom: 18px; }

.app-feats { list-style: none; margin-bottom: 22px; }
.app-feats li { position: relative; padding-left: 22px; color: var(--text); font-size: 0.95rem; margin-bottom: 8px; }
.app-feats li::before {
  content: ""; position: absolute; left: 0; top: 9px;
  width: 8px; height: 8px; background: var(--copper); transform: rotate(45deg);
}

.app-foot { margin-top: auto; display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.price { font-family: var(--font-head); font-size: 0.85rem; color: var(--copper-lt); letter-spacing: 0.04em; }
.price.muted { color: var(--muted); }

/* ---------- Studio ---------- */
.studio-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: 56px; align-items: start; }
.studio-intro h2 { font-size: clamp(1.8rem, 4vw, 2.5rem); margin-bottom: 20px; }
.studio-intro p { color: var(--muted); margin-bottom: 16px; max-width: 46ch; }

.values { list-style: none; display: grid; gap: 18px; }
.values li {
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 3px solid var(--copper);
  padding: 22px 24px;
}
.value-num { font-family: var(--font-head); font-size: 0.85rem; color: var(--copper-lt); letter-spacing: 0.1em; }
.values h3 { font-size: 1.2rem; margin: 6px 0 6px; }
.values p { color: var(--muted); font-size: 0.96rem; }

/* ---------- CTA ---------- */
.cta { text-align: center; background:
    radial-gradient(700px 360px at 50% 0%, rgba(199, 93, 44, 0.14), transparent 60%), var(--bg); }
.cta-inner { max-width: 620px; margin: 0 auto; }
.cta h2 { font-size: clamp(1.9rem, 4vw, 2.7rem); margin-bottom: 16px; }
.cta .section-lead { margin-bottom: 30px; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding: 34px 0; background: var(--bg-2); }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.footer-brand { display: flex; align-items: center; gap: 10px; }
.footer-copy { color: var(--muted); font-size: 0.88rem; }

/* ---------- Responsive ---------- */
@media (max-width: 820px) {
  .studio-grid { grid-template-columns: 1fr; gap: 36px; }
  .nav { gap: 22px; }
}
@media (max-width: 680px) {
  .nav-toggle { display: flex; }
  .nav {
    position: absolute; top: 72px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--bg-2); border-bottom: 1px solid var(--line);
    max-height: 0; overflow: hidden; transition: max-height 0.3s ease;
  }
  .nav.open { max-height: 360px; }
  .nav a { padding: 16px 24px; border-top: 1px solid var(--line); }
  .nav .btn { margin: 14px 24px; }
  .hero { padding: 72px 0 64px; }
  .hero-stats { gap: 28px; }
  .section { padding: 64px 0; }
}

/* ============================================================
   Detail aplikace (modal) + galerie
   ============================================================ */
body.modal-open { overflow: hidden; }

.app-modal {
  position: fixed; inset: 0; z-index: 100;
  display: none; align-items: flex-start; justify-content: center;
  padding: 40px 20px; overflow-y: auto;
}
.app-modal.open { display: flex; }

.app-modal-backdrop {
  position: fixed; inset: 0;
  background: rgba(6, 10, 14, 0.8);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  animation: am-fade 0.3s ease;
}

.app-modal-card {
  position: relative; z-index: 1; margin: auto;
  width: 100%; max-width: 980px;
  background: var(--surface);
  border: 1px solid var(--line); border-top: 3px solid var(--copper);
  padding: 34px 34px 38px;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 22px), calc(100% - 22px) 100%, 0 100%);
  transform-origin: center center;
  display: none;
}
.app-modal-card.is-shown { display: block; animation: am-flip 0.6s cubic-bezier(0.2, 0.7, 0.2, 1); }

@keyframes am-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes am-flip {
  0%   { opacity: 0; transform: perspective(1500px) rotateY(-92deg) scale(0.82); }
  55%  { opacity: 1; }
  100% { opacity: 1; transform: perspective(1500px) rotateY(0deg) scale(1); }
}

.app-modal-close {
  position: absolute; top: 14px; right: 16px;
  width: 38px; height: 38px;
  background: var(--surface-2); border: 1px solid var(--line);
  color: var(--muted); font-size: 1.5rem; line-height: 1;
  cursor: pointer; transition: 0.2s; z-index: 2;
}
.app-modal-close:hover { color: var(--text); border-color: var(--copper-lt); }

/* hlavička detailu */
.am-head { display: flex; align-items: center; gap: 18px; margin-bottom: 28px; padding-right: 40px; }
.am-logo { width: 64px; height: 64px; flex: none; }
.am-logo img { width: 100%; height: 100%; object-fit: contain; }
.am-badge { display: inline-block; font-family: var(--font-head); font-size: 0.7rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--copper-lt); }
.am-head h3 { font-size: 1.9rem; margin: 3px 0 2px; }
.am-tag { color: var(--muted); }

.am-section { margin-bottom: 30px; }
.am-section h4 { font-family: var(--font-head); font-size: 0.82rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--copper-lt); margin-bottom: 16px; }

/* galerie */
.gal-stage { display: flex; align-items: center; gap: 12px; }
.gal-frame {
  position: relative; flex: 1; margin: 0;
  background: #0c1117; border: 1px solid var(--line); border-radius: 8px;
  overflow: hidden; padding-top: 30px;
}
.gal-dots { position: absolute; top: 11px; left: 14px; display: flex; gap: 7px; }
.gal-dots i { width: 10px; height: 10px; border-radius: 50%; }
.gal-dots i:nth-child(1){ background:#e0584f; } .gal-dots i:nth-child(2){ background:#e0a83f; } .gal-dots i:nth-child(3){ background:#4fbf57; }
.gal-frame img { display: block; width: 100%; height: auto; }
.gal-nav {
  flex: none; width: 42px; height: 42px; border-radius: 50%;
  background: var(--surface-2); border: 1px solid var(--line);
  color: var(--text); font-size: 1.4rem; line-height: 1; cursor: pointer; transition: 0.2s;
}
.gal-nav:hover { border-color: var(--copper-lt); color: var(--copper-lt); }
.gal-cap { text-align: center; color: var(--muted); font-size: 0.92rem; margin: 14px 0 16px; }
.gal-thumbs { display: flex; gap: 10px; }
.gal-thumb { flex: 1; min-width: 0; padding: 0; background: none; border: 2px solid transparent; border-radius: 6px; overflow: hidden; cursor: pointer; line-height: 0; transition: 0.2s; }
.gal-thumb img { width: 100%; height: 58px; object-fit: cover; object-position: top; opacity: 0.55; transition: 0.2s; display: block; }
.gal-thumb:hover img { opacity: 0.9; }
.gal-thumb.is-active { border-color: var(--copper); }
.gal-thumb.is-active img { opacity: 1; }

/* platba + reference */
.am-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; margin-bottom: 30px; }
.am-pay, .am-refs { margin-bottom: 0; background: var(--bg-2); border: 1px solid var(--line); padding: 22px 22px 24px; position: relative; }
.am-storeforce { border-color: var(--copper); background: linear-gradient(160deg, #1a1a2e 0%, #16213e 100%); }
.pay-price { display: flex; align-items: baseline; gap: 10px; margin-bottom: 6px; flex-wrap: wrap; }
.pay-price strong { font-family: var(--font-head); font-size: 2rem; color: var(--text); }
.pay-annual { display: block; color: var(--muted); font-size: 0.82rem; margin-bottom: 14px; }
.pay-annual em { color: #6ee7b7; font-style: normal; }
.pay-feats { list-style: none; margin-top: 12px; }
.pay-feats li { position: relative; padding-left: 24px; margin-bottom: 9px; color: var(--text); font-size: 0.95rem; }
.pay-feats li::before { content: "✓"; position: absolute; left: 0; color: var(--copper-lt); font-weight: 700; }
.sf-feat::before { content: "✦" !important; color: #f59e0b !important; }
.sf-badge { position: absolute; top: -11px; right: 16px; background: #f59e0b; color: #111; font-size: 0.72rem; font-weight: 700; padding: 2px 10px; border-radius: 20px; letter-spacing: 0.03em; }
.ref { margin: 0 0 16px; border-left: 3px solid var(--copper); padding-left: 14px; }
.ref:last-child { margin-bottom: 0; }
.ref p { color: var(--text); font-size: 0.95rem; margin-bottom: 6px; }
.ref cite { color: var(--muted); font-size: 0.85rem; font-style: normal; }

/* stažení */
.am-download { text-align: center; border-top: 1px solid var(--line); padding-top: 28px; }
.am-download h4 { font-family: var(--font-head); font-size: 1.3rem; letter-spacing: 0; text-transform: none; color: var(--text); margin-bottom: 16px; }
.am-dl-btn { font-size: 1.05rem; padding: 15px 36px; }
.am-dl-note { color: var(--muted); font-size: 0.85rem; margin-top: 14px; }

/* překlápěcí tlačítko stažení (Mac / Windows) */
.dl-flip { width: 340px; max-width: 100%; margin: 0 auto; perspective: 1200px; }
.dl-flip-inner {
  position: relative;
  transform-style: preserve-3d;
  transition: transform 0.55s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.dl-flip.is-flipped .dl-flip-inner { transform: rotateY(180deg); }
.dl-face { backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.dl-front { width: 100%; cursor: pointer; }
.dl-back {
  position: absolute;
  inset: 0;
  transform: rotateY(180deg);
  display: flex;
  gap: 10px;
}
.dl-os {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  white-space: nowrap;
  font-size: 0.95rem;
  padding: 15px 14px;
}
.dl-ic { width: 17px; height: 17px; flex-shrink: 0; }
.dl-os-soon { opacity: 0.65; cursor: default; }
.dl-os-soon:hover { transform: none; }
@media (prefers-reduced-motion: reduce) {
  .dl-flip-inner { transition: none; }
}

@media (prefers-reduced-motion: reduce) {
  .app-modal-card.is-shown { animation: am-fade 0.3s ease; }
}

@media (max-width: 680px) {
  .am-grid { grid-template-columns: 1fr; }
  .app-modal-card { padding: 26px 18px 30px; }
  .gal-nav { width: 34px; height: 34px; font-size: 1.2rem; }
  .am-head h3 { font-size: 1.6rem; }
}

/* ---------- Shelbitsky lockup: shrink on narrow screens ---------- */
@media (max-width: 600px) {
  .brand { gap: 12px !important; }
  .brand svg { width: 38px; height: 38px; }
  .brand span span:first-child { font-size: 16px !important; }
  .brand span span:last-child { font-size: 7px !important; letter-spacing: 0.22em !important; }
}
