@font-face {
  font-family: "Instrument Serif";
  src: url("/assets/instrument-serif.woff2") format("woff2");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

:root {
  color-scheme: dark;
  font-family: Inter, "Helvetica Neue", Arial, sans-serif;
  background: #0c0b0b;
}

* { box-sizing: border-box; }
body { margin: 0; }
a, button { -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }

@property --seam-left {
  syntax: "<percentage>";
  inherits: true;
  initial-value: 13%;
}

@property --seam-right {
  syntax: "<percentage>";
  inherits: true;
  initial-value: 90%;
}

.chooser {
  --gutter: clamp(30px, 5.6vw, 90px);
  --ease: cubic-bezier(.2, .73, .26, 1);
  position: relative;
  isolation: isolate;
  min-height: max(580px, 100vh);
  min-height: max(580px, 100svh);
  overflow: hidden;
  transition: --seam-left .68s var(--ease), --seam-right .68s var(--ease);
}

.wordmark {
  position: absolute;
  top: clamp(24px, 4.7vh, 56px);
  left: var(--gutter);
  z-index: 4;
  margin: 0;
  padding: .05em .27em .12em;
  font: 400 clamp(25px, 3.2vw, 45px)/1 "Instrument Serif", Georgia, serif;
  letter-spacing: -.025em;
  color: #fff9eb;
  background: #151513;
  pointer-events: none;
}

.area, .portrait, .portrait img, .cut, .scrim, .seam {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.world { pointer-events: none; }
.area {
  display: block;
  color: inherit;
  text-decoration: none;
  pointer-events: auto;
}

.world--professional { color: #151513; }
.world--professional .area {
  clip-path: polygon(0 0, 100% 0, 100% var(--seam-right), 0 var(--seam-left));
  background: #b3a99a;
}

.world--creative { color: #fff4e5; }
.world--creative .area {
  clip-path: polygon(0 var(--seam-left), 100% var(--seam-right), 100% 100%, 0 100%);
  background: #151015;
}

.portrait img, .cut { object-fit: cover; }
.world--professional .portrait img { object-position: 53% 42%; }
.world--creative .portrait img { object-position: 50% 55%; }
.cut {
  pointer-events: none;
  opacity: 0;
  transition: opacity .48s var(--ease);
}
.world--creative .cut {
  top: 22%;
  height: 78%;
  object-position: 51% 59%;
  mask-image: linear-gradient(transparent 1%, #000 15%);
}
.world[data-playing] .cut { opacity: 1; }

.world--professional .scrim {
  background:
    radial-gradient(ellipse at 92% 27%, #eee9dded 1%, #eee9ddb8 19%, #eddeba24 43%, transparent 58%),
    linear-gradient(128deg, #1916131f, transparent 40%, #dfbf814d);
}
.world--creative .scrim {
  background:
    radial-gradient(ellipse at 8% 77%, #110b11f1, #170a13a6 24%, transparent 60%),
    linear-gradient(18deg, #0c0b0b96, transparent 60%, #57132353);
}
.world--creative[data-playing] .scrim {
  background:
    radial-gradient(ellipse at 9% 78%, #110b11ed, #170a13a0 22%, transparent 52%),
    linear-gradient(18deg, #0c0b0b52, transparent 49%);
}

.seam {
  pointer-events: none;
  z-index: 3;
  background: linear-gradient(110deg, #5c212a, #d7b387 64%, #e7cfab);
  clip-path: polygon(0 calc(var(--seam-left) - .5px), 100% calc(var(--seam-right) - .5px), 100% calc(var(--seam-right) + .5px), 0 calc(var(--seam-left) + .5px));
}

.caption {
  position: absolute;
  display: grid;
  align-content: start;
  gap: 12px;
  max-width: calc(100% - 2 * var(--gutter));
}
.world--professional .caption {
  top: clamp(104px, 18vh, 226px);
  right: var(--gutter);
  justify-items: end;
  text-align: right;
}
.world--creative .caption {
  bottom: clamp(96px, 14.5vh, 166px);
  left: var(--gutter);
  justify-items: start;
}
.title {
  display: block;
  font: 400 clamp(74px, 10vw, 168px)/.83 "Instrument Serif", Georgia, serif;
  letter-spacing: -.047em;
}
.description { font-size: clamp(15px, 1.48vw, 22px); line-height: 1.34; }
.enter {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  min-height: 44px;
  padding: 0 1px;
  border-bottom: 1px solid currentColor;
  font-weight: 650;
  font-size: 15px;
}
.enter span { font-size: 18px; }

.area:focus-visible { outline: none; }
.area:focus-visible .enter { outline: 2px solid currentColor; outline-offset: 6px; }
.chooser[data-active="professional"],
.chooser:has(.world--professional .area:focus-visible) { --seam-left: 20%; --seam-right: 97%; }
.chooser[data-active="creative"],
.chooser:has(.world--creative .area:focus-visible) { --seam-left: 7%; --seam-right: 83%; }

.preview {
  position: absolute;
  z-index: 4;
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  gap: 9px;
  padding: 0 13px;
  border: 1px solid currentColor;
  background: #171211c7;
  color: #fff7e9;
  font: 600 13px/1 Inter, "Helvetica Neue", Arial, sans-serif;
  cursor: pointer;
}
.world--professional .preview { top: clamp(30px, 5vh, 62px); right: var(--gutter); }
.world--creative .preview { bottom: clamp(26px, 4.6vh, 52px); left: var(--gutter); }
.preview:focus-visible { outline: 2px solid #fff; outline-offset: 4px; }
.preview-icon {
  width: 8px;
  height: 10px;
  background: currentColor;
  clip-path: polygon(0 0, 100% 50%, 0 100%);
}
.world[data-playing] .preview-icon {
  background: linear-gradient(to right, currentColor 33%, transparent 33% 67%, currentColor 67%);
  clip-path: none;
}

@media (max-width: 680px) {
  .chooser {
    --gutter: 20px;
    --seam-left: 38%;
    --seam-right: 64%;
    min-height: max(560px, 100svh);
  }
  .chooser[data-active="professional"],
  .chooser:has(.world--professional .area:focus-visible) { --seam-left: 43%; --seam-right: 68%; }
  .chooser[data-active="creative"],
  .chooser:has(.world--creative .area:focus-visible) { --seam-left: 34%; --seam-right: 60%; }
  .wordmark { top: 17px; }
  .world--professional .caption { top: clamp(78px, 11vh, 125px); }
  .world--creative .caption { bottom: clamp(76px, 12vh, 120px); }
  .world--professional .portrait img { object-position: 50% 29%; }
  .world--creative .portrait img { top: 38%; height: 62%; object-position: 59% 50%; }
  .world--creative .cut { top: 35%; height: 65%; object-position: 54% 60%; }
  .world--professional .scrim {
    background: radial-gradient(ellipse at 94% 25%, #eae8e1f2, #eae8e19e 28%, transparent 62%);
  }
  .world--creative .scrim { background: linear-gradient(10deg, #0c0b0bf5, #0c0b0b86 23%, transparent 48%); }
  .world--creative[data-playing] .scrim { background: linear-gradient(10deg, #0c0b0bfa, #0c0b0b98 22%, transparent 45%); }
  .world--professional .preview { top: 12px; }
  .world--creative .preview { bottom: 18px; }
  .preview { padding-inline: 11px; }
  .caption { gap: 7px; }
  .title { font-size: clamp(60px, 15vw, 102px); }
  .description { font-size: 15px; }
}

@media (max-height: 560px) and (orientation: landscape) {
  .chooser { min-height: max(360px, 100svh); }
  .wordmark { top: 14px; }
  .world--professional .caption { top: 63px; }
  .world--creative .caption { bottom: 65px; }
  .world--professional .preview { top: 10px; }
  .world--creative .preview { bottom: 7px; }
  .title { font-size: clamp(51px, 8vw, 100px); }
  .caption { gap: 5px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0s !important; transition-duration: 0s !important; }
}
@media (forced-colors: active) {
  .wordmark, .caption, .preview { color: CanvasText; background: Canvas; }
  .seam { background: CanvasText; }
}
