/*
 * Short-drama studio visual system.
 *
 * This stylesheet is loaded only when a page opts in through `_head.eta`.
 * The infinite canvas deliberately does not opt in, so its rendering and
 * interaction surface remain unchanged.
 */

:root.studio-theme-root {
  background: #eeeaf2;
}

body.studio-theme {
  --studio-accent: #bd5d36;
  --studio-accent-strong: #974024;
  --studio-accent-soft: rgba(255, 239, 226, 0.84);
  --studio-ink: #282126;
  --studio-muted: #736971;
  --studio-line: rgba(82, 64, 73, 0.12);
  --studio-glass: rgba(255, 255, 255, 0.72);
  --studio-glass-strong: rgba(255, 255, 255, 0.86);
  --studio-shadow: 0 24px 70px -44px rgba(57, 35, 47, 0.46), 0 8px 24px -18px rgba(57, 35, 47, 0.26);
  --studio-bg-image: url("/static/studio-backgrounds/production-stage.webp");
  color: var(--studio-ink);
  background-color: #f4efeb;
  background-image: linear-gradient(105deg, rgba(248, 245, 244, 0.72), rgba(247, 241, 238, 0.48)),
    var(--studio-bg-image);
  background-attachment: fixed;
  background-position: center;
  background-size: cover;
}

body.studio-theme--projects {
  --studio-accent: #a64b51;
  --studio-accent-strong: #813740;
  --studio-accent-soft: rgba(255, 235, 233, 0.82);
  --studio-bg-image: url("/static/studio-backgrounds/projects-dawn.webp");
  background-image: linear-gradient(108deg, rgba(246, 243, 249, 0.72), rgba(250, 239, 236, 0.42)),
    var(--studio-bg-image);
}

body.studio-theme--storyboard {
  --studio-accent: #6459a9;
  --studio-accent-strong: #494080;
  --studio-accent-soft: rgba(239, 237, 255, 0.82);
  --studio-bg-image: url("/static/studio-backgrounds/storyboard-glass.webp");
  background-image: linear-gradient(110deg, rgba(244, 245, 252, 0.76), rgba(241, 238, 252, 0.46)),
    var(--studio-bg-image);
}

body.studio-theme::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: radial-gradient(circle at 72% 8%, rgba(255, 255, 255, 0.62), transparent 32rem),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.04), rgba(248, 246, 248, 0.48));
}

.studio-theme > .min-h-screen {
  background: transparent;
}

.studio-theme main {
  position: relative;
}

.studio-theme main::before {
  content: "";
  position: fixed;
  inset: 0 0 0 260px;
  z-index: -1;
  pointer-events: none;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.02));
}

/* App shell */
.studio-theme aside {
  border-right-color: rgba(255, 255, 255, 0.56) !important;
  background: rgba(250, 249, 250, 0.69) !important;
  box-shadow: 16px 0 54px -38px rgba(49, 35, 44, 0.44);
  -webkit-backdrop-filter: blur(28px) saturate(1.08);
  backdrop-filter: blur(28px) saturate(1.08);
}

.studio-theme aside > a:first-child {
  margin: 12px 12px 4px;
  padding: 14px 13px;
  border: 1px solid rgba(255, 255, 255, 0.66);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.52);
  box-shadow: 0 10px 30px -24px rgba(55, 34, 43, 0.55);
}

.studio-theme aside nav {
  padding-left: 12px;
  padding-right: 12px;
}

.studio-theme .nav-link,
.studio-theme aside nav a[href*="/projects/"] {
  min-height: 37px;
  border-radius: 12px !important;
}

.studio-theme .nav-link:hover,
.studio-theme aside nav a[href*="/projects/"]:hover {
  color: var(--studio-ink) !important;
  background: rgba(255, 255, 255, 0.62) !important;
}

.studio-theme .nav-link.active,
.studio-theme aside nav a[style*="inset 2px"] {
  color: var(--studio-accent-strong) !important;
  background: var(--studio-accent-soft) !important;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.54), 0 8px 22px -18px
    color-mix(in srgb, var(--studio-accent) 62%, transparent) !important;
}

