:root {
  color-scheme: dark;
  scroll-padding-top: 96px;
}
[hidden] { display: none !important; }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible,
select:focus-visible, .track-card:has(.track-button:focus-visible) {
  outline: 2px solid #ffb59e !important;
  outline-offset: 3px;
}
.skip-link {
  position: fixed;
  z-index: 100;
  top: 8px;
  inset-inline-start: 10px;
  transform: translateY(-160%);
  background: #ffb59e;
  color: #331409;
  padding: 8px 14px;
}
.skip-link:focus { transform: none; }
.studio-logo { width: auto; height: 34px; object-fit: contain; }
.studio-wordmark { font: 700 21px/1 "Space Grotesk", sans-serif; letter-spacing: -.045em; }
header a[hreflang] { min-width: 32px; text-align: center; line-height: 21px; }
#menu-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  color: #ffb59e;
  background: #2e2735;
  border: 1px solid #5a4139;
  border-radius: 4px;
}
#mobile-nav {
  position: absolute;
  top: 100%;
  right: 0;
  left: 0;
  display: grid;
  background: #1f1926;
  border-bottom: 1px solid #5a4139;
  padding: 8px 20px 14px;
  box-shadow: 0 14px 22px #110c1870;
}
#mobile-nav a { display: block; padding: 10px 0; }
#mobile-nav a:last-child { color: #ffb59e; }
.track-card { isolation: isolate; min-width: 0; cursor: pointer; }
.track-card .track-button {
  position: absolute;
  z-index: 1;
  inset: 0 auto 0 0;
  width: 18%;
  height: 100%;
  cursor: pointer;
  border-radius: inherit;
}
[dir="rtl"] .track-card .track-button { inset: 0 0 0 auto; width: 16%; }
.track-card[data-selected="true"] {
  background-color: #2e2735;
  border-color: #f75f2880;
  color: #eadef2;
}
.track-card[data-selected="false"] {
  background-color: #1f1926;
  color: #e2bfb4;
  border-color: #5a41394d;
  box-shadow: none;
}
.track-card[data-selected="true"] .active-indicator { opacity: 1; }
.track-card[data-selected="false"] .active-indicator { opacity: 0; }
.track-card[data-selected="true"] > .material-symbols-outlined { color: #f75f28; }
.track-card[data-selected="false"] > .material-symbols-outlined { color: #e2bfb4; }
.track-card[data-selected="true"] .w-10.h-10 { background: #f75f28; color: #521400; }
.track-card[data-selected="false"] .w-10.h-10 { background: #393240; color: #e2bfb4; }
.track-card .w-10.h-10 { flex-shrink: 0; }
.manifest-control { position: relative; z-index: 2; display: inline-flex; }
.manifest-control button { white-space: nowrap; }
.manifest-popup {
  position: fixed;
  z-index: 65;
  width: min(320px, calc(100vw - 16px));
  max-height: calc(100dvh - 16px);
  overflow-y: auto;
  padding: 12px;
  background: #17111e;
  border: 1px solid #b45030;
  border-radius: 5px;
  box-shadow: 0 12px 40px #09060d99;
}
.manifest-popup .font-mono, .font-mono { font-family: "JetBrains Mono", ui-monospace, monospace; }
.manifest-popup li { cursor: default; }
[data-filter][aria-pressed="true"] {
  color: #521400;
  background: #f75f28;
  border-color: #f75f28;
  font-weight: bold;
}
[data-filter][aria-pressed="false"] {
  color: #c8c6c2;
  background: #2e2735;
  border-color: #5a413978;
  box-shadow: none;
}
.sequence-slider {
  position: absolute;
  z-index: 2;
  inset: -9px 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
  height: 26px;
  margin: 0;
  direction: ltr;
}
#studio-timeline:focus-within, #video-timeline-track:focus-within { outline: 2px solid #ffb59e; outline-offset: 3px; }
#studio-timeline, #video-timeline-track { touch-action: pan-y; }
.studio-stage-card[data-active="true"], [id^="stage-"][data-active="true"] { border-color: #f75f28; }
.studio-stage-card[data-active="false"], [id^="stage-"][data-active="false"] { border-color: #5a41395c; }
.studio-stage-card[data-active="true"] .studio-stage-title, [id^="stage-"][data-active="true"] { color: #ff9166; }
.studio-stage-card[data-active="false"] .studio-stage-title, [id^="stage-"][data-active="false"] { color: #c8c6c2; }
.studio-stage-card { text-align: start; }
.brief-note { font-size: 13px; line-height: 1.6; color: #c8c6c2; }
.brief-note a { color: #ffb59e; text-decoration: underline; }
.grid > *, .flex-1, .track-card > .flex > div { min-width: 0; }
section input, section select, section textarea { max-width: 100%; }
#contact-brief form { position: relative; z-index: 1; }
#services-video img { display: block; }
[dir="rtl"] .font-mono { font-family: "JetBrains Mono", Cairo, monospace; }
[dir="rtl"] form select { padding-inline-start: .85rem; padding-inline-end: 2rem; background-position: left .5rem center; }
@media (max-width: 1023px) {
  :root { scroll-padding-top: 88px; }
  [dir="ltr"] .track-card .font-headline-sm.flex { flex-wrap: wrap; gap: 5px; }
  [dir="rtl"] .text-headline-xl { font-size: clamp(32px, 6vw, 48px); line-height: 1.3; }
}
@media (max-width: 767px) {
  #menu-toggle { display: flex; }
  .studio-logo { width: auto; height: 30px; }
  .studio-wordmark { font-size: 19px; }
  .px-margin-tablet { padding-inline: clamp(16px, 4vw, 28px); }
  .text-display-hero { font-size: clamp(40px, 9vw, 60px); line-height: 1.12; }
  .text-headline-xl { font-size: clamp(30px, 7vw, 44px); line-height: 1.18; }
  .text-headline-lg { font-size: clamp(25px, 5.9vw, 32px); line-height: 1.22; }
  [dir="rtl"] .text-headline-lg { line-height: 1.42; }
  .text-body-lg { font-size: 16px; line-height: 1.65; }
  .font-mono { overflow-wrap: anywhere; }
  [data-category] { overflow-wrap: anywhere; }
  footer > .px-margin-tablet { padding-inline: 20px; }
  .track-card .truncate { white-space: normal; }
  footer .flex.gap-space-md { flex-wrap: wrap; }
  #studio-player-viewport .text-label-sm { font-size: 9px; }
  #services-video .p-space-lg, #services-erp .p-space-lg { padding: 16px; }
  header .h-20 { column-gap: 10px; }
}
@media (max-width: 480px) {
  .p-space-lg { padding: 16px; }
  .track-card .gap-space-md { gap: 10px; }
  .track-card .w-10.h-10 { width: 32px; height: 36px; }
  .track-card .font-headline-sm { font-size: 17px; line-height: 1.42; }
  #view-type-label, #preview-terminal-id { overflow-wrap: anywhere; }
  [data-preview] .text-headline-md { font-size: 17px; }
  #services-video .text-headline-sm, #services-erp .text-headline-sm { font-size: 17px; }
  #services-erp .font-mono, #services-video .font-mono, [data-preview] .font-mono { overflow-wrap: anywhere; }
  [dir="ltr"] .hero-selector-btn { padding: 12px; }
  [data-preview] .flex.items-center.justify-between { gap: 5px; }
  [data-preview] .font-label-lg { font-size: 12px; }
  [dir="rtl"] #services-video .grid-cols-4 { grid-template-columns: repeat(2, minmax(0,1fr)); }
  [dir="rtl"] .track-card .counter-badge { font-size: 9px; }
}
@media (prefers-reduced-motion: reduce) {
  *, ::before, ::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
