/* meyalive.net — global tokens & base styles
   Minimal editorial + folk feel. Cream paper, terracotta ink, handwritten accents. */

:root {
  /* Palette — warm terracotta on cream */
  --cream: #fbf6ee;
  --cream-2: #f3ead8;
  --cream-3: #ece0c6;
  --terracotta: #d96b3c;
  --terracotta-dark: #b95423;
  --rust: #8a3a1d;
  --ink: #1d1612;
  --ink-2: #3d3024;
  --ink-3: #6a5a4a;
  --ink-4: #9a8c7a;
  --line: rgba(29, 22, 18, 0.14);
  --line-soft: rgba(29, 22, 18, 0.06);
  --sage: #9aa388;

  /* Type */
  --serif: 'Fraunces', 'EB Garamond', Georgia, 'Times New Roman', serif;
  --hand: 'Caveat', 'Patrick Hand', cursive;
  --sans: 'Inter', system-ui, -apple-system, sans-serif;

  /* Density scale — driven by Tweaks panel */
  --d: 1;
  --space-1: calc(4px * var(--d));
  --space-2: calc(8px * var(--d));
  --space-3: calc(12px * var(--d));
  --space-4: calc(16px * var(--d));
  --space-5: calc(20px * var(--d));
  --space-6: calc(24px * var(--d));
  --space-8: calc(32px * var(--d));
  --space-10: calc(40px * var(--d));
  --space-12: calc(48px * var(--d));
  --space-16: calc(64px * var(--d));
  --space-20: calc(80px * var(--d));
  --space-24: calc(96px * var(--d));
  --space-32: calc(128px * var(--d));

  /* Type scale — also scales mildly with density */
  --t-base: calc(17px * (0.5 + 0.5 * var(--d)));
  --t-small: calc(13.5px * (0.6 + 0.4 * var(--d)));
  --t-eyebrow: calc(11.5px * (0.7 + 0.3 * var(--d)));
}

[data-density="kompakt"]   { --d: 0.78; }
[data-density="vychozi"]   { --d: 1.00; }
[data-density="vzdusne"]   { --d: 1.30; }

* { box-sizing: border-box; }
html, body {
  margin: 0; padding: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--serif);
  font-size: var(--t-base);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
body { min-height: 100vh; }
img, svg { max-width: 100%; display: block; }
button { font: inherit; background: none; border: 0; padding: 0; color: inherit; cursor: pointer; }
a { color: inherit; text-decoration: none; }
hr { border: 0; border-top: 1px solid var(--line); margin: 0; }

/* Type helpers ─────────────────────────── */
.serif    { font-family: var(--serif); }
.hand     { font-family: var(--hand); font-weight: 500; }
.sans     { font-family: var(--sans); }
.eyebrow  {
  font-family: var(--sans);
  font-size: var(--t-eyebrow);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-3);
  font-weight: 500;
}
.eyebrow .dot { color: var(--terracotta); margin: 0 .4em; }
.lead { font-family: var(--serif); font-size: calc(20px * (0.7 + 0.3 * var(--d))); line-height: 1.55; color: var(--ink-2); font-weight: 350; font-style: italic; }
.caption { font-family: var(--sans); font-size: var(--t-small); color: var(--ink-3); }
.handnote { font-family: var(--hand); color: var(--terracotta); font-size: calc(22px * (0.6 + 0.4 * var(--d))); line-height: 1; }
.tabular { font-variant-numeric: tabular-nums; }

h1, h2, h3, h4, h5 { font-family: var(--serif); font-weight: 400; color: var(--ink); margin: 0; line-height: 1.05; letter-spacing: -0.015em; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }

/* Site chrome ─────────────────────────── */
.site {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
.site-nav {
  padding: var(--space-5) var(--space-12);
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-8);
  border-bottom: 1px solid var(--line-soft);
  background: var(--cream);
  position: sticky; top: 0; z-index: 10;
  backdrop-filter: blur(8px);
}
.site-nav .brand {
  font-family: var(--hand);
  font-size: calc(34px * (0.7 + 0.3 * var(--d)));
  line-height: 1;
  color: var(--ink);
  letter-spacing: -0.01em;
}
.site-nav .brand .dot { color: var(--terracotta); }
.site-nav nav {
  display: flex; gap: var(--space-8);
  font-family: var(--sans);
  font-size: var(--t-small);
  font-weight: 500;
}
.site-nav nav button {
  position: relative;
  color: var(--ink-2);
  padding: 4px 0;
  transition: color .15s;
}
.site-nav nav button:hover { color: var(--ink); }
.site-nav nav button.active { color: var(--ink); }
.site-nav nav button.active::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: -2px;
  height: 1px; background: var(--terracotta);
}
.site-nav .meta {
  display: flex; align-items: center; gap: var(--space-5);
  font-family: var(--sans);
  font-size: var(--t-small);
  color: var(--ink-3);
}
.cart-pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-family: var(--sans);
  font-size: var(--t-small);
  color: var(--ink-2);
  transition: background .15s, border-color .15s;
}
.cart-pill:hover { background: var(--cream-2); border-color: var(--ink-4); }
.cart-pill.has-items { background: var(--ink); color: var(--cream); border-color: var(--ink); }
.cart-pill .count { font-variant-numeric: tabular-nums; }

