/* ==========================================================================
   Variables
   ========================================================================== */
:root {
  /* Colors */
  --color-background: #f7f7f7; /* soft loft light */
  --color-surface: #ffffff; /* white cards/sections */
  --color-surface-muted: #f0f0f0; /* light grey blocks */
  --color-concrete: #e1e1e1; /* concrete accent */
  --color-wood: #d9b38c; /* light oak accent */

  --color-text: #151515;
  --color-text-muted: #666666;
  --color-border-subtle: #dddddd;

  --color-primary: #111111; /* minimalist black accents */
  --color-primary-soft: #2a2a2a;
  --color-success: #1b7c4b;
  --color-warning: #c58b18;
  --color-danger: #c0363c;

  --gray-50: #fafafa;
  --gray-100: #f5f5f5;
  --gray-200: #e5e5e5;
  --gray-300: #d4d4d4;
  --gray-400: #a3a3a3;
  --gray-500: #737373;
  --gray-600: #525252;
  --gray-700: #404040;
  --gray-800: #262626;
  --gray-900: #171717;

  /* Typography */
  --font-sans: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Arial, sans-serif;
  --font-heading: var(--font-sans);

  --font-size-xs: 0.75rem;   /* 12px */
  --font-size-sm: 0.875rem;  /* 14px */
  --font-size-base: 1rem;    /* 16px */
  --font-size-lg: 1.125rem;  /* 18px */
  --font-size-xl: 1.25rem;   /* 20px */
  --font-size-2xl: 1.5rem;   /* 24px */
  --font-size-3xl: 1.875rem; /* 30px */
  --font-size-4xl: 2.25rem;  /* 36px */
  --font-size-5xl: 3rem;     /* 48px – hero mobile */

  --line-height-tight: 1.1;
  --line-height-snug: 1.25;
  --line-height-normal: 1.5;
  --line-height-relaxed: 1.7;

  /* Spacing scale (0–96px) */
  --space-0: 0;
  --space-1: 0.25rem;  /* 4px */
  --space-2: 0.5rem;   /* 8px */
  --space-3: 0.75rem;  /* 12px */
  --space-4: 1rem;     /* 16px */
  --space-5: 1.25rem;  /* 20px */
  --space-6: 1.5rem;   /* 24px */
  --space-7: 1.75rem;  /* 28px */
  --space-8: 2rem;     /* 32px */
  --space-10: 2.5rem;  /* 40px */
  --space-12: 3rem;    /* 48px */
  --space-16: 4rem;    /* 64px */
  --space-20: 5rem;    /* 80px */
  --space-24: 6rem;    /* 96px */

  /* Radius */
  --radius-xs: 2px;
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 16px;
  --radius-pill: 999px;

  /* Shadows – subtle loft feel */
  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.08), 0 1px 2px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 12px 30px rgba(15, 23, 42, 0.12);
  --shadow-soft-elevated: 0 18px 45px rgba(15, 23, 42, 0.15);

  /* Transitions */
  --transition-fast: 120ms ease-out;
  --transition-base: 200ms ease-out;
  --transition-slow: 320ms ease-out;

  /* Layout */
  --container-max-width: 1120px;
  --header-height: 64px;
}

/* ==========================================================================
   Reset / Normalize
   ========================================================================== */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  margin: 0;
  padding: 0;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
}

h1, h2, h3, h4, h5, h6,
p, figure, blockquote,
dl, dd,
ul, ol {
  margin: 0;
}

ul, ol {
  padding-left: 1.25rem;
}

img, picture, video, canvas, svg {
  display: block;
  max-width: 100%;
}

input, button, textarea, select {
  font: inherit;
  color: inherit;
}

button {
  border: none;
  background: none;
  padding: 0;
}

/* Remove default focus outline – we will re-add custom focus-visible */
:focus {
  outline: none;
}

/* ==========================================================================
   Base Styles
   ========================================================================== */
body {
  min-height: 100vh;
  font-family: var(--font-sans);
  font-size: var(--font-size-base);
  line-height: var(--line-height-normal);
  background-color: var(--color-background);
  color: var(--color-text);
  -webkit-font-smoothing: antialiased;
}

main {
  display: block;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 600;
  color: var(--color-text);
  line-height: var(--line-height-tight);
}

h1 {
  font-size: var(--font-size-3xl);
  letter-spacing: -0.03em;
}

h2 {
  font-size: var(--font-size-2xl);
  letter-spacing: -0.02em;
}

h3 {
  font-size: var(--font-size-xl);
}

h4 {
  font-size: var(--font-size-lg);
}

p {
  margin-top: var(--space-3);
  margin-bottom: 0;
  color: var(--color-text-muted);
}

strong {
  font-weight: 600;
}

a {
  color: inherit;
  text-decoration: none;
  cursor: pointer;
  transition: color var(--transition-base), opacity var(--transition-fast);
}

a:hover {
  opacity: 0.82;
}

a:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

hr {
  border: 0;
  border-top: 1px solid var(--gray-200);
  margin: var(--space-8) 0;
}

