/* PsyQo V4 refinement layer — semantic tokens and one shared responsive system. */

body.is-refined {
  --rf-bg: #03040a;
  --rf-panel: #0b0d15;
  --rf-ink: #f4f5fb;
  --rf-soft: rgba(244, 245, 251, 0.72);
  --rf-muted: rgba(244, 245, 251, 0.52);
  --rf-line: rgba(211, 214, 255, 0.14);
  --rf-accent: #9ea3ff;
  --rf-radius: 12px;
  --rf-gutter: clamp(20px, 5vw, 72px);
  --rf-section: clamp(96px, 10vw, 148px);
  background: var(--rf-bg) !important;
  color: var(--rf-ink);
  font-family: "Space Grotesk", system-ui, sans-serif;
  font-size: 16px;
  font-weight: 400;
  text-rendering: optimizeLegibility;
}

body.is-refined .container {
  width: min(100% - (var(--rf-gutter) * 2), 1280px);
}

body.is-refined h1,
body.is-refined h2,
body.is-refined h3,
body.is-refined p {
  text-wrap: pretty;
}

body.is-refined h2 {
  font-family: "Space Grotesk", system-ui, sans-serif;
  font-size: clamp(2rem, 4vw, 3.25rem);
  font-weight: 600;
  line-height: 1.04;
  letter-spacing: -0.035em;
}

body.is-refined h3 {
  font-family: "Space Grotesk", system-ui, sans-serif;
  font-weight: 600;
  letter-spacing: -0.025em;
}

body.is-refined p {
  font-size: clamp(1rem, 1.35vw, 1.1rem);
  font-weight: 400;
  line-height: 1.65;
}

body.is-refined .btn {
  min-height: 44px;
  border-radius: 999px;
  font: 600 15px/1 "Space Grotesk", system-ui, sans-serif;
  letter-spacing: -0.01em;
}

body.is-refined .site-header {
  border-bottom-color: rgba(255, 255, 255, 0.08);
  background: rgba(3, 4, 10, 0.78);
  backdrop-filter: blur(18px);
}

body.is-refined .nav-links a,
body.is-refined .header-actions .btn,
body.is-refined .mobile-panel a {
  font: 600 14px/1 "Space Grotesk", system-ui, sans-serif;
  letter-spacing: -0.01em;
}

body.is-refined .mobile-panel a,
body.is-refined .menu-toggle {
  min-height: 44px;
}

body.is-refined .rf-section {
  position: relative;
  padding: var(--rf-section) 0;
  background: var(--rf-bg);
  border-top: 1px solid var(--rf-line);
}

.rf-about-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(300px, 0.72fr);
  align-items: end;
  gap: clamp(56px, 9vw, 140px);
}

.rf-about h2 {
  max-width: 15ch;
  margin: 0;
}

.rf-about-copy {
  max-width: 38rem;
}

.rf-about-copy > p:first-child {
  margin: 0;
  color: var(--rf-soft);
}

.rf-proof {
  margin: 32px 0 0;
  padding-top: 22px;
  border-top: 1px solid var(--rf-line);
  color: var(--rf-ink);
  font-size: 13px !important;
  font-weight: 600 !important;
  line-height: 1.55 !important;
  letter-spacing: 0.02em;
}

.rf-proof span {
  padding: 0 7px;
  color: var(--rf-accent);
}

.rf-section-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.55fr);
  align-items: end;
  gap: 48px;
  margin-bottom: clamp(36px, 5vw, 60px);
}

.rf-section-head h2,
.rf-section-head p {
  margin: 0;
}

.rf-section-head p {
  color: var(--rf-soft);
}

.rf-media-panel {
  position: relative;
  display: block;
  min-height: clamp(360px, 55vw, 720px);
  overflow: hidden;
  border: 1px solid var(--rf-line);
  border-radius: var(--rf-radius);
  color: var(--rf-ink);
  isolation: isolate;
}

.rf-media-panel > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.01);
  transition: transform 600ms cubic-bezier(.2,.8,.2,1), filter 600ms ease;
}

.rf-media-panel:hover > img {
  transform: scale(1.035);
  filter: saturate(1.08);
}

.rf-media-scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 28%, rgba(2, 3, 8, 0.88) 100%);
}

