/* Hoofy — premium 3D-style visuals (CSS transforms + motion; no WebGL dependency) */

/* ——— Immersive hero ——— */
.hero-bold--immersive {
  position: relative;
  overflow: clip;
  isolation: isolate;
}

.hero-3d-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.hero-3d-bg .orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(56px);
  opacity: 0.68;
  animation: orbFloat 18s ease-in-out infinite;
}

.hero-3d-bg .orb-1 {
  width: min(420px, 55vw);
  height: min(420px, 55vw);
  background: radial-gradient(circle at 30% 30%, rgba(244, 176, 46, 0.62), rgba(167, 139, 250, 0.22) 50%, transparent 70%);
  top: -12%;
  right: -8%;
  animation-delay: 0s;
}

.hero-3d-bg .orb-2 {
  width: min(320px, 45vw);
  height: min(320px, 45vw);
  background: radial-gradient(circle, rgba(167, 139, 250, 0.48), transparent 65%);
  bottom: 5%;
  left: -10%;
  animation-delay: -6s;
}

.hero-3d-bg .orb-3 {
  width: min(200px, 30vw);
  height: min(200px, 30vw);
  background: radial-gradient(circle, rgba(34, 211, 238, 0.22), rgba(74, 222, 128, 0.12) 40%, transparent 70%);
  top: 40%;
  left: 35%;
  animation-delay: -12s;
}

@keyframes orbFloat {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(2%, -3%) scale(1.03); }
  66% { transform: translate(-2%, 2%) scale(0.98); }
}

.hero-3d-bg .grid-floor {
  position: absolute;
  inset: auto -20% -30%;
  height: 55%;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 48px 48px;
  transform: perspective(500px) rotateX(68deg);
  transform-origin: 50% 0;
  opacity: 0.35;
  mask-image: linear-gradient(to bottom, transparent, black 30%, transparent);
}

.hero-bold-inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(2rem, 5vw, 3.5rem);
  align-items: center;
  max-width: var(--max);
  margin: 0 auto;
  width: 100%;
}

@media (min-width: 960px) {
  .hero-bold-inner {
    grid-template-columns: minmax(0, 1.05fr) minmax(280px, 0.95fr);
    gap: clamp(1.5rem, 4vw, 3rem);
  }
}

.hero-copy {
  position: relative;
  z-index: 2;
}

/* ——— 3D phone mockup ——— */
.hero-3d-showcase {
  display: flex;
  justify-content: center;
  align-items: center;
  perspective: 1200px;
  min-height: 420px;
}

.phone-3d {
  position: relative;
  width: min(260px, 72vw);
  height: min(520px, 145vw);
  transform-style: preserve-3d;
  --tilt-x: 8deg;
  --tilt-y: -14deg;
  transform: rotateX(var(--tilt-x)) rotateY(var(--tilt-y));
  transition: transform 0.15s ease-out;
  animation: phoneEnter 1.2s cubic-bezier(0.16, 1, 0.3, 1) 0.2s both;
}

@keyframes phoneEnter {
  from {
    opacity: 0;
    transform: rotateX(18deg) rotateY(-22deg) translateY(40px);
  }
  to {
    opacity: 1;
    transform: rotateX(var(--tilt-x)) rotateY(var(--tilt-y));
  }
}

.phone-3d__glow {
  position: absolute;
  inset: -15%;
  border-radius: 48px;
  background: radial-gradient(ellipse at 50% 40%, rgba(244, 176, 46, 0.58), rgba(167, 139, 250, 0.15) 55%, transparent 65%);
  filter: blur(32px);
  z-index: 0;
  opacity: 0.95;
}

