/* ==========================================================================
   Kompas Rental — arkusz stylów
   ========================================================================== */

/* ---- base.css (wymagane resetowanie) ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html {
  -moz-text-size-adjust: none;
  -webkit-text-size-adjust: none;
  text-size-adjust: none;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  scroll-behavior: smooth;
  hanging-punctuation: first last;
  scroll-padding-top: var(--space-20);
}
body {
  min-height: 100dvh;
  line-height: 1.6;
  font-family: var(--font-body, sans-serif);
  font-size: var(--text-base);
  color: var(--color-text);
  background-color: var(--color-bg);
}
img, picture, video, canvas, svg { display: block; max-width: 100%; height: auto; }
ul[role="list"], ol[role="list"] { list-style: none; }
input, button, textarea, select { font: inherit; color: inherit; }
h1, h2, h3, h4, h5, h6 { text-wrap: balance; line-height: 1.15; }
p, li, figcaption { text-wrap: pretty; }
::selection { background: oklch(from var(--color-primary) l c h / 0.25); color: var(--color-text); }
:focus-visible { outline: 2px solid var(--color-primary); outline-offset: 3px; border-radius: var(--radius-sm); }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
button { cursor: pointer; background: none; border: none; }
table { border-collapse: collapse; width: 100%; }
a, button, [role="button"], input, select {
  transition: color var(--transition-interactive), background var(--transition-interactive),
    border-color var(--transition-interactive), box-shadow var(--transition-interactive);
}
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border-width: 0;
}

/* ---- design tokens ---- */
:root {
  --text-xs: clamp(0.75rem, 0.7rem + 0.25vw, 0.875rem);
  --text-sm: clamp(0.875rem, 0.8rem + 0.35vw, 1rem);
  --text-base: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  --text-lg: clamp(1.125rem, 1rem + 0.75vw, 1.5rem);
  --text-xl: clamp(1.5rem, 1.2rem + 1.25vw, 2.25rem);
  --text-2xl: clamp(2rem, 1.2rem + 2.5vw, 3.5rem);
  --text-3xl: clamp(2.5rem, 1rem + 4vw, 4.5rem);

  --space-1: 0.25rem; --space-2: 0.5rem; --space-3: 0.75rem; --space-4: 1rem;
  --space-5: 1.25rem; --space-6: 1.5rem; --space-8: 2rem; --space-10: 2.5rem;
  --space-12: 3rem; --space-16: 4rem; --space-20: 5rem; --space-24: 6rem; --space-32: 8rem;

  --radius-sm: 0.375rem; --radius-md: 0.5rem; --radius-lg: 0.75rem; --radius-xl: 1rem; --radius-full: 9999px;
  --transition-interactive: 180ms cubic-bezier(0.16, 1, 0.3, 1);

  --content-narrow: 640px; --content-default: 1040px; --content-wide: 1280px;

  --font-display: 'Space Grotesk', 'Archivo', 'Helvetica Neue', sans-serif;
  --font-body: 'IBM Plex Sans', 'Inter', 'Helvetica Neue', sans-serif;
  --font-mono: 'IBM Plex Mono', 'Menlo', monospace;
}

/* ---- industrial palette: concrete grays + safety amber accent ---- */
:root, [data-theme='light'] {
  --color-bg: #efece5;
  --color-surface: #f8f6f1;
  --color-surface-2: #ffffff;
  --color-surface-offset: #e5e1d7;
  --color-surface-dynamic: #dbd6c9;
  --color-divider: #d3cebd;
  --color-border: #c2bca7;

  --color-text: #201d17;
  --color-text-muted: #635d4e;
  --color-text-faint: #9b9482;
  --color-text-inverse: #f8f6f1;

  --color-primary: #d5720f;
  --color-primary-hover: #b45c08;
  --color-primary-active: #8f4706;
  --color-primary-highlight: #f3ddc0;

  --color-steel: #3a4750;
  --color-steel-hover: #2c363d;

  --color-success: #3f7a35;
  --color-success-highlight: #d9e6d2;

  --shadow-sm: 0 1px 2px oklch(0.2 0.02 80 / 0.08);
  --shadow-md: 0 6px 16px oklch(0.2 0.02 80 / 0.12);
  --shadow-lg: 0 16px 40px oklch(0.2 0.02 80 / 0.18);
}

