:root {
  color-scheme: dark;
  --ink: #f7f3ee;
  --paper: #111018;
  --muted: #c5bcb5;
  --dim: #827a76;
  --line: rgba(255, 255, 255, 0.13);
  --panel: rgba(255, 255, 255, 0.075);
  --panel-strong: rgba(255, 255, 255, 0.12);
  --red: #7f1d1d;
  --blue: #4777a6;
  --ice: #a9d5ff;
  --warm: #f1d2b2;
  --shadow: 0 18px 54px rgba(0, 0, 0, 0.28);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  margin: 0;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 82% 10%, rgba(71, 119, 166, 0.14), transparent 30rem),
    radial-gradient(circle at 18% 0%, rgba(127, 29, 29, 0.24), transparent 30rem),
    var(--paper);
  color: var(--ink);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image: linear-gradient(rgba(255,255,255,0.026) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,0.026) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: linear-gradient(to bottom, #000, transparent 78%);
}

a {
  color: inherit;
}

.hero-actions,
.work-meta,
footer {
  display: flex;
  align-items: center;
}

main,
footer {
  position: relative;
  z-index: 1;
}

.hero {
  position: relative;
  min-height: 74vh;
  display: grid;
  align-items: center;
  overflow: hidden;
  padding: 72px clamp(20px, 6vw, 86px) 58px;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(118deg, transparent 0 42%, rgba(169, 213, 255, 0.08) 44%, transparent 47%),
    linear-gradient(128deg, transparent 0 58%, rgba(127, 29, 29, 0.1) 60%, transparent 64%);
  background-size: 130% 130%, 150% 150%;
  opacity: 0.95;
  transform: translate3d(calc(var(--parallax-x, 0) * 16px), calc(var(--scroll-y, 0) * -26px), 0);
  animation: hero-field 18s ease-in-out infinite alternate;
}

#system-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.78;
  transform: translate3d(calc(var(--parallax-x, 0) * -10px), calc(var(--parallax-y, 0) * -8px), 0) scale(1.03);
  transition: transform 160ms ease-out;
}

.hero-light {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 78% 44%, rgba(169, 213, 255, 0.22), transparent 18rem),
    radial-gradient(circle at 88% 62%, rgba(71, 119, 166, 0.2), transparent 22rem),
    linear-gradient(90deg, transparent 0 42%, rgba(71, 119, 166, 0.16), transparent 78%),
    linear-gradient(180deg, rgba(127, 29, 29, 0.1), transparent 50%);
  opacity: 1;
  transform: translate3d(calc(var(--parallax-x, 0) * 18px), calc(var(--parallax-y, 0) * 14px), 0) scale(1.04);
  transition: transform 160ms ease-out;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(17, 16, 24, 0.98), rgba(17, 16, 24, 0.82) 45%, rgba(17, 16, 24, 0.18) 78%);
}

.hero-grid {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 0.98fr) minmax(280px, 420px);
  gap: clamp(28px, 6vw, 72px);
  align-items: center;
}

.hero-copy {
  max-width: 790px;
  transform: translate3d(calc(var(--parallax-x, 0) * 4px), calc(var(--parallax-y, 0) * 3px), 0);
  transition: transform 160ms ease-out;
}

.eyebrow {
  margin: 0 0 16px;
  color: var(--ice);
  font-size: 0.78rem;
  font-weight: 950;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

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

h1 {
  max-width: 15ch;
  margin-bottom: 22px;
  font-size: clamp(2.9rem, 5.6vw, 5.4rem);
  font-weight: 780;
  line-height: 1;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 0;
  font-size: clamp(1.75rem, 3.45vw, 3.15rem);
  font-weight: 760;
  line-height: 1.08;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 14px;
  font-size: clamp(1.2rem, 1.7vw, 1.55rem);
  font-weight: 760;
  line-height: 1.14;
}

.lede {
  max-width: 740px;
  color: var(--muted);
  font-size: clamp(1.05rem, 1.35vw, 1.2rem);
  line-height: 1.55;
}

.hero-actions {
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 34px;
}

.button {
  min-height: 50px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 20px;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-weight: 900;
  text-decoration: none;
}

.button.primary {
  color: #130f12;
  background: var(--ink);
}

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

.creator-map {
  position: relative;
  overflow: hidden;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: linear-gradient(145deg, rgba(255,255,255,0.11), rgba(255,255,255,0.045));
  box-shadow: var(--shadow);
  transform: perspective(900px) rotateX(calc(var(--parallax-y, 0) * -2deg)) rotateY(calc(var(--parallax-x, 0) * 3deg)) translate3d(calc(var(--parallax-x, 0) * 10px), calc(var(--parallax-y, 0) * 10px), 0);
  transition: transform 160ms ease-out;
  text-decoration: none;
}

.creator-map::before {
  content: "";
  position: absolute;
  inset: -40%;
  background: linear-gradient(115deg, transparent 42%, rgba(169, 213, 255, 0.16), transparent 58%);
  transform: translateX(-44%);
  animation: card-scan 8s ease-in-out infinite;
}

.creator-map-title {
  position: relative;
  z-index: 1;
  margin-bottom: 18px;
  color: #fff;
  font-size: clamp(1.4rem, 2.8vw, 2.5rem);
  font-weight: 950;
  line-height: 0.9;
  letter-spacing: 0;
  white-space: nowrap;
}

.preview-stack {
  position: relative;
  z-index: 1;
  min-height: clamp(230px, 28vw, 330px);
}

.preview-shot {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 74%;
  object-fit: cover;
  object-position: top center;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.32);
}

