/* ==========================================================================
   hero.css — top bar + unified hero + 3D freely-slidable image bar
   The bar is a scroll-driven coverflow: each card's rotation, depth, scale
   and opacity are computed in hero.js from its distance to the centre.
   ========================================================================== */

/* ---------- Top bar ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(10, 7, 16, 0.72);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
}

.nav {
  max-width: var(--container);
  margin: 0 auto;
  height: 68px;
  padding: 0 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0;
  font-size: 21px;
  font-weight: 800;
  letter-spacing: -0.03em;
}
.brand > img { margin-right: 9px; }
.brand span { color: var(--accent); font-weight: 700; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
  font-size: 14px;
  color: var(--muted);
}
.nav-links a:hover { color: var(--text); }

.nav-end { display: flex; align-items: center; gap: 16px; }

/* ---------- Hero ---------- */

.hero {
  position: relative;
  isolation: isolate;
  max-width: var(--container);
  margin: 0 auto;
  padding: clamp(56px, 8vw, 96px) 32px 30px;
  text-align: center;
  overflow: hidden;
}

/* ambient glows */
.hero::before,
.hero::after {
  content: "";
  position: absolute;
  z-index: -1;
  border-radius: 50%;
  filter: blur(90px);
  pointer-events: none;
}
.hero::before {
  width: 560px; height: 560px;
  left: -140px; top: -120px;
  background: rgba(255, 77, 141, 0.16);
}
.hero::after {
  width: 640px; height: 640px;
  right: -180px; top: 120px;
  background: rgba(168, 85, 247, 0.14);
}

.hero-copy {
  max-width: 860px;
  margin: 0 auto;
}

.hero h1 {
  margin: 28px 0 22px;
  font-size: clamp(44px, 6.4vw, 84px);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.035em;
  text-wrap: balance;
}

.intro {
  max-width: 620px;
  margin: 0 auto;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.75;
  text-wrap: pretty;
}

.hero-actions {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 34px;
}

.fine-print {
  margin-top: 22px;
  font-size: 12px;
  color: var(--faint);
}

/* ---------- 3D freely-slidable image bar ---------- */

.strip {
  --rot-max: 50; /* max edge rotation in degrees; tuned per breakpoint */
  position: relative;
  margin-top: clamp(48px, 6vw, 68px);
}

.strip-stage { position: relative; }

/* soft ground shadow under the fan of cards */
.strip-stage::before {
  content: "";
  position: absolute;
  z-index: 0;
  left: 10%;
  right: 10%;
  bottom: -2px;
  height: 46px;
  background: radial-gradient(ellipse at center, rgba(0, 0, 0, 0.5), transparent 70%);
  filter: blur(8px);
  pointer-events: none;
}

/* floating arrows over the carousel edges */
.strip-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 6;
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  font-size: 18px;
  color: var(--text);
  background: rgba(12, 8, 18, 0.62);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  transition: border-color 0.2s ease, transform 0.2s ease, opacity 0.2s ease;
}
.strip-arrow-prev { left: 2px; }
.strip-arrow-next { right: 2px; }
.strip-arrow:hover:not(:disabled) {
  border-color: rgba(255, 77, 141, 0.55);
  transform: translateY(-50%) scale(1.06);
}
.strip-arrow:disabled { opacity: 0.25; cursor: default; }

.strip-viewport {
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
  cursor: grab;
  padding: 16px 0 28px; /* headroom for focus rings */
}
.strip-viewport::-webkit-scrollbar { display: none; }
.strip-viewport:active { cursor: grabbing; }
.strip-viewport:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
  border-radius: var(--radius);
}

.strip-track {
  display: flex;
  gap: 14px;
  width: max-content;
  /* half-viewport padding lets the first and last cards reach the
     viewport centre; the fan opens centred (see hero.js init) */
  padding: 0 calc(50% - 120px);
  perspective: 1500px;
  perspective-origin: 50% 45%; /* overwritten per frame in hero.js */
  user-select: none;
  -webkit-user-select: none;
}

.strip-track li {
  flex: none;
  will-change: transform, opacity;
}

/* ---------- Cards ---------- */

.card {
  position: relative;
  display: block;
  width: 240px;
  border-radius: var(--radius);
  border: 1px solid rgba(255, 255, 255, 0.12);
  overflow: hidden;
  background: var(--surface);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}
.card:hover {
  transform: translateY(-5px);
  border-color: rgba(255, 77, 141, 0.5);
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.card-art {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
}
.card-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 22%;
  transition: transform 0.4s ease;
  -webkit-user-drag: none;
}
.card:hover .card-art img { transform: scale(1.05); }

.card-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 42%, rgba(10, 7, 16, 0.55) 70%, rgba(10, 7, 16, 0.94) 100%);
}

.card-copy {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 14px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  pointer-events: none;
}

.card-name {
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.card-tag {
  font-size: 11.5px;
  color: #cfc6d8;
  line-height: 1.5;
}

/* feature cards: gradient art + icon */
.card-feature .card-art {
  display: grid;
  place-items: center;
  color: #fff;
}
.card-feature .card-art::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 72% 22%, rgba(255, 255, 255, 0.22), transparent 42%);
}
.card-feature .card-art svg {
  position: relative;
  z-index: 1;
  width: 52px;
  height: 52px;
  filter: drop-shadow(0 6px 18px rgba(0, 0, 0, 0.35));
}
.card-feature.f1 .card-art { background: linear-gradient(160deg, #ff4d8d, #c026d3); }
.card-feature.f2 .card-art { background: linear-gradient(160deg, #a855f7, #6366f1); }
.card-feature.f3 .card-art { background: linear-gradient(160deg, #f472b6, #8b5cf6); }
.card-feature.f4 .card-art { background: linear-gradient(160deg, #fb923c, #f43f5e); }
.card-feature.f5 .card-art { background: linear-gradient(160deg, #38bdf8, #6366f1); }
.card-feature .card-tag { color: #d6cde0; }

/* ---------- Progress ---------- */

.strip-progress {
  position: relative;
  z-index: 2;
  height: 3px;
  margin: 6px 24px 0;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.07);
  overflow: hidden;
}
.strip-progress span {
  display: block;
  height: 100%;
  width: 100%;
  border-radius: inherit;
  background: var(--grad);
  transform: scaleX(0.12);
  transform-origin: left center;
  will-change: transform;
}

/* ---------- Responsive ---------- */

@media (max-width: 860px) {
  .nav { padding: 0 20px; }
  .nav-links { gap: 20px; font-size: 13px; }
  .hero { padding-left: 20px; padding-right: 20px; }
  .card { width: 200px; }
  .strip-track { padding: 0 calc(50% - 100px); }
}

@media (max-width: 640px) {
  .nav { height: 60px; }
  .nav-links { display: none; } /* mobile menu arrives with a later section */
  .brand { font-size: 19px; }
  .btn-small { padding: 8px 16px; font-size: 12px; }

  .hero { padding-top: 48px; }
  .hero h1 { margin-top: 22px; font-size: clamp(36px, 10.5vw, 44px); }
  .intro { font-size: 15px; }

  .strip { --rot-max: 38; }
  .strip-arrow { width: 38px; height: 38px; font-size: 15px; }
  .card { width: 178px; border-radius: 16px; }
  .card-name { font-size: 17px; }
  .strip-track { padding: 0 calc(50% - 89px); }
  .strip-progress { margin-left: 0; margin-right: 0; }
}
