:root {
  --bg: #f6f5ef;
  --surface: #ffffff;
  --ink: #151515;
  --muted: #666560;
  --line: #dedbd0;
  --soft: #ece9de;
  --coral: #ff775f;
  --mint: #87e6c0;
  --sky: #92cfff;
  --yellow: #f2d95c;
  --shadow: 0 20px 60px rgba(17, 17, 17, 0.1);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
  overflow-x: hidden;
}

body.is-dialog-open {
  overflow: hidden;
}

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

button {
  font: inherit;
}

.site-shell {
  min-height: 100vh;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 24px;
  padding: 16px 32px;
  background: rgba(246, 245, 239, 0.82);
  border-bottom: 1px solid rgba(222, 219, 208, 0.78);
  backdrop-filter: blur(18px);
}

.brand-mark,
.main-nav,
.header-actions,
.lang-switch,
.hero-actions,
.contact-actions,
.filter-bar {
  display: flex;
  align-items: center;
}

.brand-mark {
  gap: 8px;
  font-size: 0.9rem;
  font-weight: 760;
}

.brand-mark__dot {
  width: 11px;
  height: 11px;
  background: var(--coral);
  border: 2px solid var(--ink);
  transform: rotate(45deg);
}

.main-nav {
  justify-content: center;
  gap: 22px;
  color: var(--muted);
  font-size: 0.92rem;
}

.main-nav a,
.icon-link {
  transition: color 180ms ease, transform 180ms ease;
}

.main-nav a:hover,
.icon-link:hover {
  color: var(--ink);
}

.header-actions {
  justify-content: flex-end;
  gap: 12px;
}

.lang-switch {
  gap: 4px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.6);
}

.lang-button {
  min-width: 38px;
  height: 30px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.lang-button.is-active {
  background: var(--ink);
  color: var(--surface);
}

.icon-link {
  padding: 8px 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.62);
  font-size: 0.9rem;
  font-weight: 700;
}

.hero-section {
  position: relative;
  min-height: 88svh;
  display: grid;
  align-items: end;
  gap: 32px;
  padding: 96px 32px 28px;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}

#motionCanvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.92;
}

.hero-content,
.hero-meta {
  position: relative;
  z-index: 1;
  max-width: 1120px;
  width: 100%;
  margin: 0 auto;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 780;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 22px;
  font-size: 6rem;
  line-height: 0.95;
  font-weight: 820;
}

.hero-copy {
  max-width: 680px;
  margin-bottom: 30px;
  color: #31312d;
  font-size: 1.26rem;
}

.hero-actions,
.contact-actions {
  gap: 12px;
  flex-wrap: wrap;
}

.button {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 20px;
  border: 1px solid var(--ink);
  border-radius: 999px;
  cursor: pointer;
  font-weight: 780;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.button:hover,
.project-card:hover,
.process-item:hover {
  transform: translateY(-3px);
}

.button--primary {
  background: var(--ink);
  color: var(--surface);
  box-shadow: 0 12px 28px rgba(17, 17, 17, 0.16);
}

.button--ghost {
  background: rgba(255, 255, 255, 0.42);
  color: var(--ink);
}

.hero-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  border: 1px solid rgba(21, 21, 21, 0.12);
  background: rgba(21, 21, 21, 0.12);
  border-radius: var(--radius);
  overflow: hidden;
}

.hero-meta div {
  padding: 18px 20px;
  background: rgba(255, 255, 255, 0.68);
  backdrop-filter: blur(14px);
}

.hero-meta span,
.metric span,
.project-type,
.dialog-note {
  display: block;
  color: var(--muted);
  font-size: 0.82rem;
}

.hero-meta strong {
  display: block;
  margin-top: 4px;
  font-size: 1rem;
}

.section-block {
  max-width: 1184px;
  margin: 0 auto;
  padding: 92px 32px;
}

.section-heading {
  max-width: 720px;
  margin-bottom: 34px;
}

.section-heading h2,
.about-copy h2,
.contact-copy h2 {
  margin-bottom: 14px;
  font-size: 3.2rem;
  line-height: 1.05;
}

