:root {
  color-scheme: light dark;
  --page: min(100% - 56px, 1540px);
  --copy: min(100% - 40px, 900px);
  --paper: #f5f5f7;
  --ink: #1d1d1f;
  --muted: #6e6e73;
  --line: rgba(29, 29, 31, 0.12);
  --blue: #0071e3;
  --button: #1d1d1f;
  --display: "SF Pro Display", -apple-system, BlinkMacSystemFont, "Helvetica Neue", sans-serif;
  --text: "SF Pro Text", -apple-system, BlinkMacSystemFont, "Helvetica Neue", sans-serif;
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--paper);
  scroll-behavior: smooth;
  scroll-snap-type: y proximity;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--text);
  line-height: 1.35;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.director-page {
  min-height: 100vh;
}

.director-header {
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

.director-main {
  padding: 38px 0 100px;
}

.director-focus {
  width: min(100%, 1280px);
  margin-inline: auto;
}

.director-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 32px;
  margin-bottom: 24px;
}

.director-step {
  display: block;
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.director-heading h1 {
  font-size: clamp(32px, 4vw, 54px);
  line-height: 1;
  letter-spacing: -0.045em;
}

.director-heading p {
  max-width: 640px;
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 16px;
}

.director-controls {
  display: flex;
  gap: 8px;
}

.director-controls button {
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: color-mix(in srgb, var(--paper), var(--ink) 4%);
  color: var(--ink);
  font: 600 20px/1 var(--text);
  cursor: pointer;
}

.director-stage {
  border-radius: 20px;
}

.director-board {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 26px;
  margin-top: 80px;
  padding-top: 40px;
  border-top: 1px solid var(--line);
}

.director-card {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 14px;
  border: 1px solid transparent;
  border-radius: 18px;
  background: transparent;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
  transition: border-color 140ms ease, background 140ms ease;
}

.director-card:hover,
.director-card.is-selected {
  border-color: var(--line);
  background: color-mix(in srgb, var(--paper), var(--ink) 3%);
}

.director-card.is-selected {
  box-shadow: inset 0 0 0 1px var(--blue);
}

.director-card-label {
  display: flex;
  gap: 12px;
  align-items: baseline;
  padding-inline: 2px;
  font-size: 14px;
  font-weight: 650;
}

.director-card-label b {
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.06em;
}

.director-thumbnail {
  pointer-events: none;
  border-radius: 12px;
  box-shadow: 0 14px 42px rgba(0, 0, 0, 0.14);
}

@media (max-width: 760px) {
  .director-main { padding-top: 22px; }
  .director-heading { align-items: center; }
  .director-heading p { display: none; }
  .director-board { grid-template-columns: 1fr; margin-top: 48px; }
}

a {
  color: inherit;
}

header,
main,
footer {
  width: var(--page);
  margin-inline: auto;
}

.footer-links {
  display: inline-flex;
  align-items: center;
  gap: 18px;
}

.footer-links > a {
  text-decoration: none;
}

.footer-links > a:hover {
  color: var(--ink);
}

header {
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--ink);
  font-weight: 650;
  letter-spacing: -0.02em;
  text-decoration: none;
}

.brand img {
  display: block;
  border-radius: 8px;
}

.header-link {
  color: var(--muted);
  font-size: 13px;
  text-decoration: none;
}

.header-link:hover {
  color: var(--ink);
}

.hero {
  min-height: calc(100svh - 68px);
  display: grid;
  grid-template-columns: minmax(300px, 0.78fr) minmax(520px, 1.22fr);
  align-items: center;
  gap: clamp(44px, 6vw, 96px);
  padding: clamp(44px, 7vh, 82px) 0 clamp(72px, 10vh, 120px);
  scroll-snap-align: start;
}

.demo-scene {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: clamp(14px, 1.6vw, 24px);
  background: #fff;
  box-shadow: 0 32px 90px rgba(0, 0, 0, 0.18);
  isolation: isolate;
}

.scene-canvas,
.scene-wallpaper,
.scene-wallpaper img,
.scene-wash,
.scene-dim,
.latch-layer,
.latch-state,
.latch-state img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.scene-wallpaper img,
.latch-state img {
  display: block;
  object-fit: cover;
  user-select: none;
}

