:root {
  --bg: #090711;
  --surface: rgb(26 20 39 / 68%);
  --surface-strong: #20172f;
  --text: #f8f4ff;
  --muted: #b7adc8;
  --line: rgb(224 206 255 / 17%);
  --accent: #f6bd7c;
  --accent-ink: #23120c;
  --focus: #73efe2;
  color-scheme: dark;
}

body {
  overflow-x: clip;
  background:
    radial-gradient(circle at 12% 9%, rgb(127 79 196 / 19%), transparent 30rem),
    radial-gradient(circle at 88% 20%, rgb(241 103 162 / 15%), transparent 34rem),
    linear-gradient(180deg, #090711 0%, #0e0917 55%, #08070d 100%);
  color: var(--text);
}

body::before {
  position: fixed;
  z-index: -1;
  inset: 0;
  opacity: 0.16;
  background-image: linear-gradient(rgb(255 255 255 / 5%) 1px, transparent 1px), linear-gradient(90deg, rgb(255 255 255 / 5%) 1px, transparent 1px);
  background-size: 4rem 4rem;
  mask-image: radial-gradient(circle at 50% 25%, black, transparent 70%);
  content: "";
}

.brand-mark {
  border: 1px solid var(--line);
  background: linear-gradient(135deg, rgb(246 189 124 / 18%), rgb(144 92 232 / 28%));
  box-shadow: inset 0 0 1.2rem rgb(255 255 255 / 5%);
}

.site-header {
  padding: 0.55rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: 1.15rem;
  background: rgb(9 7 17 / 76%);
  box-shadow: 0 0.9rem 2.5rem rgb(0 0 0 / 18%);
  backdrop-filter: blur(16px);
}

.site-header.is-scrolled {
  background: rgb(26 20 39 / 90%);
  box-shadow: 0 0.9rem 2.5rem rgb(0 0 0 / 30%), 0 0 1.5rem rgb(246 189 124 / 7%);
}

@media (max-width: 880px) {
  .site-header {
    align-items: center;
  }
}

.nav-links a,
.nav-actions a,
.nav-actions button {
  color: var(--muted);
}

.nav-links a:hover,
.nav-actions a:hover,
.nav-actions button:hover {
  color: var(--text);
}

.button {
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease, box-shadow 180ms ease;
}

@media (hover: hover) and (pointer: fine) {
  .button:hover {
    box-shadow: 0 0.75rem 2rem rgb(0 0 0 / 24%), 0 0 1.25rem rgb(246 189 124 / 9%);
    transform: translateY(-0.15rem);
  }

  .button:not(.button-primary):hover {
    border-color: rgb(246 189 124 / 58%);
    background: rgb(246 189 124 / 9%);
  }

  .button-primary:hover {
    background: #ffd09a;
    box-shadow: 0 0.75rem 2rem rgb(0 0 0 / 24%), 0 0 1.5rem rgb(246 189 124 / 17%);
  }
}

.hero {
  grid-template-columns: minmax(0, 1.05fr) minmax(25rem, 0.95fr);
}

.hero-copy h1,
.section-header h2,
.contact-card h2,
.legal-heading {
  font-family: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  font-weight: 500;
}

.legal-card {
  border-radius: 1.25rem;
  box-shadow: inset 0 0 2rem rgb(255 255 255 / 2%);
}

.hero-copy h1 em {
  color: var(--accent);
  font-weight: inherit;
}

.flow-canvas {
  border: 1px solid var(--line);
  border-radius: 45% 55% 52% 48% / 58% 42% 58% 42%;
  background:
    radial-gradient(circle at 50% 50%, rgb(236 167 120 / 14%), transparent 28%),
    radial-gradient(circle at 30% 30%, rgb(109 229 215 / 9%), transparent 30%),
    rgb(17 12 27 / 66%);
  box-shadow: inset 0 0 7rem rgb(131 83 191 / 10%), 0 3rem 8rem rgb(0 0 0 / 28%);
  animation: breathe 9s ease-in-out infinite alternate;
}

.flow-line {
  fill: none;
  stroke-linecap: round;
  stroke-width: 1.35;
}

.flow-line-one {
  stroke: url(#atelierGradientOne);
  stroke-dasharray: 7 7;
  animation: flow 20s linear infinite;
}

.flow-line-two {
  stroke: url(#atelierGradientTwo);
  stroke-dasharray: 3 7;
  animation: flow-reverse 26.25s linear infinite;
}

.flow-node {
  fill: #f9ce99;
  filter: drop-shadow(0 0 8px rgb(246 189 124 / 78%));
}

.signal-core {
  top: 50%;
  left: 50%;
  border: 1px solid rgb(255 255 255 / 28%);
  background:
    radial-gradient(circle at 33% 28%, rgb(255 243 207 / 45%), transparent 16%),
    linear-gradient(145deg, #f5b77b, #be6997 48%, #6d4fb5);
  box-shadow: 0 0 5rem rgb(218 108 152 / 32%), inset -1rem -1rem 2rem rgb(51 22 87 / 32%);
  color: #fff9f2;
  transform: translate(-50%, -50%);
}

.signal-status {
  color: rgb(255 249 242 / 75%);
}

.signal-tag {
  will-change: transform;
}

.signal-tag:nth-of-type(1) {
  top: 17%;
  left: 17%;
  animation: dodge-systems 20s ease-in-out infinite;
}

.signal-tag:nth-of-type(2) {
  top: 19%;
  right: 16%;
  animation: dodge-curiosity 23s ease-in-out infinite;
}

.signal-tag:nth-of-type(3) {
  bottom: 18%;
  left: 16%;
  animation: dodge-craft 21s ease-in-out infinite;
}

.signal-tag:nth-of-type(4) {
  right: 16%;
  bottom: 16%;
  animation: dodge-care 24s ease-in-out infinite;
}

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

.principle,
.project-card,
.capability-card,
.contact-card {
  border-radius: 1.6rem;
  backdrop-filter: blur(18px);
  box-shadow: inset 0 1px rgb(255 255 255 / 5%);
}

.principle::after {
  position: absolute;
  right: -3rem;
  bottom: -4rem;
  width: 9rem;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, rgb(246 189 124 / 15%), transparent 70%);
  content: "";
}

.project-card {
  --project-preview-overlay: linear-gradient(90deg, rgb(9 7 17 / 100%) 0%, rgb(9 7 17 / 100%) 34%, rgb(9 7 17 / 20%) 55%, rgb(9 7 17 / 4%) 100%);
  transition: transform 260ms ease, border-color 260ms ease, background 260ms ease;
}

.project-card::after {
  clip-path: inset(0 0 0 100%);
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 42%, #000 100%);
  mask-image: linear-gradient(90deg, transparent 0%, #000 42%, #000 100%);
  transition: opacity 180ms ease, clip-path 520ms cubic-bezier(0.22, 1, 0.36, 1);
}

.project-card.is-preview-active::after {
  clip-path: inset(0);
}

.project-card:hover {
  border-color: rgb(246 189 124 / 44%);
  background: rgb(35 25 51 / 78%);
  transform: translateY(-0.35rem);
}

.project-card::before {
  position: absolute;
  top: -8rem;
  right: -7rem;
  width: 18rem;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, var(--project-glow, rgb(246 189 124 / 24%)), transparent 68%);
  content: "";
}

.project-card:nth-child(2) {
  --project-glow: rgb(91 226 215 / 22%);
}

.project-card:nth-child(3) {
  --project-glow: rgb(160 108 240 / 24%);
}

.project-card:nth-child(4) {
  --project-glow: rgb(239 91 155 / 23%);
}

.project-link {
  background: rgb(255 255 255 / 4%);
}

.tag-list li {
  background: rgb(255 255 255 / 2%);
}

.contact-card {
  background:
    radial-gradient(circle at 90% 30%, rgb(236 102 161 / 25%), transparent 24rem),
    radial-gradient(circle at 60% 120%, rgb(103 222 211 / 15%), transparent 25rem),
    var(--surface);
}

.site-footer {
  border-top: 1px solid var(--line);
}

@keyframes flow {
  to {
    stroke-dashoffset: -180;
  }
}

@keyframes flow-reverse {
  to {
    stroke-dashoffset: 180;
  }
}

@keyframes breathe {
  from {
    border-radius: 45% 55% 52% 48% / 58% 42% 58% 42%;
  }

  to {
    border-radius: 53% 47% 43% 57% / 44% 57% 43% 56%;
  }
}

@keyframes dodge-systems {
  0%,
  100% {
    transform: translate3d(0.8rem, 0.2rem, 0) rotate(-0.7deg);
  }

  25% {
    transform: translate3d(1.65rem, -0.75rem, 0) rotate(1.1deg);
  }

  50% {
    transform: translate3d(-0.45rem, 0.95rem, 0) rotate(-0.65deg);
  }

  75% {
    transform: translate3d(1.05rem, 0.35rem, 0) rotate(0.75deg);
  }
}

@keyframes dodge-curiosity {
  0%,
  100% {
    transform: translate3d(0.2rem, 0.45rem, 0) rotate(0.55deg);
  }

  25% {
    transform: translate3d(0.85rem, -0.7rem, 0) rotate(-1deg);
  }

  50% {
    transform: translate3d(-1.4rem, 0.3rem, 0) rotate(0.65deg);
  }

  75% {
    transform: translate3d(-0.35rem, 1.05rem, 0) rotate(-0.8deg);
  }
}

@keyframes dodge-craft {
  0%,
  100% {
    transform: translate3d(0.3rem, -0.45rem, 0) rotate(-0.55deg);
  }

  25% {
    transform: translate3d(-0.85rem, -1.1rem, 0) rotate(1deg);
  }

  50% {
    transform: translate3d(1.5rem, -0.3rem, 0) rotate(-0.85deg);
  }

  75% {
    transform: translate3d(0.55rem, 0.7rem, 0) rotate(0.65deg);
  }
}

@keyframes dodge-care {
  0%,
  100% {
    transform: translate3d(-1.05rem, -0.55rem, 0) rotate(0.75deg);
  }

  25% {
    transform: translate3d(-0.35rem, -1.25rem, 0) rotate(-0.75deg);
  }

  50% {
    transform: translate3d(0.5rem, -0.2rem, 0) rotate(0.6deg);
  }

  75% {
    transform: translate3d(-0.8rem, 0.55rem, 0) rotate(-1deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .button:hover {
    transform: none;
  }

  .flow-canvas .signal-tag {
    animation: none;
    transform: none;
    will-change: auto;
  }
}

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