[data-theme='dark'] {
  --color-bg: #17181a;
  --color-surface: #1d1f21;
  --color-surface-2: #232527;
  --color-surface-offset: #262729;
  --color-surface-dynamic: #2e2f31;
  --color-divider: #303234;
  --color-border: #3c3e40;

  --color-text: #e9e6df;
  --color-text-muted: #a4a099;
  --color-text-faint: #6c6a64;
  --color-text-inverse: #17181a;

  --color-primary: #f0913f;
  --color-primary-hover: #f6ab6c;
  --color-primary-active: #fac190;
  --color-primary-highlight: #4a3a26;

  --color-steel: #8fa2ad;
  --color-steel-hover: #aebdc6;

  --color-success: #7cbf6a;
  --color-success-highlight: #2c3b28;

  --shadow-sm: 0 1px 2px oklch(0 0 0 / 0.3);
  --shadow-md: 0 6px 16px oklch(0 0 0 / 0.35);
  --shadow-lg: 0 16px 40px oklch(0 0 0 / 0.45);
}

/* ==========================================================================
   Layout primitives
   ========================================================================== */

.wrap { max-width: var(--content-wide); margin-inline: auto; padding-inline: var(--space-6); }
.wrap--narrow { max-width: var(--content-default); }

section { padding-block: clamp(var(--space-16), 8vw, var(--space-24)); }

.eyebrow {
  display: inline-flex; align-items: center; gap: var(--space-2);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-primary);
  font-weight: 600;
}
.eyebrow::before {
  content: "";
  width: 8px; height: 8px;
  background: var(--color-primary);
  clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%);
}

h2.section-title {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 700;
  margin-top: var(--space-3);
  letter-spacing: -0.01em;
}

.section-lede {
  font-size: var(--text-base);
  color: var(--color-text-muted);
  max-width: 60ch;
  margin-top: var(--space-4);
}

/* ==========================================================================
   Header
   ========================================================================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in oklab, var(--color-bg) 88%, transparent);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--color-divider);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding-block: var(--space-4);
}
.brand {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  text-decoration: none;
  color: var(--color-text);
}
.brand svg { width: 34px; height: 34px; flex-shrink: 0; }
.brand-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--text-base);
  letter-spacing: -0.01em;
  line-height: 1.1;
}
.brand-tag {
  display: block;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  letter-spacing: 0.04em;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: var(--space-6);
}
.main-nav a {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-text-muted);
  text-decoration: none;
}
.main-nav a:hover { color: var(--color-text); }

.header-actions { display: flex; align-items: center; gap: var(--space-3); }

.theme-toggle {
  width: 38px; height: 38px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  color: var(--color-text);
  background: var(--color-surface);
}
.theme-toggle:hover { background: var(--color-surface-offset); }

.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-sm);
  font-weight: 600;
  padding: var(--space-3) var(--space-5);
  border-radius: var(--radius-md);
  text-decoration: none;
  border: 1px solid transparent;
  white-space: nowrap;
}
.btn--primary {
  background: var(--color-primary);
  color: #1a1408;
  box-shadow: var(--shadow-sm);
}
.btn--primary:hover { background: var(--color-primary-hover); color: #fff; }
.btn--ghost {
  background: transparent;
  border-color: var(--color-border);
  color: var(--color-text);
}
.btn--ghost:hover { background: var(--color-surface-offset); }
.btn--sm { padding: var(--space-2) var(--space-4); font-size: var(--text-xs); }

.nav-toggle { display: none; }
.header-actions .btn--primary span.short { display: none; }

@media (max-width: 860px) {
  .main-nav { display: none; }
}
@media (max-width: 480px) {
  .header-actions .btn--primary span.long { display: none; }
  .header-actions .btn--primary span.short { display: inline; }
}

/* ==========================================================================
   Hero
   ========================================================================== */

