:root {
  --ink: #101010;
  --paper: #fff7e6;
  --white: #ffffff;
  --yellow: #ffd60a;
  --blue: #00a8ff;
  --green: #2ecc71;
  --red: #ff3b30;
  --muted: color-mix(in srgb, var(--ink) 66%, white);
  --frame: 4px;
  --radius: 10px;
  --panel-pad: clamp(1.4rem, 4vw, 3.6rem);
  --header-pad: clamp(0.85rem, 2.2vw, 1.5rem);
  font-family:
    "Avenir Next", "Hiragino Sans", "Yu Gothic", ui-sans-serif, system-ui,
    sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100dvh;
  color: var(--ink);
  background: var(--white);
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
}

[hidden] {
  display: none !important;
}

.project-shell {
  width: 100%;
  min-height: 100dvh;
}

.switcher {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  min-height: inherit;
  border: var(--frame) solid var(--ink);
  background: var(--white);
  overflow: clip;
}

.switcher__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: nowrap;
  gap: clamp(0.75rem, 2vw, 1.25rem);
  padding: var(--header-pad);
  border-bottom: var(--frame) solid var(--ink);
  background: var(--yellow);
}

.brand-lockup {
  display: inline-flex;
  flex: 1 1 auto;
  align-items: center;
  min-width: 0;
  gap: clamp(0.55rem, 1.6vw, 1rem);
}

.project-title,
h2,
h3 {
  margin: 0;
  letter-spacing: 0;
}

.project-title {
  flex: 0 1 auto;
  min-width: 0;
  font-size: clamp(1.6rem, 5vw, 4rem);
  font-weight: 950;
  line-height: 0.95;
  white-space: nowrap;
}

.language-switch {
  display: inline-grid;
  flex: 0 0 auto;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  overflow: hidden;
  border: calc(var(--frame) - 1px) solid var(--ink);
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: inset 0 -0.2rem 0 rgb(16 16 16 / 14%);
}

.language-switch__button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.32rem;
  min-width: clamp(3.05rem, 5.6vw, 3.55rem);
  min-height: clamp(2rem, 4.5vw, 2.4rem);
  border: 0;
  border-right: calc(var(--frame) - 1px) solid var(--ink);
  padding: 0.35rem 0.5rem;
  color: var(--ink);
  background: transparent;
  font-size: clamp(0.68rem, 1.7vw, 0.78rem);
  font-weight: 950;
  line-height: 1;
  cursor: pointer;
}

.language-switch__button:last-child {
  border-right: 0;
}

.language-switch__button:hover,
.language-switch__button:focus-visible {
  background: color-mix(in srgb, var(--blue) 18%, var(--white));
}

.language-switch__button:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: -5px;
}

.language-switch__button.is-active {
  color: var(--white);
  background: var(--ink);
  cursor: default;
}

.language-switch__button.is-active .language-switch__flag {
  border-color: var(--white);
}

.language-switch__flag {
  flex: 0 0 auto;
  width: clamp(1.05rem, 2.5vw, 1.3rem);
  height: auto;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: var(--white);
}

.language-switch__code {
  flex: 0 0 auto;
  line-height: 1;
  transform: translateY(0.08em);
}

.play-link {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  gap: 0.65em;
  min-height: clamp(2.7rem, 6vw, 3.6rem);
  padding: 0.75rem clamp(0.9rem, 2.5vw, 1.35rem);
  border: var(--frame) solid var(--ink);
  border-radius: var(--radius);
  color: var(--ink);
  background: var(--white);
  font-size: clamp(0.9rem, 2.2vw, 1.05rem);
  font-weight: 950;
  white-space: nowrap;
  box-shadow: inset 0 -0.25rem 0 rgb(16 16 16 / 14%);
}

.section-menu {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-bottom: var(--frame) solid var(--ink);
  background: var(--paper);
}

