/*
 * Roar Panther — Surface & Light Dial
 * Full desktop dial experience; simplified tablet and mobile explorer.
 */

.rp-surface-light {
  --rp-surface-bg: #fcfaf6;
  --rp-surface-text: #29251f;
  --rp-surface-muted: #6a635b;
  --rp-surface-bronze: var(--rp-accent, #a87542);
  --rp-surface-line: rgba(100, 75, 48, 0.14);
  width: 100%;
  overflow: hidden;
  padding-block: clamp(28px, 4vh, 48px) clamp(24px, 3vh, 38px);
  color: var(--rp-surface-text);
  background:
    radial-gradient(circle at 18% 16%, rgba(231, 217, 193, 0.18), transparent 27%),
    radial-gradient(circle at 82% 18%, rgba(231, 217, 193, 0.16), transparent 27%),
    linear-gradient(180deg, #fcfaf6 0%, #f9f5ed 100%);
  font-family: var(--font-sans, "Questrial", "Inter", sans-serif);
}

.rp-surface-light__container {
  display: grid;
  gap: clamp(14px, 1.8vh, 22px);
}

.rp-surface-light__header {
  display: grid;
  justify-items: center;
  text-align: center;
}

.rp-surface-light__motif {
  display: flex;
  align-items: center;
  gap: 0;
  width: 112px;
  margin-bottom: 10px;
}

.rp-surface-light__motif i {
  flex: 1;
  height: 1px;
  background: rgba(168, 117, 66, 0.65);
}

.rp-surface-light__motif b {
  position: relative;
  width: 28px;
  height: 14px;
}

.rp-surface-light__motif b::before,
.rp-surface-light__motif b::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 12px;
  height: 12px;
  border: 1px solid rgba(168, 117, 66, 0.8);
  transform: translateY(-50%) rotate(45deg);
}

.rp-surface-light__motif b::before {
  left: 3px;
}

.rp-surface-light__motif b::after {
  right: 3px;
}

.rp-surface-light__eyebrow {
  margin: 0 0 8px;
  color: var(--rp-surface-bronze);
  font: 500 0.72rem/1.4 var(--font-sans, "Questrial", sans-serif);
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.rp-surface-light h2 {
  max-width: 21ch;
  margin: 0;
  color: var(--rp-surface-text);
  font: 300 clamp(2.05rem, 3.4vw, 4.2rem)/0.98 var(--font-display, "Questrial", sans-serif);
  letter-spacing: -0.045em;
  text-wrap: balance;
}

.rp-surface-light__interactive {
  display: grid;
  grid-template-columns: minmax(210px, 0.23fr) minmax(320px, 0.54fr) minmax(210px, 0.23fr);
  align-items: center;
  gap: clamp(16px, 2vw, 34px);
  min-height: clamp(330px, 48vh, 520px);
}

.rp-surface-light__controls {
  display: grid;
  align-items: center;
  gap: 14px;
}

.rp-surface-light__controls h3 {
  margin: 0;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--rp-surface-line);
  color: var(--rp-surface-bronze);
  font: 500 0.78rem/1.3 var(--font-sans, "Questrial", sans-serif);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.rp-surface-light__options {
  display: grid;
}

.rp-surface-light__option {
  appearance: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 43px;
  padding: 8px 2px;
  border: 0;
  border-bottom: 1px solid var(--rp-surface-line);
  background: transparent;
  color: #6c655d;
  cursor: pointer;
  font: 400 0.95rem/1.3 var(--font-sans, "Questrial", sans-serif);
  text-align: left;
  transition:
    color 260ms ease,
    transform 260ms ease;
}

.rp-surface-light__option i {
  flex: 0 0 auto;
  width: 12px;
  height: 12px;
  border: 1px solid rgba(168, 117, 66, 0.62);
  border-radius: 50%;
  background: transparent;
  transition:
    background 260ms ease,
    border-color 260ms ease,
    transform 260ms ease;
}

.rp-surface-light__option:hover {
  color: var(--rp-surface-text);
  transform: translateX(3px);
}

.rp-surface-light__option.is-active {
  color: var(--rp-surface-text);
  font-weight: 500;
}

.rp-surface-light__option.is-active i {
  border-color: var(--rp-surface-bronze);
  background: var(--rp-surface-bronze);
  transform: scale(1.04);
}

.rp-surface-light__option:focus-visible,
.rp-surface-light__cta:focus-visible {
  outline: 2px solid var(--rp-surface-bronze);
  outline-offset: 4px;
}

.rp-surface-light__short-label {
  display: none;
}

.rp-surface-light__dial {
  justify-self: center;
  position: relative;
  width: 92px;
  height: 92px;
  margin-top: 4px;
  border-radius: 50%;
  background:
    repeating-conic-gradient(
      from -3deg,
      rgba(168, 117, 66, 0.6) 0deg 1deg,
      transparent 1deg 15deg
    );
  transition: opacity 260ms ease;
}

.rp-surface-light__dial-face {
  position: absolute;
  inset: 15px;
  border: 1px solid rgba(136, 101, 62, 0.28);
  border-radius: 50%;
  background:
    radial-gradient(circle at 34% 28%, rgba(255, 255, 255, 0.95), transparent 25%),
    conic-gradient(
      from 205deg,
      #d8c7ac 0deg,
      #f7f0e5 80deg,
      #c5af8d 180deg,
      #f8f1e7 280deg,
      #d8c7ac 360deg
    );
  box-shadow:
    0 10px 18px rgba(91, 67, 39, 0.13),
    inset 0 0 0 5px rgba(255, 255, 255, 0.32);
}

.rp-surface-light__dial-pointer {
  position: absolute;
  left: 50%;
  top: 8px;
  width: 2px;
  height: 15px;
  border-radius: 999px;
  background: var(--rp-surface-bronze);
  transform-origin: 50% 27px;
  transform: translateX(-50%) rotate(var(--rp-dial-angle, 0deg));
  transition: transform 620ms cubic-bezier(0.22, 1, 0.36, 1);
}

.rp-surface-light__stage {
  position: relative;
  display: grid;
  place-items: center;
  min-width: 0;
}

.rp-surface-light__disc {
  position: relative;
  width: clamp(320px, min(36vw, 50vh), 520px);
  aspect-ratio: 1;
  overflow: hidden;
  border: 1px solid rgba(131, 100, 65, 0.2);
  border-radius: 50%;
  background: #f4ecdf;
  box-shadow:
    0 26px 48px rgba(73, 56, 34, 0.12),
    inset 0 0 0 1px rgba(255, 255, 255, 0.72);
  isolation: isolate;
}

.rp-surface-light__image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  border-radius: 50%;
}

.rp-surface-light__image.is-current {
  z-index: 1;
  transition:
    opacity 520ms cubic-bezier(0.22, 1, 0.36, 1),
    transform 620ms cubic-bezier(0.22, 1, 0.36, 1);
}

.rp-surface-light__image.is-next {
  z-index: 2;
  opacity: 0;
  clip-path: circle(0% at 50% 50%);
  transform: scale(1.015);
}

.rp-surface-light__sweep {
  position: absolute;
  inset: -20%;
  z-index: 3;
  opacity: 0;
  pointer-events: none;
  background: linear-gradient(
    105deg,
    transparent 35%,
    rgba(255, 255, 255, 0.42) 48%,
    transparent 62%
  );
  transform: translateX(-75%);
}

.rp-surface-light__disc.is-changing .rp-surface-light__image.is-current {
  opacity: 0.42;
  transform: scale(0.985);
}

.rp-surface-light__disc.is-changing .rp-surface-light__image.is-next {
  animation: rp-surface-radial-reveal 620ms cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.rp-surface-light__disc.is-changing .rp-surface-light__sweep {
  animation: rp-surface-sweep 620ms cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.rp-surface-light__disc[data-light-direction="front"] .rp-surface-light__sweep {
  background: radial-gradient(circle, rgba(255, 255, 255, 0.38), transparent 46%);
  transform: scale(0.7);
}

.rp-surface-light__disc[data-light-direction="side"] .rp-surface-light__sweep {
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.4),
    transparent 46%
  );
}

.rp-surface-light__disc[data-light-direction="grazing"] .rp-surface-light__sweep {
  background: linear-gradient(
    18deg,
    transparent 42%,
    rgba(255, 255, 255, 0.44) 50%,
    transparent 58%
  );
}

.rp-surface-light__shadow {
  position: absolute;
  left: 50%;
  bottom: -14px;
  width: min(64%, 330px);
  height: 32px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(76, 56, 34, 0.22), transparent 70%);
  transform: translateX(-50%);
  filter: blur(4px);
  transition: transform 500ms ease, opacity 500ms ease;
}

