/* Theme 3 — 3D rotating card carousel */

.t3-page {
  min-height: 100dvh;
  background:
    radial-gradient(circle at 50% -12%, color-mix(in srgb, var(--accent) 22%, transparent), transparent 34%),
    linear-gradient(180deg, var(--bg), var(--bg-2));
  color: var(--ink);
  overflow-x: hidden;
}

.t3-shell {
  width: min(1180px, calc(100% - 36px));
  min-height: 100dvh;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
}

.t3-header {
  position: sticky;
  top: 14px;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  margin-top: 14px;
  padding: 13px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--header-bg) 82%, transparent);
  color: var(--header-text);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(16px);
}

.t3-brand {
  color: var(--header-text);
  font-size: 0.96rem;
  font-weight: 850;
  letter-spacing: 0;
  text-decoration: none;
}

.t3-nav {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.t3-nav a {
  color: color-mix(in srgb, var(--header-text) 68%, transparent);
  font-size: 0.82rem;
  font-weight: 700;
  text-decoration: none;
}

.t3-nav a:hover,
.t3-nav a:focus-visible {
  color: var(--header-text);
}

.t3-hero {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr;
  align-content: start;
  row-gap: 0;
  padding: clamp(72px, 9vh, 96px) 0 34px;
}

.t3-hero__intro {
  position: relative;
  z-index: 5;
  width: 100vw;
  max-width: none;
  margin-right: calc(50% - 50vw);
  margin-left: calc(50% - 50vw);
  text-align: center;
  pointer-events: none;
  padding-bottom: clamp(14px, 2vw, 22px);
}

.t3-kicker {
  margin: 0 0 10px;
  color: var(--accent);
  font-size: clamp(0.72rem, 1.5vw, 0.9rem);
  font-weight: 850;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.t3-hero h1 {
  display: inline-block;
  max-width: calc(100vw - 24px);
  margin: 0;
  color: var(--hero-text);
  font-family: var(--hero-font, inherit);
  font-size: clamp(3.2rem, 8vw, 7.2rem);
  font-weight: 950;
  line-height: 0.86;
  letter-spacing: 0;
  white-space: nowrap;
  text-wrap: normal;
  overflow-wrap: normal;
}

.t3-hero h1 .h1c {
  display: inline-block;
  transition: transform 0.3s cubic-bezier(0.23, 1, 0.32, 1);
}

.t3-hero h1 .h1c:hover {
  transform: translateY(-18px);
}

/* ── 3D carousel ── */

.t3-stage {
  --card-w: 230px;
  --card-h: 270px;
  position: relative;
  z-index: 1;
  margin-top: -42px;
  height: 420px;
  display: grid;
  place-items: center;
  overflow: visible;
}

.t3-carousel3d {
  position: relative;
  width: 0;
  height: 0;
  transform: perspective(1000px) rotateX(70deg);
  transform-style: preserve-3d;
  animation: t3-spin 30s linear infinite;
}

.t3-carousel3d:hover {
  animation-play-state: paused;
}

.t3-card3d,
.t3-shadow3d {
  position: absolute;
  width: var(--card-w);
  height: var(--card-h);
  top: calc(var(--card-h) / -2);
  left: calc(var(--card-w) / -2);
  border-radius: 6px;
}

.t3-shadow3d {
  background: color-mix(in srgb, #000 55%, var(--bg-2, #1a1a1a));
  transform:
    rotateZ(calc(360deg / var(--n) * var(--i)))
    rotateX(90deg)
    translateY(70px)
    translateZ(219px);
}

.t3-card3d {
  background-image: var(--img);
  background-size: cover;
  background-position: center;
  background-color: color-mix(in srgb, var(--accent) 14%, #1e1e1e);
  box-shadow: 0 0 24px rgba(0, 0, 0, 0.65);
  transform:
    rotateZ(calc(360deg / var(--n) * var(--i)))
    rotateX(90deg)
    translateY(70px)
    translateZ(220px)
    rotateZ(180deg);
  -webkit-box-reflect: below 3px linear-gradient(transparent 72%, rgba(255, 255, 255, 0.1));
}

.t3-carousel3d--empty .t3-card3d {
  background-image:
    linear-gradient(135deg, color-mix(in srgb, var(--accent) 26%, transparent), color-mix(in srgb, var(--accent-2) 18%, transparent)),
    linear-gradient(180deg, var(--bg-2), var(--bg));
}

@keyframes t3-spin {
  to {
    transform: perspective(1000px) rotateX(70deg) rotateZ(360deg);
  }
}

/* ── description + CTA ── */

.t3-description {
  margin-top: clamp(20px, 4vw, 36px);
  display: grid;
  justify-items: center;
  gap: 16px;
  max-width: 720px;
  margin: 0 auto;
  text-align: center;
}

.t3-description p {
  margin: 0;
  color: var(--muted);
  font-size: clamp(1rem, 2.2vw, 1.22rem);
  line-height: 1.7;
  text-wrap: balance;
}

.t3-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 24px;
  border: 1px solid color-mix(in srgb, var(--button-bg) 72%, var(--line));
  border-radius: 999px;
  background: var(--button-bg);
  color: var(--button-text);
  font-size: 0.88rem;
  font-weight: 820;
  text-decoration: none;
  box-shadow: 0 12px 28px color-mix(in srgb, var(--button-bg) 24%, transparent);
}

.t3-cta:hover,
.t3-cta:focus-visible {
  transform: translateY(-1px);
}

/* ── footer ── */

.t3-page .site-footer {
  margin-top: auto;
  border-top: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
}

.t3-page .site-footer a {
  color: var(--muted);
}

.t3-page .site-footer a:hover {
  color: var(--ink);
}

/* ── mobile ── */

@media (max-width: 720px) {
  .t3-shell {
    width: min(100% - 24px, 1180px);
  }

  .t3-header {
    position: static;
    align-items: flex-start;
    flex-direction: column;
    border-radius: var(--radius);
  }

  .t3-nav {
    justify-content: flex-start;
    gap: 14px;
  }

  .t3-hero {
    padding-top: 72px;
  }

  .t3-stage {
    --card-w: 190px;
    --card-h: 225px;
    height: 270px;
    margin-top: -28px;
  }

  .t3-carousel3d {
    scale: 0.65;
  }
}
