/* ============================================================
   SWIT — section layouts
   hero · marquee · products · capabilities · stats · reviews · cta · footer
   ============================================================ */

/* ====================== HERO ====================== */
.hero {
  position: relative;
  padding-top: clamp(8rem, 6rem + 9vw, 12rem);
  padding-bottom: clamp(3rem, 2rem + 5vw, 6rem);
}
.hero__inner {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: clamp(2rem, 1rem + 5vw, 5rem);
  align-items: center;
}
.hero__copy { max-width: 38rem; }

.hero__badge {
  display: inline-flex;
  align-items: center;
  flex-wrap: nowrap;
  white-space: nowrap;
  max-width: 100%;
  gap: 0.6em;
  padding: 0.4em 0.4em 0.4em 0.9em;
  margin-bottom: 1.6rem;
  font-size: 0.82rem;
  color: var(--muted);
  background: oklch(100% 0 0 / 0.03);
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
}
.hero__badge b { color: var(--text); font-weight: 600; }
.hero__badge .pill {
  padding: 0.2em 0.6em;
  font-family: var(--font-display);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  color: var(--accent-bright);
  background: var(--accent-soft);
  border-radius: var(--r-pill);
}

.hero__title {
  font-size: var(--text-hero);
  letter-spacing: -0.035em;
  line-height: 0.98;
}
.hero__title .grad-text { display: inline-block; }

.hero__lead {
  margin-top: 1.6rem;
  font-size: var(--text-lead);
  color: var(--muted);
  max-width: 34rem;
}

.hero__cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 2.2rem;
}

.hero__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 2.4rem;
  padding-top: 1.8rem;
  border-top: 1px solid var(--line);
}

/* ---- Hero visual stage ---- */
.hero-stage {
  position: relative;
  perspective: 1600px;
  min-height: 30rem;
}
.hero-stage__glow {
  position: absolute;
  inset: -12% -6% -18% -6%;
  background:
    radial-gradient(45% 50% at 60% 38%, oklch(64% 0.16 232 / 0.42), transparent 70%),
    radial-gradient(40% 45% at 30% 70%, oklch(50% 0.14 250 / 0.36), transparent 72%);
  filter: blur(20px);
  z-index: 0;
}

/* cursor-tracked hero spotlight */
.hero__spot {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.5s var(--ease-out);
  background: radial-gradient(
    240px 240px at var(--sx, 50%) var(--sy, 40%),
    oklch(72% 0.15 230 / 0.16), transparent 70%);
}
.hero:hover .hero__spot { opacity: 1; }
@media (prefers-reduced-motion: reduce) { .hero__spot { display: none; } }
.hero-stage__inner {
  position: relative;
  z-index: 1;
  transform-style: preserve-3d;
  transform: rotateY(-13deg) rotateX(7deg);
  transition: transform var(--dur-slow) var(--ease-out);
}

/* generic device frame */
.frame {
  position: relative;
  background: var(--bg-2);
  border: 1px solid var(--line-2);
  border-radius: 14px;
  box-shadow: var(--shadow-float);
  overflow: hidden;
}
.frame--mac { border-radius: 14px; }
.frame__bar {
  display: flex;
  align-items: center;
  gap: 7px;
  height: 30px;
  padding-inline: 13px;
  background: oklch(20% 0.006 40);
  border-bottom: 1px solid var(--line);
}
.frame__bar i { width: 11px; height: 11px; border-radius: 50%; background: var(--line-3); }
.frame__bar i:nth-child(1) { background: oklch(64% 0.17 25); }
.frame__bar i:nth-child(2) { background: oklch(80% 0.13 85); }
.frame__bar i:nth-child(3) { background: oklch(72% 0.16 150); }
.frame__bar span {
  margin-left: 10px;
  font-family: var(--font-display);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  color: var(--faint);
}
.frame img { width: 100%; height: auto; display: block; }
.frame::after {
  /* glare sweep on hover */
  content: "";
  position: absolute;
  inset: 0;
  z-index: 3;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(108deg, transparent 36%, oklch(100% 0 0 / 0.16) 50%, transparent 64%);
  transform: translateX(-130%);
}
.product:hover .frame::after,
.hero-window:hover::after { animation: sheen 1s var(--ease-out); }
@media (prefers-reduced-motion: reduce) {
  .product:hover .frame::after,
  .hero-window:hover::after { animation: none; }
}