.rp-surface-light__disc.is-changing + .rp-surface-light__shadow {
  transform: translateX(-50%) scaleX(0.94);
  opacity: 0.74;
}

.rp-surface-light__footer {
  display: grid;
  justify-items: center;
  gap: 8px;
  max-width: 760px;
  margin-inline: auto;
  text-align: center;
}

.rp-surface-light__description {
  margin: 0;
  color: var(--rp-surface-text);
  font: 500 0.9rem/1.5 var(--font-sans, "Questrial", sans-serif);
}

.rp-surface-light__supporting {
  margin: 0;
  color: var(--rp-surface-muted);
  font: 400 0.98rem/1.55 var(--font-sans, "Questrial", sans-serif);
}

.rp-surface-light__cta {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  min-height: 42px;
  margin-top: 2px;
  color: #8b5c2f;
  font: 500 0.9rem/1.3 var(--font-sans, "Questrial", sans-serif);
  text-decoration: none;
  transition: color 240ms ease, transform 240ms ease;
}

.rp-surface-light__cta span:last-child {
  font-size: 1.25rem;
  transition: transform 240ms ease;
}

.rp-surface-light__cta:hover {
  color: var(--rp-surface-text);
}

.rp-surface-light__cta:hover span:last-child {
  transform: translateX(4px);
}