.studio-theme aside nav a[style*="inset 2px"] {
  border-left: 3px solid var(--studio-accent);
}

.studio-theme aside .border-ink-800 {
  border-color: rgba(67, 51, 59, 0.09) !important;
}

.studio-theme aside .text-marigold-500,
.studio-theme aside .text-marigold-400 {
  color: var(--studio-accent) !important;
}

.studio-theme aside .bg-marigold-500 {
  background-color: var(--studio-accent) !important;
}

.studio-theme aside > a[href="/me"],
.studio-theme aside > div:last-of-type {
  background: rgba(255, 255, 255, 0.28);
}

/* Mobile top bar */
.studio-theme header.lg\:hidden {
  border-bottom-color: rgba(255, 255, 255, 0.58) !important;
  background: rgba(251, 250, 251, 0.74) !important;
  -webkit-backdrop-filter: blur(24px);
  backdrop-filter: blur(24px);
  box-shadow: 0 10px 30px -26px rgba(54, 37, 47, 0.5);
}

/* Headings and section leads */
.studio-theme main > div {
  margin-left: auto;
  margin-right: auto;
}

.studio-theme main > div > header,
.studio-theme main > div > form > header {
  position: relative;
  padding: 22px 24px !important;
  border: 1px solid rgba(255, 255, 255, 0.66) !important;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.54);
  box-shadow: 0 18px 54px -42px rgba(61, 40, 49, 0.52);
  -webkit-backdrop-filter: blur(20px) saturate(1.05);
  backdrop-filter: blur(20px) saturate(1.05);
}

.studio-theme main h1 {
  color: var(--studio-ink) !important;
  letter-spacing: -0.035em;
}

.studio-theme main h1 .text-ink-500 {
  color: rgba(72, 61, 68, 0.54) !important;
}

.studio-theme .eyebrow {
  color: var(--studio-muted);
  letter-spacing: 0.16em;
}

.studio-theme .lead {
  color: #5c5258;
}

/* Glass cards */
.studio-theme .panel {
  border-color: rgba(255, 255, 255, 0.72) !important;
  border-radius: 20px !important;
  background: var(--studio-glass) !important;
  box-shadow: var(--studio-shadow) !important;
  -webkit-backdrop-filter: blur(22px) saturate(1.08);
  backdrop-filter: blur(22px) saturate(1.08);
}

.studio-theme a.panel,
.studio-theme .group\/card > a {
  transition: transform 220ms ease, box-shadow 220ms ease, border-color 220ms ease !important;
}

.studio-theme a.panel:hover,
.studio-theme .group\/card > a:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 255, 255, 0.92) !important;
  box-shadow: 0 28px 70px -38px rgba(57, 36, 47, 0.48), 0 12px 28px -20px rgba(57, 36, 47, 0.3) !important;
}

.studio-theme .panel .tile,
.studio-theme a.panel > .aspect-\[16\/10\],
.studio-theme a.panel > .aspect-\[4\/3\],
.studio-theme a.panel > .aspect-video {
  border-radius: 18px 18px 0 0;
}

.studio-theme .hatch {
  background-color: rgba(255, 255, 255, 0.38) !important;
}

/* Buttons and controls */
.studio-theme .btn,
.studio-theme .btn-primary,
.studio-theme button[class*="border"],
.studio-theme a[class*="border"][class*="px-"] {
  border-radius: 999px !important;
}

.studio-theme .btn {
  border-color: rgba(74, 58, 67, 0.14) !important;
  background: rgba(255, 255, 255, 0.62) !important;
  box-shadow: 0 7px 20px -16px rgba(49, 34, 43, 0.56);
}

.studio-theme .btn:hover {
  border-color: rgba(74, 58, 67, 0.22) !important;
  background: rgba(255, 255, 255, 0.88) !important;
}

.studio-theme .btn-primary {
  background: linear-gradient(135deg, var(--studio-accent), var(--studio-accent-strong)) !important;
  box-shadow: 0 12px 28px -18px color-mix(in srgb, var(--studio-accent) 72%, transparent);
}