.phone-3d__body {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 100%;
  border-radius: 40px;
  background: linear-gradient(165deg, #1c1c22 0%, #0a0a0e 100%);
  box-shadow:
    0 50px 100px rgba(0, 0, 0, 0.55),
    0 0 0 1px rgba(255, 255, 255, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
  overflow: hidden;
}

.phone-3d__screen {
  position: absolute;
  inset: 10px;
  border-radius: 32px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, #12121a 0%, #0d0d12 100%);
  box-shadow: inset 0 0 40px rgba(0, 0, 0, 0.5);
}

/* In-phone UI — matches hoofyapp.com tokens (dark glass, gold + violet) */
.phone-3d__screen--hoofy {
  background:
    radial-gradient(ellipse 120% 80% at 50% -20%, rgba(244, 176, 46, 0.12), transparent 52%),
    radial-gradient(ellipse 80% 50% at 100% 100%, rgba(167, 139, 250, 0.08), transparent 45%),
    linear-gradient(180deg, #14141c 0%, #0a0a0e 100%);
  box-shadow:
    inset 0 0 0 1px rgba(244, 176, 46, 0.12),
    inset 0 0 60px rgba(0, 0, 0, 0.5);
}

.phone-3d__screen--hoofy .phone-3d__notch {
  background: linear-gradient(180deg, #12121a 0%, #050508 100%);
  border: 1px solid rgba(244, 176, 46, 0.1);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.45);
}

.phone-3d__notch {
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  width: 32%;
  height: 26px;
  background: #0a0a0e;
  border-radius: 20px;
  z-index: 3;
}

.phone-3d__ui {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.phone-3d__ui--hoofy {
  padding: 40px 0 6px;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.65rem;
  display: flex;
  flex-direction: column;
  min-height: 0;
  flex: 1 1 auto;
  overflow: hidden;
}

.phone-3d__ui--hoofy .phone-3d__statusbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 12px 4px 14px;
  flex-shrink: 0;
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text-muted);
}

.phone-3d__ui--hoofy .phone-3d__status-icons {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.5rem;
  font-weight: 700;
  color: rgba(250, 250, 250, 0.75);
}

.phone-3d__ui--hoofy .phone-3d__sig {
  display: flex;
  gap: 2px;
  align-items: flex-end;
  height: 8px;
}

.phone-3d__ui--hoofy .phone-3d__sig i {
  display: block;
  width: 3px;
  border-radius: 1px;
  background: rgba(250, 250, 250, 0.85);
}

.phone-3d__ui--hoofy .phone-3d__sig i:nth-child(1) {
  height: 4px;
}

.phone-3d__ui--hoofy .phone-3d__sig i:nth-child(2) {
  height: 6px;
}

.phone-3d__ui--hoofy .phone-3d__sig i:nth-child(3) {
  height: 8px;
}

.phone-3d__ui--hoofy .phone-3d__lte {
  margin-left: 2px;
  font-size: 0.48rem;
  opacity: 0.9;
}

.phone-3d__ui--hoofy .phone-3d__bat {
  width: 14px;
  height: 7px;
  border-radius: 2px;
  border: 1px solid rgba(250, 250, 250, 0.55);
  margin-left: 2px;
  position: relative;
}

.phone-3d__ui--hoofy .phone-3d__bat::after {
  content: "";
  position: absolute;
  right: -2px;
  top: 2px;
  width: 1px;
  height: 3px;
  background: rgba(250, 250, 250, 0.55);
  border-radius: 0 1px 1px 0;
}

.phone-3d__app-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  padding: 2px 8px 8px;
  border-bottom: 1px solid var(--border);
}

.phone-3d__app-btn {
  font-size: 0.54rem;
  font-weight: 600;
  font-family: var(--font-body);
  color: var(--accent-hot);
  padding: 4px 9px;
  border-radius: 999px;
  border: 1px solid rgba(244, 176, 46, 0.45);
  background: rgba(244, 176, 46, 0.08);
  line-height: 1.1;
  box-shadow: 0 0 16px rgba(244, 176, 46, 0.06);
}

.phone-3d__app-nav-title {
  font-size: 0.72rem;
  font-weight: 800;
  font-family: var(--font-display);
  letter-spacing: -0.03em;
  flex: 1;
  text-align: center;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text);
}

.phone-3d__app-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
  padding: 6px 9px 10px;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.phone-3d__app-block {
  flex-shrink: 0;
}

