/* ==========================================================================
   3D tisk — JL Creative Studio
   Základní design systém pro 3dtisk.html (tmavé téma).
   Page-specific styly jsou přímo v <style> v 3dtisk.html.
   ========================================================================== */

:root {
  --bg-base: #0b0d1a;
  --bg-surface: #10132a;
  --bg-card: #161a35;
  --border: #262b4d;
  --text: #e8eaf6;
  --text-muted: #9aa0c3;
  --primary: #1e2d78;
  --accent: #4e5fbe;
  --accent-light: #7b8cff;
  --radius: 12px;
  --nav-h: 68px;
}

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

html { scroll-behavior: smooth; scroll-padding-top: var(--nav-h); }

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--bg-base);
  color: var(--text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }
img { max-width: 100%; display: block; }

/* ── NAV ── */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
  background: rgba(11, 13, 26, 0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

nav ul {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 2rem;
}

nav ul a {
  text-decoration: none;
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.2s;
}

nav ul a:hover { color: var(--text); }

nav ul a.nav-cta {
  color: var(--text);
  background: var(--accent);
  padding: 0.55rem 1.1rem;
  border-radius: 100px;
  transition: background 0.2s;
}

nav ul a.nav-cta:hover { background: var(--accent-light); }

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: 0;
  cursor: pointer;
  padding: 0.5rem;
}

.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.25s, opacity 0.25s;
}

nav.open .hamburger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
nav.open .hamburger span:nth-child(2) { opacity: 0; }
nav.open .hamburger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── LAYOUT ── */
section { padding: 6rem 2rem; }

.container {
  max-width: 1100px;
  margin: 0 auto;
}

.section-label {
  display: inline-block;
  color: var(--accent-light);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin-bottom: 0.75rem;
}

.section-title {
  font-size: clamp(1.8rem, 3.5vw, 2.6rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin-bottom: 1rem;
}

.section-desc {
  color: var(--text-muted);
  font-size: 1rem;
  line-height: 1.7;
  max-width: 560px;
  margin-bottom: 3rem;
}

.hero-badge {
  display: inline-block;
  background: rgba(78, 95, 190, 0.12);
  border: 1px solid rgba(78, 95, 190, 0.35);
  color: var(--accent-light);
  font-size: 0.8rem;
  font-weight: 500;
  padding: 0.4rem 0.9rem;
  border-radius: 100px;
}

/* ── BUTTONS ── */
.btn-primary,
.btn-outline {
  display: inline-block;
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 600;
  padding: 0.85rem 1.6rem;
  border-radius: 100px;
  transition: background 0.2s, border-color 0.2s, transform 0.2s;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  border: 1px solid var(--accent);
}

.btn-primary:hover { background: var(--accent-light); border-color: var(--accent-light); transform: translateY(-2px); }

.btn-outline {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-outline:hover { border-color: var(--accent-light); transform: translateY(-2px); }

/* ── PORTFOLIO ── */
.portfolio-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 2rem;
}

.filter-btn {
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 500;
  padding: 0.5rem 1.1rem;
  border-radius: 100px;
  cursor: pointer;
  transition: all 0.2s;
}

.filter-btn:hover { color: var(--text); border-color: var(--accent); }
.filter-btn.active { background: var(--accent); border-color: var(--accent); color: #fff; }

.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.portfolio-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color 0.2s, transform 0.2s;
}

.portfolio-item:hover { border-color: var(--accent); transform: translateY(-4px); }
.portfolio-item.hidden { display: none; }

a.portfolio-item {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
}

.portfolio-grid--wide { grid-template-columns: repeat(2, 1fr); }

.portfolio-thumb { overflow: hidden; background: var(--bg-card); }

.portfolio-thumb img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  transition: transform 0.4s;
}

.portfolio-grid--wide .portfolio-thumb img { height: 300px; }
.portfolio-item:hover .portfolio-thumb img { transform: scale(1.04); }

.portfolio-info { padding: 1.1rem 1.25rem 1.3rem; }

.portfolio-info p {
  color: var(--text-muted);
  font-size: 0.87rem;
  line-height: 1.6;
  margin-top: 0.5rem;
}

.portfolio-more {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: 0.9rem;
  color: var(--accent-light);
  font-size: 0.85rem;
  font-weight: 600;
}

.portfolio-more svg { width: 16px; height: 16px; transition: transform 0.2s; }
.portfolio-item:hover .portfolio-more svg { transform: translateX(3px); }