.hero-window {
  position: relative;
  z-index: 2;
  width: 100%;
}

.hero-phone {
  position: absolute;
  z-index: 3;
  width: 30%;
  bottom: -9%;
  left: -11%;
  border-radius: 26px;
  border: 1px solid var(--line-2);
  background: #000;
  box-shadow: var(--shadow-float);
  overflow: hidden;
  transform: translateZ(60px);
}
.hero-phone img { width: 100%; height: auto; }

/* floating mini cards */
.float-card {
  position: absolute;
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.7rem 0.95rem;
  background: oklch(18% 0.006 40 / 0.86);
  border: 1px solid var(--line-2);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-float);
  backdrop-filter: blur(10px);
  font-size: 0.82rem;
  white-space: nowrap;
  will-change: transform;
}
.float-card small { display: block; color: var(--faint); font-size: 0.7rem; }
.float-card b { font-family: var(--font-display); font-weight: 600; }
.float-card__ic {
  display: grid; place-items: center;
  width: 30px; height: 30px;
  border-radius: 9px;
  background: var(--accent-soft);
  color: var(--accent-bright);
}
.float-card__ic svg { width: 16px; height: 16px; }
.float-card--a { top: 6%; right: -8%; transform: translateZ(90px); animation: float-y 6s var(--ease-inout) infinite alternate; }
.float-card--b { bottom: 20%; right: -4%; transform: translateZ(70px); animation: float-y 7.5s var(--ease-inout) infinite alternate -2s; }

/* mini equalizer */
.eq { display: flex; align-items: center; gap: 2px; height: 18px; }
.eq i {
  width: 3px; border-radius: 2px;
  background: var(--accent-bright);
  animation: eq 1s var(--ease-inout) infinite alternate;
}
.eq i:nth-child(1){ height: 40%; animation-delay: -0.0s; }
.eq i:nth-child(2){ height: 90%; animation-delay: -0.2s; }
.eq i:nth-child(3){ height: 60%; animation-delay: -0.4s; }
.eq i:nth-child(4){ height: 100%; animation-delay: -0.6s; }
.eq i:nth-child(5){ height: 50%; animation-delay: -0.3s; }
@keyframes eq { to { transform: scaleY(0.35); } }
@keyframes float-y { to { transform: translateY(-12px) translateZ(80px); } }

@media (prefers-reduced-motion: reduce) {
  .float-card--a, .float-card--b { animation: none; }
  .eq i { animation: none; }
  .hero-stage__inner { transform: rotateY(-10deg) rotateX(5deg); }
}

/* ====================== MARQUEE BAND ====================== */
.band {
  padding-block: clamp(2rem, 1.5rem + 2vw, 3.2rem);
  border-block: 1px solid var(--line);
  background: oklch(100% 0 0 / 0.012);
}
.band__label {
  text-align: center;
  margin-bottom: 1.4rem;
  font-family: var(--font-display);
  font-size: 0.75rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--faint);
}

/* ====================== PRODUCTS ====================== */
.product {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(2rem, 1rem + 5vw, 5.5rem);
  align-items: center;
}
.product + .product { margin-top: clamp(4.5rem, 3rem + 6vw, 9rem); }
.product:nth-child(even) .product__media { order: 2; }

.product__index {
  font-family: var(--font-display);
  font-size: 0.8rem;
  letter-spacing: 0.2em;
  color: var(--accent-bright);
}
.product__title { font-size: var(--text-h2); margin: 0.7rem 0 0; }
.product__tagline {
  margin-top: 1.1rem;
  font-size: var(--text-lead);
  color: var(--muted);
  max-width: 42ch;
}
.product__features {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 1.8rem;
}
.product__link {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  margin-top: 2rem;
  font-family: var(--font-display);
  font-weight: 500;
  color: var(--text);
}
.product__link svg { width: 1.05em; height: 1.05em; transition: transform var(--dur) var(--ease-out); }
.product__link:hover { color: var(--accent-bright); }
.product__link:hover svg { transform: translateX(4px); }

