/* ============ RanGarage – dark theme ============ */
:root {
  --orange: #e8834a;
  --orange-dark: #cf6a2e;
  --orange-soft: #2c2018;
  --ink: #ece7e2;
  --ink-soft: #a59d94;
  --bg: #121110;
  --bg-alt: #191716;
  --card: #201d1b;
  --border: #2e2a26;
  --shadow: 0 10px 30px rgba(0, 0, 0, .35);
  --shadow-lg: 0 24px 60px rgba(0, 0, 0, .5);
  --radius: 18px;
  --font: "Inter", "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: "Unbounded", "Inter", "Segoe UI", system-ui, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
.container { width: min(1160px, 92%); margin: 0 auto; }
.accent { color: var(--orange); }
.center { text-align: center; margin-top: 2.5rem; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .55rem;
  padding: .85rem 1.6rem; border-radius: 999px;
  font-weight: 700; font-size: 1rem; cursor: pointer;
  transition: transform .25s ease, box-shadow .25s ease, background .25s ease, color .25s ease;
  border: 2px solid transparent;
}
.btn:hover { transform: translateY(-3px); }
.btn:active { transform: translateY(-1px) scale(.98); }
.btn-primary {
  background: linear-gradient(135deg, var(--orange), var(--orange-dark));
  color: #fff;
  box-shadow: 0 8px 24px rgba(232, 131, 74, .25);
}
.btn-primary:hover { box-shadow: 0 14px 34px rgba(232, 131, 74, .35); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--border); }
.btn-ghost:hover { border-color: var(--orange); color: var(--orange); }
.btn-outline { background: transparent; color: var(--orange); border-color: var(--orange); padding: .65rem 1.35rem; }
.btn-outline:hover { background: var(--orange); color: #121110; }
.btn-sm { padding: .55rem 1.1rem; font-size: .9rem; }

/* ---------- Nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(18, 17, 16, .82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .7rem 0; }
.brand { display: flex; align-items: center; gap: .7rem; font-size: 1.05rem; font-weight: 700; font-family: var(--font-display); }
.brand-logo { border-radius: 50%; box-shadow: 0 0 0 3px var(--orange-soft); }
.nav-links { display: flex; gap: 1.6rem; font-weight: 600; color: var(--ink-soft); }
.nav-links a { position: relative; padding: .3rem 0; transition: color .2s; }
.nav-links a::after {
  content: ""; position: absolute; left: 0; bottom: 0; height: 2.5px; width: 0;
  background: var(--orange); border-radius: 2px; transition: width .3s ease;
}
.nav-links a:hover { color: var(--ink); }
.nav-links a:hover::after { width: 100%; }

/* ---------- Hero ---------- */
.hero { position: relative; padding: 5.5rem 0 4.5rem; overflow: hidden; }
.hero-bg { position: absolute; inset: 0; pointer-events: none; }
.blob {
  position: absolute; border-radius: 50%; filter: blur(70px); opacity: .5;
  animation: blob-float 14s ease-in-out infinite alternate;
}
.blob-1 { width: 480px; height: 480px; background: #3a2a1d; top: -160px; right: -120px; }
.blob-2 { width: 380px; height: 380px; background: #2a251f; bottom: -140px; left: -100px; animation-delay: -7s; }
@keyframes blob-float {
  from { transform: translate(0, 0) scale(1); }
  to { transform: translate(40px, 30px) scale(1.12); }
}
.road-lines {
  position: absolute; left: 0; right: 0; bottom: 0; height: 5px;
  background: repeating-linear-gradient(90deg, var(--orange) 0 60px, transparent 60px 120px);
  opacity: .45;
  animation: road-move 3s linear infinite;
}
@keyframes road-move { to { background-position-x: 120px; } }

.hero-inner {
  position: relative; display: grid; grid-template-columns: 1.25fr 1fr;
  gap: 3rem; align-items: center;
}
.hero-kicker {
  display: inline-block; background: var(--orange-soft); color: var(--orange-dark);
  font-weight: 700; padding: .4rem 1rem; border-radius: 999px; margin-bottom: 1.2rem;
  font-size: .95rem;
}
.hero h1 { font-family: var(--font-display); font-size: clamp(1.55rem, 3.4vw, 2.5rem); line-height: 1.28; margin-bottom: 1.2rem; letter-spacing: 0; }
.hero-sub { font-size: 1.13rem; color: var(--ink-soft); margin-bottom: 1.8rem; max-width: 56ch; }
.hero-cta { display: flex; flex-wrap: wrap; gap: .9rem; margin-bottom: 2.4rem; }

.stats { display: flex; gap: 2.6rem; flex-wrap: wrap; }
.stat { display: flex; flex-direction: column; }
.stat-num { font-family: var(--font-display); font-size: 1.55rem; font-weight: 700; color: var(--orange); font-variant-numeric: tabular-nums; }
.odo { display: inline-flex; align-items: flex-start; }
.odo-digit {
  display: inline-block; height: 1.2em; overflow: hidden; line-height: 1.2em;
}
.odo-strip {
  display: block; will-change: transform;
  transition: transform 2.2s cubic-bezier(.22, .8, .28, 1);
}
.odo-strip span { display: block; height: 1.2em; line-height: 1.2em; text-align: center; }
.odo-static { display: inline-block; height: 1.2em; line-height: 1.2em; white-space: pre; }
.stat-label { color: var(--ink-soft); font-weight: 600; font-size: .92rem; }

.hero-avatar { position: relative; justify-self: center; }
.avatar-ring {
  position: relative; padding: 10px; border-radius: 50%;
  background: conic-gradient(from 0deg, var(--orange), #8a5a34, var(--orange));
  animation: ring-spin 8s linear infinite;
}
.avatar-ring img { border-radius: 50%; animation: ring-unspin 8s linear infinite; }
@keyframes ring-spin { to { transform: rotate(360deg); } }
@keyframes ring-unspin { to { transform: rotate(-360deg); } }

.float-badge {
  position: absolute; background: var(--card); border: 1px solid var(--border);
  border-radius: 999px; padding: .3rem .75rem; font-weight: 700; font-size: .78rem;
  box-shadow: var(--shadow);
  animation: badge-bob 4s ease-in-out infinite;
}
.badge-1 { top: 6%; left: -14%; }
.badge-2 { bottom: 14%; right: -12%; animation-delay: -1.3s; }
.badge-3 { bottom: -4%; left: 4%; animation-delay: -2.6s; font-size: 1.05rem; padding: .5rem 1.15rem; }
@keyframes badge-bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

/* ---------- Sections ---------- */
.section { padding: 5rem 0; position: relative; overflow: hidden; }
.section > .container { position: relative; z-index: 1; }

/* ---------- Мечо – background accents ---------- */
.mecho-accent {
  position: absolute; top: 50%; width: min(30vw, 400px); height: auto;
  opacity: .38; pointer-events: none; z-index: 0;
  -webkit-mask-image: radial-gradient(ellipse 62% 55% at center, #000 35%, transparent 78%);
  mask-image: radial-gradient(ellipse 62% 55% at center, #000 35%, transparent 78%);
}
.mecho-right { right: -4%; transform: translateY(-50%) rotate(3deg); }
.mecho-left { left: -4%; transform: translateY(-50%) rotate(-3deg); }
@media (max-width: 1100px) {
  /* On mobile the accent sits behind the section header, fading into the
     background; cards with solid backgrounds pass over it. */
  .mecho-accent {
    top: -8vw; bottom: auto; left: 50%; right: auto;
    width: 82vw; opacity: .45;
    transform: translateX(-50%) rotate(0);
    -webkit-mask-image: radial-gradient(ellipse 58% 52% at center, #000 32%, transparent 76%);
    mask-image: radial-gradient(ellipse 58% 52% at center, #000 32%, transparent 76%);
  }
  /* Bigger headers over the photo, cards pushed down so the first row
     covers no more than ~20% of the image */
  .has-mecho .section-kicker { font-size: 1.05rem; }
  .has-mecho .section-title { font-size: 1.8rem; }
  .has-mecho .about-grid,
  .has-mecho .community-grid { margin-top: 56vw; }
}
.section-alt { background: var(--bg-alt); }
.section-kicker {
  text-align: center; color: var(--orange-dark); font-weight: 700;
  text-transform: uppercase; letter-spacing: 1.5px; font-size: .85rem; margin-bottom: .5rem;
  text-shadow: 0 1px 3px rgba(0, 0, 0, .6), 0 2px 14px rgba(0, 0, 0, .7);
}
.section-title {
  font-family: var(--font-display); text-align: center; font-size: clamp(1.35rem, 2.5vw, 1.9rem); margin-bottom: 3rem; letter-spacing: 0;
  text-shadow: 0 1px 3px rgba(0, 0, 0, .6), 0 2px 14px rgba(0, 0, 0, .7);
}

/* ---------- About ---------- */
.about-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1.4rem; }
.about-card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1.8rem 1.6rem; transition: transform .3s ease, box-shadow .3s ease, border-color .3s ease;
}
.about-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); border-color: #4a3728; }
.about-icon { font-size: 2.1rem; margin-bottom: .8rem; }
.about-card h3 { margin-bottom: .5rem; font-size: 1.12rem; }
.about-card p { color: var(--ink-soft); font-size: .97rem; }

/* ---------- Content cards ---------- */
.content-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.4rem; }
.content-card {
  position: relative; background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 2rem 1.7rem; overflow: hidden;
  transition: transform .3s ease, box-shadow .3s ease;
}
.content-card::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 4px;
  background: linear-gradient(90deg, var(--orange), #e8a06a);
  transform: scaleX(0); transform-origin: left; transition: transform .4s ease;
}
.content-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.content-card:hover::before { transform: scaleX(1); }
.content-emoji { font-size: 2.3rem; margin-bottom: .9rem; }
.content-card h3 { margin-bottom: .55rem; font-size: 1.15rem; }
.content-card p { color: var(--ink-soft); font-size: .97rem; }

/* ---------- Featured (latest video) ---------- */
.featured {
  display: grid; grid-template-columns: 1.6fr 1fr; gap: 2rem; align-items: center;
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1.4rem; box-shadow: var(--shadow);
}
.featured-player {
  position: relative; aspect-ratio: 16 / 9; border-radius: 12px; overflow: hidden;
  background: #14110f; cursor: pointer;
}
.featured-player img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease, opacity .3s ease; }
.featured-player:hover img { transform: scale(1.04); opacity: .85; }
.featured-player iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.featured-play {
  position: absolute; inset: 0; margin: auto; width: 76px; height: 76px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(207, 106, 46, .92); color: #fff; border: none; border-radius: 50%;
  cursor: pointer; transition: transform .3s ease, background .3s ease;
  box-shadow: 0 12px 32px rgba(20, 17, 15, .4);
}
.featured-player:hover .featured-play { transform: scale(1.1); background: var(--orange-dark); }
.featured-info h3 { font-size: 1.35rem; line-height: 1.35; margin-bottom: .7rem; letter-spacing: -.3px; }
.featured-info .video-meta { margin-bottom: 1.4rem; }

/* ---------- Videos ---------- */
.video-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1.5rem; }
.video-card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; transition: transform .3s ease, box-shadow .3s ease;
}
.video-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.thumb { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: #2e2a26; }
.thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.video-card:hover .thumb img { transform: scale(1.07); }
.play-btn {
  position: absolute; inset: 0; margin: auto; width: 58px; height: 58px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(207, 106, 46, .92); color: #fff; border-radius: 50%;
  opacity: 0; transform: scale(.6); transition: opacity .3s ease, transform .3s ease;
}
.video-card:hover .play-btn { opacity: 1; transform: scale(1); }
.video-info { padding: 1.1rem 1.2rem 1.3rem; }
.video-info h3 {
  font-size: 1rem; line-height: 1.4; margin-bottom: .5rem;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.video-meta { color: var(--ink-soft); font-size: .88rem; }

/* ---------- Community ---------- */
.community-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1.4rem; }
.community-card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 2.2rem 1.8rem; text-align: center;
  transition: transform .3s ease, box-shadow .3s ease;
}
.community-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.community-icon {
  width: 64px; height: 64px; margin: 0 auto 1rem; border-radius: 20px;
  display: flex; align-items: center; justify-content: center; font-size: 1.7rem;
}
.community-icon.yt { background: #382422; color: #e06060; }
.community-icon.fb { background: #222b3c; color: #7fa0d8; }
.community-icon.rv { background: #2d2738; }
.community-icon.biz { background: #2c2a22; }
.community-card h3 { margin-bottom: .6rem; }
.community-card p { color: var(--ink-soft); margin-bottom: 1.3rem; font-size: .97rem; }

/* ---------- Footer ---------- */
.footer { background: #0c0b0a; color: #b5aea7; padding: 3rem 0 2rem; text-align: center; }
.footer-inner { display: flex; flex-direction: column; align-items: center; gap: .8rem; }
.footer-brand { display: flex; align-items: center; gap: .6rem; font-size: 1.7rem; font-weight: 700; color: #fff; font-family: var(--font-display); }
.footer-copy { font-size: .85rem; color: #6e6862; margin-top: .6rem; }

/* ---------- To top ---------- */
.to-top {
  position: fixed; right: 1.4rem; bottom: 1.4rem; width: 48px; height: 48px;
  border: none; border-radius: 50%; background: var(--orange); color: #fff;
  font-size: 1.3rem; cursor: pointer; box-shadow: 0 10px 24px rgba(232, 131, 74, .3);
  opacity: 0; transform: translateY(16px); pointer-events: none;
  transition: opacity .3s ease, transform .3s ease; z-index: 40;
}
.to-top.show { opacity: 1; transform: translateY(0); pointer-events: auto; }
.to-top:hover { background: var(--orange-dark); }

/* ---------- Scroll reveal ---------- */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .7s ease, transform .7s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }
.delay-1 { transition-delay: .12s; }
.delay-2 { transition-delay: .24s; }
.delay-3 { transition-delay: .36s; }

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
  html { scroll-behavior: auto; }
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .featured { grid-template-columns: 1fr; }
  .featured-info { text-align: center; padding-bottom: .6rem; }
  .hero-inner { grid-template-columns: 1fr; text-align: center; }
  .hero-sub { margin-inline: auto; }
  .hero-cta, .stats { justify-content: center; }
  .hero-avatar { order: -1; }
  .avatar-ring img { width: 260px; height: 260px; }
  .badge-1 { left: -4%; }
  .badge-2 { right: -4%; }
  .nav-links { display: none; }
}
@media (max-width: 900px) {
  /* За мен: 2x2 instead of stacked/3+1 */
  .about-grid { grid-template-columns: 1fr 1fr; gap: 1rem; }
  .about-card { padding: 1.3rem 1.1rem; }
  .about-card p { font-size: .9rem; }
  .about-icon { font-size: 1.7rem; margin-bottom: .6rem; }
}
@media (max-width: 520px) {
  .section { padding: 3.5rem 0; }
  .hero { padding: 3.5rem 0 3rem; }
  .stats { gap: 1.6rem; }
  .stat-num { font-size: 1.6rem; }
  .float-badge { font-size: .8rem; padding: .35rem .8rem; }
}