.rf-media-copy {
  position: absolute;
  left: clamp(24px, 4vw, 56px);
  right: 84px;
  bottom: clamp(24px, 4vw, 50px);
  display: grid;
  gap: 8px;
}

.rf-media-copy strong {
  font-size: clamp(1.6rem, 3.6vw, 3rem);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.035em;
}

.rf-media-copy > span {
  color: rgba(255, 255, 255, 0.72);
  font-size: 15px;
}

.rf-media-action {
  position: absolute;
  right: clamp(24px, 4vw, 48px);
  bottom: clamp(24px, 4vw, 48px);
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border: 1px solid rgba(255,255,255,.28);
  border-radius: 50%;
  background: rgba(3,4,10,.46);
  backdrop-filter: blur(12px);
}

.rf-studios-grid {
  display: grid;
  grid-template-columns: minmax(280px, 0.7fr) minmax(0, 1.3fr);
  align-items: center;
  gap: clamp(48px, 8vw, 112px);
}

.rf-studios-copy h2 {
  max-width: 15ch;
  margin: 0 0 24px;
}

.rf-studios-copy p {
  max-width: 34rem;
  margin: 0 0 32px;
  color: var(--rf-soft);
}

.rf-studios-case {
  display: grid;
  overflow: hidden;
  border: 1px solid var(--rf-line);
  border-radius: var(--rf-radius);
  background: var(--rf-panel);
  color: var(--rf-ink);
}

.rf-studios-case img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.rf-studios-case > span {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
  color: var(--rf-muted);
  font-size: 13px;
}

.rf-studios-case strong {
  color: var(--rf-ink);
  font-weight: 600;
}

.rf-shop-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(300px, 0.75fr);
  align-items: center;
  gap: clamp(52px, 9vw, 132px);
}

.rf-shop-media {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: clamp(420px, 48vw, 660px);
  overflow: hidden;
  border: 1px solid var(--rf-line);
  border-radius: var(--rf-radius);
  background: radial-gradient(circle at 50% 42%, rgba(158, 163, 255, 0.17), transparent 55%), #080912;
}

.rf-shop-media::after {
  position: absolute;
  inset: 0;
  content: "";
  pointer-events: none;
  background: linear-gradient(180deg, transparent 58%, rgba(2, 3, 8, 0.88));
}

.rf-shop-media img {
  width: 100%;
  height: 100%;
  min-height: inherit;
  object-fit: contain;
  filter: drop-shadow(0 30px 40px rgba(0, 0, 0, 0.42));
}

.rf-shop-media > span {
  position: absolute;
  z-index: 1;
  left: clamp(22px, 3vw, 38px);
  bottom: clamp(20px, 3vw, 34px);
  color: var(--rf-ink);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.rf-shop-copy h2 {
  max-width: 15ch;
  margin: 0 0 24px;
}

.rf-shop-copy p {
  max-width: 36rem;
  margin: 0 0 32px;
  color: var(--rf-soft);
}

.rf-network-grid,
.rf-faq-grid {
  display: grid;
  grid-template-columns: minmax(260px, 0.65fr) minmax(0, 1.35fr);
  align-items: start;
  gap: clamp(56px, 10vw, 148px);
}

.rf-network-copy,
.rf-faq-copy {
  position: sticky;
  top: 128px;
}

.rf-network-copy h2,
.rf-faq-copy h2 {
  max-width: 14ch;
  margin: 0 0 22px;
}

.rf-network-copy p,
.rf-faq-copy p {
  max-width: 34rem;
  margin: 0;
  color: var(--rf-soft);
}

.rf-network-list {
  display: grid;
  border-top: 1px solid var(--rf-line);
}

.rf-network-item {
  display: grid;
  grid-template-columns: 1fr auto 22px;
  align-items: center;
  gap: 22px;
  min-height: 70px;
  padding: 12px 0;
  border-bottom: 1px solid var(--rf-line);
  color: var(--rf-muted);
}

.rf-network-item > span {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--rf-soft);
  font-weight: 600;
}

.rf-network-item svg {
  width: 18px;
  height: 18px;
}