/* product media frames */
.media {
  position: relative;
  isolation: isolate;
}
.media::before {
  content: "";
  position: absolute;
  inset: 8% 4% -6% 4%;
  background: radial-gradient(60% 60% at 50% 40%, oklch(60% 0.16 32 / 0.35), transparent 72%);
  filter: blur(28px);
  z-index: -1;
}
.media--phone {
  display: flex;
  justify-content: center;
  gap: 1.1rem;
}
.phone {
  width: clamp(150px, 40%, 230px);
  border-radius: 30px;
  border: 1px solid var(--line-2);
  background: #000;
  padding: 6px;
  box-shadow: var(--shadow-float);
  transition: transform var(--dur-slow) var(--ease-out);
}
.phone img { width: 100%; border-radius: 24px; }
.phone--back { transform: translateY(28px) rotate(-4deg) scale(0.92); opacity: 0.92; }
.phone--front { transform: rotate(2deg); z-index: 2; }
.product:hover .phone--back { transform: translateY(20px) rotate(-5deg) scale(0.93); }
.product:hover .phone--front { transform: translateY(-4px) rotate(2deg); }

.media--app .frame { transition: transform var(--dur-slow) var(--ease-out); }
.product:hover .media--app .frame { transform: translateY(-6px); }

@media (prefers-reduced-motion: reduce) {
  .phone, .media--app .frame { transition: none; }
}

/* ====================== CAPABILITIES BENTO ====================== */
.bento {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: clamp(0.8rem, 0.5rem + 1vw, 1.2rem);
}
.bento__cell {
  grid-column: span 2;
  padding: clamp(1.3rem, 1rem + 1vw, 1.9rem);
  min-height: 180px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.bento__cell--wide { grid-column: span 3; }
.bento__cell--tall { grid-row: span 2; }
.bento__cell--feature { grid-column: span 4; grid-row: span 2; }

.cell__ic {
  display: grid; place-items: center;
  width: 42px; height: 42px;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent-bright);
}
.cell__ic svg { width: 21px; height: 21px; }
.cell__title { font-family: var(--font-display); font-weight: 600; font-size: 1.12rem; margin-top: 1.3rem; }
.cell__desc { margin-top: 0.5rem; color: var(--muted); font-size: 0.92rem; }

.cell--feature { position: relative; overflow: hidden; }
.cell--feature .cell__big {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 1.5rem + 3vw, 3.4rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.05;
  margin-top: 1.2rem;
}
.cell--feature .cell__desc { max-width: 40ch; }
.cell__spark {
  position: absolute;
  inset: auto -10% -30% 30%;
  height: 70%;
  background: radial-gradient(50% 60% at 50% 100%, oklch(60% 0.16 32 / 0.3), transparent 70%);
  filter: blur(20px);
}
/* feature cell stays top-anchored so the big headline reads from the top */
.bento__cell.cell--feature { justify-content: flex-start; }

