:root {
  --page-bg: #f6efe6;
  --page-bg-deep: #ead9c7;
  --surface: rgba(255, 249, 241, 0.72);
  --surface-strong: rgba(255, 252, 248, 0.9);
  --surface-border: rgba(110, 74, 41, 0.18);
  --frame-bg: #1d1613;
  --frame-accent: #c08f62;
  --text: #221611;
  --muted: #6d5342;
  --headline: #3a2217;
  --glow: rgba(194, 136, 84, 0.3);
  --shadow-soft: 0 28px 70px rgba(71, 37, 13, 0.12);
  --shadow-strong: 0 34px 90px rgba(47, 23, 8, 0.18);
  --radius-xl: 36px;
  --radius-lg: 28px;
  --radius-md: 18px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  overflow-x: hidden;
  font-family: "Manrope", system-ui, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(208, 149, 88, 0.22), transparent 28%),
    radial-gradient(circle at 86% 18%, rgba(236, 212, 180, 0.6), transparent 18%),
    radial-gradient(circle at bottom right, rgba(139, 78, 31, 0.12), transparent 22%),
    linear-gradient(180deg, #fbf7f2 0%, var(--page-bg) 44%, var(--page-bg-deep) 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.35;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.16) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.12) 1px, transparent 1px);
  background-size: 120px 120px;
  mask-image: radial-gradient(circle at center, black 42%, transparent 88%);
}

.ritual-page {
  position: relative;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 54px 0 72px;
  overflow: clip;
}

.ambient {
  position: absolute;
  border-radius: 999px;
  filter: blur(12px);
  pointer-events: none;
}

.ambient-one {
  top: 34px;
  left: -32px;
  width: 180px;
  height: 180px;
  background: radial-gradient(circle, rgba(212, 154, 103, 0.46), transparent 72%);
}

.ambient-two {
  right: -54px;
  bottom: 74px;
  width: 220px;
  height: 220px;
  background: radial-gradient(circle, rgba(138, 80, 35, 0.24), transparent 72%);
}

.hero {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 16px;
  justify-items: center;
  text-align: center;
  margin: 0 auto 34px;
  padding: 26px 0 10px;
}

.hero h1 {
  margin: 0;
  max-width: none;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(2.95rem, 5vw, 4.95rem);
  font-weight: 600;
  line-height: 0.95;
  letter-spacing: 0.02em;
  color: var(--headline);
  background: linear-gradient(180deg, #8f4b24 0%, #bf7d53 48%, #5f3525 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  text-wrap: balance;
  text-shadow: 0 8px 24px rgba(138, 79, 33, 0.1);
}

.subtext {
  margin: 0;
  max-width: 32ch;
  font-size: clamp(1.08rem, 2vw, 1.35rem);
  line-height: 1.7;
  color: var(--muted);
  text-wrap: balance;
}

.video-stage {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 24px;
  justify-items: center;
}

.video-card {
  position: relative;
  width: min(1040px, 100%);
  padding: 18px;
  border-radius: calc(var(--radius-xl) + 6px);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.7), rgba(255, 248, 239, 0.54)),
    var(--surface);
  border: 1px solid rgba(138, 92, 58, 0.18);
  box-shadow: var(--shadow-strong);
  backdrop-filter: blur(16px);
}

.video-card-border {
  position: absolute;
  inset: 10px;
  border-radius: calc(var(--radius-xl) - 2px);
  border: 1px solid rgba(185, 134, 88, 0.26);
  pointer-events: none;
}

.video-frame {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: var(--radius-xl);
  background:
    linear-gradient(180deg, rgba(19, 13, 10, 0.36), rgba(19, 13, 10, 0.08)),
    var(--frame-bg);
  box-shadow:
    inset 0 0 0 1px rgba(255, 237, 218, 0.08),
    inset 0 -32px 60px rgba(0, 0, 0, 0.16),
    0 22px 60px rgba(34, 18, 10, 0.28);
}

.video-frame iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

.video-backdrop {
  position: relative;
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 50% 28%, rgba(255, 214, 171, 0.94), rgba(255, 214, 171, 0.12) 20%, transparent 36%),
    linear-gradient(180deg, #d8b28e 0%, #9e6240 46%, #4f3023 76%, #1e1715 100%);
}

.video-backdrop::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 50% 96%, rgba(255, 192, 135, 0.28), transparent 24%),
    linear-gradient(180deg, transparent 52%, rgba(28, 18, 14, 0.12) 68%, rgba(18, 11, 10, 0.42) 100%);
}

.video-backdrop::after {
  content: "";
  position: absolute;
  inset: auto 8% 10%;
  height: 32%;
  border-radius: 50%;
  background:
    radial-gradient(circle at center, rgba(255, 235, 214, 0.16), transparent 52%),
    linear-gradient(180deg, rgba(255, 211, 168, 0.22), transparent 76%);
  filter: blur(20px);
}