.phone-3d__app-label {
  margin: 0 0 4px 2px;
  font-size: 0.5rem;
  font-weight: 700;
  font-family: var(--font-display);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.phone-3d__app-card {
  background: rgba(255, 255, 255, 0.045);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  border: 1px solid var(--border);
  box-shadow: 0 0 24px rgba(0, 0, 0, 0.25), 0 0 20px rgba(244, 176, 46, 0.04);
}

.phone-3d__app-photo-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.phone-3d__app-thumb {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  background:
    radial-gradient(circle at 30% 25%, rgba(244, 176, 46, 0.15), transparent 55%),
    linear-gradient(145deg, #1c1c24 0%, #0f0f14 100%);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.phone-3d__ui--hoofy .phone-3d__cam-ico {
  width: 22px;
  height: 22px;
  color: var(--accent);
  opacity: 0.95;
  filter: drop-shadow(0 0 6px rgba(244, 176, 46, 0.35));
}

.phone-3d__cam-ico--lg {
  width: 26px;
  height: 26px;
}

.phone-3d__app-photo-action {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.6rem;
  font-weight: 600;
  color: var(--accent-hot);
}

.phone-3d__app-hint {
  margin: 5px 2px 0;
  font-size: 0.45rem;
  line-height: 1.35;
  color: var(--text-muted);
}

.phone-3d__app-card--row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  background: rgba(244, 176, 46, 0.05);
  border-color: rgba(244, 176, 46, 0.15);
}

.phone-3d__warn {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background: rgba(167, 139, 250, 0.12);
  border: 1px solid rgba(167, 139, 250, 0.25);
  color: var(--violet);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.phone-3d__warn svg {
  width: 14px;
  height: 14px;
}

.phone-3d__app-safety-txt {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.phone-3d__app-safety-txt strong {
  font-size: 0.58rem;
  font-weight: 700;
  color: var(--text);
}

.phone-3d__app-safety-txt span {
  font-size: 0.48rem;
  color: var(--text-muted);
  line-height: 1.25;
}

.phone-3d__toggle {
  width: 36px;
  height: 21px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border);
  flex-shrink: 0;
  position: relative;
}

.phone-3d__toggle-knob {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: linear-gradient(180deg, #3a3a44, #2a2a32);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}

.phone-3d__app-card--list {
  padding: 0;
  overflow: hidden;
}

.phone-3d__app-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 7px 10px;
  font-size: 0.56rem;
  border-bottom: 1px solid var(--border);
}

.phone-3d__app-row:last-child {
  border-bottom: none;
}

.phone-3d__app-row--solo {
  font-weight: 600;
  color: var(--text);
}

.phone-3d__app-row--placeholder span {
  color: rgba(180, 180, 192, 0.45);
  font-weight: 400;
}

.phone-3d__app-k {
  color: var(--text-muted);
  font-weight: 500;
}

.phone-3d__app-v {
  display: flex;
  align-items: center;
  gap: 4px;
  color: rgba(180, 180, 192, 0.85);
  font-weight: 400;
}

.phone-3d__ui--hoofy .phone-3d__picker {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin-left: 3px;
  font-size: 0.32rem;
  line-height: 0.65;
  color: var(--violet);
  opacity: 0.9;
}

.phone-3d__ui--hoofy .phone-3d__picker > span {
  display: block;
}

.phone-3d__shadow {
  position: absolute;
  bottom: -8%;
  left: 50%;
  transform: translateX(-50%) rotateX(90deg);
  width: 70%;
  height: 24px;
  background: radial-gradient(ellipse, rgba(0, 0, 0, 0.55), transparent 70%);
  filter: blur(12px);
  z-index: 0;
}

/* Floating chips behind phone */
.hero-3d-showcase::before,
.hero-3d-showcase::after {
  content: "";
  position: absolute;
  width: 64px;
  height: 64px;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(244, 176, 46, 0.25), rgba(167, 139, 250, 0.2));
  border: 1px solid rgba(255, 255, 255, 0.1);
  transform: rotate(-12deg) translateZ(0);
  animation: chipFloat 6s ease-in-out infinite;
  pointer-events: none;
}

.hero-3d-showcase::before {
  top: 8%;
  right: 8%;
  animation-delay: -2s;
}

.hero-3d-showcase::after {
  bottom: 18%;
  left: 4%;
  width: 48px;
  height: 48px;
  border-radius: 12px;
  animation-delay: -4s;
}

@keyframes chipFloat {
  0%, 100% { transform: rotate(-12deg) translateY(0); }
  50% { transform: rotate(-8deg) translateY(-12px); }
}

/* ——— 3D stat cards in hero ——— */
.hero-visual--3d {
  transform-style: preserve-3d;
}

.hero-stat {
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.25s, box-shadow 0.35s;
}

.hero-visual-contained {
  max-width: var(--max);
  margin-left: auto;
  margin-right: auto;
  width: 100%;
}

.hero-visual--3d .hero-stat:hover {
  transform: translateY(-6px) translateZ(12px);
  border-color: rgba(244, 176, 46, 0.35);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(244, 176, 46, 0.15);
}

/* ——— Feature cards tilt ——— */
.card--tilt {
  transform-style: preserve-3d;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.3s, box-shadow 0.4s;
}

.card--tilt:hover {
  transform: translateY(-8px) rotateX(2deg);
  box-shadow:
    0 24px 48px rgba(0, 0, 0, 0.4),
    0 0 0 1px rgba(244, 176, 46, 0.12);
  border-color: rgba(255, 255, 255, 0.12);
}

.card--tilt .card-icon {
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.card--tilt:hover .card-icon {
  transform: scale(1.08) translateZ(8px);
}

/* ——— Stat strip depth ——— */
.stat-block--3d {
  transition: transform 0.35s ease, border-color 0.25s, box-shadow 0.35s;
}

.stat-block--3d:hover {
  transform: translateY(-4px);
  border-color: rgba(244, 176, 46, 0.25);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
}

/* ——— Meet section: decorative rings ——— */
.section-meet--3d {
  position: relative;
  overflow: hidden;
}

.meet-rings {
  position: absolute;
  inset: 50% auto auto 50%;
  transform: translate(-50%, -50%);
  width: min(900px, 140vw);
  height: min(900px, 140vw);
  pointer-events: none;
  z-index: 0;
  opacity: 0.4;
}

.meet-rings svg {
  width: 100%;
  height: 100%;
  display: block;
  animation: ringSpin 80s linear infinite;
  transform-origin: 200px 200px;
}

@keyframes ringSpin {
  to { transform: rotate(360deg); }
}

.section-meet--3d .meet-display,
.section-meet--3d .meet-sub {
  position: relative;
  z-index: 1;
}

/* ——— Testimonial glass 3D ——— */
.testimonial-card--3d {
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.3s, box-shadow 0.4s;
  backdrop-filter: blur(12px);
}

.testimonial-card--3d:hover {
  transform: translateY(-6px) scale(1.02);
  border-color: rgba(255, 255, 255, 0.14);
  box-shadow: 0 28px 56px rgba(0, 0, 0, 0.45);
}

/* ——— CTA band depth ——— */
.cta-band--3d {
  position: relative;
  overflow: hidden;
}

.cta-band--3d::before {
  content: "";
  position: absolute;
  inset: -50%;
  background: conic-gradient(from 180deg at 50% 50%, transparent 0deg, rgba(244, 176, 46, 0.06) 60deg, transparent 120deg);
  animation: ctaRotate 20s linear infinite;
  pointer-events: none;
}

@keyframes ctaRotate {
  to { transform: rotate(360deg); }
}

.cta-band--3d h2,
.cta-band--3d .sub,
.cta-band--3d .hero-actions-bold,
.cta-band--3d .newsletter {
  position: relative;
  z-index: 1;
}

@media (prefers-reduced-motion: reduce) {
  .orb,
  .phone-3d,
  .meet-rings svg,
  .cta-band--3d::before,
  .hero-3d-showcase::before,
  .hero-3d-showcase::after {
    animation: none !important;
  }

  .phone-3d {
    animation: none;
    opacity: 1;
    transform: rotateX(8deg) rotateY(-14deg);
  }

  .card--tilt:hover,
  .stat-block--3d:hover,
  .hero-visual--3d .hero-stat:hover,
  .testimonial-card--3d:hover {
    transform: none;
  }
}