.preview-shot:nth-child(1) {
  z-index: 3;
  transform: translate3d(0, 0, 0);
}

.preview-shot:nth-child(2) {
  z-index: 2;
  transform: translate3d(9%, 18%, 0) scale(0.88);
  opacity: 0.72;
}

.preview-shot:nth-child(3) {
  z-index: 1;
  transform: translate3d(-7%, 30%, 0) scale(0.76);
  opacity: 0.42;
}

@keyframes card-scan {
  0%, 42% {
    transform: translateX(-48%);
  }
  70%, 100% {
    transform: translateX(48%);
  }
}

@keyframes hero-field {
  from {
    background-position: 0% 0%, 100% 0%;
  }
  to {
    background-position: 100% 40%, 0% 100%;
  }
}

.preview-caption {
  position: relative;
  z-index: 2;
  display: grid;
  gap: 6px;
  margin-top: 8px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.preview-caption strong {
  color: #fff;
  font-size: 1.05rem;
}

.preview-caption span {
  color: var(--muted);
  line-height: 1.45;
}

.preview-caption em {
  color: var(--ice);
  font-size: 0.84rem;
  font-style: normal;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.work-preview:hover .preview-shot:nth-child(1) {
  transform: translate3d(0, -4px, 0) scale(1.015);
}

section:not(.hero) {
  padding: clamp(64px, 9vw, 112px) clamp(20px, 6vw, 86px);
}

.split,
.contact {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(310px, 0.95fr);
  gap: clamp(36px, 7vw, 90px);
  align-items: start;
}

.plain-copy {
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.8;
}

.plain-copy p:last-child {
  margin-bottom: 0;
}

.section-title {
  max-width: 860px;
  margin-bottom: 42px;
}

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

.work-item {
  min-height: 420px;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
}

.work-row {
  grid-column: 1 / -1;
  min-height: auto;
  display: grid;
  grid-template-columns: minmax(220px, 0.38fr) minmax(0, 0.62fr);
  column-gap: clamp(24px, 5vw, 70px);
  align-items: center;
}

.work-row .work-meta {
  grid-column: 1;
  margin: 0;
  align-self: start;
  flex-direction: column;
  align-items: flex-start;
}

.work-row h3,
.work-row p {
  grid-column: 2;
}

.work-row p {
  margin-bottom: 0;
}

.work-item.feature {
  grid-column: 1 / -1;
  min-height: auto;
  display: grid;
  grid-template-columns: minmax(0, 1.16fr) minmax(300px, 0.84fr);
  gap: 28px;
  align-items: center;
  background:
    linear-gradient(180deg, rgba(17,16,24,0.12), rgba(17,16,24,0.82)),
    radial-gradient(circle at 40% 10%, rgba(169,213,255,0.28), transparent 24rem),
    linear-gradient(145deg, rgba(127,29,29,0.54), rgba(71,119,166,0.34));
  box-shadow: var(--shadow);
}

.work-item.feature .work-shot {
  grid-row: 1 / span 3;
}

.work-meta {
  justify-content: space-between;
  gap: 16px;
  margin: 20px 0 28px;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.work-shot {
  display: block;
  overflow: hidden;
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.055);
  text-decoration: none;
}

.work-shot img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: top center;
  filter: saturate(0.92) contrast(1.03);
  transform: scale(1.01);
  transition: transform 420ms ease, filter 420ms ease;
}

.work-shot:hover img {
  filter: saturate(1.04) contrast(1.04);
  transform: scale(1.045);
}

.work-diagram {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
}

.work-diagram span {
  min-height: 84px;
  display: grid;
  place-items: center;
  padding: 14px;
  color: var(--ink);
  background: linear-gradient(145deg, rgba(127, 29, 29, 0.38), rgba(71, 119, 166, 0.28));
  font-weight: 850;
  text-align: center;
}

.reveal {
  opacity: 0;
  filter: blur(8px);
  transform: translate3d(0, 30px, 0);
  transition:
    opacity 680ms ease,
    filter 680ms ease,
    transform 680ms cubic-bezier(0.2, 0.8, 0.2, 1);
  transition-delay: var(--reveal-delay, 0ms);
  will-change: opacity, filter, transform;
}

.reveal.is-visible {
  opacity: 1;
  filter: blur(0);
  transform: translate3d(0, 0, 0);
}

.reveal.from-left {
  transform: translate3d(-26px, 22px, 0);
}

.reveal.from-right {
  transform: translate3d(26px, 22px, 0);
}

.reveal.from-left.is-visible,
.reveal.from-right.is-visible {
  transform: translate3d(0, 0, 0);
}

.work-meta a {
  color: var(--ice);
}

.work-item p,
.system-grid p {
  color: var(--muted);
  line-height: 1.65;
}

.store-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.store-links a {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 13px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 850;
  text-decoration: none;
}

.store-links a:hover {
  background: rgba(255, 255, 255, 0.14);
}

.systems {
  background: #f7f3ee;
  color: #17131a;
}

.systems .system-grid p {
  color: #4f4642;
}

.systems .system-grid h3 {
  color: #17131a;
}

.systems .eyebrow {
  color: #4777a6;
}

.system-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  background: rgba(17, 16, 24, 0.18);
  border: 1px solid rgba(17, 16, 24, 0.16);
}