.video-backdrop-sun,
.video-backdrop-glow,
.play-pill,
.backdrop-sheen,
.control-strip {
  position: absolute;
}

.video-backdrop-sun {
  top: 17%;
  width: min(15vw, 144px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, #fff6ea 0%, #ffd9b4 42%, rgba(255, 217, 180, 0.08) 72%);
  box-shadow: 0 0 60px rgba(255, 214, 178, 0.36);
}

.video-backdrop-glow {
  inset: 10% 14% auto;
  height: 54%;
  background: radial-gradient(circle at center, rgba(255, 225, 190, 0.14), transparent 56%);
  filter: blur(14px);
}

.play-pill {
  display: grid;
  place-items: center;
  width: clamp(84px, 10vw, 110px);
  aspect-ratio: 1;
  border-radius: 50%;
  background:
    linear-gradient(180deg, rgba(255, 250, 245, 0.94), rgba(247, 229, 210, 0.72)),
    rgba(255, 250, 245, 0.84);
  border: 1px solid rgba(255, 255, 255, 0.55);
  box-shadow:
    0 18px 40px rgba(49, 23, 8, 0.24),
    inset 0 -10px 20px rgba(196, 147, 102, 0.18);
}

.play-icon {
  width: 0;
  height: 0;
  margin-left: 7px;
  border-top: 15px solid transparent;
  border-bottom: 15px solid transparent;
  border-left: 25px solid rgba(76, 44, 28, 0.92);
}

.backdrop-sheen {
  inset: 0;
  background:
    linear-gradient(124deg, rgba(255, 255, 255, 0.22) 0%, rgba(255, 255, 255, 0.02) 28%, transparent 42%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), transparent 26%);
}

.control-strip {
  left: clamp(18px, 3vw, 30px);
  right: clamp(18px, 3vw, 30px);
  bottom: clamp(18px, 3vw, 26px);
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(14, 10, 8, 0.4), rgba(14, 10, 8, 0.68));
  border: 1px solid rgba(255, 235, 218, 0.12);
  backdrop-filter: blur(12px);
}

.control-dot {
  width: 10px;
  height: 10px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #fff0e1;
  box-shadow: 0 0 14px rgba(255, 232, 206, 0.9);
}

.progress-track {
  flex: 1;
  height: 4px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 248, 241, 0.22);
}

.progress-fill {
  display: block;
  width: 36%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #f7d6b1 0%, #f3b886 100%);
}

.control-time {
  color: rgba(255, 240, 228, 0.86);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.08em;
}

.ornament {
  width: 160px;
  color: rgba(120, 75, 42, 0.56);
}

.ornament svg {
  width: 100%;
  height: auto;
}

.ornament path {
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-width: 1.7;
}

@media (max-width: 900px) {
  .ritual-page {
    width: min(100% - 22px, 1180px);
    padding-top: 34px;
    padding-bottom: 52px;
  }

  .hero {
    gap: 12px;
    margin-bottom: 24px;
  }

  .video-card {
    padding: 12px;
  }

  .video-card-border {
    inset: 7px;
  }
}

@media (max-width: 640px) {
  body::before {
    background-size: 88px 88px;
  }

  .hero h1 {
    max-width: 10ch;
    font-size: clamp(2.6rem, 11vw, 4rem);
  }

  .subtext {
    max-width: 20ch;
    font-size: 1rem;
    line-height: 1.75;
  }

  .video-card {
    padding: 10px;
    border-radius: 24px;
  }

  .video-card-border,
  .video-frame {
    border-radius: 20px;
  }

  .control-strip {
    gap: 10px;
    padding: 10px 12px;
  }

  .control-time {
    font-size: 0.75rem;
  }

  .ambient {
    display: none;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .ambient-one {
    animation: drift 12s ease-in-out infinite;
  }

  .ambient-two {
    animation: drift 14s ease-in-out infinite reverse;
  }

  .play-pill {
    animation: pulse 3.2s ease-in-out infinite;
  }
}

@keyframes drift {
  0%,
  100% {
    transform: translate3d(0, 0, 0);
  }

  50% {
    transform: translate3d(0, -10px, 0);
  }
}

@keyframes pulse {
  0%,
  100% {
    transform: scale(1);
    box-shadow:
      0 18px 40px rgba(49, 23, 8, 0.24),
      inset 0 -10px 20px rgba(196, 147, 102, 0.18);
  }

  50% {
    transform: scale(1.03);
    box-shadow:
      0 22px 48px rgba(49, 23, 8, 0.28),
      inset 0 -10px 20px rgba(196, 147, 102, 0.24);
  }
}