.scene-wash {
  z-index: 1;
  background: rgba(255, 255, 255, 0.035);
}

.workspace-plane {
  --plane-opacity: 0.48;
  position: absolute;
  z-index: 2;
  overflow: hidden;
  border: 1px solid rgba(29, 29, 31, 0.14);
  border-radius: clamp(10px, 1.15vw, 17px);
  background: rgba(248, 248, 250, 0.78);
  box-shadow: 0 22px 55px rgba(0, 0, 0, 0.20);
  opacity: 0;
  backdrop-filter: blur(30px) saturate(0.78);
  -webkit-backdrop-filter: blur(30px) saturate(0.78);
  transition:
    left 520ms cubic-bezier(.22, 1, .36, 1),
    top 520ms cubic-bezier(.22, 1, .36, 1),
    width 520ms cubic-bezier(.22, 1, .36, 1),
    height 520ms cubic-bezier(.22, 1, .36, 1),
    opacity 180ms ease,
    box-shadow 180ms ease,
    transform 180ms cubic-bezier(.2, 0, 0, 1);
}

.workspace-plane.is-visible {
  opacity: var(--plane-opacity);
}

.workspace-plane.is-front {
  --plane-opacity: 0.82;
  z-index: 4;
  box-shadow: 0 30px 72px rgba(0, 0, 0, 0.28);
}

.workspace-plane.is-focused {
  z-index: 5;
  box-shadow:
    0 0 0 3px #0a84ff,
    0 0 24px rgba(10, 132, 255, 0.42),
    0 30px 72px rgba(0, 0, 0, 0.28);
}

.scene-canvas:has(.workspace-plane.is-focused) .workspace-plane:not(.is-focused) {
  --plane-opacity: 0.25;
}

.window-titlebar {
  position: relative;
  z-index: 2;
  height: clamp(34px, 4vw, 48px);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 0 clamp(11px, 1.2vw, 17px);
  border-bottom: 1px solid rgba(29, 29, 31, 0.10);
  background: rgba(255, 255, 255, 0.22);
}

.traffic-lights {
  display: flex;
  gap: clamp(5px, 0.55vw, 8px);
}

.traffic-light {
  width: clamp(7px, 0.72vw, 11px);
  height: clamp(7px, 0.72vw, 11px);
  display: block;
  border-radius: 50%;
  box-shadow: inset 0 0 0 0.5px rgba(0, 0, 0, 0.16);
}