.site-main { flex: 1; }

.site-foot {
  margin-top: var(--space-24);
  padding: var(--space-16) var(--space-12) var(--space-8);
  border-top: 1px solid var(--line-soft);
  background: var(--cream-2);
}
.site-foot .row {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.4fr;
  gap: var(--space-10);
  max-width: 1280px;
  margin: 0 auto;
}
.site-foot h4 { font-family: var(--sans); font-size: var(--t-eyebrow); letter-spacing: 0.18em; text-transform: uppercase; color: var(--ink-3); font-weight: 500; margin-bottom: var(--space-3); }
.site-foot .links { display: flex; flex-direction: column; gap: 6px; font-size: var(--t-small); color: var(--ink-2); font-family: var(--sans); }
.site-foot .links a:hover { color: var(--terracotta); }
.site-foot .colophon {
  max-width: 1280px; margin: var(--space-12) auto 0;
  padding-top: var(--space-5);
  border-top: 1px solid var(--line-soft);
  display: flex; justify-content: space-between; align-items: baseline;
  font-family: var(--sans); font-size: var(--t-eyebrow); color: var(--ink-4);
  letter-spacing: 0.08em;
}

/* Buttons & inputs ─────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 22px;
  font-family: var(--sans);
  font-size: var(--t-small);
  font-weight: 500;
  letter-spacing: 0.02em;
  border-radius: 999px;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--cream);
  transition: transform .15s, background .15s, color .15s, border-color .15s;
}
.btn:hover { background: var(--rust); border-color: var(--rust); }
.btn:active { transform: translateY(1px); }
.btn-ghost { background: transparent; color: var(--ink); }
.btn-ghost:hover { background: var(--ink); color: var(--cream); }
.btn-link {
  display: inline-flex; align-items: baseline; gap: 8px;
  font-family: var(--sans); font-size: var(--t-small); font-weight: 500;
  color: var(--ink); border-bottom: 1px solid var(--ink);
  padding-bottom: 2px;
}
.btn-link:hover { color: var(--terracotta); border-color: var(--terracotta); }
.btn-link .arrow { transition: transform .15s; }
.btn-link:hover .arrow { transform: translateX(3px); }

.input, .textarea {
  font: inherit;
  font-family: var(--sans);
  font-size: var(--t-base);
  padding: 12px 14px;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  width: 100%;
  outline: none;
  transition: border-color .15s;
}
.input:focus, .textarea:focus { border-bottom-color: var(--terracotta); }
.textarea { resize: vertical; min-height: 120px; }
.field-label { font-family: var(--sans); font-size: var(--t-eyebrow); letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-3); display: block; margin-bottom: 4px; }

/* image-slot styling — folk paper */
image-slot {
  --is-bg: var(--cream-2);
  --is-fg: var(--ink-4);
  background: var(--cream-2);
  color: var(--ink-4);
}

/* Decorative ─────────────────── */
.rule { display: block; width: 32px; height: 1px; background: var(--terracotta); margin: var(--space-4) 0; }
.rule-tall { width: 1px; height: 28px; background: var(--terracotta); }
.dot-sep { display: inline-block; width: 4px; height: 4px; border-radius: 50%; background: var(--terracotta); vertical-align: middle; margin: 0 8px; }

/* Container ─────────────────── */
.wrap { max-width: 1280px; margin: 0 auto; padding: 0 var(--space-12); }
.wrap-tight { max-width: 980px; margin: 0 auto; padding: 0 var(--space-12); }
.wrap-narrow { max-width: 720px; margin: 0 auto; padding: 0 var(--space-12); }

/* Page fade-in ─────────────────── */
.page { opacity: 1; }

/* Variant-switch hint pill (visible only when Tweaks panel is open) */
.variant-flag {
  position: fixed;
  left: 16px;
  bottom: 16px;
  z-index: 100;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(29, 22, 18, 0.85);
  color: var(--cream);
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  pointer-events: none;
  opacity: 0;
  transition: opacity .2s;
}
.variant-flag.show { opacity: 1; }