.rp-surface-light:not(.is-visible) .rp-surface-light__header,
.rp-surface-light:not(.is-visible) .rp-surface-light__controls,
.rp-surface-light:not(.is-visible) .rp-surface-light__stage,
.rp-surface-light:not(.is-visible) .rp-surface-light__footer {
  opacity: 0;
}

.rp-surface-light:not(.is-visible) .rp-surface-light__header,
.rp-surface-light:not(.is-visible) .rp-surface-light__footer {
  transform: translateY(16px);
}

.rp-surface-light:not(.is-visible) .rp-surface-light__stage {
  transform: scale(0.94);
}

.rp-surface-light__header,
.rp-surface-light__controls,
.rp-surface-light__stage,
.rp-surface-light__footer {
  transition:
    opacity 720ms cubic-bezier(0.22, 1, 0.36, 1),
    transform 720ms cubic-bezier(0.22, 1, 0.36, 1);
}

.rp-surface-light.is-visible .rp-surface-light__controls--finish {
  transition-delay: 70ms;
}

.rp-surface-light.is-visible .rp-surface-light__controls--light {
  transition-delay: 120ms;
}

.rp-surface-light.is-visible .rp-surface-light__footer {
  transition-delay: 160ms;
}

@keyframes rp-surface-radial-reveal {
  from {
    opacity: 0.15;
    clip-path: circle(0% at 50% 50%);
    transform: scale(1.015);
  }
  to {
    opacity: 1;
    clip-path: circle(72% at 50% 50%);
    transform: scale(1);
  }
}

@keyframes rp-surface-sweep {
  0% {
    opacity: 0;
    transform: translateX(-75%);
  }
  35% {
    opacity: 0.75;
  }
  100% {
    opacity: 0;
    transform: translateX(75%);
  }
}

/* Short laptop layout: everything remains visible at 1366 × 768. */
@media (min-width: 1025px) and (max-height: 820px) {
  .rp-surface-light {
    padding-block: 20px;
  }

  .rp-surface-light__container {
    gap: 10px;
  }

  .rp-surface-light__motif {
    margin-bottom: 5px;
  }

  .rp-surface-light__eyebrow {
    margin-bottom: 4px;
  }

  .rp-surface-light h2 {
    font-size: clamp(1.9rem, 3vw, 3.25rem);
  }

  .rp-surface-light__interactive {
    min-height: 350px;
  }

  .rp-surface-light__disc {
    width: clamp(300px, min(34vw, 47vh), 420px);
  }

  .rp-surface-light__dial {
    width: 80px;
    height: 80px;
  }

  .rp-surface-light__dial-face {
    inset: 13px;
  }

  .rp-surface-light__option {
    min-height: 38px;
    font-size: 0.86rem;
  }

  .rp-surface-light__controls {
    gap: 9px;
  }

  .rp-surface-light__footer {
    gap: 4px;
  }

  .rp-surface-light__supporting {
    font-size: 0.9rem;
  }
}