.section-heading p:not(.eyebrow),
.about-copy p,
.contact-copy p,
.process-item p,
.project-card__body p:not(.project-type) {
  color: var(--muted);
}

.filter-bar {
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 22px;
}

.filter-button {
  height: 38px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.55);
  color: var(--muted);
  cursor: pointer;
}

.filter-button.is-active {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--surface);
}

.work-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.project-card {
  display: flex;
  min-height: 100%;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.62);
  overflow: hidden;
  cursor: pointer;
  transition: transform 200ms ease, box-shadow 200ms ease, border-color 200ms ease;
}

.project-card:hover {
  border-color: rgba(21, 21, 21, 0.42);
  box-shadow: var(--shadow);
}

.project-card.is-hidden {
  display: none;
}

.work-visual {
  position: relative;
  min-height: 0;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--soft);
}

.project-preview,
.dialog-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.project-preview {
  object-fit: cover;
  opacity: 0.82;
  filter: saturate(1.06) contrast(1.02);
  transition: opacity 180ms ease, transform 220ms ease;
}

.project-card:hover .project-preview {
  opacity: 1;
  transform: scale(1.025);
}

.has-video::before {
  z-index: 1;
  background: linear-gradient(180deg, rgba(246, 245, 239, 0.1), rgba(21, 21, 21, 0.08));
}

.has-video::after {
  z-index: 1;
}

.work-visual::before,
.work-visual::after {
  content: "";
  position: absolute;
  inset: 18px;
  border: 1px solid rgba(21, 21, 21, 0.24);
}

.work-visual::after {
  inset: auto 18px 28px 18px;
  height: 38px;
  border-width: 0 0 1px;
  background:
    linear-gradient(90deg, rgba(21, 21, 21, 0.22) 0 12%, transparent 12% 16%, rgba(21, 21, 21, 0.22) 16% 48%, transparent 48% 52%, rgba(21, 21, 21, 0.22) 52% 70%, transparent 70%);
}

.work-visual--coral {
  background: color-mix(in srgb, var(--coral) 46%, var(--surface));
}

.work-visual--mint {
  background: color-mix(in srgb, var(--mint) 52%, var(--surface));
}

.work-visual--sky {
  background: color-mix(in srgb, var(--sky) 48%, var(--surface));
}

.work-visual--yellow {
  background: color-mix(in srgb, var(--yellow) 58%, var(--surface));
}

.work-visual--ink {
  background: #222326;
  color: var(--surface);
}

.work-visual--ink::before,
.work-visual--ink::after {
  border-color: rgba(255, 255, 255, 0.25);
}

.visual-label {
  position: absolute;
  z-index: 2;
  top: 22px;
  left: 24px;
  font-size: 4.5rem;
  line-height: 1;
  font-weight: 830;
  text-shadow: 0 8px 26px rgba(255, 255, 255, 0.42);
}

.work-visual--ink .visual-label {
  color: var(--ink);
  text-shadow: none;
}

.work-visual--ink .visual-track {
  background: var(--ink);
}

.visual-wave {
  position: absolute;
  z-index: 2;
  right: 24px;
  top: 34px;
  width: 28%;
  height: 46%;
  border: 2px solid currentColor;
  border-left: 0;
  opacity: 0.5;
  transform: skewX(-10deg);
  animation: waveNudge 3.6s ease-in-out infinite;
}

.visual-track {
  position: absolute;
  z-index: 2;
  right: 22px;
  bottom: 26px;
  width: 13px;
  height: 42px;
  border-radius: 999px;
  background: currentColor;
  animation: trackPlayhead 4s ease-in-out infinite;
}

.project-card__body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 20px;
}

.project-card__body h3 {
  margin-bottom: 8px;
  font-size: 1.45rem;
}

.project-card__body p:not(.project-type) {
  margin-bottom: 22px;
}

.text-button {
  width: fit-content;
  margin-top: auto;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  font-weight: 790;
  cursor: pointer;
}

.text-button::after {
  content: " ->";
}

.about-section {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(300px, 0.8fr);
  gap: 34px;
  align-items: stretch;
}

.about-copy {
  align-self: center;
}

.about-copy p {
  max-width: 720px;
  font-size: 1.08rem;
}