.section-menu__item {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45em;
  min-width: 0;
  min-height: clamp(3.5rem, 8vw, 5rem);
  border: 0;
  border-right: var(--frame) solid var(--ink);
  padding: clamp(0.75rem, 2.4vw, 1.2rem);
  color: var(--ink);
  background: var(--paper);
  font-size: clamp(0.82rem, 2.2vw, 1.15rem);
  font-weight: 950;
  line-height: 1.05;
  text-align: center;
  cursor: pointer;
  box-shadow:
    inset 0 -0.38rem 0 rgb(16 16 16 / 18%),
    inset 0 0 0 2px transparent;
  transition:
    background 150ms ease,
    box-shadow 150ms ease,
    transform 150ms ease;
}

.section-menu__item::after {
  content: "";
  flex: 0 0 auto;
  width: 0.48em;
  aspect-ratio: 1;
  border-right: 0.18em solid currentColor;
  border-bottom: 0.18em solid currentColor;
  opacity: 0.55;
  transform: translateY(-0.08em) rotate(-45deg);
  transition:
    opacity 150ms ease,
    transform 150ms ease;
}

.section-menu__item:last-child {
  border-right: 0;
}

.section-menu__item:hover {
  background: color-mix(in srgb, var(--yellow) 38%, var(--paper));
  box-shadow:
    inset 0 -0.55rem 0 rgb(16 16 16 / 24%),
    inset 0 0 0 2px var(--ink);
}

.section-menu__item:hover::after {
  opacity: 1;
  transform: translate(0.12em, -0.08em) rotate(-45deg);
}

.section-menu__item:active {
  transform: translateY(0.18rem);
  box-shadow:
    inset 0 -0.18rem 0 rgb(16 16 16 / 28%),
    inset 0 0 0 2px var(--ink);
}

.section-menu__item:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: -8px;
}

.section-menu__item.is-active {
  background: var(--blue);
  box-shadow:
    inset 0 0.35rem 0 rgb(16 16 16 / 18%),
    inset 0 0 0 2px var(--ink);
  cursor: default;
}

.section-menu__item.is-active::after {
  opacity: 1;
  transform: translateY(0.05em) rotate(45deg);
}

.panel-stage {
  min-width: 0;
  min-height: 0;
  overflow: auto;
  background:
    linear-gradient(90deg, rgb(255 214 10 / 18%), transparent 42%),
    var(--white);
}

.content-panel {
  min-height: 100%;
  padding: var(--panel-pad);
}

.eyebrow {
  margin: 0;
  color: color-mix(in srgb, var(--red) 75%, var(--ink));
  font-size: clamp(0.68rem, 1.5vw, 0.78rem);
  font-weight: 950;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

h2 {
  max-width: 13.5em;
  margin-top: 0.65rem;
  font-size: clamp(2rem, 5.8vw, 5.25rem);
  line-height: 1.03;
}

h3 {
  font-size: clamp(1.05rem, 2.4vw, 1.35rem);
  line-height: 1.15;
}

.content-panel > p:not(.eyebrow) {
  max-width: min(100%, 78rem);
  color: var(--muted);
  font-size: clamp(1rem, 2.2vw, 1.35rem);
  font-weight: 750;
  line-height: 1.85;
}

.panel-video {
  width: min(100%, 78rem);
  margin: clamp(1.5rem, 3vw, 2rem) 0 0;
}

.video-embed {
  min-width: 0;
  overflow: hidden;
  background: var(--ink);
}

.video-embed__button {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 0;
  padding: 0;
  background: var(--ink);
  cursor: pointer;
  overflow: hidden;
}

.video-embed__thumbnail {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 180ms ease;
}

.video-embed__button:hover .video-embed__thumbnail,
.video-embed__button:focus-visible .video-embed__thumbnail {
  transform: scale(1.025);
}

.video-embed__button:focus-visible {
  outline: 4px solid var(--blue);
  outline-offset: 4px;
}

.video-embed__play {
  position: absolute;
  top: 50%;
  left: 50%;
  display: grid;
  place-items: center;
  width: clamp(3.8rem, 10vw, 5.5rem);
  aspect-ratio: 1;
  border: calc(var(--frame) - 1px) solid var(--ink);
  border-radius: 999px;
  background: var(--yellow);
  box-shadow: 0.22rem 0.22rem 0 var(--ink);
  transform: translate(-50%, -50%);
}

.video-embed__play::before {
  content: "";
  margin-left: 0.2rem;
  border-top: 0.78rem solid transparent;
  border-bottom: 0.78rem solid transparent;
  border-left: 1.18rem solid var(--ink);
}

.video-embed__iframe {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  height: auto;
  border: 0;
  background: var(--ink);
}

.about-lead,
.play-note,
.step-copy p,
.team-card p {
  color: var(--muted);
  font-weight: 750;
  line-height: 1.7;
}

.play-steps {
  --arrow-size: clamp(1.25rem, 2.6vw, 1.6rem);
  --step-gap: clamp(2.75rem, 4vw, 3.5rem);

  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--step-gap);
  width: min(100%, 86rem);
  max-width: none;
  margin: clamp(1.5rem, 3vw, 2rem) 0 0;
  padding: 0;
  list-style: none;
}

