:root {
  color-scheme: dark;
  --color-paper: #f1f0e9;
  --color-muted: rgba(241, 240, 233, 0.78);
  --color-hairline: rgba(241, 240, 233, 0.55);
  --color-focus: #f4e6b3;
  --font-display: Baskerville, "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --font-ui: Inter, "Helvetica Neue", Helvetica, Arial, sans-serif;
  --edge-x: clamp(1.5rem, 3.1vw, 4rem);
  --edge-y: clamp(1.5rem, 4.7vh, 3.25rem);
  --ease-cinematic: cubic-bezier(0.22, 1, 0.36, 1);
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: #1d302e;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100%;
  background: #1d302e;
  color: var(--color-paper);
  font-family: var(--font-ui);
  -webkit-font-smoothing: antialiased;
}

button,
a {
  color: inherit;
}

button {
  font: inherit;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 0.75rem;
  left: 0.75rem;
  padding: 0.75rem 1rem;
  transform: translateY(-160%);
  border-radius: 0.2rem;
  background: #f5f3ea;
  color: #122420;
  font-size: 0.8rem;
  text-decoration: none;
  transition: transform 180ms ease;
}

.skip-link:focus {
  transform: translateY(0);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.hero {
  position: relative;
  isolation: isolate;
  width: 100%;
  height: 100vh;
  height: 100svh;
  min-height: 42rem;
  overflow: hidden;
  background: #47605c;
}

.environment-layer,
.interaction-layer,
.ui-layer,
.visual-layer,
.environment-grade {
  position: absolute;
  inset: 0;
}

.environment-layer {
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.visual-layer {
  pointer-events: none;
}

.visual-layer__asset {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  user-select: none;
}

.visual-layer--water {
  z-index: 1;
  background: #536b67;
}

.visual-layer--water .visual-layer__asset {
  filter: saturate(0.82) contrast(0.96) brightness(0.91);
}

.visual-layer--sky-reflection {
  z-index: 2;
  background:
    radial-gradient(circle at 84% 12%, rgba(255, 249, 225, 0.13), transparent 27%),
    linear-gradient(115deg, transparent 46%, rgba(231, 235, 222, 0.035) 76%, transparent 100%);
  mix-blend-mode: screen;
  will-change: transform, opacity;
}

.visual-layer--building-reflection {
  z-index: 3;
}

.visual-layer--stones {
  z-index: 4;
}

.visual-layer--tree-reflection {
  z-index: 5;
}

.visual-layer--tree-reflection-secondary {
  z-index: 5;
}

.visual-layer--tree-shadow {
  z-index: 6;
  background:
    radial-gradient(ellipse at 7% 89%, rgba(8, 22, 18, 0.25), transparent 25%),
    radial-gradient(ellipse at 86% 100%, rgba(7, 23, 20, 0.2), transparent 28%);
  mix-blend-mode: multiply;
}

.visual-layer--main-tree {
  z-index: 7;
}

.visual-layer--foreground-tree {
  z-index: 8;
}

[data-tree-asset],
.tree-motion-zone {
  position: absolute;
  display: block;
  max-width: none;
  object-fit: contain;
  object-position: left top;
  will-change: transform, filter, opacity;
  user-select: none;
}

.tree-motion-zone {
  pointer-events: none;
  -webkit-mask-position: left top;
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-size: 100% 100%;
  mask-position: left top;
  mask-repeat: no-repeat;
  mask-size: 100% 100%;
}

.tree-motion-zone[data-tree-zone="inner"] {
  -webkit-mask-image: radial-gradient(
    ellipse 110% 94% at 0% 0%,
    transparent 0 20%,
    #000 31% 48%,
    transparent 65%
  );
  mask-image: radial-gradient(
    ellipse 110% 94% at 0% 0%,
    transparent 0 20%,
    #000 31% 48%,
    transparent 65%
  );
}

.tree-motion-zone[data-tree-zone="mid"] {
  -webkit-mask-image: radial-gradient(
    ellipse 116% 100% at 0% 0%,
    transparent 0 39%,
    #000 51% 69%,
    transparent 84%
  );
  mask-image: radial-gradient(
    ellipse 116% 100% at 0% 0%,
    transparent 0 39%,
    #000 51% 69%,
    transparent 84%
  );
}

.tree-motion-zone[data-tree-zone="outer"] {
  -webkit-mask-image: radial-gradient(
    ellipse 122% 108% at 0% 0%,
    transparent 0 58%,
    rgba(0, 0, 0, 0.72) 70%,
    #000 81%,
    transparent 93%
  );
  mask-image: radial-gradient(
    ellipse 122% 108% at 0% 0%,
    transparent 0 58%,
    rgba(0, 0, 0, 0.72) 70%,
    #000 81%,
    transparent 93%
  );
}

.tree-motion-zone[data-tree-zone="tips"] {
  -webkit-mask-image: radial-gradient(
    ellipse 126% 112% at 0% 0%,
    transparent 0 76%,
    rgba(0, 0, 0, 0.72) 87%,
    #000 96% 100%
  );
  mask-image: radial-gradient(
    ellipse 126% 112% at 0% 0%,
    transparent 0 76%,
    rgba(0, 0, 0, 0.72) 87%,
    #000 96% 100%
  );
}

.visual-layer--pond-edge {
  z-index: 9;
}

.environment-grade {
  z-index: 10;
  background:
    linear-gradient(90deg, rgba(9, 23, 19, 0.18), transparent 27%, transparent 75%, rgba(12, 27, 25, 0.08)),
    linear-gradient(180deg, rgba(8, 20, 17, 0.1), transparent 28%, transparent 72%, rgba(5, 15, 13, 0.2));
  animation: atmosphere-breathe 18s ease-in-out infinite alternate;
}

.environment-grade::after {
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.25'/%3E%3C/svg%3E");
  content: "";
  opacity: 0.035;
  mix-blend-mode: soft-light;
}

.interaction-layer {
  z-index: 10;
  pointer-events: none;
}

.visual-layer--koi {
  z-index: 2;
}

.visual-layer--koi .visual-layer__asset {
  display: none;
}

.koi-deformation-canvas {
  position: absolute;
  top: 0;
  left: 0;
  opacity: 0;
  filter: brightness(0.72) saturate(0.65) drop-shadow(0 0.6rem 1rem rgba(4, 12, 11, 0.22));
  transform-origin: center;
  transition: opacity 600ms ease;
  visibility: hidden;
  will-change: transform;
}

.hero[data-koi-ready="true"] .koi-deformation-canvas {
  visibility: visible;
}

.water-surface-canvas,
.ambient-rain-canvas,
.ripple-canvas {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.water-surface-canvas {
  z-index: 0;
  opacity: 0.96;
  filter: blur(0.12px);
}

.ripple-canvas {
  z-index: 1;
}

.ambient-rain-canvas {
  z-index: 3;
  filter: drop-shadow(0 0 0.35px rgba(233, 242, 236, 0.22));
}

@keyframes reflection-drift {
  0% {
    opacity: 0.92;
    transform: translate3d(-1px, 0, 0) scale(1.004);
  }

  100% {
    opacity: 1;
    transform: translate3d(2px, -1px, 0) scale(1.006);
  }
}

@keyframes atmosphere-breathe {
  0% {
    opacity: 0.94;
  }

  100% {
    opacity: 1;
  }
}

.ui-layer {
  z-index: 20;
  pointer-events: none;
}

.site-header,
.project-navigation,
.hero-footer {
  pointer-events: auto;
}

.site-header {
  position: absolute;
  z-index: 2;
  inset: var(--edge-y) var(--edge-x) auto;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}

.brand {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  text-decoration: none;
}

.brand__name {
  font-family: var(--font-display);
  font-size: clamp(2rem, 2.45vw, 2.9rem);
  font-weight: 400;
  letter-spacing: 0.055em;
  line-height: 0.9;
  text-shadow: 0 1px 18px rgba(10, 20, 17, 0.18);
}

.brand__disciplines {
  display: grid;
  gap: 0.38rem;
  margin-top: clamp(1rem, 1.8vh, 1.35rem);
  padding-left: clamp(1.55rem, 1.7vw, 2rem);
  font-size: clamp(0.62rem, 0.7vw, 0.78rem);
  font-weight: 500;
  letter-spacing: 0.16em;
  line-height: 1;
}

.brand__disciplines span {
  display: block;
}

.site-navigation {
  display: flex;
  align-items: center;
  gap: clamp(2rem, 4vw, 4.5rem);
  padding-top: 0.45rem;
}

.site-navigation ul {
  display: flex;
  align-items: center;
  gap: clamp(1.55rem, 2.35vw, 3rem);
  padding: 0;
  margin: 0;
  list-style: none;
}

.site-navigation a {
  position: relative;
  display: inline-block;
  padding: 0.25rem 0;
  font-size: clamp(0.66rem, 0.69vw, 0.78rem);
  font-weight: 500;
  letter-spacing: 0.08em;
  line-height: 1;
  text-decoration: none;
  text-shadow: 0 1px 12px rgba(10, 20, 17, 0.2);
}

.site-navigation a::after {
  position: absolute;
  right: 0;
  bottom: -0.25rem;
  left: 0;
  height: 1px;
  background: currentColor;
  content: "";
  opacity: 0.65;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 320ms var(--ease-cinematic);
}

.site-navigation a:hover::after,
.site-navigation a:focus-visible::after {
  transform: scaleX(1);
  transform-origin: left;
}

.site-navigation__rule {
  display: block;
  width: clamp(2.1rem, 2.6vw, 3rem);
  height: 1px;
  background: var(--color-hairline);
}

.project-navigation {
  position: absolute;
  z-index: 1;
  top: 31.8%;
  left: 24.1%;
  width: 56.4%;
}

.project-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(1rem, 4vw, 5rem);
  padding: 0;
  margin: 0;
  list-style: none;
}

.project-item {
  display: flex;
  justify-content: center;
  min-width: 0;
}

.project-hotspot {
  position: relative;
  display: flex;
  width: min(100%, 13rem);
  padding: 0.75rem 0.75rem 1rem;
  flex-direction: column;
  align-items: center;
  border: 0;
  background: transparent;
  color: var(--color-paper);
  cursor: pointer;
  opacity: 0.9;
  text-align: center;
  text-shadow: 0 1px 16px rgba(7, 22, 19, 0.32);
  transition:
    opacity 420ms ease,
    transform 560ms var(--ease-cinematic);
}

.project-hotspot::before {
  position: absolute;
  inset: -0.75rem -0.5rem;
  border: 1px solid transparent;
  border-radius: 50%;
  content: "";
  transition: border-color 320ms ease;
}

.project-hotspot:hover,
.project-hotspot:focus-visible {
  opacity: 1;
  outline: none;
  transform: translateY(-0.18rem);
}

.project-hotspot:focus-visible::before {
  border-color: rgba(244, 230, 179, 0.74);
}

.project-hotspot__index {
  font-family: var(--font-display);
  font-size: clamp(0.78rem, 0.82vw, 0.92rem);
  letter-spacing: 0.08em;
  line-height: 1;
}

.project-hotspot__line {
  width: 1px;
  height: clamp(1.4rem, 2.8vh, 1.8rem);
  margin: 0.75rem 0 1.15rem;
  background: var(--color-hairline);
  transition: height 480ms var(--ease-cinematic);
}

.project-hotspot:hover .project-hotspot__line,
.project-hotspot:focus-visible .project-hotspot__line {
  height: clamp(1.55rem, 3.15vh, 2rem);
}

.project-hotspot__title {
  white-space: nowrap;
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 1.7vw, 2rem);
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.project-hotspot__description {
  display: flex;
  margin-top: clamp(1.3rem, 2.7vh, 1.85rem);
  flex-direction: column;
  font-size: clamp(0.74rem, 0.82vw, 0.92rem);
  font-weight: 350;
  letter-spacing: -0.01em;
  line-height: 1.42;
  opacity: 0.86;
  transition: transform 520ms var(--ease-cinematic);
}

.project-hotspot:hover .project-hotspot__description,
.project-hotspot:focus-visible .project-hotspot__description {
  transform: translateY(0.12rem);
}

.hero[data-preview-project] .project-hotspot:not(:hover, :focus-visible) {
  opacity: 0.64;
}

.hero-footer {
  position: absolute;
  inset: auto var(--edge-x) 0;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
}

.manifesto {
  padding-bottom: clamp(2rem, 4.7vh, 3.2rem);
}

.manifesto p {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(0.9rem, 1.05vw, 1.2rem);
  letter-spacing: -0.01em;
  line-height: 1.22;
  text-shadow: 0 1px 16px rgba(7, 20, 17, 0.4);
}

.manifesto__rule {
  display: block;
  width: clamp(3.8rem, 5.6vw, 6rem);
  height: 1px;
  margin-top: clamp(1.4rem, 3.4vh, 2.25rem);
  background: var(--color-hairline);
}

.scroll-cue {
  display: flex;
  flex-direction: column;
  align-items: center;
  font-size: clamp(0.6rem, 0.68vw, 0.75rem);
  font-weight: 500;
  letter-spacing: 0.13em;
  text-decoration: none;
}

.scroll-cue__line {
  width: 1px;
  height: clamp(3.3rem, 6.5vh, 4.5rem);
  margin-top: 1rem;
  background: linear-gradient(to bottom, var(--color-hairline), rgba(241, 240, 233, 0.05));
  transform-origin: top;
  transition: transform 460ms var(--ease-cinematic);
}

.scroll-cue:hover .scroll-cue__line,
.scroll-cue:focus-visible .scroll-cue__line {
  transform: scaleY(1.12);
}

a:focus-visible {
  outline: 1px solid var(--color-focus);
  outline-offset: 0.4rem;
}

@media (max-width: 960px) {
  .site-navigation {
    gap: 1.25rem;
  }

  .site-navigation ul {
    gap: 1rem;
  }

  .site-navigation__rule {
    display: none;
  }

  .project-navigation {
    left: 18%;
    width: 70%;
  }
}

@media (max-width: 700px) {
  :root {
    --edge-x: 1.25rem;
    --edge-y: 1.5rem;
  }

  .hero {
    min-height: 46rem;
  }

  .visual-layer__asset {
    object-position: 43% center;
  }

  .site-header {
    gap: 1.5rem;
  }

  .brand__name {
    font-size: 1.8rem;
  }

  .brand__disciplines {
    gap: 0.28rem;
    margin-top: 0.8rem;
    padding-left: 0;
    font-size: 0.54rem;
  }

  .site-navigation {
    max-width: 53vw;
    padding-top: 0.15rem;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .site-navigation::-webkit-scrollbar {
    display: none;
  }

  .site-navigation ul {
    gap: 0.9rem;
  }

  .site-navigation a {
    font-size: 0.57rem;
  }

  .project-navigation {
    top: 25%;
    left: 0;
    width: 100%;
    padding: 0 1rem;
  }

  .project-list {
    grid-template-columns: 1fr;
    gap: 0.15rem;
  }

  .project-item {
    justify-content: flex-end;
  }

  .project-hotspot {
    width: min(70vw, 17rem);
    padding: 0.4rem 0.75rem;
    align-items: flex-start;
    text-align: left;
  }

  .project-hotspot__index {
    font-size: 0.7rem;
  }

  .project-hotspot__line {
    width: 2.2rem;
    height: 1px;
    margin: 0.5rem 0 0.7rem;
  }

  .project-hotspot:hover .project-hotspot__line,
  .project-hotspot:focus-visible .project-hotspot__line {
    width: 2.55rem;
    height: 1px;
  }

  .project-hotspot__title {
    font-size: 1.35rem;
  }

  .project-hotspot__description {
    margin-top: 0.35rem;
    font-size: 0.69rem;
  }

  .hero-footer {
    pointer-events: none;
  }

  .manifesto {
    padding-bottom: 1.5rem;
  }

  .manifesto p {
    font-size: 0.86rem;
  }

  .scroll-cue {
    pointer-events: auto;
    font-size: 0.56rem;
  }
}

@media (max-height: 720px) and (min-width: 701px) {
  .project-navigation {
    top: 28%;
  }

  .project-hotspot__description {
    margin-top: 1rem;
  }
}

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

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
