:root {
  /* Light, studio-ish palette: warm paper base + acid accent (less corporate). */
  --bg: #f4f1ea;
  --panel: rgba(20, 20, 24, 0.05);
  --panel-strong: rgba(20, 20, 24, 0.08);
  /* --text: rgba(20, 20, 24, 0.92); */
  --text: orangered;
  --muted: rgba(20, 20, 24, 0.66);
  --faint: rgba(20, 20, 24, 0.42);
  --line: rgba(20, 20, 24, 0.14);
  --shadow: 0 26px 80px rgba(10, 10, 12, 0.12);
  --radius: 18px;
  --max: 1100px;
  --accent: #c6ff2e;
  --font-body: "Familjen Grotesk", "Segoe UI", sans-serif;
  --font-display: "Unbounded", "Arial Black", sans-serif;
  --page-gutter: clamp(16px, 3vw, 30px);
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

html {
  overflow: hidden;
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--text);
  background: var(--bg);
  overflow: hidden;
}

.bg-mark {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-size: clamp(64px, 16vw, 200px);
  letter-spacing: 0.12em;
  font-weight: 700;
  /* color: rgba(20, 20, 24, 0.08); */
  color: var(--text);
  pointer-events: none;
  user-select: none;
  z-index: 0;
  transition: filter 220ms ease, opacity 220ms ease;
}

.topbar {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 80;
  background: transparent;
  padding-top: var(--page-gutter);
}

.topbar__inner {
  max-width: calc(100% - (var(--page-gutter) * 2));
  margin: 0 auto;
  padding: 0 0 14px 0;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
  /* border-bottom: 1px solid var(--text); */
}

.topbar__link {
  justify-self: start;
  color: var(--text);
  text-decoration: none;
  font-size: 14px;
  letter-spacing: 0.02em;
  padding: 8px 10px;
  border-radius: 999px;
  transition: background 160ms ease, color 160ms ease;
  font-family: var(--font-display);
}

.topbar__link:hover {
  color: var(--text);
  background: rgba(20, 20, 24, 0.05);
}

.topbar__actions {
  justify-self: end;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.icon-link {
  color: var(--text);
  display: inline-flex;
  width: 36px;
  height: 36px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid var(--text);
  /* border: 1px solid rgba(20, 20, 24, 0.12); */
  /* background: rgba(20, 20, 24, 0.03); */
  transition: transform 160ms ease, background 160ms ease, color 160ms ease, border-color 160ms ease;
}

.icon-link:hover {
  transform: translateY(-1px);
  background: rgba(20, 20, 24, 0.06);
  color: var(--text);
  border-color: rgba(20, 20, 24, 0.18);
}

.brand {
  justify-self: center;
  display: inline-flex;
  align-items: center;
  gap: 0px;
  text-decoration: none;
  color: var(--text);
  letter-spacing: 0.08em;
}

.brand__left,
.brand__right {
  font-weight: 650;
  font-size: 14px;
  text-transform: uppercase;
  font-family: var(--font-display);
}

.brand__mark {
  height: 34px;
  width: auto;
  opacity: 0.9;
  color: var(--text);
}

.scene {
  height: 100vh;
  width: 100vw;
  position: relative;
  transition: filter 220ms ease;
}

.enquiry-drawer {
  --enquiry-height: min(55vh, 520px);
  --enquiry-handle-height: 52px;
  --enquiry-handle-rise: calc(var(--enquiry-height) + var(--page-gutter) + 12px);
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  height: var(--enquiry-height);
  display: block;
  pointer-events: none;
  z-index: 40;
}

.enquiry-handle {
  appearance: none;
  border: 0;
  background: var(--text);
  color: var(--bg);
  padding: 12px 22px;
  min-height: var(--enquiry-handle-height);
  border-radius: 999px;
  font-family: var(--font-display);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 12px;
  box-shadow: 0 12px 32px rgba(10, 10, 12, 0.22);
  cursor: pointer;
  position: absolute;
  left: 50%;
  bottom: var(--page-gutter);
  transform: translate(-50%, 0);
  transition: transform 260ms ease, opacity 200ms ease;
  pointer-events: auto;
  z-index: 1;
}

.enquiry-panel {
  width: 100vw;
  height: var(--enquiry-height);
  background: var(--text);
  color: var(--bg);
  padding: 20px;
  border-radius: 0;
  box-shadow: 0 28px 60px rgba(10, 10, 12, 0.22);
  pointer-events: none;
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  transform: translateY(100%);
  transition: transform 260ms ease;
}

.enquiry-open .enquiry-panel {
  pointer-events: auto;
  transform: translateY(0);
}

.enquiry-open .enquiry-handle {
  opacity: 0;
  transform: translate(-50%, calc(-1 * var(--enquiry-handle-rise)));
  pointer-events: none;
}

.enquiry-panel__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: min(880px, calc(100% - (var(--page-gutter) * 2)));
  margin: 0 auto 14px;
}