.play-note {
  width: min(100%, 86rem);
  margin: clamp(1rem, 2.5vw, 1.4rem) 0 0;
  font-size: clamp(0.98rem, 2vw, 1.18rem);
}

.play-steps li {
  position: relative;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: clamp(0.75rem, 2vw, 1rem);
  min-width: 0;
  min-height: clamp(13rem, 24vw, 15rem);
  padding: clamp(1rem, 2.4vw, 1.25rem);
  border: calc(var(--frame) - 1px) solid var(--ink);
  background: var(--paper);
}

.play-steps li:not(:last-child)::after {
  position: absolute;
  top: 50%;
}

.play-steps li:not(:last-child)::after {
  content: "▶";
  z-index: 2;
  right: calc((var(--step-gap) + var(--arrow-size)) / -2);
  width: var(--arrow-size);
  color: var(--ink);
  font-size: var(--arrow-size);
  font-weight: 950;
  line-height: 1;
  text-align: center;
  text-shadow: 0.09em 0.09em 0 var(--yellow);
  transform: translateY(-50%);
}

.step-icon {
  display: grid;
  place-items: center;
  width: clamp(3.2rem, 7vw, 4rem);
  aspect-ratio: 1;
  border: calc(var(--frame) - 1px) solid var(--ink);
  border-radius: var(--radius);
  background: var(--yellow);
}

.step-icon svg {
  width: 62%;
  height: 62%;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 4;
}

.step-icon circle {
  fill: currentColor;
}

.step-copy {
  min-width: 0;
}

.step-copy strong {
  display: block;
  font-size: clamp(1rem, 2vw, 1.25rem);
  font-weight: 950;
  line-height: 1.2;
}

.step-copy p {
  margin: 0.5rem 0 0;
}

.team-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(1.2rem, 3vw, 2rem);
  width: min(100%, 82rem);
  margin: clamp(1.5rem, 3vw, 2rem) auto 0;
}

.about-lead {
  max-width: min(100%, 82rem);
  margin: clamp(1rem, 2.4vw, 1.5rem) 0 0;
  font-size: clamp(1rem, 2.2vw, 1.35rem);
}

.about-lead > span {
  display: block;
}

.about-lead > span + span {
  margin-top: 0.2rem;
}

.about-lead a {
  color: var(--ink);
  text-decoration-line: underline;
  text-decoration-color: var(--blue);
  text-decoration-thickness: 0.18em;
  text-underline-offset: 0.14em;
}

.about-lead a:hover,
.about-lead a:focus-visible {
  color: var(--blue);
  outline: none;
}

.team-card {
  display: grid;
  grid-template-columns: minmax(12rem, 0.9fr) minmax(0, 1fr);
  align-items: stretch;
  min-width: 0;
  border: calc(var(--frame) - 1px) solid var(--ink);
  background: var(--paper);
}

.team-photo {
  width: 100%;
  height: 100%;
  min-height: clamp(16rem, 28vw, 22rem);
  object-fit: cover;
  object-position: 34% 42%;
  border-right: calc(var(--frame) - 1px) solid var(--ink);
  background: var(--blue);
}