/* ==========================================================================
   Accessibility & Motion
   ========================================================================== */
:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

/* Screen reader only */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ==========================================================================
   Layout Utilities
   ========================================================================== */
.container {
  width: 100%;
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--space-4);
  padding-right: var(--space-4);
  max-width: min(100%, var(--container-max-width));
}

.section {
  padding-top: var(--space-12);
  padding-bottom: var(--space-12);
}

.section--light {
  background-color: var(--color-surface);
}

.section--muted {
  background-color: var(--color-surface-muted);
}

/* Simple flex helpers */
.flex {
  display: flex;
}

.flex-row {
  flex-direction: row;
}

.flex-column {
  flex-direction: column;
}

.flex-center {
  align-items: center;
  justify-content: center;
}

.flex-between {
  justify-content: space-between;
}

.flex-wrap {
  flex-wrap: wrap;
}

.gap-xs { gap: var(--space-2); }
.gap-sm { gap: var(--space-3); }
.gap-md { gap: var(--space-4); }
.gap-lg { gap: var(--space-6); }
.gap-xl { gap: var(--space-8); }

/* Grid helpers for masonry-like layouts */
.grid {
  display: grid;
  gap: var(--space-4);
}

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

.grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.grid-auto-fit {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

@media (min-width: 768px) {
  h1 {
    font-size: var(--font-size-4xl);
  }

  h2 {
    font-size: var(--font-size-3xl);
  }

  .section {
    padding-top: var(--space-16);
    padding-bottom: var(--space-16);
  }
}

@media (min-width: 960px) {
  h1 {
    font-size: var(--font-size-5xl);
  }
}

/* Spacing utility helpers (margin-top only for vertical rhythm) */
.mt-0 { margin-top: 0 !important; }
.mt-xs { margin-top: var(--space-2) !important; }
.mt-sm { margin-top: var(--space-3) !important; }
.mt-md { margin-top: var(--space-4) !important; }
.mt-lg { margin-top: var(--space-6) !important; }
.mt-xl { margin-top: var(--space-8) !important; }

/* ==========================================================================
   Components – Buttons
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.7rem 1.6rem;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  font-size: var(--font-size-sm);
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background-color: var(--color-primary);
  color: #ffffff;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition:
    background-color var(--transition-base),
    color var(--transition-base),
    box-shadow var(--transition-base),
    transform var(--transition-fast),
    border-color var(--transition-base);
}

.btn:hover {
  background-color: var(--color-primary-soft);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0);
  box-shadow: var(--shadow-xs);
}

.btn:focus-visible {
  outline: 2px solid var(--color-wood);
  outline-offset: 3px;
}

.btn--ghost {
  background-color: transparent;
  color: var(--color-primary);
  border-color: var(--gray-300);
  box-shadow: none;
}

.btn--ghost:hover {
  background-color: rgba(0, 0, 0, 0.04);
  box-shadow: none;
}

.btn--light {
  background-color: #ffffff;
  color: var(--color-primary);
  border-color: var(--gray-200);
}

.btn--light:hover {
  background-color: var(--gray-100);
}

.btn--disabled,
.btn[disabled] {
  cursor: not-allowed;
  opacity: 0.6;
  box-shadow: none;
  transform: none;
}

/* Sticky CTA (e.g., "Nezávazná poptávka") */
.cta-sticky {
  position: fixed;
  right: var(--space-4);
  bottom: var(--space-4);
  z-index: 50;
}

@media (min-width: 768px) {
  .cta-sticky {
    right: var(--space-6);
    bottom: var(--space-6);
  }
}

/* ==========================================================================
   Components – Form Elements
   ========================================================================== */
.input,
textarea,
select {
  width: 100%;
  padding: 0.75rem 0.9rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--gray-300);
  background-color: #ffffff;
  color: var(--color-text);
  font-size: var(--font-size-sm);
  line-height: var(--line-height-normal);
  transition:
    border-color var(--transition-base),
    box-shadow var(--transition-base),
    background-color var(--transition-base);
}

textarea {
  min-height: 140px;
  resize: vertical;
}

.input::placeholder,
textarea::placeholder {
  color: var(--gray-400);
}

.input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 1px var(--color-primary), var(--shadow-sm);
  outline: none;
}

.input[disabled],
textarea[disabled],
select[disabled] {
  background-color: var(--gray-100);
  cursor: not-allowed;
}

.label {
  display: block;
  margin-bottom: var(--space-2);
  font-size: var(--font-size-sm);
  font-weight: 500;
}

.field-hint {
  margin-top: var(--space-1);
  font-size: var(--font-size-xs);
  color: var(--gray-500);
}

.field-error {
  margin-top: var(--space-1);
  font-size: var(--font-size-xs);
  color: var(--color-danger);
}

/* ==========================================================================
   Components – Card & Surfaces
   ========================================================================== */
.card {
  position: relative;
  border-radius: var(--radius-md);
  background-color: var(--color-surface);
  padding: var(--space-6);
  box-shadow: var(--shadow-sm);
}

