/* PP-HERO-1 — coded home hero. Loaded after styles.css (?v=1).
   Only hero-specific, namespaced rules live here (.pp-hero*, --hero-*).
   Text outside the stage uses the site tokens (--ink, --muted, --surface, --line, --bg),
   so it follows html[data-theme]. The stage itself is a dark "showroom" card in BOTH themes. */

.pp-hero {
  --hero-stage-bg: #0a0e18;
  --hero-stage-line: rgba(255, 255, 255, 0.14);
  --hero-stage-ink: #f4f6fb;
  --hero-stage-muted: #b4bccd;
  --hero-accent: #f0a48f;
  --hero-accent-ink: #2a0f08;
  --hero-wa: #0b6b3a;
  --hero-wa-ink: #ffffff;
  --hero-card-ratio: 0.4732; /* image width / height (680 / 1437) */
  --hero-stage-h: clamp(300px, calc(100vh - 430px), 470px);
  --hero-stage-h: clamp(300px, calc(100svh - 430px), 470px);

  display: grid;
  gap: 14px;
  padding: 12px 0 34px;
  align-items: start;
  grid-template-columns: minmax(0, 1fr);
}

.pp-hero__head,
.pp-hero__visual,
.pp-hero__cta,
.pp-hero__proof {
  min-width: 0;
}

.pp-hero__head .eyebrow {
  margin-bottom: 8px;
}

.pp-hero h1 {
  margin: 0 0 10px;
  font-size: clamp(27px, 8vw, 62px);
  line-height: 1.04;
  letter-spacing: 0;
  color: var(--ink);
}

.pp-hero__text {
  max-width: 600px;
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
  color: var(--muted);
}

/* ---------- Stage ---------- */

.pp-hero__visual {
  position: relative;
  width: 100%;
  max-width: 640px;
  margin: 0 auto;
}

.pp-stage {
  position: relative;
  height: var(--hero-stage-h);
  overflow: hidden;
  border: 1px solid var(--hero-stage-line);
  border-radius: 26px;
  color: var(--hero-stage-ink);
  background: var(--hero-stage-bg);
  touch-action: pan-y;
  -webkit-user-select: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  cursor: grab;
  contain: layout paint;
}

.pp-stage:active {
  cursor: grabbing;
}

.pp-stage:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 4px;
}

.pp-light {
  position: absolute;
  left: 50%;
  top: 40%;
  width: 90%;
  aspect-ratio: 1;
  border-radius: 50%;
  pointer-events: none;
  background: radial-gradient(circle, rgba(240, 164, 143, 0.28), rgba(240, 164, 143, 0) 62%);
  transform: translate(-50%, -50%);
  will-change: transform;
}

.pp-aura {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  display: grid;
  place-items: center;
  pointer-events: none;
  transform: translateY(-3%);
}

.pp-aura::before {
  content: "";
  width: 120%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(240, 164, 143, 0.3), rgba(240, 164, 143, 0) 62%);
  opacity: 0.8;
}

@supports (background: conic-gradient(red, blue)) {
  .pp-aura::before {
    background: conic-gradient(
      from 0deg,
      rgba(240, 164, 143, 0),
      rgba(240, 164, 143, 0.42) 60deg,
      rgba(255, 222, 205, 0) 130deg,
      rgba(240, 164, 143, 0.34) 220deg,
      rgba(255, 200, 180, 0) 300deg,
      rgba(240, 164, 143, 0)
    );
    animation: pp-hero-spin 18s linear infinite;
    will-change: transform;
  }
}