.enquiry-panel__title {
  margin: 0;
  font-size: 16px;
  font-family: var(--font-display);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.enquiry-panel .button {
  color: var(--bg);
  border-color: rgba(244, 241, 234, 0.32);
  background: rgba(244, 241, 234, 0.08);
}

.enquiry-panel .button:hover {
  background: rgba(244, 241, 234, 0.16);
}

.enquiry-form {
  display: grid;
  gap: 12px;
  width: min(880px, calc(100% - (var(--page-gutter) * 2)));
  margin: 0 auto;
}

.enquiry-field {
  display: grid;
  gap: 6px;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.enquiry-field input,
.enquiry-field select,
.enquiry-field textarea {
  width: 100%;
  border: 1px solid rgba(244, 241, 234, 0.35);
  background: rgba(244, 241, 234, 0.12);
  color: var(--bg);
  padding: 10px 12px;
  font-family: var(--font-body);
  font-size: 14px;
  border-radius: 0;
}

.enquiry-field select {
  color-scheme: light;
}

.enquiry-field select option {
  background: var(--bg);
  color: rgba(20, 20, 24, 0.92);
}

.enquiry-field textarea {
  resize: vertical;
  min-height: 110px;
}

.enquiry-field input::placeholder,
.enquiry-field textarea::placeholder {
  color: rgba(244, 241, 234, 0.7);
}

.enquiry-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.enquiry-submit {
  appearance: none;
  border: 0;
  background: var(--bg);
  color: var(--text);
  padding: 10px 18px;
  border-radius: 999px;
  font-family: var(--font-display);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
}

.enquiry-status {
  font-size: 12px;
  letter-spacing: 0.02em;
  text-transform: none;
  color: rgba(244, 241, 234, 0.85);
}

.gallery {
  position: absolute;
  inset: 0;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  perspective: 1200px;
  perspective-origin: 50% 50%;
  scrollbar-width: none;
  /* Firefox */
  -ms-overflow-style: none;
  /* IE/Edge legacy */
  padding: 0;
}

.gallery::-webkit-scrollbar {
  width: 0;
  height: 0;
}

.project-open .scene {
  filter: blur(14px);
  pointer-events: none;
}

.about-open .scene {
  filter: blur(14px);
  pointer-events: none;
}

.project-open .bg-mark {
  filter: blur(10px);
  opacity: 0.7;
}

.about-open .bg-mark {
  filter: blur(10px);
  opacity: 0.7;
}

.about-open .topbar {
  filter: blur(0);
}

.about-overlay {
  position: fixed;
  inset: 0;
  z-index: 60;
  opacity: 0;
  pointer-events: none;
  transition: opacity 220ms ease;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: none;
  -ms-overflow-style: none;
  display: grid;
  align-items: center;
  justify-items: center;
  padding: calc(var(--page-gutter) * 2) var(--page-gutter);
}

.about-overlay::-webkit-scrollbar {
  width: 0;
  height: 0;
}

.about-overlay.is-open {
  opacity: 1;
  pointer-events: auto;
}

.about-overlay__backdrop {
  position: fixed;
  inset: 0;
  background: rgba(244, 241, 234, 0.35);
  z-index: 0;
}

.about-overlay__content {
  position: relative;
  z-index: 1;
  width: min(880px, calc(100% - (var(--page-gutter) * 2)));
  color: var(--text);
  text-transform: none;
  letter-spacing: 0;
}

.about-overlay__body {
  color: var(--text);
  font-size: clamp(1.2rem, 2.2vw, 2rem);
  line-height: 1.45;
  font-family: var(--font-display);
  font-weight: 600;
}

.about-overlay__body p {
  margin: 0 0 22px;
}

.project-overlay {
  position: fixed;
  inset: 0;
  z-index: 60;
  opacity: 0;
  pointer-events: none;
  transition: opacity 220ms ease;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: none;
  -ms-overflow-style: none;
  scroll-snap-type: y mandatory;
  scroll-behavior: smooth;
}

.project-overlay::-webkit-scrollbar {
  width: 0;
  height: 0;
}

.project-overlay.is-open {
  opacity: 1;
  pointer-events: auto;
}

.project-overlay__backdrop {
  position: fixed;
  inset: 0;
  background: rgba(244, 241, 234, 0.35);
  z-index: 0;
}

.project-overlay__content {
  position: relative;
  max-width: none;
  margin: 0;
  padding: 0;
  z-index: 1;
}

.project-slide {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: calc(var(--page-gutter) * 3) var(--page-gutter) calc(var(--page-gutter) * 4);
  scroll-snap-align: center;
  opacity: 0.18;
  transform: translateY(24px);
  transition: opacity 240ms ease, transform 240ms ease;
}

.project-slide.is-active {
  opacity: 1;
  transform: translateY(0);
}

.project-slide img {
  max-width: min(980px, calc(100vw - (var(--page-gutter) * 2)));
  max-height: 70vh;
  width: auto;
  height: auto;
  border-radius: 0;
  box-shadow: var(--shadow);
}

.project-slide iframe {
  width: min(980px, calc(100vw - (var(--page-gutter) * 2)));
  aspect-ratio: 16 / 9;
  border: 0;
  box-shadow: var(--shadow);
  background: rgba(20, 20, 24, 0.12);
}

.project-caption {
  position: fixed;
  left: var(--page-gutter);
  bottom: var(--page-gutter);
  font-family: var(--font-display);
  font-size: 1rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text);
  z-index: 65;
  pointer-events: auto;
}

.project-caption__title {
  font-family: var(--font-display);
  font-size: 14px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.project-caption__desc {
  margin-top: 8px;
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.55;
  text-transform: none;
  letter-spacing: 0;
  max-width: min(50vw, 520px);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
}

@media (max-width: 720px) {
  .project-caption__desc {
    max-width: calc(100vw - (var(--page-gutter) * 2));
  }

  .enquiry-drawer {
    --enquiry-height: 75vh;
    --enquiry-handle-height: 46px;
  }
}

.project-caption__text {
  display: block;
}

.project-caption__desc.is-clamped .project-caption__text {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.project-caption__desc.is-expanded .project-caption__text {
  display: block;
  -webkit-line-clamp: unset;
}

.caption-toggle {
  appearance: none;
  border: 0;
  padding: 0;
  background: none;
  color: var(--text);
  font-family: var(--font-display);
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: none;
  text-decoration: underline;
  font-style: italic;
  cursor: pointer;
}

.caption-toggle[hidden] {
  display: none;
}

.stage3d {
  position: sticky;
  top: 0;
  height: 100%;
  pointer-events: none;
  transform-style: preserve-3d;
  z-index: 2;
}

.world {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
}

.spacer {
  height: 1400px;
  position: relative;
  z-index: 1;
}

.tile {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 0;
  height: 0;
  border: 0;
  padding: 0;
  background: transparent;
  cursor: pointer;
  user-select: none;
  pointer-events: auto;
  transform-style: preserve-3d;
  --lift: 0px;
}

.slice {
  position: absolute;
  top: 0;
  left: 0;
  overflow: hidden;
  background-image: var(--img);
  background-size: var(--w) var(--h);
  background-position: var(--bp);
  background-repeat: no-repeat;
  border-radius: 0;
  filter: saturate(0.1) brightness(1.3) contrast(0.5);
  transform-style: preserve-3d;
  backface-visibility: hidden;
  transform: rotateY(var(--theta)) translateZ(calc(var(--cyl-z) + var(--lift)));
  transition: transform 220ms ease, filter 200ms ease;
  will-change: transform;
}

.slice--edge-left {
  border-radius: 0;
}

.slice--edge-right {
  border-radius: 0;
}

.tile:is(:hover, :focus-visible) {
  --lift: 38px;
}

.tile:is(:hover, :focus-visible) .slice {
  filter: saturate(1) brightness(1) contrast(1);
}

.pill {
  font-size: 12px;
  color: rgba(250, 250, 250, 0.84);
  padding: 6px 10px;
  border: 1px solid rgba(250, 250, 250, 0.18);
  border-radius: 999px;
  background: rgba(10, 10, 12, 0.22);
  white-space: nowrap;
}

.tile:focus-visible {
  outline: 2px solid rgba(198, 255, 46, 0.55);
  outline-offset: 3px;
}

.scene-hint {
  position: absolute;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: var(--faint);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  pointer-events: none;
}

.scene-hint__line {
  width: 38px;
  height: 1px;
  background: var(--line);
}

.modal {
  width: min(980px, calc(100vw - 40px));
  border: 1px solid rgba(20, 20, 24, 0.14);
  border-radius: calc(var(--radius) * 1.2);
  padding: 0;
  background: rgba(244, 241, 234, 0.94);
  color: var(--text);
  box-shadow: var(--shadow);
}

.modal::backdrop {
  background: rgba(10, 10, 12, 0.22);
  backdrop-filter: blur(6px);
}

.modal__sheet {
  padding: 0;
  margin: 0;
}

.modal__sheet--wide {
  width: min(980px, calc(100vw - 40px));
}

.modal__header {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  padding: 16px 16px 12px;
  border-bottom: 1px solid rgba(20, 20, 24, 0.12);
}

.modal__title {
  margin: 0;
  font-size: 16px;
  font-family: var(--font-display);
}

.modal__subtitle {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.modal__body {
  padding: 14px 16px 18px;
}

.button {
  appearance: none;
  border: 1px solid rgba(20, 20, 24, 0.16);
  background: rgba(20, 20, 24, 0.06);
  color: var(--text);
  border-radius: 999px;
  padding: 8px 12px;
  cursor: pointer;
  font-family: var(--font-display);
}

.button:hover {
  background: rgba(20, 20, 24, 0.09);
}

.button--ghost {
  background: transparent;
}

.prose {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

.prose p {
  margin: 0 0 10px;
}

.about-overlay__body.prose {
  color: var(--text);
  font-size: clamp(1.2rem, 2.2vw, 2rem);
  line-height: 1.45;
  font-family: var(--font-display);
  font-weight: 600;
}

.about-overlay__body.prose p {
  margin: 0 0 22px;
}

.project {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 16px;
}

.project__gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.project__gallery img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid rgba(20, 20, 24, 0.12);
  background: rgba(20, 20, 24, 0.04);
}

.noscript {
  margin: 24px auto;
  max-width: 560px;
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(20, 20, 24, 0.05);
  border: 1px solid rgba(20, 20, 24, 0.12);
  color: var(--muted);
}

@media (max-width: 840px) {
  .project {
    grid-template-columns: 1fr;
  }

  .slice {
    /* border-radius: 14px; */
  }
}

@media (prefers-reduced-motion: reduce) {
  .slice {
    transition: none;
  }

  .icon-link {
    transition: none;
  }

  .topbar__link {
    transition: none;
  }
}
