/* ============================================
   MALÍŘSKÉ PRÁCE CZ — DESIGN SYSTEM
   Editorial craft aesthetic · warm · confident
   ============================================ */

:root {
  /* Palette */
  --paper:       #F4EFE6;  /* warm off-white, the "wall" */
  --paper-deep:  #EBE4D6;
  --ink:         #1A1F24;  /* deep charcoal, near-black */
  --ink-60:      rgba(26, 31, 36, 0.62);
  --ink-40:      rgba(26, 31, 36, 0.40);
  --ink-12:      rgba(26, 31, 36, 0.12);
  --clay:        #B8492C;  /* burnt terracotta — the accent */
  --clay-deep:   #8E3620;
  --moss:        #4A5D3A;  /* occasional second accent */
  --chalk:       #FFFFFF;

  /* Type */
  --font-display: 'Source Serif 4', 'Source Serif Pro', 'Playfair Display', Georgia, serif;
  --font-body:    'Source Sans 3', 'Source Sans Pro', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono:    'JetBrains Mono', ui-monospace, monospace;

  /* Scale */
  --step--2: clamp(0.72rem, 0.70rem + 0.11vw, 0.78rem);
  --step--1: clamp(0.83rem, 0.80rem + 0.17vw, 0.94rem);
  --step-0:  clamp(0.95rem, 0.91rem + 0.24vw, 1.13rem);
  --step-1:  clamp(1.19rem, 1.12rem + 0.39vw, 1.41rem);
  --step-2:  clamp(1.49rem, 1.36rem + 0.61vw, 1.77rem);
  --step-3:  clamp(1.86rem, 1.66rem + 0.93vw, 2.21rem);
  --step-4:  clamp(2.32rem, 2.02rem + 1.40vw, 2.76rem);
  --step-5:  clamp(2.91rem, 2.46rem + 2.08vw, 3.45rem);
  --step-6:  clamp(3.64rem, 2.98rem + 3.05vw, 4.31rem);
  --step-7:  clamp(4.55rem, 3.60rem + 4.43vw, 5.39rem);

  /* Space */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 1rem;
  --space-4: 1.5rem;
  --space-5: 2rem;
  --space-6: 3rem;
  --space-7: 5rem;
  --space-8: 8rem;

  /* Layout */
  --max:     1320px;
  --gutter:  clamp(1rem, 4vw, 3rem);
  --radius:  4px;
  --radius-lg: 12px;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.55;
  color: var(--ink);
  background: var(--paper);
  font-feature-settings: "ss01", "cv11";
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, textarea, select { font: inherit; color: inherit; }

/* ---------- Subtle paper texture ---------- */
body::before {
  content: "";
  position: fixed; inset: 0;
  pointer-events: none;
  z-index: 1;
  background-image:
    radial-gradient(rgba(26,31,36,0.025) 1px, transparent 1px);
  background-size: 3px 3px;
  mix-blend-mode: multiply;
  opacity: 0.7;
}

/* ---------- Typography ---------- */
h1, h2, h3, h4, .display {
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.02;
}
h1, .h1 { font-size: var(--step-6); font-weight: 350; }
h2, .h2 { font-size: var(--step-4); font-weight: 400; }
h3, .h3 { font-size: var(--step-2); font-weight: 450; letter-spacing: -0.015em; }
h4, .h4 { font-size: var(--step-1); font-weight: 500; letter-spacing: -0.01em; }

.italic  { font-style: italic; }
.serif   { font-family: var(--font-display); }
.mono    { font-family: var(--font-mono); font-feature-settings: "ss01"; }

.eyebrow {
  font-family: var(--font-mono);
  font-size: var(--step--2);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--clay);
  font-weight: 500;
}

.lede { font-size: var(--step-1); line-height: 1.5; color: var(--ink-60); max-width: 58ch; }

p { max-width: 68ch; }
p + p { margin-top: var(--space-3); }