@supports (mask-image: radial-gradient(circle, #000, transparent)) or
  (-webkit-mask-image: radial-gradient(circle, #000, transparent)) {
  .pp-aura::before {
    -webkit-mask-image: radial-gradient(circle, #000 18%, transparent 62%);
    mask-image: radial-gradient(circle, #000 18%, transparent 62%);
  }
}

/* Old WebViews: conic gradient but no mask would show a hard disc, so keep it faint and still. */
@supports (background: conic-gradient(red, blue)) and
  (not ((mask-image: radial-gradient(circle, #000, transparent)) or
    (-webkit-mask-image: radial-gradient(circle, #000, transparent)))) {
  .pp-aura::before {
    animation: none;
    opacity: 0.25;
  }
}

.pp-floor {
  position: absolute;
  left: 50%;
  bottom: 19%;
  width: 46%;
  height: 22px;
  margin-left: -23%;
  border-radius: 50%;
  pointer-events: none;
  background: radial-gradient(ellipse, rgba(0, 0, 0, 0.62), rgba(0, 0, 0, 0) 70%);
  animation: pp-hero-shadow 7s ease-in-out infinite;
}

.pp-scene {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  perspective: 1400px;
}

.pp-float {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  transform-style: preserve-3d;
  animation: pp-hero-float 7s ease-in-out infinite;
}

.pp-card {
  position: absolute;
  left: 50%;
  top: 46%;
  height: 64%;
  width: calc(var(--hero-stage-h) * 0.64 * var(--hero-card-ratio));
  transform-style: preserve-3d;
  transform: translate(-50%, -50%);
  will-change: transform;
}

.pp-img {
  position: absolute;
  left: 50%;
  top: 0;
  width: auto;
  height: 100%;
  max-width: none;
  opacity: 0;
  transform: translateX(-50%);
  transition:
    opacity 0.45s ease,
    transform 0.6s cubic-bezier(0.2, 0.7, 0.2, 1);
  pointer-events: none;
  -webkit-user-drag: none;
}

.pp-img.is-on {
  opacity: 1;
}

.pp-img.is-before {
  transform: translateX(-50%) rotateY(-38deg);
}

.pp-img.is-after {
  transform: translateX(-50%) rotateY(38deg);
}

/* Glare band slides across the back/front views as the phone tilts */
.pp-glare {
  position: absolute;
  top: 0.6%;
  right: 0.6%;
  bottom: 0.6%;
  left: 0.6%;
  overflow: hidden;
  border-radius: 13% / 6.2%;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.35s;
  transform: translateZ(2px);
}

.pp-glare i {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 15%;
  width: 70%;
  background: linear-gradient(
    112deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.26) 50%,
    rgba(255, 255, 255, 0) 100%
  );
  will-change: transform;
}

.pp-card[data-view="back"] .pp-glare,
.pp-card[data-view="front"] .pp-glare {
  opacity: 1;
}

.pp-flash {
  position: absolute;
  left: 79.5%;
  top: 16.9%;
  width: 24%;
  aspect-ratio: 1;
  margin: -12% 0 0 -12%;
  border-radius: 50%;
  pointer-events: none;
  opacity: 0;
  transform: translateZ(3px);
  background: radial-gradient(
    circle,
    rgba(255, 255, 255, 0.95),
    rgba(255, 232, 214, 0.4) 32%,
    rgba(255, 232, 214, 0) 68%
  );
}

.pp-card[data-view="back"] .pp-flash {
  animation: pp-hero-pulse 3.2s ease-in-out infinite;
}

/* Left-side wording inside the stage: plain <p> text, never catches pointer events */
.pp-copy {
  position: absolute;
  left: 3.5%;
  top: 46%;
  z-index: 1;
  width: 25%;
  transform: translateY(-50%);
  pointer-events: none;
}

.pp-copy__eyebrow,
.pp-copy__title {
  margin: 0;
}

/* .pp-hero prefix: styles.css colours every <p> (and dark theme uses a more specific rule) */
.pp-hero .pp-copy__eyebrow {
  color: var(--hero-accent);
}

.pp-hero .pp-copy__title {
  color: #fff;
}

.pp-copy__eyebrow {
  margin-bottom: 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  line-height: 1.2;
  text-transform: uppercase;
}

.pp-copy__title {
  font-size: clamp(15px, 4.6vw, 27px);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: 0;
}

.pp-hint {
  position: absolute;
  left: 16px;
  top: 14px;
  max-width: 62%;
  margin: 0;
  font-size: 12px;
  line-height: 1.3;
  color: var(--hero-stage-muted);
  pointer-events: none;
}

.pp-tilt {
  position: absolute;
  right: 10px;
  top: 8px;
  z-index: 3;
  min-height: 44px;
  padding: 0 14px;
  border: 1px dashed var(--hero-stage-line);
  border-radius: 999px;
  color: var(--hero-stage-ink);
  background: rgba(10, 14, 24, 0.7);
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}

/* ---------- View buttons ---------- */

.pp-views {
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 10px;
  z-index: 2;
  display: flex;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--hero-stage-line);
  border-radius: 999px;
  background: rgba(10, 14, 24, 0.72);
}

.pp-hero:not(.pp-hero--live) .pp-views {
  visibility: hidden;
}

.pp-view {
  flex: 1 1 0;
  min-width: 44px;
  min-height: 44px;
  padding: 0 6px;
  border: 1px solid transparent;
  border-radius: 999px;
  color: var(--hero-stage-ink);
  background: transparent;
  font: inherit;
  font-size: 14px;
  cursor: pointer;
}

.pp-view[aria-pressed="true"] {
  color: var(--hero-accent-ink);
  background: var(--hero-accent);
  font-weight: 700;
}

.pp-view:focus-visible,
.pp-tilt:focus-visible {
  outline: 3px solid var(--hero-accent);
  outline-offset: 2px;
}

/* ---------- Calls to action ---------- */

.pp-hero__cta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.pp-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 52px;
  padding: 6px 10px;
  border: 2px solid transparent;
  border-radius: 14px;
  font-size: 14.5px;
  font-weight: 700;
  line-height: 1.15;
  text-align: center;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}

.pp-btn--primary {
  color: var(--bg);
  background: var(--ink);
}

.pp-btn--wa {
  color: var(--hero-wa-ink);
  background: var(--hero-wa);
}

.pp-btn svg {
  display: none;
  flex: none;
}

.pp-btn:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 3px;
}

/* ---------- Trust pills ---------- */

.pp-hero__proof {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.pp-hero__proof li {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 4px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink);
  background: var(--surface);
  font-size: 12.5px;
  font-weight: 650;
  line-height: 1.2;
}

/* ---------- Pause / reduced motion ---------- */

.pp-hero--paused .pp-aura::before,
.pp-hero--paused .pp-float,
.pp-hero--paused .pp-floor,
.pp-hero--paused .pp-card .pp-flash {
  animation-play-state: paused;
}

@keyframes pp-hero-spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes pp-hero-float {
  50% {
    transform: translateY(-4px);
  }
}

@keyframes pp-hero-shadow {
  50% {
    transform: scale(0.95);
    opacity: 0.85;
  }
}

@keyframes pp-hero-pulse {
  0%,
  100% {
    opacity: 0.18;
    transform: translateZ(3px) scale(0.75);
  }
  50% {
    opacity: 0.95;
    transform: translateZ(3px) scale(1.2);
  }
}

@media (prefers-reduced-motion: reduce) {
  .pp-aura::before,
  .pp-float,
  .pp-floor,
  .pp-card[data-view="back"] .pp-flash {
    animation: none;
  }

  .pp-card[data-view="back"] .pp-flash {
    opacity: 0.6;
  }

  .pp-img,
  .pp-img.is-before,
  .pp-img.is-after {
    transition: opacity 0.2s ease;
    transform: translateX(-50%);
  }
}

/* ---------- Wider screens ---------- */

@media (min-width: 380px) {
  .pp-btn {
    font-size: 15px;
  }

  .pp-btn svg {
    display: block;
  }
}

@media (max-width: 359px) {
  .pp-hint {
    display: none;
  }
}

@media (max-width: 339px) {
  .pp-hero__cta {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (min-width: 600px) {
  .pp-hero {
    --hero-stage-h: 500px;
    gap: 18px;
    padding-top: 20px;
  }

  .pp-hero__text {
    font-size: 15.5px;
  }

  .pp-hero__cta {
    max-width: 520px;
    margin-inline: auto;
    width: 100%;
  }

  .pp-hero__proof {
    justify-content: center;
  }
}

@media (min-width: 900px) {
  .pp-hero {
    --hero-stage-h: 560px;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
    grid-template-areas:
      "head visual"
      "cta visual"
      "proof visual";
    grid-template-rows: auto auto 1fr;
    column-gap: 56px;
    row-gap: 22px;
    padding: 36px 0 56px;
    align-items: start;
  }

  .pp-hero__head {
    grid-area: head;
    align-self: end;
  }

  .pp-hero__visual {
    grid-area: visual;
    align-self: center;
    margin: 0;
  }

  .pp-hero__cta {
    grid-area: cta;
    max-width: 480px;
    margin: 0;
  }

  .pp-hero__proof {
    grid-area: proof;
    justify-content: flex-start;
  }

  .pp-hero h1 {
    font-size: clamp(44px, 4.8vw, 64px);
    margin-bottom: 16px;
  }

  .pp-hero__text {
    font-size: 17px;
    line-height: 1.6;
  }

  .pp-views {
    position: static;
    margin-top: 12px;
    justify-content: center;
    border-color: var(--line);
    background: var(--surface);
    --hero-stage-ink: var(--ink);
  }

  .pp-view {
    flex: 0 1 112px;
  }

  .pp-view[aria-pressed="true"] {
    color: var(--hero-accent-ink);
  }

  .pp-view:focus-visible {
    outline-color: var(--ink);
  }
}
