/* ==========================================================================
   Landing page — /earrings/ only (see earrings-landing.php)
   One screen, no scrolling. The video is the hero; the text sits near the
   bottom, with enough clearance to clear mobile browser chrome.
   ========================================================================== */

:root {
  --ap-ink: #16130f;
  --ap-serif: ui-serif, Georgia, "Times New Roman", serif;
  --ap-sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --ap-ease: cubic-bezier(0.22, 0.68, 0.16, 1);
}

/* ---------- exactly one screen, no scroll ---------- */

html:has(body.page-id-14),
body.page-id-14 {
  height: 100%;
  overflow: hidden;
  overscroll-behavior: none;
  background: var(--ap-ink);
}

/*
 * The theme's page template wraps the content in <main> and two groups that add
 * ~140px above and ~70px below. That pushed a full-height hero off the screen,
 * so everything above the cover is flattened and the whole chain is one screen.
 */
.page-id-14 .wp-site-blocks > main,
.page-id-14 .wp-site-blocks > main > .wp-block-group,
.page-id-14 .wp-block-post-content {
  margin-top: 0 !important;
  margin-bottom: 0 !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  height: 100dvh;
  overflow: hidden;
}

.page-id-14 header.wp-block-template-part,
.page-id-14 footer.wp-block-template-part,
.page-id-14 .wp-block-post-title {
  display: none;
}

.page-id-14 .wp-site-blocks {
  padding-top: 0;
  height: 100dvh;
  overflow: hidden;
}

/* ---------- the video ---------- */

.page-id-14 .wp-block-cover {
  height: 100dvh;
  min-height: 100dvh;
  /*
   * Mobile browsers (Safari, and Instagram's in-app browser) lay a toolbar over
   * the bottom of the page, so the text and button are lifted clear of it.
   */
  padding: 0 clamp(20px, 6vw, 70px) calc(clamp(34px, 5.5vh, 56px) + env(safe-area-inset-bottom, 0px));
  overflow: hidden;
}

/* the text block is anchored to the bottom of the frame */
.page-id-14 .wp-block-cover.has-custom-content-position.is-position-bottom-left {
  align-items: flex-end;
  justify-content: flex-start;
}

/*
 * The model sits right of centre in the source clip, so the crop is aimed there;
 * on a portrait phone that keeps her (and the earring) in frame rather than the
 * middle of the room. The frame is lifted slightly so the face clears the text.
 */
.page-id-14 .wp-block-cover__video-background {
  object-position: 56% 50%;
  transform-origin: center 45%;
  animation: ap-breathe 26s ease-in-out infinite;
}

@keyframes ap-breathe {
  0%,
  100% { transform: translate3d(0, -4%, 0) scale(1.07); }
  50%      { transform: translate3d(0, -6%, 0) scale(1.12); }
}

/* a scrim only where the text is: clear through the subject, dark at the foot */
.page-id-14 .wp-block-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(
    180deg,
    rgba(12, 10, 8, 0.22) 0%,
    rgba(12, 10, 8, 0.00) 24%,
    rgba(12, 10, 8, 0.06) 52%,
    rgba(12, 10, 8, 0.62) 82%,
    rgba(12, 10, 8, 0.88) 100%
  );
}

/* very light grain, just enough to keep it from looking flat */
.page-id-14 .wp-block-cover::before {
  content: "";
  position: absolute;
  inset: -10%;
  z-index: 1;
  pointer-events: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='140' height='140'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/></filter><rect width='140' height='140' filter='url(%23n)' opacity='0.42'/></svg>");
  opacity: 0.10;
  mix-blend-mode: soft-light;
}

/* ---------- the text ---------- */

.page-id-14 .wp-block-cover__inner-container {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 720px;
  margin-inline: 0;
}

.page-id-14 .wp-block-cover h1 {
  font-family: var(--ap-serif);
  font-weight: 400;
  font-size: clamp(28px, 7.6vw, 52px);
  line-height: 1.05;
  letter-spacing: -0.015em;
  margin: 0 0 12px;
  text-shadow: 0 14px 44px rgba(0, 0, 0, 0.6), 0 2px 6px rgba(0, 0, 0, 0.35);
}

.page-id-14 .wp-block-cover p {
  max-width: 31ch;
  margin: 0 0 20px;
  font-size: clamp(14px, 3.9vw, 17px);
  line-height: 1.55;
  text-shadow: 0 6px 22px rgba(0, 0, 0, 0.6);
}

.page-id-14 .wp-block-buttons,
.page-id-14 .wp-block-button {
  margin-block-end: 0;
}

/* entrance, once, when the page opens */
.page-id-14 .ap-in {
  opacity: 0;
  transform: translate3d(0, 20px, 0);
  animation: ap-rise 1.05s var(--ap-ease) forwards;
  animation-delay: var(--ap-delay, 0ms);
}

@keyframes ap-rise {
  to {
    opacity: 1;
    transform: none;
  }
}

/* ---------- the button ---------- */

.page-id-14 .wp-block-button__link {
  border-radius: 999px;
  padding: 15px 28px;
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 0.01em;
  transition: transform 0.35s var(--ap-ease), box-shadow 0.35s var(--ap-ease);
}

.page-id-14 .wp-block-button__link:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 38px rgba(0, 0, 0, 0.32);
}

/* ---------- accessibility: keep the fade, drop the movement ---------- */

@media (prefers-reduced-motion: reduce) {
  .page-id-14 .wp-block-cover__video-background {
    animation: none;
    transform: translate3d(0, -4%, 0) scale(1.06);
  }

  .page-id-14 .ap-in {
    transform: none;
    animation: ap-fade 0.7s ease forwards;
    animation-delay: var(--ap-delay, 0ms);
  }

  .page-id-14 .wp-block-button__link {
    transition: none;
  }
}

@keyframes ap-fade {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* very short screens (landscape phones): shrink so nothing is cut off */
@media (max-height: 520px) {
  .page-id-14 .wp-block-cover {
    padding-bottom: calc(18px + env(safe-area-inset-bottom, 0px));
  }

  .page-id-14 .wp-block-cover h1 {
    font-size: clamp(20px, 5.4vh, 34px);
    margin-bottom: 6px;
  }

  .page-id-14 .wp-block-cover p {
    font-size: 13px;
    margin-bottom: 12px;
  }
}