/* ---------- Layout helpers ---------- */
.wrap   { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); position: relative; z-index: 2; }
.wrap-narrow { max-width: 960px; margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: var(--space-8); }
.section-sm { padding-block: var(--space-7); }
.divider { border: 0; border-top: 1px solid var(--ink-12); margin: 0; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  padding: 0.95em 1.6em;
  border-radius: 999px;
  font-weight: 500;
  font-size: var(--step-0);
  letter-spacing: -0.005em;
  transition: all 200ms ease;
  border: 1.5px solid transparent;
  white-space: nowrap;
}
.btn-primary { background: var(--ink); color: var(--paper); }
.btn-primary:hover { background: var(--clay); transform: translateY(-2px); box-shadow: 0 10px 30px -10px rgba(184,73,44,0.4); }
.btn-outline { border-color: var(--ink); color: var(--ink); }
.btn-outline:hover { background: var(--ink); color: var(--paper); }
.btn-clay { background: var(--clay); color: var(--chalk); }
.btn-clay:hover { background: var(--clay-deep); transform: translateY(-2px); }
.btn-ghost { color: var(--ink); text-decoration: underline; text-underline-offset: 6px; text-decoration-thickness: 1px; text-decoration-color: var(--ink-40); padding: 0; border-radius: 0; }
.btn-ghost:hover { text-decoration-color: var(--clay); color: var(--clay); }
.btn .arrow { transition: transform 200ms; }
.btn:hover .arrow { transform: translateX(4px); }

/* ---------- Nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(244,239,230,0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--ink-12);
}
.nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.9rem var(--gutter);
  max-width: var(--max);
  margin-inline: auto;
}
.logo {
  display: flex; align-items: baseline; gap: 0.5em;
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 500;
  letter-spacing: -0.02em;
}
.logo .dot { width: 9px; height: 9px; background: var(--clay); border-radius: 50%; display: inline-block; transform: translateY(-0.2em); }
.nav-links {
  display: flex; gap: 2rem; align-items: center;
  font-size: var(--step--1);
}
.nav-links a {
  position: relative;
  padding: 0.4em 0;
  color: var(--ink-60);
  transition: color 160ms;
}
.nav-links a:hover, .nav-links a.active { color: var(--ink); }
.nav-links a::after {
  content: ""; position: absolute; left: 0; bottom: 0;
  width: 0; height: 1px; background: var(--clay);
  transition: width 220ms ease;
}
.nav-links a:hover::after, .nav-links a.active::after { width: 100%; }
.nav-cta {
  background: var(--ink);
  color: var(--paper) !important;
  padding: 0.55em 1.2em !important;
  border-radius: 999px;
  font-weight: 500;
}
.nav-cta:hover { background: var(--clay); }
.nav-cta::after { display: none; }
.nav-toggle { display: none; font-size: 1.5rem; padding: 0.3em; }

@media (max-width: 860px) {
  .nav-links { display: none; }
  .nav-toggle { display: block; }
  .nav-links.open {
    display: flex; flex-direction: column;
    position: absolute; top: 100%; left: 0; right: 0;
    background: var(--paper);
    padding: 1.5rem var(--gutter);
    border-bottom: 1px solid var(--ink-12);
    gap: 1rem; align-items: flex-start;
  }
}

/* ---------- Footer ---------- */
footer {
  background: var(--ink);
  color: var(--paper);
  padding: var(--space-8) 0 var(--space-5);
  margin-top: var(--space-7);
  position: relative;
  z-index: 2;
}
footer .eyebrow { color: var(--clay); opacity: 0.9; }
footer h3 { color: var(--paper); }
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: var(--space-6);
}
.footer-grid ul { list-style: none; display: grid; gap: 0.6em; }
.footer-grid a { color: rgba(244,239,230,0.65); font-size: var(--step--1); transition: color 160ms; }
.footer-grid a:hover { color: var(--clay); }
.footer-bottom {
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 1rem;
  padding-top: var(--space-4);
  border-top: 1px solid rgba(244,239,230,0.14);
  font-size: var(--step--2);
  color: rgba(244,239,230,0.5);
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
@media (max-width: 780px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 2rem; }
}

/* ---------- Reusable cards ---------- */
.card {
  background: var(--chalk);
  border: 1px solid var(--ink-12);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  transition: all 240ms ease;
}
.card:hover {
  border-color: var(--ink);
  transform: translateY(-3px);
  box-shadow: 0 20px 40px -20px rgba(26,31,36,0.15);
}

/* ---------- Ornamental elements ---------- */
.rule {
  display: flex; align-items: center; gap: 1rem;
  font-family: var(--font-mono);
  font-size: var(--step--2);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--ink-60);
}
.rule::before, .rule::after { content: ""; flex: 1; height: 1px; background: var(--ink-12); }

/* Reveal animation */
@keyframes reveal {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}
.reveal { animation: reveal 900ms cubic-bezier(0.2, 0.8, 0.2, 1) both; }
.reveal-2 { animation-delay: 120ms; }
.reveal-3 { animation-delay: 240ms; }
.reveal-4 { animation-delay: 360ms; }
.reveal-5 { animation-delay: 480ms; }

/* Marquee for reassurance bar */
@keyframes marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