.hero {
  padding-block: clamp(var(--space-16), 10vw, var(--space-32)) clamp(var(--space-12), 6vw, var(--space-20));
  position: relative;
  overflow: hidden;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: var(--space-12);
  align-items: center;
}
.hero-copy h1 {
  font-family: var(--font-display);
  font-size: var(--text-3xl);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-top: var(--space-4);
}
.hero-copy h1 em {
  font-style: normal;
  color: var(--color-primary);
}
.hero-copy p {
  margin-top: var(--space-5);
  font-size: var(--text-lg);
  color: var(--color-text-muted);
  max-width: 52ch;
}
.hero-actions {
  display: flex;
  gap: var(--space-4);
  margin-top: var(--space-8);
  flex-wrap: wrap;
}
.hero-stats {
  display: flex;
  gap: var(--space-8);
  margin-top: var(--space-12);
  flex-wrap: wrap;
}
.hero-stat strong {
  display: block;
  font-family: var(--font-display);
  font-size: var(--text-xl);
  color: var(--color-text);
}
.hero-stat span {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.hero-collage {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-3);
}
.hero-collage img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}
.hero-collage .tall { grid-row: span 2; aspect-ratio: 3/4; object-position: right bottom; }
.hero-collage .wide { aspect-ratio: 4/3; }

@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-collage { order: -1; }
}

/* ==========================================================================
   Trust strip
   ========================================================================== */

.trust-strip {
  padding-block: var(--space-6);
  border-block: 1px solid var(--color-divider);
  background: var(--color-surface);
}
.trust-strip ul {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--space-4);
}
.trust-strip li {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  font-weight: 500;
}
.trust-strip svg { width: 18px; height: 18px; color: var(--color-primary); flex-shrink: 0; }

/* ==========================================================================
   Equipment cards
   ========================================================================== */

.equipment-header { text-align: left; }

.equipment-grid {
  margin-top: var(--space-12);
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-10);
}

.machine-card {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  background: var(--color-surface);
  border: 1px solid var(--color-divider);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.machine-card:nth-child(even) { grid-template-columns: 1fr 1.1fr; }
.machine-card:nth-child(even) .machine-gallery { order: 2; }

.machine-gallery {
  position: relative;
  background: var(--color-surface-offset);
}
.machine-gallery .gallery-main {
  aspect-ratio: 4/3;
  width: 100%;
  object-fit: cover;
}
.gallery-thumbs {
  position: absolute;
  bottom: var(--space-3);
  left: var(--space-3);
  display: flex;
  gap: var(--space-2);
}
.gallery-thumbs button {
  width: 52px; height: 52px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 2px solid color-mix(in oklab, #fff 60%, transparent);
  padding: 0;
  box-shadow: var(--shadow-sm);
}
.gallery-thumbs button.active { border-color: var(--color-primary); }
.gallery-thumbs img { width: 100%; height: 100%; object-fit: cover; }

.machine-category {
  position: absolute;
  top: var(--space-3);
  left: var(--space-3);
  background: color-mix(in oklab, var(--color-steel) 92%, transparent);
  color: #fff;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: 0.04em;
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-full);
}

.machine-body {
  padding: clamp(var(--space-6), 3vw, var(--space-8));
  display: flex;
  flex-direction: column;
}
.machine-body h3 {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 700;
}
.machine-model {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  margin-top: var(--space-1);
  letter-spacing: 0.02em;
}
.machine-desc {
  margin-top: var(--space-4);
  color: var(--color-text-muted);
  font-size: var(--text-sm);
}

.spec-list {
  margin-top: var(--space-5);
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-2) var(--space-4);
}
.spec-list li {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  border-top: 1px solid var(--color-divider);
  padding-top: var(--space-2);
}
.spec-list li strong {
  display: block;
  color: var(--color-text);
  font-size: var(--text-sm);
  font-weight: 600;
}

.price-table {
  margin-top: var(--space-6);
  border: 1px solid var(--color-divider);
  border-radius: var(--radius-md);
  overflow: hidden;
}
.price-table table { font-size: var(--text-sm); }
.price-table th, .price-table td {
  padding: var(--space-3) var(--space-4);
  text-align: center;
}