.team-photo--portrait {
  object-position: 63% 32%;
}

.team-copy {
  display: grid;
  align-content: start;
  min-width: 0;
  padding: clamp(1rem, 2.4vw, 1.6rem);
}

.team-card h3 {
  margin: 0;
  font-size: clamp(1.55rem, 3vw, 2.15rem);
  line-height: 1.05;
}

.team-card p {
  margin: 0.85rem 0 0;
}

.team-profile {
  color: var(--ink);
  white-space: pre-line;
}

.linkedin-link {
  display: inline-flex;
  justify-self: start;
  align-items: center;
  justify-content: center;
  margin-top: 1rem;
  padding: 0.62rem 0.95rem;
  border: calc(var(--frame) - 1px) solid var(--ink);
  border-radius: var(--radius);
  color: var(--white);
  background: #0a66c2;
  font-family:
    Avenir, "Avenir Next", ui-sans-serif, system-ui, sans-serif;
  font-size: clamp(0.92rem, 2vw, 1.05rem);
  font-weight: 950;
  line-height: 1;
  box-shadow: 0.18rem 0.18rem 0 var(--ink);
}

.linkedin-link:hover,
.linkedin-link:focus-visible {
  color: var(--ink);
  background: var(--yellow);
  outline: none;
}

@media (max-width: 900px) {
  .play-steps {
    --step-gap: clamp(1.6rem, 5vw, 2.25rem);

    grid-template-columns: 1fr;
  }

  .play-steps li {
    grid-template-columns: auto minmax(0, 1fr);
    grid-template-rows: auto;
    min-height: auto;
    align-items: center;
  }

  .play-steps li:not(:last-child)::after {
    content: "▼";
    top: auto;
    right: auto;
    bottom: calc((var(--step-gap) + var(--arrow-size)) / -2);
    left: calc(clamp(3.2rem, 7vw, 4rem) / 2 + clamp(1rem, 2.4vw, 1.25rem));
    width: var(--arrow-size);
    transform: translateX(-50%);
  }
}

@media (max-width: 720px) {
  :root {
    --frame: 3px;
    --header-pad: clamp(0.65rem, 2.5vw, 0.9rem);
  }

  .switcher__top {
    align-items: center;
    gap: clamp(0.5rem, 2.4vw, 0.75rem);
  }

  .brand-lockup {
    gap: clamp(0.35rem, 1.8vw, 0.55rem);
  }

  .project-title {
    font-size: clamp(1.25rem, 6vw, 2.15rem);
  }

  .language-switch__button {
    min-width: clamp(2.6rem, 9vw, 3rem);
    min-height: clamp(1.75rem, 7vw, 2rem);
    gap: 0.22rem;
    padding-inline: 0.32rem;
    font-size: clamp(0.62rem, 2.8vw, 0.7rem);
  }

  .language-switch__flag {
    width: clamp(0.95rem, 4vw, 1.05rem);
    border-width: 1.5px;
  }

  .play-link {
    min-height: clamp(2.25rem, 8vw, 2.7rem);
    padding: 0.5rem clamp(0.6rem, 2.4vw, 0.85rem);
    font-size: clamp(0.78rem, 3.5vw, 0.92rem);
  }

  .section-menu__item {
    min-height: 3.4rem;
  }

  .content-panel {
    min-height: auto;
  }

  .team-grid {
    grid-template-columns: 1fr;
  }

  .team-card {
    grid-template-columns: minmax(0, 1fr);
  }

  .team-photo {
    aspect-ratio: 16 / 10;
    height: auto;
    min-height: 0;
    border-right: 0;
    border-bottom: calc(var(--frame) - 1px) solid var(--ink);
  }

  .team-photo--portrait {
    aspect-ratio: 4 / 3;
    object-position: 62% 26%;
  }
}

@media (max-width: 420px) {
  .language-switch__button {
    min-width: clamp(2.05rem, 10vw, 2.3rem);
  }

  .language-switch__code {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }

  .section-menu__item {
    padding-inline: 0.35rem;
  }

}
