/* ============================================================
   Rent.rv.ua — reset, typography, layout primitives
   ============================================================ */

/* ---------- Reset ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}
* {
  margin: 0;
}
html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}
body {
  min-height: 100dvh;
  font: var(--text-md);
  color: var(--color-text);
  background: var(--color-bg-page);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
main {
  overflow-x: clip;
}
img,
svg,
video {
  display: block;
  max-width: 100%;
}
input,
button,
textarea,
select {
  font: inherit;
  color: inherit;
}
button {
  cursor: pointer;
  background: none;
  border: 0;
  padding: 0;
}
a {
  color: inherit;
  text-decoration: none;
}
table {
  border-collapse: separate;
  border-spacing: 0;
}
::selection {
  background: var(--color-selection);
}
:focus-visible {
  outline: 2px solid var(--color-focus);
  outline-offset: 2px;
}
[hidden] {
  display: none !important;
}

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

/* ---------- Icons (SVG sprite: <svg class="icon"><use href="…#i-name"/></svg>) ---------- */
.icon {
  width: 20px;
  height: 20px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.icon--sm {
  width: 16px;
  height: 16px;
}
.icon--xs {
  width: 12px;
  height: 12px;
  stroke-width: 2;
}
.icon--lg {
  width: 24px;
  height: 24px;
}

/* ---------- Typography ---------- */
.t-display {
  font: var(--text-display);
  letter-spacing: var(--ls-tight);
}
.t-h2 {
  font: var(--text-h2);
  letter-spacing: var(--ls-snug);
}
.t-h3 {
  font: var(--text-h3);
  letter-spacing: var(--ls-snug);
}
.t-num-xl {
  font: var(--text-num-xl);
  letter-spacing: var(--ls-tight);
  font-variant-numeric: tabular-nums;
}
.t-lg {
  font: var(--text-lg);
}
.t-md {
  font: var(--text-md);
}
.t-sm {
  font: var(--text-sm);
}
.t-xs {
  font: var(--text-xs);
}
.t-overline {
  font: var(--text-overline);
  text-transform: uppercase;
  letter-spacing: var(--ls-wide);
}
.t-secondary {
  color: var(--color-text-secondary);
}
.t-tertiary {
  color: var(--color-text-tertiary);
}
.t-medium {
  font-weight: var(--fw-medium);
}
.t-semibold {
  font-weight: var(--fw-semibold);
}
.num {
  font-variant-numeric: tabular-nums;
  font-feature-settings: 'tnum' 1;
}
.amount--pos {
  color: var(--color-amount-positive);
}
.amount--neg {
  color: var(--color-amount-negative);
}
.amount--zero {
  color: var(--color-amount-zero);
}
.link {
  color: var(--color-text-link);
  font-weight: var(--fw-medium);
}
.link:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ---------- Layout ---------- */
.container {
  width: 100%;
  max-width: calc(var(--container) + var(--page-gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--page-gutter);
}
.container--fluid {
  max-width: none;
}
.page {
  padding-block: var(--space-6) var(--space-8);
}
.page-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3) var(--space-4);
  margin-bottom: var(--stack-gap);
}
.page-head__sub {
  margin-top: var(--space-1);
  color: var(--color-text-secondary);
}
.stack {
  display: flex;
  flex-direction: column;
  gap: var(--stack-gap);
}
.stack--sm {
  gap: var(--space-3);
}
.row {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}
.row--wrap {
  flex-wrap: wrap;
}
.row--between {
  justify-content: space-between;
}
.spacer {
  flex: 1;
}
.grid {
  display: grid;
  gap: var(--stack-gap);
  grid-template-columns: repeat(var(--cols, 1), minmax(0, 1fr));
}
@media (min-width: 768px) {
  .grid--2 {
    --cols: 2;
  }
  .grid--3,
  .grid--4 {
    --cols: 2;
  }
}
@media (min-width: 1280px) {
  .grid--3 {
    --cols: 3;
  }
  .grid--4 {
    --cols: 4;
  }
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* Visibility per breakpoint */
@media (max-width: 767.98px) {
  .hide-mobile {
    display: none !important;
  }
}
@media (min-width: 768px) {
  .only-mobile {
    display: none !important;
  }
}
