/* UNLOCK-RENT Drivers — cinematic premium */

:root {
  --bg: #06040c;
  --ink: #f7f6fb;
  --muted: #a69ebb;
  --dim: #736a8a;
  --line: rgba(247,246,251,0.08);
  --line-strong: rgba(247,246,251,0.16);
  --glass: rgba(21,16,32,0.55);
  --glass-strong: rgba(26,20,40,0.72);
  --accent: #d0c5eb;
  --accent-mid: #ab9bd4;
  --accent-deep: #836fb5;
  --accent-ink: #0d0818;
  --warm: #b5a0d8;
  --display: "Syne", "Segoe UI", system-ui, sans-serif;
  --sans: "Outfit", "Segoe UI", system-ui, sans-serif;
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-l: env(safe-area-inset-left, 0px);
  --safe-r: env(safe-area-inset-right, 0px);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }

body.drv-page {
  height: 100dvh;
  max-height: 100dvh;
  overflow: hidden;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
}

a { color: inherit; text-decoration: none; }
img, svg { -webkit-user-drag: none; user-select: none; pointer-events: none; }
.drv-link svg { pointer-events: none; }
.drv-link, .drv-nav a { -webkit-user-select: none; user-select: none; }

/* ——— Atmosphere ——— */
.drv-atmosphere {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
  background: #05030a;
}
.drv-atmosphere__canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  opacity: 0.95;
}
.drv-atmosphere__base {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 90% 70% at 50% -20%, rgba(25,18,42,0.75) 0%, transparent 55%),
    linear-gradient(168deg, rgba(11,8,18,0.35) 0%, rgba(6,4,12,0.55) 45%, rgba(4,2,8,0.7) 100%);
  mix-blend-mode: multiply;
}
.drv-atmosphere__spotlight {
  position: absolute;
  inset: 0;
  transition: opacity 0.4s ease;
  will-change: background;
}
.drv-atmosphere__mesh {
  position: absolute;
  inset: 0;
  opacity: 0.22;
  background-image:
    linear-gradient(rgba(208,197,235,0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(208,197,235,0.06) 1px, transparent 1px);
  background-size: 72px 72px;
  background-position: calc(var(--px, 50%) * 0.04) calc(var(--py, 40%) * 0.04);
  mask-image: radial-gradient(ellipse 75% 70% at var(--px, 50%) var(--py, 40%), #000 15%, transparent 72%);
  -webkit-mask-image: radial-gradient(ellipse 75% 70% at var(--px, 50%) var(--py, 40%), #000 15%, transparent 72%);
  transition: background-position 0.15s linear;
}
.drv-atmosphere__grain {
  position: absolute;
  inset: 0;
  opacity: 0.3;
  mix-blend-mode: soft-light;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 220 220' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.6'/%3E%3C/svg%3E");
  background-size: 240px;
}
.drv-atmosphere__vignette {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 72% at 50% 40%, transparent 28%, rgba(0, 0, 0, 0.58) 100%),
    linear-gradient(180deg, rgba(0, 0, 0, 0.2), transparent 18%, transparent 78%, rgba(0, 0, 0, 0.4));
}

.drv-shell {
  height: 100dvh;
  max-height: 100dvh;
  max-width: 1220px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: clamp(1rem, 2vh, 1.55rem);
  padding:
    calc(1.15rem + var(--safe-t))
    calc(1.4rem + var(--safe-r))
    calc(1.15rem + var(--safe-b))
    calc(1.4rem + var(--safe-l));
  overflow: hidden;
}

/* ——— Header ——— */
.drv-top {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.drv-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
}
.drv-logo__mark {
  width: 0.58rem;
  height: 0.58rem;
  border-radius: 2px;
  background: linear-gradient(135deg, #f6f2fb, var(--accent-deep) 55%, var(--warm));
  box-shadow: 0 0 20px rgba(208,197,235,0.5);
  transform: rotate(45deg);
}
.drv-logo__copy {
  display: flex;
  flex-direction: column;
  line-height: 1.05;
}
.drv-logo__copy strong {
  font-family: var(--display);
  font-size: 0.92rem;
  font-weight: 800;
  letter-spacing: 0.12em;
}
.drv-logo__copy em {
  margin-top: 0.12rem;
  font-style: normal;
  font-size: 0.68rem;
  font-weight: 500;
  color: var(--dim);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.drv-nav {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}
.drv-nav a {
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--muted);
  transition: color 0.2s var(--ease);
}
.drv-nav a:hover { color: var(--ink); }
.drv-nav__sep {
  width: 1px;
  height: 0.85rem;
  background: var(--line-strong);
}
.drv-nav__chimera {
  display: inline-flex;
  align-items: center;
  min-height: 1.95rem;
  padding: 0 0.9rem;
  border-radius: 999px;
  border: 1px solid rgba(208,197,235,0.28);
  color: var(--accent) !important;
  font-weight: 600 !important;
  background: linear-gradient(135deg, rgba(208,197,235,0.1), rgba(208,197,235,0.03));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
  transition: background 0.2s var(--ease), border-color 0.2s var(--ease), transform 0.2s var(--ease);
}
.drv-nav__chimera:hover {
  background: linear-gradient(135deg, rgba(208,197,235,0.16), rgba(208,197,235,0.06));
  border-color: rgba(208,197,235,0.5);
  transform: translateY(-1px);
}

/* ——— Intro ——— */
.drv-intro {
  flex: 0 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) auto;
  align-items: end;
  gap: 1.5rem 2rem;
  animation: drvRise 0.6s var(--ease) both;
}
.drv-intro__kicker {
  margin: 0 0 0.65rem;
  display: inline-flex;
  align-items: center;
  gap: 0.15rem;
  min-height: 1.1em;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent-mid);
}
.drv-intro__title {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(2.05rem, 3.5vw, 3rem);
  font-weight: 700;
  line-height: 0.98;
  letter-spacing: -0.035em;
  min-height: 1.05em;
}
.drv-intro__title .drv-type__out {
  background: linear-gradient(118deg, #ffffff 8%, #e9e4f5 48%, #b7a9db 92%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.drv-intro__lead {
  margin: 0.7rem 0 0;
  max-width: 34rem;
  min-height: 2.9em;
  font-size: 0.95rem;
  font-weight: 300;
  line-height: 1.5;
  color: var(--muted);
}

.drv-type__out { white-space: pre-wrap; }
.drv-type__caret {
  display: inline-block;
  width: 0.08em;
  height: 0.9em;
  margin-left: 0.08em;
  vertical-align: -0.05em;
  border-radius: 1px;
  background: linear-gradient(180deg, #f6f4fb, var(--accent-deep));
  box-shadow: 0 0 12px rgba(208,197,235,0.55);
  opacity: 0;
  transform: scaleY(0.85);
}
.drv-type.is-typing .drv-type__caret {
  opacity: 1;
  animation: drvCaret 0.75s steps(1) infinite;
}
.drv-type.is-done .drv-type__caret {
  opacity: 0;
  transition: opacity 0.35s ease;
}
.drv-intro__title .drv-type__caret {
  width: 0.06em;
  height: 0.82em;
  vertical-align: 0.02em;
  background: linear-gradient(180deg, #ffffff, var(--accent-mid));
}
.drv-intro__kicker .drv-type__caret {
  height: 0.85em;
  vertical-align: 0.05em;
}

@keyframes drvCaret {
  0%, 45% { opacity: 1; }
  50%, 100% { opacity: 0.15; }
}

.drv-intro__keys {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  padding: 0.9rem 1.05rem;
  border-radius: 18px;
  border: 1px solid var(--line-strong);
  background:
    linear-gradient(160deg, rgba(255, 255, 255, 0.05), transparent 42%),
    rgba(16,12,26,0.55);
  backdrop-filter: blur(18px) saturate(1.2);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 16px 36px rgba(0, 0, 0, 0.25);
  min-width: 13rem;
}
.drv-key {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}
.drv-key__swatch {
  width: 0.72rem;
  height: 0.72rem;
  border-radius: 999px;
  flex: 0 0 auto;
}
.drv-key__swatch--site {
  background: linear-gradient(135deg, #f3f0fb, var(--accent-deep));
  box-shadow: 0 0 14px rgba(208,197,235,0.4);
}
.drv-key__swatch--disk {
  border: 1px solid rgba(247,246,251,0.38);
  background: rgba(255, 255, 255, 0.03);
}
.drv-key div { min-width: 0; }
.drv-key strong {
  display: block;
  font-size: 0.74rem;
  font-weight: 600;
  white-space: nowrap;
}
.drv-key em {
  display: block;
  margin-top: 0.08rem;
  font-style: normal;
  font-size: 0.66rem;
  color: var(--dim);
  white-space: nowrap;
}

/* ——— Catalog cards ——— */
.drv-catalog {
  flex: 0 0 auto;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.9rem;
  align-content: start;
  perspective: 1400px;
}

.drv-item {
  --tone: var(--accent-mid);
  --rx: 0deg;
  --ry: 0deg;
  position: relative;
  border-radius: 22px;
  padding: 1px;
  background:
    linear-gradient(
      145deg,
      rgba(255, 255, 255, 0.38),
      rgba(255, 255, 255, 0.08) 26%,
      rgba(255, 255, 255, 0.03) 55%,
      color-mix(in srgb, var(--tone) 35%, transparent)
    );
  box-shadow:
    0 16px 40px rgba(0, 0, 0, 0.36),
    0 0 0 1px rgba(0, 0, 0, 0.3);
  opacity: 0;
  transform: translateY(16px) scale(0.985);
  transform-style: preserve-3d;
  animation: drvRise 0.58s var(--ease) forwards;
  animation-delay: calc(0.12s + var(--i, 0) * 44ms);
  transition:
    transform 0.28s var(--ease),
    box-shadow 0.35s var(--ease),
    background 0.35s var(--ease);
  will-change: transform;
}
.drv-item--cyan { --tone: #ae90dc; }
.drv-item--teal { --tone: #937eb8; }
.drv-item--blue { --tone: #a891e2; }
.drv-item--gold { --tone: #ab95d2; }

.drv-item__glow {
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  background:
    radial-gradient(circle at var(--mx, 70%) var(--my, 20%), color-mix(in srgb, var(--tone) 42%, transparent), transparent 52%),
    radial-gradient(circle at 20% 100%, rgba(255, 255, 255, 0.08), transparent 40%);
  opacity: 0;
  transition: opacity 0.35s var(--ease);
  pointer-events: none;
  z-index: 0;
}
.drv-item__inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 0.42rem;
  height: 100%;
  padding: 1.12rem 1.12rem 1.02rem;
  border-radius: 21px;
  background:
    linear-gradient(165deg, rgba(255, 255, 255, 0.12) 0%, transparent 36%),
    linear-gradient(180deg, rgba(37,30,55,0.62), rgba(11,8,20,0.78));
  backdrop-filter: blur(30px) saturate(1.4);
  -webkit-backdrop-filter: blur(30px) saturate(1.4);
  overflow: hidden;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}
.drv-item__inner::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at var(--mx, 80%) var(--my, 10%), color-mix(in srgb, var(--tone) 22%, transparent), transparent 45%),
    radial-gradient(circle at 100% 0%, color-mix(in srgb, var(--tone) 16%, transparent), transparent 42%);
  opacity: 0.85;
  pointer-events: none;
  transition: opacity 0.3s var(--ease);
}
.drv-item__inner::after {
  content: "";
  position: absolute;
  left: 10%;
  right: 10%;
  top: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.55), transparent);
  opacity: 0.8;
  pointer-events: none;
}

.drv-item:hover,
.drv-item.is-hot {
  transform:
    translateY(-4px)
    scale(1.008)
    rotateX(var(--rx))
    rotateY(var(--ry));
  background:
    linear-gradient(
      145deg,
      rgba(255, 255, 255, 0.4),
      rgba(255, 255, 255, 0.08) 28%,
      color-mix(in srgb, var(--tone) 32%, transparent)
    );
  box-shadow:
    0 20px 40px rgba(0, 0, 0, 0.34),
    0 0 0 1px rgba(0, 0, 0, 0.18),
    0 0 28px color-mix(in srgb, var(--tone) 12%, transparent);
}
.drv-item:hover .drv-item__glow,
.drv-item.is-hot .drv-item__glow { opacity: 1; }
.drv-item:hover .drv-item__inner,
.drv-item.is-hot .drv-item__inner {
  background:
    linear-gradient(165deg, rgba(255, 255, 255, 0.14) 0%, transparent 38%),
    linear-gradient(180deg, rgba(42,34,62,0.78), rgba(17,12,28,0.9));
}

.drv-item__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.12rem;
}
.drv-item__tag {
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--tone) 72%, var(--dim));
}
.drv-item__idx {
  font-family: var(--display);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: rgba(208,197,235,0.38);
}
.drv-item__name {
  margin: 0;
  position: relative;
  font-family: var(--display);
  font-size: clamp(0.98rem, 1.05vw, 1.14rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
}
.drv-item__about {
  margin: 0;
  position: relative;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 400;
  line-height: 1.42;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  min-height: calc(1.42em * 2);
}

.drv-item__links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.5rem;
  padding-top: 0.78rem;
  border-top: 1px solid rgba(247,246,251,0.08);
  position: relative;
}
.drv-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  min-height: 1.85rem;
  padding: 0 0.78rem;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(8px);
  transition:
    color 0.2s var(--ease),
    border-color 0.2s var(--ease),
    background 0.2s var(--ease),
    transform 0.2s var(--ease),
    box-shadow 0.2s var(--ease);
}
.drv-link svg {
  width: 0.8rem;
  height: 0.8rem;
  flex: 0 0 auto;
}
.drv-link:hover {
  color: var(--ink);
  border-color: rgba(247,246,251,0.32);
  background: rgba(255, 255, 255, 0.06);
  transform: translateY(-1px);
}
.drv-link--primary {
  color: var(--accent-ink);
  border-color: transparent;
  background: linear-gradient(135deg, #f6f4fc 0%, var(--accent) 42%, var(--accent-deep) 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.55),
    0 8px 18px rgba(131,111,181,0.28);
}
.drv-link--primary:hover {
  color: var(--accent-ink);
  border-color: transparent;
  background: linear-gradient(135deg, #ffffff 0%, #dfd7f2 50%, var(--accent-mid) 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.7),
    0 10px 22px rgba(131,111,181,0.36);
}

@keyframes drvRise {
  to { opacity: 1; transform: none; }
}

@media (max-width: 1100px) {
  .drv-catalog {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    overflow: auto;
  }
  .drv-intro {
    grid-template-columns: 1fr;
    align-items: start;
  }
  .drv-intro__keys {
    flex-direction: row;
    width: fit-content;
  }
}

@media (max-width: 820px) {
  body.drv-page,
  .drv-shell { overflow: auto; height: auto; max-height: none; justify-content: flex-start; }
  .drv-catalog { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .drv-nav a:not(.drv-nav__chimera),
  .drv-nav__sep { display: none; }
  .drv-logo__copy em { display: none; }
  .drv-atmosphere__mesh { opacity: 0.12; }
  .drv-item:hover {
    transform: translateY(-4px) scale(1.01);
  }
}

@media (max-width: 480px) {
  .drv-catalog { grid-template-columns: 1fr; }
  .drv-intro__title { font-size: 1.85rem; }
  .drv-intro__keys { width: 100%; }
}

@media (max-height: 760px) {
  .drv-intro__lead { display: none; }
  .drv-intro__keys { display: none; }
  .drv-item__inner { padding: 0.85rem 0.9rem 0.8rem; }
  .drv-item__about { font-size: 0.72rem; }
  .drv-shell { gap: 0.75rem; }
}

@media (prefers-reduced-motion: reduce) {
  .drv-intro,
  .drv-item { animation: none; opacity: 1; transform: none; }
  .drv-item:hover,
  .drv-link:hover,
  .drv-nav__chimera:hover { transform: none; }
  .drv-atmosphere__canvas { display: none; }
}