.traffic-light.close { background: #ff5f57; }
.traffic-light.minimize { background: #febc2e; }
.traffic-light.zoom { background: #28c840; }

.window-title {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: rgba(29, 29, 31, 0.52);
  font-size: clamp(9px, 0.8vw, 12px);
  font-weight: 600;
  letter-spacing: -0.015em;
}

.window-title img {
  width: clamp(13px, 1.2vw, 18px);
  height: clamp(13px, 1.2vw, 18px);
  display: block;
  border-radius: 22%;
}

.titlebar-balance {
  min-width: 44px;
}

.window-content {
  position: absolute;
  inset: clamp(34px, 4vw, 48px) 0 0;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.12);
}

.content-field {
  position: absolute;
  display: block;
  border-radius: 42%;
  filter: blur(clamp(34px, 4.5vw, 68px));
  opacity: 0.22;
}

.field-primary {
  width: 54%;
  aspect-ratio: 1.15;
  top: 3%;
  right: 2%;
  background: #0a84ff;
}

.field-secondary {
  width: 48%;
  aspect-ratio: 1;
  left: 10%;
  bottom: -12%;
  background: #8e8e93;
}

.plane-safari {
  left: 33%;
  top: 13%;
  width: 62%;
  height: 72%;
}

.plane-cursor-main {
  left: 6%;
  top: 13%;
  width: 66%;
  height: 74%;
}

.plane-cursor-site {
  left: 17%;
  top: 18%;
  width: 64%;
  height: 70%;
}

.plane-cursor-release {
  left: 27%;
  top: 23%;
  width: 62%;
  height: 66%;
}

.plane-xcode {
  left: 38%;
  top: 16%;
  width: 58%;
  height: 70%;
}

.workspace-plane.layout-left {
  left: 2.4%;
  top: 7%;
  width: 63.2%;
  height: 87%;
}

.latch-layer {
  z-index: 8;
  pointer-events: none;
  opacity: 0;
  transform: translateY(10px) scale(0.985);
  transition:
    opacity 150ms cubic-bezier(.32, 0, .67, 0),
    transform 150ms cubic-bezier(.32, 0, .67, 0);
}

.latch-visible .latch-layer {
  opacity: 1;
  transform: translateY(0) scale(1);
  transition:
    opacity 220ms cubic-bezier(.16, 1, .3, 1),
    transform 220ms cubic-bezier(.16, 1, .3, 1);
}

.latch-state {
  opacity: 0;
  transition: opacity 110ms linear;
}

.latch-state.is-active {
  opacity: 1;
}

.key-hud {
  position: absolute;
  right: 4.3%;
  bottom: 5.4%;
  z-index: 10;
  min-width: 42px;
  min-height: 38px;
  display: grid;
  place-items: center;
  padding: 0 12px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 10px;
  background: rgba(18, 18, 20, 0.66);
  color: rgba(255, 255, 255, 0.9);
  font-size: clamp(12px, 1.2vw, 18px);
  font-weight: 650;
  opacity: 0;
  transform: translateY(5px) scale(0.96);
  backdrop-filter: blur(16px);
  transition: opacity 120ms ease, transform 120ms ease;
}

.key-hud.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.key-hud.is-pressed {
  transform: translateY(1px) scale(0.94);
}

.product-frame,
.theme-frame {
  position: relative;
  margin: 0;
  overflow: hidden;
  aspect-ratio: 2 / 1;
  border: 1px solid var(--line);
  border-radius: clamp(14px, 1.6vw, 24px);
  background: #ffffff;
  box-shadow: 0 32px 90px rgba(0, 0, 0, 0.18);
}

.product-frame img,
.product-frame picture {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.hero-copy,
.feature-copy {
  width: var(--copy);
  margin-inline: auto;
  text-align: center;
}

.hero-copy {
  grid-column: 1;
  grid-row: 1;
  width: auto;
  margin: 0;
  padding: 0;
  text-align: left;
}

.hero-scene {
  grid-column: 2;
  grid-row: 1;
  width: 100%;
  max-width: 820px;
  justify-self: end;
}

h1,
h2 {
  margin: 0;
  font-family: var(--display);
  text-wrap: balance;
}

h1 {
  font-size: clamp(54px, 6.2vw, 88px);
  font-weight: 700;
  line-height: 0.96;
  letter-spacing: -0.06em;
}

.hero-copy p,
.feature-copy p {
  color: var(--muted);
  text-wrap: balance;
}

.hero-copy p {
  max-width: 520px;
  margin: 28px 0 34px;
  font-family: var(--display);
  font-size: clamp(20px, 2vw, 28px);
  line-height: 1.23;
  letter-spacing: -0.032em;
}

.button {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 22px;
  border-radius: 980px;
  background: var(--button);
  color: white;
  font-size: 14px;
  font-weight: 650;
  text-decoration: none;
  transition: transform 150ms ease, opacity 150ms ease;
}

.button:hover {
  opacity: 0.86;
  transform: translateY(-1px);
}

.feature {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(48px, 6vh, 80px) 0;
  scroll-snap-align: start;
}

.feature-copy {
  margin-bottom: clamp(28px, 4vh, 48px);
}

.feature h2,
.beta h2 {
  font-size: clamp(42px, 5.4vw, 76px);
  font-weight: 680;
  line-height: 1;
  letter-spacing: -0.058em;
}

.feature-copy p {
  max-width: 650px;
  margin: 24px auto 0;
  font-size: clamp(18px, 1.9vw, 24px);
  line-height: 1.38;
  letter-spacing: -0.018em;
}

.feature-scene {
  width: min(100%, 1380px);
  max-height: 62svh;
  margin-inline: auto;
}

.feature-sequence {
  display: grid;
  gap: clamp(28px, 5vw, 72px);
}

.theme-stack {
  display: grid;
  gap: 18vh;
  padding-bottom: 12vh;
}

.theme-frame {
  position: sticky;
  top: 84px;
  overflow: visible;
  margin-bottom: 56px;
  aspect-ratio: auto;
  border: 0;
  background: var(--paper);
  box-shadow: none;
}

.theme-frame figcaption {
  position: absolute;
  top: calc(100% + 18px);
  width: 100%;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
  text-align: center;
}

.beta {
  margin-top: clamp(96px, 12vw, 180px);
  padding: clamp(62px, 9vw, 130px) 28px;
  border-radius: 28px;
  background: var(--blue);
  color: white;
  text-align: center;
}

.beta p {
  margin: 22px 0 32px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 16px;
}

.button-light,
.button-light:hover {
  background: white;
  color: #1d1d1f;
}

footer {
  min-height: 124px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  color: var(--muted);
  font-size: 13px;
}

footer a {
  text-underline-offset: 3px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #0d0d0f;
    --ink: #f5f5f7;
    --muted: #a1a1a6;
    --line: rgba(255, 255, 255, 0.14);
    --blue: #0a84ff;
    --button: #f5f5f7;
  }

  .button:not(.button-light) {
    color: #1d1d1f;
  }

  .product-frame {
    background: #05070a;
    box-shadow: 0 34px 100px rgba(0, 0, 0, 0.42);
  }

  .demo-scene {
    background: #05070a;
    box-shadow: 0 34px 100px rgba(0, 0, 0, 0.42);
  }

  .workspace-plane {
    border-color: rgba(255, 255, 255, 0.14);
    background: rgba(25, 26, 30, 0.76);
  }

  .window-titlebar {
    border-bottom-color: rgba(255, 255, 255, 0.09);
    background: rgba(255, 255, 255, 0.025);
  }

  .window-title {
    color: rgba(255, 255, 255, 0.62);
  }

  .window-content {
    background: rgba(0, 0, 0, 0.08);
  }

  .scene-wash {
    background: rgba(0, 0, 0, 0.16);
  }
}

@media (max-width: 1000px) and (min-width: 761px) {
  .hero {
    min-height: auto;
    grid-template-columns: 1fr;
    gap: 48px;
    padding: 58px 0 100px;
  }

  .hero-copy,
  .hero-scene {
    grid-column: 1;
  }

  .hero-copy {
    grid-row: 1;
    text-align: center;
  }

  .hero-copy p {
    margin-inline: auto;
  }

  .hero-scene {
    grid-row: 2;
    max-width: 760px;
    justify-self: center;
  }
}

@media (max-width: 760px) {
  html {
    scroll-snap-type: none;
  }

  :root {
    --page: min(100% - 24px, 1540px);
  }

  header {
    height: 60px;
  }

  .hero {
    min-height: auto;
    display: flex;
    flex-direction: column;
    gap: 42px;
    padding: 38px 0 84px;
  }

  .hero-copy {
    order: 1;
    text-align: center;
  }

  .hero-copy p {
    margin-inline: auto;
  }

  .hero-scene {
    order: 2;
  }

  .product-frame,
  .theme-frame {
    aspect-ratio: 4 / 3;
    border-radius: 12px;
  }

  .demo-scene {
    aspect-ratio: 4 / 3;
    border-radius: 12px;
  }

  .scene-canvas {
    left: -16.6667%;
    width: 133.3334%;
  }

  .theme-frame {
    aspect-ratio: auto;
  }

  h1 {
    font-size: clamp(50px, 14vw, 76px);
  }

  .feature {
    min-height: 100svh;
    padding: 76px 0;
  }

  .theme-stack {
    display: flex;
    gap: 14px;
    margin-inline: -12px;
    padding: 0 12px 18px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
  }

  .theme-stack::-webkit-scrollbar {
    display: none;
  }

  .theme-frame {
    position: relative;
    top: auto;
    flex: 0 0 92%;
    margin-bottom: 48px;
    scroll-snap-align: center;
  }

  .beta {
    border-radius: 20px;
  }

  footer {
    padding: 36px 0;
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .button {
    transition: none;
  }
}