.about-panel {
  display: grid;
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--line);
}

.metric {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 26px;
  background: rgba(255, 255, 255, 0.68);
}

.metric strong {
  font-size: 2.4rem;
  line-height: 1;
}

.process-section {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.process-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.process-item {
  min-height: 240px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.58);
  transition: transform 200ms ease, box-shadow 200ms ease;
}

.process-item span {
  display: inline-flex;
  width: 42px;
  height: 30px;
  align-items: center;
  justify-content: center;
  margin-bottom: 36px;
  border: 1px solid var(--ink);
  border-radius: 999px;
  font-size: 0.84rem;
  font-weight: 780;
}

.process-item h3 {
  margin-bottom: 10px;
  font-size: 1.34rem;
}

.skill-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.skill-cloud span {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.62);
  font-weight: 720;
}

.contact-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 28px;
  align-items: end;
}

.contact-copy p {
  margin-bottom: 0;
  color: var(--muted);
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 28px 32px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.92rem;
}

.project-dialog {
  width: min(760px, calc(100vw - 32px));
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow);
}

.project-dialog::backdrop {
  background: rgba(17, 17, 17, 0.42);
  backdrop-filter: blur(8px);
}

.dialog-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px 0;
}

.dialog-close {
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  cursor: pointer;
  font-size: 1.5rem;
  line-height: 1;
}

.dialog-visual {
  position: relative;
  aspect-ratio: 16 / 9;
  min-height: 0;
  margin: 18px 20px;
  border-radius: var(--radius);
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(21, 21, 21, 0.16) 0 16%, transparent 16% 20%, rgba(21, 21, 21, 0.16) 20% 62%, transparent 62% 68%, rgba(21, 21, 21, 0.16) 68%),
    var(--soft);
}

.dialog-video {
  background: var(--ink);
  object-fit: contain;
}

.project-dialog h2,
.project-dialog p:not(.eyebrow) {
  margin-left: 20px;
  margin-right: 20px;
}

.project-dialog h2 {
  font-size: 2rem;
}

.dialog-media-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 18px 20px 10px;
}

.media-button {
  min-height: 34px;
  max-width: 100%;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(246, 245, 239, 0.8);
  color: var(--muted);
  cursor: pointer;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.media-button.is-active {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--surface);
}

.dialog-note {
  margin-bottom: 24px;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 26px;
  z-index: 40;
  min-width: 180px;
  padding: 12px 16px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--surface);
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 12px);
  transition: opacity 180ms ease, transform 180ms ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 650ms ease, transform 650ms ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@keyframes waveNudge {
  0%,
  100% {
    transform: translateX(0) skewX(-10deg);
  }
  50% {
    transform: translateX(-12px) skewX(-10deg);
  }
}

@keyframes trackPlayhead {
  0%,
  100% {
    transform: translateX(0);
  }
  50% {
    transform: translateX(-150px);
  }
}

@media (max-width: 980px) {
  .site-header {
    grid-template-columns: 1fr auto;
  }

  .main-nav {
    display: none;
  }

  h1 {
    font-size: 4.5rem;
  }

  .work-grid,
  .process-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .about-section,
  .contact-section {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 680px) {
  .site-header {
    padding: 12px 16px;
    gap: 12px;
  }

  .brand-mark span:last-child {
    display: none;
  }

  .header-actions {
    gap: 8px;
  }

  .icon-link {
    display: none;
  }

  .hero-section {
    min-height: 86svh;
    padding: 78px 18px 18px;
  }

  h1 {
    font-size: 3.25rem;
  }

  .hero-copy {
    font-size: 1.04rem;
  }

  .button {
    width: 100%;
  }

  .hero-meta {
    grid-template-columns: 1fr;
  }

  .section-block {
    padding: 68px 18px;
  }

  .section-heading h2,
  .about-copy h2,
  .contact-copy h2 {
    font-size: 2.24rem;
  }

  .work-grid,
  .process-grid {
    grid-template-columns: 1fr;
  }

  .visual-label {
    font-size: 3.4rem;
  }

  .site-footer {
    flex-direction: column;
    padding: 22px 18px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