.card--muted {
  background-color: var(--color-surface-muted);
}

.card--outline {
  box-shadow: none;
  border: 1px solid var(--color-border-subtle);
}

.card-header {
  margin-bottom: var(--space-3);
}

.card-title {
  font-size: var(--font-size-lg);
  margin-bottom: var(--space-1);
}

.card-meta {
  font-size: var(--font-size-xs);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--gray-500);
}

/* Loft-style surface blocks with subtle concrete & wood accent */
.surface-loft {
  position: relative;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, #ffffff 0%, #f7f7f7 40%, #f0f0f0 100%);
  box-shadow: var(--shadow-soft-elevated);
  overflow: hidden;
}

.surface-loft::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(135deg, rgba(230, 230, 230, 0.5) 0, rgba(255, 255, 255, 0) 45%),
    radial-gradient(circle at 10% 20%, rgba(0, 0, 0, 0.06) 0, transparent 55%),
    radial-gradient(circle at 90% 80%, rgba(0, 0, 0, 0.03) 0, transparent 60%);
  opacity: 0.5;
  mix-blend-mode: multiply;
  pointer-events: none;
}

.surface-loft__inner {
  position: relative;
  padding: var(--space-8) var(--space-6);
}

.surface-loft__accent {
  position: absolute;
  top: 0;
  left: 0;
  width: 5px;
  height: 64px;
  background: linear-gradient(180deg, var(--color-wood), #f1e2d1);
  border-bottom-right-radius: var(--radius-md);
}

/* ==========================================================================
   Components – Media & Hero
   ========================================================================== */
.hero {
  position: relative;
  
  display: flex;
  align-items: center;
  background-color: #000;
  color: #fff;
}

.hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, rgba(0, 0, 0, 0.7) 0%, rgba(0, 0, 0, 0.25) 55%, rgba(0, 0, 0, 0.75) 100%);
  pointer-events: none;
}

.hero__content {
  position: relative;
  z-index: 1;
  padding-top: var(--header-height);
  padding-bottom: var(--space-12);
}

.hero__kicker {
  font-size: var(--font-size-xs);
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: rgba(255, 255, 255, 0.8);
}

.hero__title {
  margin-top: var(--space-3);
  color: #fff;
}

.hero__subtitle {
  margin-top: var(--space-4);
  max-width: 34rem;
  color: rgba(255, 255, 255, 0.9);
}

.hero__actions {
  margin-top: var(--space-6);
}

/* Fullscreen slider shell – logic handled via JS */
.slider {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.slider__track {
  display: flex;
  height: 100%;
  will-change: transform;
}

.slider__slide {
  position: relative;
  flex: 0 0 100%;
  padding: 100px 0;
}

.slider__image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.slider__content {
  position: relative;
}

.slider__dots {
  position: absolute;
  left: 50%;
  bottom: var(--space-6);
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.slider__dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background-color: rgba(255, 255, 255, 0.4);
  border: none;
  padding: 0;
}

.slider__dot--active {
  width: 22px;
  background-color: #ffffff;
}

/* ==========================================================================
   Components – Badges & Meta
   ========================================================================== */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.15rem 0.6rem;
  border-radius: var(--radius-pill);
  font-size: var(--font-size-xs);
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background-color: rgba(0, 0, 0, 0.04);
  color: var(--gray-700);
}

.badge--outline {
  background-color: transparent;
  border: 1px solid var(--gray-300);
}

.badge--primary {
  background-color: var(--color-primary);
  color: #ffffff;
}

/* ==========================================================================
   Components – Stats / Timeline helpers
   ========================================================================== */
.stats {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-6);
}

.stats__item {
  min-width: 120px;
}

.stats__value {
  font-family: var(--font-heading);
  font-size: var(--font-size-3xl);
  letter-spacing: -0.05em;
}

.stats__label {
  margin-top: var(--space-1);
  font-size: var(--font-size-xs);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--gray-500);
}

.timeline {
  position: relative;
  padding-left: 1.5rem;
}

.timeline::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0.35rem;
  width: 1px;
  background: linear-gradient(to bottom, var(--gray-300), transparent 8%, var(--gray-300) 25%, transparent 30%, var(--gray-300) 60%, transparent 100%);
}

.timeline__item {
  position: relative;
  padding-bottom: var(--space-6);
}

.timeline__item::before {
  content: "";
  position: absolute;
  left: -0.1rem;
  top: 0.3rem;
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background-color: var(--color-primary);
}

.timeline__label {
  font-size: var(--font-size-xs);
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--gray-500);
}

/* ==========================================================================
   Misc Utilities
   ========================================================================== */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-muted { color: var(--color-text-muted); }

.hide-mobile {
  display: none !important;
}

@media (min-width: 768px) {
  .hide-mobile {
    display: initial !important;
  }
}

.hide-desktop {
  display: initial !important;
}

@media (min-width: 768px) {
  .hide-desktop {
    display: none !important;
  }
}