/* Tablet: simpler controls, no rotary dials or heavy reveal. */
@media (max-width: 1024px) {
  .rp-surface-light {
    padding-block: clamp(58px, 8vw, 82px);
  }

  .rp-surface-light__container {
    gap: 26px;
  }

  .rp-surface-light h2 {
    max-width: 15ch;
    font-size: clamp(2.3rem, 6vw, 4rem);
  }

  .rp-surface-light__interactive {
    grid-template-columns: 1fr;
    grid-template-areas:
      "stage"
      "finish"
      "light";
    min-height: 0;
    gap: 26px;
  }

  .rp-surface-light__stage {
    grid-area: stage;
  }

  .rp-surface-light__controls--finish {
    grid-area: finish;
  }

  .rp-surface-light__controls--light {
    grid-area: light;
  }

  .rp-surface-light__controls {
    gap: 12px;
  }

  .rp-surface-light__controls h3 {
    text-align: center;
  }

  .rp-surface-light__options--finish {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: none;
  }

  .rp-surface-light__options--finish::-webkit-scrollbar {
    display: none;
  }

  .rp-surface-light__options--finish .rp-surface-light__option {
    flex: 0 0 auto;
    justify-content: center;
    min-height: 44px;
    padding: 9px 15px;
    border: 1px solid rgba(100, 75, 48, 0.14);
    border-radius: 999px;
  }

  .rp-surface-light__options--finish .rp-surface-light__option i {
    width: 8px;
    height: 8px;
  }

  .rp-surface-light__options--light {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 7px;
  }

  .rp-surface-light__options--light .rp-surface-light__option {
    justify-content: center;
    min-height: 46px;
    padding: 9px 10px;
    border: 1px solid rgba(100, 75, 48, 0.14);
    border-radius: 4px;
  }

  .rp-surface-light__options--light .rp-surface-light__option i {
    display: none;
  }

  .rp-surface-light__dial {
    display: none;
  }

  .rp-surface-light__disc {
    width: min(64vw, 440px);
  }

  .rp-surface-light__disc.is-changing .rp-surface-light__image.is-next {
    animation: rp-surface-simple-fade 340ms ease forwards;
  }

  .rp-surface-light__disc.is-changing .rp-surface-light__sweep {
    display: none;
  }

  .rp-surface-light__disc.is-changing .rp-surface-light__image.is-current {
    opacity: 0.2;
    transform: scale(0.99);
  }
}

@keyframes rp-surface-simple-fade {
  from {
    opacity: 0;
    clip-path: circle(72% at 50% 50%);
    transform: scale(1.01);
  }
  to {
    opacity: 1;
    clip-path: circle(72% at 50% 50%);
    transform: scale(1);
  }
}

/* Mobile: efficient finish explorer. */
@media (max-width: 640px) {
  .rp-surface-light {
    padding-block: 56px 48px;
  }

  .rp-surface-light__container {
    gap: 22px;
  }

  .rp-surface-light__motif {
    width: 84px;
  }

  .rp-surface-light h2 {
    font-size: clamp(2.15rem, 11vw, 3.35rem);
  }

  .rp-surface-light__disc {
    width: min(82vw, 360px);
  }

  .rp-surface-light__controls h3 {
    text-align: left;
  }

  .rp-surface-light__options--finish {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    overflow: visible;
  }

  .rp-surface-light__options--finish .rp-surface-light__option {
    width: 100%;
  }

  .rp-surface-light__full-label {
    display: none;
  }

  .rp-surface-light__short-label {
    display: inline;
  }

  .rp-surface-light__description {
    font-size: 0.86rem;
  }

  .rp-surface-light__supporting {
    font-size: 0.94rem;
    line-height: 1.6;
  }
}

@media (prefers-reduced-motion: reduce) {
  .rp-surface-light *,
  .rp-surface-light *::before,
  .rp-surface-light *::after {
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 180ms !important;
    transition-delay: 0ms !important;
    scroll-behavior: auto !important;
  }

  .rp-surface-light__sweep {
    display: none !important;
  }
}