/* ====================== STATS ====================== */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(1rem, 0.5rem + 2vw, 2.5rem);
  text-align: center;
}
.stat__num {
  font-family: var(--font-display);
  font-size: var(--text-stat);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1;
  background: var(--grad-text);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.stat__label { margin-top: 0.7rem; color: var(--muted); font-size: 0.95rem; }
.stat + .stat { position: relative; }

/* ====================== REVIEWS ====================== */
.reviews-wall {
  columns: 3;
  column-gap: clamp(0.9rem, 0.5rem + 1.2vw, 1.4rem);
}
.review {
  break-inside: avoid;
  margin-bottom: clamp(0.9rem, 0.5rem + 1.2vw, 1.4rem);
  padding: 1.5rem 1.6rem;
}
/* In a CSS multi-column wall, a transform on a column item makes cards
   repaint/vanish (Chrome/Safari fragmentation bug). Keep reviews static on
   hover — the border + cursor spotlight still provide hover feedback. */
.review:hover { transform: none; }
.review__stars { display: flex; gap: 2px; color: var(--accent-bright); margin-bottom: 0.9rem; }
.review__stars svg { width: 15px; height: 15px; }
.review__text { color: var(--text); font-size: 0.98rem; line-height: 1.6; }
.review__author {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  margin-top: 1.2rem;
  padding-top: 1.1rem;
  border-top: 1px solid var(--line);
}
.review__avatar {
  display: grid; place-items: center;
  flex: none;
  width: 36px; height: 36px;
  border-radius: 50%;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.92rem;
  color: oklch(99% 0 0);
  background: var(--grad-accent);
}
.review__handle { font-family: var(--font-display); font-weight: 600; font-size: 0.9rem; }
.review__role { color: var(--faint); font-size: 0.78rem; }

/* ====================== CTA ====================== */
.cta {
  position: relative;
  padding: clamp(2.6rem, 1.5rem + 5vw, 5rem);
  text-align: center;
  border-radius: var(--r-xl);
  border: 1px solid var(--line-2);
  background:
    radial-gradient(70% 120% at 50% 0%, oklch(40% 0.12 28 / 0.55), transparent 70%),
    var(--bg-2);
  overflow: hidden;
}
.cta::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(180deg, var(--accent-soft), transparent 40%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  pointer-events: none;
}
.cta__glow {
  position: absolute;
  width: 60%; height: 60%;
  left: 20%; top: -20%;
  background: radial-gradient(circle, oklch(62% 0.17 34 / 0.45), transparent 65%);
  filter: blur(40px);
  pointer-events: none;
}
.cta__title { font-size: var(--text-h2); position: relative; }
.cta__lead { margin: 1.2rem auto 0; max-width: 48ch; color: var(--muted); font-size: var(--text-lead); position: relative; }
.cta__row {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.8rem;
  margin-top: 2.4rem;
}
.cta__contacts {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.6rem 1.6rem;
  margin-top: 2.4rem;
  color: var(--faint);
  font-size: 0.9rem;
}
.cta__contacts a { display: inline-flex; align-items: center; gap: 0.45em; color: var(--muted); transition: color var(--dur) var(--ease-out); }
.cta__contacts a:hover { color: var(--accent-bright); }
.cta__contacts svg { width: 1.05em; height: 1.05em; }

/* ====================== FOOTER ====================== */
.footer {
  border-top: 1px solid var(--line);
  padding-block: clamp(3rem, 2rem + 3vw, 5rem) 2.5rem;
}
.footer__grid {
  display: grid;
  grid-template-columns: 1.6fr repeat(3, 1fr);
  gap: 2.5rem;
}
.footer__about { max-width: 30ch; }
.footer__about .brand { margin-bottom: 1rem; }
.footer__about p { color: var(--muted); font-size: 0.92rem; }
.footer__col h4 { font-family: var(--font-display); font-size: 0.8rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--faint); margin-bottom: 1.1rem; }
.footer__col a { display: block; padding: 0.32rem 0; color: var(--muted); font-size: 0.94rem; transition: color var(--dur) var(--ease-out); }
.footer__col a:hover { color: var(--text); }
.footer__bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 3rem;
  padding-top: 1.8rem;
  border-top: 1px solid var(--line);
  color: var(--faint);
  font-size: 0.85rem;
}

/* ====================== RESPONSIVE ====================== */
@media (max-width: 1024px) {
  .hero__inner { grid-template-columns: 1fr; }
  .hero-stage { margin-top: 2rem; order: -1; min-height: 24rem; }
  .hero-stage__inner { transform: rotateY(-8deg) rotateX(5deg); }
  .reviews-wall { columns: 2; }
  .bento__cell--feature { grid-column: span 6; }
  .bento__cell--wide { grid-column: span 3; }
}

@media (max-width: 760px) {
  .nav__links { display: none; }
  .nav__burger { display: grid; }
  .nav.open .nav__links {
    display: flex;
    position: absolute;
    top: calc(100% + 0.6rem);
    left: var(--gutter); right: var(--gutter);
    flex-direction: column;
    align-items: stretch;
    gap: 0.2rem;
    padding: 0.8rem;
    background: oklch(15% 0.005 45 / 0.95);
    backdrop-filter: blur(18px);
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
  }
  .nav.open .nav__link { padding: 0.8rem 1rem; }
  .nav.open .nav__cta { margin: 0.4rem 0 0; }

  .product { grid-template-columns: 1fr; }
  .product:nth-child(even) .product__media { order: -1; }
  .hero-stage__inner { transform: none; }
  .hero-phone { width: 32%; left: -6%; }

  .bento { grid-template-columns: repeat(2, 1fr); }
  .bento__cell,
  .bento__cell--wide,
  .bento__cell--feature { grid-column: span 2; grid-row: auto; }
  .bento__cell--feature { grid-row: span 1; }

  .stats { grid-template-columns: repeat(2, 1fr); gap: 2rem 1rem; }
  .reviews-wall { columns: 1; }
  .footer__grid { grid-template-columns: 1fr 1fr; }
  .footer__about { grid-column: 1 / -1; }
}

@media (max-width: 420px) {
  .hero__cta-row .btn { width: 100%; }
  .bento { grid-template-columns: 1fr; }
  .bento__cell { grid-column: 1 / -1; }
}