.rf-network-item > strong {
  color: var(--rf-muted);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.rf-network-item.is-live {
  color: var(--rf-accent);
  transition: color 180ms ease, padding 180ms ease;
}

.rf-network-item.is-live:hover {
  padding-left: 10px;
  color: var(--rf-ink);
}

.rf-network-item.is-live > span,
.rf-network-item.is-live > strong {
  color: var(--rf-ink);
}

.rf-network-item[aria-disabled="true"] {
  cursor: default;
}

.rf-network-item[aria-disabled="true"] > span,
.rf-network-item[aria-disabled="true"] > strong {
  color: rgba(244, 245, 251, 0.58);
}

.rf-faq-list {
  border-top: 1px solid var(--rf-line);
}

.rf-faq-list details {
  border-bottom: 1px solid var(--rf-line);
}

.rf-faq-list summary {
  display: grid;
  grid-template-columns: 1fr 24px;
  align-items: center;
  gap: 24px;
  min-height: 76px;
  padding: 18px 0;
  color: var(--rf-ink);
  font-size: clamp(1rem, 1.65vw, 1.2rem);
  font-weight: 600;
  line-height: 1.3;
  cursor: pointer;
  list-style: none;
}

.rf-faq-list summary::-webkit-details-marker {
  display: none;
}

.rf-faq-list summary svg {
  width: 20px;
  height: 20px;
  color: var(--rf-accent);
  transition: transform 180ms ease;
}

.rf-faq-list details[open] summary svg {
  transform: rotate(45deg);
}

.rf-faq-list details > p {
  max-width: 65ch;
  margin: -2px 48px 26px 0;
  color: var(--rf-soft);
}

/* The cinematic remains the authored spectacle; only improve phone fit. */
@media (max-width: 760px) {
  body.is-refined.v4-film .v4-film-title {
    width: min(100%, 430px) !important;
    font-size: clamp(58px, 18vw, 82px) !important;
    line-height: 0.88 !important;
  }

  body.is-refined.v4-film .v4-film-title-block {
    width: calc(100vw - 40px) !important;
    max-width: 430px !important;
    margin-inline: auto !important;
  }

  body.is-refined.v4-film .v4-beat-about-heading {
    font-size: clamp(23px, 7vw, 30px) !important;
    line-height: 1.08 !important;
  }

  body.is-refined.v4-film .v4-beat-about-para {
    font-size: 14px !important;
    line-height: 1.52 !important;
    color: rgba(255,255,255,.78) !important;
  }
}

/* Calm secondary-page heroes. */
body.is-refined .v4-page-hero {
  min-height: clamp(280px, 42vh, 430px) !important;
  padding: clamp(120px, 16vh, 170px) var(--rf-gutter) 64px !important;
  align-items: end !important;
  border-bottom: 1px solid var(--rf-line) !important;
}

body.is-refined .v4-page-hero-copy {
  width: min(100%, 1180px) !important;
  margin: 0 auto !important;
  text-align: left !important;
}

body.is-refined .v4-page-hero-title {
  margin: 0 0 18px !important;
  font-family: "Space Grotesk", system-ui, sans-serif !important;
  font-size: clamp(2.75rem, 7vw, 5.5rem) !important;
  font-weight: 600 !important;
  line-height: .94 !important;
  letter-spacing: -.045em !important;
}

body.is-refined .v4-page-hero-dek {
  max-width: 42rem !important;
  margin: 0 !important;
  color: var(--rf-soft) !important;
  font-size: clamp(1rem, 1.8vw, 1.2rem) !important;
  font-weight: 400 !important;
  line-height: 1.55 !important;
}

/* Home join: editorial, readable, and free of the older card-stack feel. */
body.is-refined .aero-process-section {
  padding: var(--rf-section) 0 !important;
  background: var(--rf-bg) !important;
  border-top: 1px solid var(--rf-line) !important;
}

body.is-refined .process-layout {
  gap: clamp(56px, 9vw, 128px) !important;
}

body.is-refined .process-copy > h2 {
  margin-top: 0 !important;
}

body.is-refined .process-copy > p,
body.is-refined .v4-join-step p,
body.is-refined .v4-contact-status {
  color: var(--rf-soft) !important;
}

body.is-refined .v4-contact-form,
body.is-refined .v4-join-step {
  border-color: var(--rf-line) !important;
  border-radius: var(--rf-radius) !important;
  background: rgba(255,255,255,.025) !important;
  box-shadow: none !important;
}

body.is-refined .v4-contact-field > span,
body.is-refined .v4-join-step-num,
body.is-refined .v4-featured-channels-label,
body.is-refined .v4-center-shelf-head p {
  font-family: "Space Grotesk", system-ui, sans-serif !important;
  letter-spacing: .04em !important;
}

body.is-refined .v4-contact-field input,
body.is-refined .v4-contact-field select,
body.is-refined .v4-contact-field textarea {
  min-height: 48px !important;
  border-color: var(--rf-line) !important;
  border-radius: 8px !important;
  font: 400 16px/1.4 "Space Grotesk", system-ui, sans-serif !important;
}

body.is-refined .v4-join-mark-title {
  font-family: var(--v4-display, var(--font-brand)) !important;
}

/* Theater: featured player first, one swipeable recent-video rail on phones. */
body.is-refined .th-main .container {
  margin-top: clamp(36px, 6vw, 72px);
}

body.is-refined #theater .home-cinema,
body.is-refined #theater .cinema-screen,
body.is-refined #theater .cinema-card,
body.is-refined #theater .v4-center-shelf {
  border-color: var(--rf-line) !important;
  border-radius: var(--rf-radius) !important;
}