@media (max-width: 420px) {
  .price-table th, .price-table td { padding: var(--space-2) var(--space-1); }
  .price-table tbody td { font-size: var(--text-base); }
}
.price-table thead th {
  background: var(--color-surface-offset);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-text-muted);
  font-weight: 600;
}
.price-table tbody td {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--text-lg);
  border-top: 1px solid var(--color-divider);
  white-space: nowrap;
}
.price-table tbody td span {
  display: block;
  font-family: var(--font-body);
  font-weight: 400;
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  margin-top: var(--space-1);
}
.price-table tbody td.best { color: var(--color-primary); }

.machine-footer {
  margin-top: var(--space-6);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  flex-wrap: wrap;
}
.deposit-note {
  font-size: var(--text-xs);
  color: var(--color-text-faint);
}

@media (max-width: 760px) {
  .machine-card, .machine-card:nth-child(even) { grid-template-columns: 1fr; }
  .machine-card:nth-child(even) .machine-gallery { order: 0; }
  .spec-list { grid-template-columns: 1fr 1fr; }
}

/* ==========================================================================
   How it works
   ========================================================================== */

.how-grid {
  margin-top: var(--space-12);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-6);
}
.how-step {
  background: var(--color-surface);
  border: 1px solid var(--color-divider);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
}
.how-step .step-num {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  color: var(--color-primary);
  font-weight: 700;
}
.how-step h3 {
  margin-top: var(--space-3);
  font-size: var(--text-base);
  font-weight: 700;
}
.how-step p {
  margin-top: var(--space-2);
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

@media (max-width: 900px) {
  .how-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .how-grid { grid-template-columns: 1fr; }
}

.terms-box {
  margin-top: var(--space-10);
  background: var(--color-surface-offset);
  border-radius: var(--radius-lg);
  padding: clamp(var(--space-6), 4vw, var(--space-10));
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-8);
}
.terms-box h4 {
  font-size: var(--text-sm);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-primary);
  font-family: var(--font-mono);
}
.terms-box p {
  margin-top: var(--space-2);
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}
@media (max-width: 760px) {
  .terms-box { grid-template-columns: 1fr; }
}

/* ==========================================================================
   Contact / footer
   ========================================================================== */

.contact-section {
  background: var(--color-steel);
  color: #f2efe8;
  border-radius: var(--radius-xl);
  margin-inline: var(--space-6);
  padding: clamp(var(--space-10), 6vw, var(--space-20));
}
.contact-inner {
  max-width: var(--content-wide);
  margin-inline: auto;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: var(--space-12);
  align-items: center;
}
.contact-inner h2 {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 700;
  color: #fff;
}
.contact-inner p {
  margin-top: var(--space-4);
  color: color-mix(in oklab, #f2efe8 80%, transparent);
  max-width: 46ch;
}
.contact-cards {
  display: grid;
  gap: var(--space-4);
}
.contact-card {
  background: color-mix(in oklab, #fff 8%, transparent);
  border: 1px solid color-mix(in oklab, #fff 14%, transparent);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  display: flex;
  align-items: center;
  gap: var(--space-4);
}
.contact-card svg { width: 22px; height: 22px; color: var(--color-primary); flex-shrink: 0; }
.contact-card strong { display: block; font-size: var(--text-sm); }
.contact-card span { font-size: var(--text-xs); color: color-mix(in oklab, #f2efe8 70%, transparent); }
.contact-card a { color: inherit; text-decoration: underline; text-underline-offset: 2px; text-decoration-color: color-mix(in oklab, #f2efe8 40%, transparent); }
.contact-card a:hover { text-decoration-color: currentColor; }

@media (max-width: 860px) {
  .contact-inner { grid-template-columns: 1fr; }
  .contact-section { margin-inline: var(--space-4); }
}

.site-footer {
  padding-block: var(--space-12);
  text-align: center;
}
.site-footer p {
  font-size: var(--text-xs);
  color: var(--color-text-faint);
}
.site-footer .footer-brand {
  display: flex; align-items: center; justify-content: center; gap: var(--space-2);
  margin-bottom: var(--space-4);
}
.site-footer .footer-brand svg { width: 22px; height: 22px; color: var(--color-text-muted); }

/* ==========================================================================
   Fade-in reveal (minimal motion)
   ========================================================================== */

.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s cubic-bezier(0.16,1,0.3,1), transform 0.6s cubic-bezier(0.16,1,0.3,1);
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}