.system-grid div {
  min-height: 285px;
  padding: 24px;
  background: #f7f3ee;
}

.system-grid span {
  display: block;
  margin-bottom: 48px;
  color: #7f1d1d;
  font-weight: 950;
}

.dark {
  background: linear-gradient(145deg, rgba(71, 119, 166, 0.22), rgba(127, 29, 29, 0.16));
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.contact {
  background: #111018;
}

.contact-card {
  display: grid;
  gap: 10px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel-strong);
}

.contact-card a,
.contact-card span {
  min-height: 50px;
  display: flex;
  align-items: center;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--ink);
  text-decoration: none;
  font-weight: 850;
}

.contact-card span {
  color: var(--muted);
}

footer {
  justify-content: space-between;
  gap: 20px;
  padding: 28px clamp(20px, 6vw, 86px);
  color: var(--muted);
  background: #111018;
  border-top: 1px solid var(--line);
}

footer img {
  width: 44px;
  height: 44px;
  border-radius: 10px;
}

@media (max-width: 980px) {
  .hero-grid,
  .split,
  .contact {
    grid-template-columns: 1fr;
  }

  .creator-map {
    max-width: 520px;
  }

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

  .work-item.feature {
    grid-column: auto;
    grid-template-columns: 1fr;
    min-height: auto;
    grid-row: auto;
  }

  .work-item.feature .work-shot {
    grid-row: auto;
  }

  .work-row {
    grid-column: auto;
    grid-template-columns: 1fr;
  }

  .work-row .work-meta,
  .work-row h3,
  .work-row p {
    grid-column: auto;
  }

  .work-row .work-meta {
    margin-bottom: 24px;
  }
}

@media (max-width: 720px) {
  .hero {
    min-height: auto;
    padding: 44px 20px 36px;
  }

  .hero::after {
    background: linear-gradient(180deg, rgba(17, 16, 24, 0.96), rgba(17, 16, 24, 0.74));
  }

  .hero-grid {
    gap: 26px;
  }

  h1 {
    max-width: 11ch;
    font-size: clamp(2.55rem, 11vw, 3.4rem);
  }

  .lede {
    font-size: 1rem;
    line-height: 1.5;
  }

  .hero-actions {
    margin-top: 22px;
  }

  .button {
    min-height: 44px;
    padding: 0 15px;
    font-size: 0.92rem;
  }

  .creator-map {
    display: none;
  }

  .creator-map-title {
    margin-bottom: 12px;
    font-size: clamp(1.25rem, 9vw, 2rem);
  }

  .preview-stack {
    min-height: 178px;
  }

  .preview-shot {
    height: 80%;
  }

  .preview-shot:nth-child(2) {
    transform: translate3d(7%, 16%, 0) scale(0.88);
  }

  .preview-shot:nth-child(3) {
    display: none;
  }

  .preview-caption {
    margin-top: 0;
    padding-top: 12px;
  }

  .preview-caption span {
    display: none;
  }

  section:not(.hero) {
    padding: 52px 20px;
  }

  .section-title {
    margin-bottom: 26px;
  }

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

  .work-item,
  .work-item.feature,
  .system-grid div {
    min-height: auto;
  }

  .work-item {
    padding: 18px;
  }

  .work-meta {
    margin: 16px 0 20px;
    font-size: 0.76rem;
  }

  .store-links {
    margin-top: 16px;
  }

  .systems .section-title h2,
  .work .section-title h2 {
    font-size: clamp(2rem, 10vw, 2.8rem);
  }

  footer {
    align-items: flex-start;
    flex-direction: column;
  }
}

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

  .reveal {
    opacity: 1;
    filter: none;
    transform: none;
  }
}