body.is-refined #theater .cinema-now-playing,
body.is-refined #theater .v4-center-shelf-head p {
  color: var(--rf-soft) !important;
}

/* Studios: three deliberate cases, with the first carrying the visual lead. */
body.is-refined .st-about {
  margin-bottom: clamp(80px, 10vw, 128px) !important;
  padding: clamp(76px, 9vw, 120px) 0 !important;
  border-bottom-color: var(--rf-line) !important;
}

body.is-refined .st-about-copy h2 {
  margin: 0 0 4px;
}

body.is-refined .st-manifesto,
body.is-refined .st-case-desc,
body.is-refined .st-cta p {
  color: var(--rf-soft) !important;
  font-weight: 400 !important;
}

body.is-refined .st-cases {
  gap: clamp(96px, 12vw, 160px) !important;
}

body.is-refined .st-case-media,
body.is-refined .st-cta {
  border-color: var(--rf-line) !important;
  border-radius: var(--rf-radius) !important;
  box-shadow: none !important;
}

body.is-refined .st-case--featured {
  padding-bottom: clamp(36px, 5vw, 64px);
  border-bottom: 1px solid var(--rf-line);
}

body.is-refined .st-case-name {
  font-family: "Space Grotesk", system-ui, sans-serif !important;
  font-size: clamp(1.5rem, 3vw, 2.25rem) !important;
  font-weight: 600 !important;
  letter-spacing: -.03em !important;
}

body.is-refined .st-cta {
  margin-bottom: clamp(96px, 10vw, 148px) !important;
  background: rgba(255,255,255,.025) !important;
}

/* The unpublished Shop remains usable by direct URL, but visually quieter. */
body.is-refined .psyqo-shop3d {
  border-color: var(--rf-line) !important;
  border-radius: var(--rf-radius) !important;
  box-shadow: none !important;
}

/* Minimal, intentional footer. */
body.is-refined .v4-footer {
  border-top: 1px solid var(--rf-line) !important;
  background: #020308 !important;
}

body.is-refined .footer-grid {
  gap: clamp(36px, 8vw, 100px) !important;
}

body.is-refined .footer-col a,
body.is-refined .footer-brand span,
body.is-refined .footer-bottom {
  color: var(--rf-muted) !important;
}

body.is-refined .rf-social-pending {
  display: flex;
  align-items: center;
  gap: 8px;
  color: rgba(244, 245, 251, 0.62) !important;
  cursor: default;
}

body.is-refined .rf-social-pending small {
  margin-left: auto;
  color: rgba(158, 163, 255, 0.78);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

body.is-refined .footer-col-label {
  color: rgba(244, 245, 251, 0.72) !important;
  font-family: "Space Grotesk", system-ui, sans-serif !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  letter-spacing: .04em !important;
}

body.is-refined #psyqo-chat {
  display: none !important;
}