.studio-theme .btn-primary:hover {
  filter: brightness(0.96);
  box-shadow: 0 16px 32px -18px color-mix(in srgb, var(--studio-accent) 78%, transparent);
}

.studio-theme input:not([type="checkbox"]):not([type="radio"]),
.studio-theme textarea,
.studio-theme select {
  border-color: rgba(74, 58, 67, 0.14) !important;
  border-radius: 14px !important;
  background: rgba(255, 255, 255, 0.67) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.62);
}

.studio-theme input:focus,
.studio-theme textarea:focus,
.studio-theme select:focus {
  border-color: color-mix(in srgb, var(--studio-accent) 52%, white) !important;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--studio-accent) 13%, transparent) !important;
}

/* Common utility surfaces used throughout the production forms and tables. */
.studio-theme .bg-white {
  background-color: rgba(255, 255, 255, 0.68) !important;
}

.studio-theme .bg-ink-950,
.studio-theme .bg-ink-900,
.studio-theme .bg-ink-850 {
  background-color: rgba(255, 255, 255, 0.42) !important;
}

.studio-theme .hover\:bg-ink-850:hover,
.studio-theme .hover\:bg-ink-900:hover {
  background-color: rgba(255, 255, 255, 0.66) !important;
}

.studio-theme .border-ink-800,
.studio-theme .border-ink-750,
.studio-theme .border-ink-700 {
  border-color: var(--studio-line) !important;
}

.studio-theme .text-marigold-500,
.studio-theme .text-marigold-400,
.studio-theme .hover\:text-marigold-500:hover {
  color: var(--studio-accent) !important;
}

.studio-theme .bg-marigold-500,
.studio-theme .bg-marigold-400 {
  background-color: var(--studio-accent) !important;
}

.studio-theme .bg-marigold-50 {
  background-color: var(--studio-accent-soft) !important;
}

.studio-theme .border-marigold-500,
.studio-theme .border-marigold-500\/40,
.studio-theme .border-marigold-500\/60 {
  border-color: color-mix(in srgb, var(--studio-accent) 52%, transparent) !important;
}

/* Dense lists and tables */
.studio-theme table {
  overflow: hidden;
  border-collapse: separate;
  border-spacing: 0;
}

.studio-theme thead {
  background: rgba(255, 255, 255, 0.38);
}

.studio-theme tbody tr {
  transition: background-color 150ms ease;
}

.studio-theme tbody tr:hover {
  background: rgba(255, 255, 255, 0.46);
}

.studio-theme pre,
.studio-theme code[class*="block"],
.studio-theme [contenteditable="true"] {
  border-radius: 14px;
}

/* Dialogs are slightly more opaque than content cards for reliable reading. */
.studio-theme [x-show][class*="fixed"][class*="inset-0"] > .panel,
.studio-theme [role="dialog"] {
  background: var(--studio-glass-strong) !important;
  box-shadow: 0 32px 90px -30px rgba(47, 31, 40, 0.48) !important;
}

/* Reduced motion and compact screens */
@media (max-width: 1023px) {
  .studio-theme main::before {
    inset: 0;
  }

  .studio-theme main > div > header,
  .studio-theme main > div > form > header {
    padding: 18px !important;
    border-radius: 20px;
  }

  .studio-theme aside {
    background: rgba(250, 249, 250, 0.88) !important;
  }
}

@media (max-width: 640px) {
  body.studio-theme {
    background-position: 62% center;
  }

  .studio-theme main > div {
    padding-left: 14px !important;
    padding-right: 14px !important;
  }

  .studio-theme main > div > header,
  .studio-theme main > div > form > header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: flex-start;
    padding: 16px !important;
  }

  .studio-theme main > div > header > .flex.items-end {
    grid-column: 1 / -1;
    width: 100%;
    justify-content: flex-end;
  }

  .studio-theme main > div > header h1 {
    white-space: nowrap;
  }

  .studio-theme .panel {
    border-radius: 17px !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .studio-theme *,
  .studio-theme *::before,
  .studio-theme *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