.portfolio-tag {
  color: var(--accent-light);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  margin-bottom: 0.3rem;
}

.portfolio-info h3 { font-size: 1rem; font-weight: 600; }

/* ── CONTACT ── */
.contact-info {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.contact-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.contact-icon {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
}

.contact-item h4 {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.2rem;
}

.contact-item a,
.contact-item p {
  color: var(--text);
  text-decoration: none;
  font-size: 0.95rem;
}

.contact-item a:hover { color: var(--accent-light); }

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.contact-form input,
.contact-form select,
.contact-form textarea {
  width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 0.85rem 1rem;
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 0.9rem;
  outline: none;
  transition: border-color 0.2s;
}

.contact-form input::placeholder,
.contact-form textarea::placeholder { color: var(--text-muted); }

.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus { border-color: var(--accent); }

.contact-form select { color: var(--text-muted); cursor: pointer; }
.contact-form select.filled { color: var(--text); }
.contact-form option { background: var(--bg-card); color: var(--text); }

.contact-form textarea { min-height: 150px; resize: vertical; }

.contact-form .form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.file-drop {
  position: relative;
  display: flex;
  align-items: center;
  gap: 1rem;
  background: var(--bg-card);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  padding: 1.1rem 1.25rem;
  color: var(--text-muted);
  font-size: 0.88rem;
  line-height: 1.5;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}

.file-drop:hover,
.file-drop.dragover,
.file-drop:focus-within { border-color: var(--accent); background: rgba(78, 95, 190, 0.08); }

.file-drop svg { flex-shrink: 0; width: 24px; height: 24px; color: var(--accent-light); }
.file-drop strong { color: var(--text); font-weight: 600; }
.file-drop small { font-size: 0.78rem; }

/* input je přes celou plochu, aby fungovalo klikání i drag & drop */
.contact-form .file-drop input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  padding: 0;
}

.file-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.file-list:empty { display: none; }

.file-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  background: rgba(78, 95, 190, 0.1);
  border: 1px solid rgba(78, 95, 190, 0.25);
  border-radius: 8px;
  padding: 0.5rem 0.85rem;
  font-size: 0.84rem;
}

.file-list li.too-big { background: rgba(192, 57, 43, 0.12); border-color: rgba(192, 57, 43, 0.4); color: #ff8a7d; }
.file-list .size { color: var(--text-muted); white-space: nowrap; }
.file-list .name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.contact-form button {
  background: var(--accent);
  color: #fff;
  border: 0;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  padding: 0.95rem 1.5rem;
  border-radius: 100px;
  cursor: pointer;
  transition: background 0.2s, opacity 0.2s;
}

.contact-form button:hover { background: var(--accent-light); }
.contact-form button:disabled { opacity: 0.6; cursor: wait; }

.form-status {
  display: none;
  padding: 0.85rem 1rem;
  border-radius: var(--radius);
  font-size: 0.9rem;
}

.form-status.success { display: block; background: rgba(46, 158, 91, 0.12); border: 1px solid rgba(46, 158, 91, 0.4); color: #6fdc9c; }
.form-status.error { display: block; background: rgba(192, 57, 43, 0.12); border: 1px solid rgba(192, 57, 43, 0.4); color: #ff8a7d; }

/* ── FOOTER ── */
footer {
  background: var(--bg-surface);
  border-top: 1px solid var(--border);
  padding: 2.5rem 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  text-align: center;
}

footer .logo img { height: 48px; width: auto; }
footer p { color: var(--text-muted); font-size: 0.85rem; }

/* ── RESPONSIVE ── */
@media (max-width: 900px) {
  .portfolio-grid { grid-template-columns: 1fr 1fr; }

  .hamburger { display: flex; }

  nav ul {
    position: absolute;
    top: var(--nav-h);
    left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--bg-surface);
    border-bottom: 1px solid var(--border);
    padding: 0.5rem 1.5rem 1.25rem;
    display: none;
  }

  nav.open ul { display: flex; }
  nav ul li a { display: block; padding: 0.85rem 0; }
  nav ul a.nav-cta { text-align: center; margin-top: 0.5rem; }
}

@media (max-width: 600px) {
  nav { padding: 0 1rem; }
  section { padding: 4.5rem 1rem; }
  .portfolio-grid,
  .portfolio-grid--wide { grid-template-columns: 1fr; }
  .portfolio-grid--wide .portfolio-thumb img { height: 240px; }
  .contact-form .form-row { grid-template-columns: 1fr; }
}