@media (max-width: 760px) {
  body.is-refined {
    --rf-gutter: 20px;
    --rf-section: 92px;
  }

  body.is-refined h2 {
    font-size: clamp(2rem, 9vw, 2.35rem);
    line-height: 1.06;
  }

  body.is-refined .rf-section {
    overflow: hidden;
  }

  .rf-about-grid,
  .rf-section-head,
  .rf-studios-grid,
  .rf-shop-grid,
  .rf-network-grid,
  .rf-faq-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .rf-about h2,
  .rf-studios-copy h2 {
    max-width: 17ch;
  }

  .rf-proof {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 0;
  }

  .rf-media-panel {
    min-height: 420px;
  }

  .rf-media-panel > img {
    object-position: 55% center;
  }

  .rf-media-copy {
    right: 24px;
  }

  .rf-media-action {
    display: none;
  }

  .rf-studios-grid {
    gap: 44px;
  }

  .rf-shop-grid {
    gap: 44px;
  }

  .rf-shop-media {
    min-height: 410px;
  }

  .rf-shop-media img {
    min-height: 410px;
  }

  .rf-network-grid,
  .rf-faq-grid {
    gap: 44px;
  }

  .rf-network-copy,
  .rf-faq-copy {
    position: static;
  }

  .rf-network-item {
    grid-template-columns: 1fr auto;
    gap: 14px;
    min-height: 64px;
  }

  .rf-network-item > svg {
    display: none;
  }

  .rf-network-item > strong {
    text-align: right;
  }

  .rf-faq-list summary {
    min-height: 70px;
    padding: 16px 0;
  }

  .rf-studios-case > span {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }

  body.is-refined .v4-page-hero {
    min-height: 300px !important;
    padding: 124px 20px 52px !important;
  }

  body.is-refined .v4-page-hero-title {
    font-size: clamp(2.75rem, 14vw, 4rem) !important;
  }

  body.is-refined .process-layout {
    grid-template-columns: 1fr !important;
    gap: 64px !important;
  }

  body.is-refined .v4-contact-row {
    grid-template-columns: 1fr !important;
  }

  body.is-refined #theater .home-cinema {
    display: flex !important;
    flex-direction: column !important;
    gap: 20px !important;
  }

  body.is-refined #theater .cinema-main {
    order: 1;
  }

  body.is-refined #theater .cinema-side-left {
    order: 2;
    display: grid !important;
    grid-auto-flow: column !important;
    grid-auto-columns: minmax(250px, 82%) !important;
    grid-template-columns: none !important;
    gap: 12px !important;
    overflow-x: auto !important;
    overscroll-behavior-inline: contain;
    scroll-snap-type: inline mandatory;
    scrollbar-width: none;
    padding: 0 0 8px !important;
  }

  body.is-refined #theater .cinema-side-left::-webkit-scrollbar {
    display: none;
  }

  body.is-refined #theater .cinema-side-left > * {
    scroll-snap-align: start;
  }

  body.is-refined #theater .cinema-side-right {
    display: none !important;
  }

  body.is-refined #theater .cinema-controls {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 10px !important;
  }

  body.is-refined #theater [data-refresh-theater] {
    display: none !important;
  }

  body.is-refined #theater .cinema-controls .btn {
    justify-content: center;
    min-width: 0;
    padding-inline: 12px !important;
    font-size: 13px !important;
  }

  body.is-refined .v4-center-shelf-head {
    align-items: flex-start !important;
  }

  body.is-refined .st-about {
    padding: 80px 0 !important;
  }

  body.is-refined .st-about-grid {
    gap: 48px !important;
  }

  body.is-refined .st-cases {
    gap: 96px !important;
  }

  body.is-refined .st-case,
  body.is-refined .st-case--reverse {
    grid-template-columns: 1fr !important;
    gap: 32px !important;
  }

  body.is-refined .st-case .st-case-media,
  body.is-refined .st-case .st-case-copy {
    order: initial !important;
  }

  body.is-refined .st-cta {
    padding: 44px 24px !important;
  }

  body.is-refined .footer-grid {
    grid-template-columns: 1fr 1fr !important;
  }

  body.is-refined .footer-brand {
    grid-column: 1 / -1;
  }

  body.is-refined .footer-bottom {
    display: flex !important;
    align-items: flex-start !important;
    flex-direction: column !important;
    gap: 18px !important;
    padding-bottom: 34px !important;
  }

  body.is-refined .footer-join-btn {
    position: relative !important;
    inset: auto !important;
  }
}

@media (max-width: 390px) {
  body.is-refined.v4-film .v4-film-title {
    font-size: clamp(54px, 17.5vw, 68px) !important;
  }

  body.is-refined .footer-grid {
    grid-template-columns: 1fr !important;
  }

  body.is-refined .footer-brand {
    grid-column: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  .rf-media-panel > img {
    transition: none;
  }
}
