:root {
  --ink: #111214;
  --ink-soft: #303638;
  --muted: #737b7f;
  --canvas: #fbfaf7;
  --canvas-alt: #f1eee6;
  --surface: #fffefa;
  --dark: #111414;
  --dark-2: #1b2020;
  --dark-3: #252b2a;
  --forest: #1f4d3a;
  --forest-deep: #153629;
  --brass: #c5963d;
  --brass-soft: #ead7ad;
  --sky: #6d9ebd;
  --coral: #d4694d;
  --line: #e3ddcf;
  --line-dark: rgba(248, 245, 237, 0.15);
  --on-dark: #f8f5ed;
  --shadow: 0 24px 70px rgba(17, 20, 20, 0.22);
  --soft-shadow: 0 16px 44px rgba(17, 20, 20, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--canvas);
  color: var(--ink);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  margin: 0;
}

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

.site-header {
  align-items: center;
  color: var(--on-dark);
  display: flex;
  height: 78px;
  justify-content: space-between;
  left: 0;
  padding: 0 max(28px, calc((100vw - 1220px) / 2));
  position: fixed;
  right: 0;
  top: 0;
  z-index: 20;
}

.site-header::before {
  background: rgba(17, 20, 20, 0.72);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--line-dark);
  content: "";
  inset: 0;
  position: absolute;
  z-index: -1;
}

.brand,
.nav-links {
  align-items: center;
  display: flex;
}

.brand {
  font-size: 15px;
  font-weight: 800;
  gap: 12px;
}

.brand-mark {
  border-radius: 8px;
  display: block;
  height: 40px;
  width: 40px;
}

.nav-links {
  color: rgba(248, 245, 237, 0.78);
  font-size: 14px;
  font-weight: 700;
  gap: 28px;
}

.nav-links a {
  transition: color 160ms ease;
}

.nav-links a:hover {
  color: var(--on-dark);
}

.nav-cta {
  background: var(--on-dark);
  border-radius: 999px;
  color: var(--dark);
  padding: 12px 18px;
}

.hero {
  background:
    linear-gradient(110deg, rgba(17, 20, 20, 0.98) 0%, rgba(17, 20, 20, 0.94) 50%, rgba(31, 77, 58, 0.72) 100%),
    radial-gradient(circle at 82% 22%, rgba(197, 150, 61, 0.42), transparent 26%);
  color: var(--on-dark);
  display: grid;
  gap: 54px;
  grid-template-columns: minmax(0, 0.95fr) minmax(430px, 0.9fr);
  min-height: 100vh;
  overflow: hidden;
  padding: 150px max(28px, calc((100vw - 1220px) / 2)) 88px;
  position: relative;
}

.hero::after {
  background:
    linear-gradient(rgba(248, 245, 237, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(248, 245, 237, 0.055) 1px, transparent 1px);
  background-size: 72px 72px;
  content: "";
  inset: 0;
  mask-image: linear-gradient(90deg, transparent, black 35%, black 88%, transparent);
  pointer-events: none;
  position: absolute;
}

.hero-copy,
.hero-stage {
  position: relative;
  z-index: 1;
}

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

.hero h1,
.section-title h2,
.game-feature h2,
.contact-band h2 {
  letter-spacing: 0;
  margin: 0;
}

.hero h1 {
  font-size: clamp(54px, 7.2vw, 104px);
  font-weight: 800;
  line-height: 0.89;
  max-width: 860px;
}

.hero p {
  color: rgba(248, 245, 237, 0.72);
  font-size: 20px;
  line-height: 1.58;
  margin: 30px 0 0;
  max-width: 650px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 36px;
}

.button {
  align-items: center;
  border-radius: 999px;
  display: inline-flex;
  font-size: 15px;
  font-weight: 800;
  justify-content: center;
  min-height: 48px;
  padding: 15px 23px;
  transition: background 160ms ease, border-color 160ms ease, color 160ms ease, transform 160ms ease;
}

.button:hover {
  transform: translateY(-2px);
}

.button:active {
  transform: translateY(1px);
}

.button.primary {
  background: var(--brass);
  color: #171412;
}

.button.ghost {
  border: 1px solid rgba(248, 245, 237, 0.26);
  color: var(--on-dark);
}

.button.light {
  background: var(--on-dark);
  color: var(--dark);
  white-space: nowrap;
}

.hero-stage {
  align-self: center;
  min-height: 620px;
}

.screen {
  border: 1px solid var(--line-dark);
  border-radius: 8px;
  box-shadow: var(--shadow);
  overflow: hidden;
  position: absolute;
}

.screen-main {
  background: #f8f5ed;
  color: var(--ink);
  left: 0;
  top: 20px;
  transform: rotate(-2deg);
  width: min(580px, 92%);
}

.screen-bar {
  align-items: center;
  border-bottom: 1px solid #ded8c9;
  display: flex;
  gap: 8px;
  height: 46px;
  padding: 0 16px;
}

.screen-bar span {
  background: #d6cfc0;
  border-radius: 50%;
  height: 10px;
  width: 10px;
}

.screen-bar strong {
  color: var(--ink-soft);
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  margin-left: auto;
  text-transform: uppercase;
}

.screen-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: 118px 1fr 1fr;
  padding: 22px;
}

.panel {
  border-radius: 8px;
  min-height: 126px;
}

.panel-nav {
  background: #eae3d5;
  display: grid;
  gap: 12px;
  padding: 16px;
}

.panel-nav span {
  background: rgba(31, 77, 58, 0.23);
  border-radius: 999px;
  height: 9px;
}

.panel-chart {
  align-items: end;
  background: linear-gradient(135deg, rgba(109, 158, 189, 0.3), rgba(31, 77, 58, 0.14));
  display: flex;
  gap: 10px;
  grid-column: span 2;
  min-height: 180px;
  padding: 18px;
}

.panel-chart i {
  background: var(--forest);
  border-radius: 999px 999px 8px 8px;
  display: block;
  flex: 1;
}

.panel-chart i:nth-child(1) { height: 38%; }
.panel-chart i:nth-child(2) { height: 68%; background: var(--sky); }
.panel-chart i:nth-child(3) { height: 52%; background: var(--brass); }
.panel-chart i:nth-child(4) { height: 84%; }

.panel-feed {
  background: #ffffff;
  border: 1px solid #e6dfd0;
  display: grid;
  gap: 12px;
  grid-column: 2 / 4;
  padding: 18px;
}

.panel-feed span {
  background: #e9e4d8;
  border-radius: 999px;
  height: 12px;
}

.panel-feed span:nth-child(2) {
  width: 78%;
}

.panel-feed span:nth-child(3) {
  width: 52%;
}

.game-screen {
  background: #151918;
  bottom: 30px;
  color: var(--on-dark);
  right: 0;
  transform: rotate(3deg);
  width: 320px;
}

.game-scene {
  background:
    radial-gradient(circle at center, rgba(197, 150, 61, 0.26), transparent 38%),
    linear-gradient(145deg, #234638, #111414 72%);
  height: 260px;
  position: relative;
}

.table-ring {
  border: 1px solid rgba(234, 215, 173, 0.34);
  border-radius: 50%;
  height: 158px;
  left: 50%;
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 220px;
}

.card-fan {
  display: flex;
  gap: 10px;
  left: 50%;
  position: absolute;
  top: 96px;
  transform: translateX(-50%) rotate(-8deg);
}

.card-fan span {
  background: #f8f5ed;
  border-radius: 7px;
  height: 88px;
  width: 56px;
}

.card-fan span:nth-child(2) {
  background: var(--brass-soft);
  transform: translateY(-18px) rotate(5deg);
}

.card-fan span:nth-child(3) {
  transform: translateY(-10px) rotate(9deg);
}

.card-fan span:nth-child(4) {
  background: #d9eadf;
  transform: rotate(14deg);
}

.game-label {
  align-items: center;
  display: flex;
  justify-content: space-between;
  padding: 18px;
}

.game-label strong {
  font-size: 20px;
}

.game-label span,
.studio-note span,
.tag {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.game-label span {
  color: rgba(248, 245, 237, 0.56);
}

.studio-note {
  background: rgba(248, 245, 237, 0.9);
  border: 1px solid rgba(248, 245, 237, 0.7);
  border-radius: 8px;
  bottom: 150px;
  box-shadow: var(--shadow);
  color: var(--ink);
  display: grid;
  gap: 8px;
  left: 42px;
  padding: 18px;
  position: absolute;
  width: 250px;
}

.studio-note span {
  color: var(--forest);
}

.studio-note strong {
  font-size: 18px;
  line-height: 1.18;
}

.selected-work,
.studio-section {
  margin: 0 auto;
  max-width: 1284px;
  padding: 108px 32px;
}

.section-title {
  align-items: end;
  display: grid;
  gap: 36px;
  grid-template-columns: minmax(0, 0.9fr) minmax(330px, 0.62fr);
  margin-bottom: 44px;
}

.section-title h2,
.game-feature h2,
.contact-band h2 {
  font-size: clamp(38px, 4.6vw, 66px);
  font-weight: 800;
  line-height: 0.96;
}

.section-title p,
.game-feature p,
.contact-band p {
  color: var(--muted);
  font-size: 18px;
  line-height: 1.6;
  margin: 0;
}

.work-rail {
  display: grid;
  gap: 18px;
  grid-template-columns: 1.2fr 0.9fr 0.9fr;
}

.work-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--soft-shadow);
  overflow: hidden;
}

.work-media {
  min-height: 260px;
  overflow: hidden;
  position: relative;
}

.work-card.large .work-media {
  min-height: 370px;
}

.app-media {
  background:
    linear-gradient(90deg, rgba(248, 245, 237, 0.94) 0 25%, transparent 25%),
    repeating-linear-gradient(0deg, rgba(17, 20, 20, 0.07) 0 1px, transparent 1px 34px),
    linear-gradient(135deg, rgba(109, 158, 189, 0.38), rgba(31, 77, 58, 0.18));
}

.mini-ui {
  background: var(--surface);
  border: 1px solid rgba(17, 20, 20, 0.1);
  border-radius: 8px;
  bottom: 34px;
  display: grid;
  gap: 12px;
  left: 34px;
  padding: 18px;
  position: absolute;
  right: 34px;
}

.mini-ui span {
  background: #e8e0d1;
  border-radius: 999px;
  height: 12px;
}

.mini-ui span:nth-child(1) {
  background: var(--forest);
  width: 42%;
}

.mini-ui span:nth-child(2) {
  width: 76%;
}

.mini-ui span:nth-child(3) {
  width: 58%;
}

.game-media {
  background:
    radial-gradient(circle at 44% 38%, rgba(234, 215, 173, 0.58), transparent 22%),
    linear-gradient(145deg, #111414 0%, #214538 100%);
}

.playing-cards {
  display: flex;
  gap: 12px;
  left: 50%;
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%) rotate(-9deg);
}

.playing-cards span {
  background: var(--on-dark);
  border-radius: 8px;
  box-shadow: 0 20px 38px rgba(0, 0, 0, 0.26);
  height: 122px;
  width: 78px;
}

.playing-cards span:nth-child(2) {
  background: var(--brass-soft);
  transform: translateY(-20px) rotate(7deg);
}

.playing-cards span:nth-child(3) {
  transform: rotate(12deg);
}

.lab-media {
  background:
    linear-gradient(135deg, rgba(212, 105, 77, 0.28), rgba(197, 150, 61, 0.2)),
    repeating-linear-gradient(90deg, transparent 0 28px, rgba(17, 20, 20, 0.08) 28px 29px);
}

.lab-lines {
  border: 1px solid rgba(17, 20, 20, 0.13);
  border-radius: 8px;
  inset: 34px;
  position: absolute;
}

.lab-lines::before,
.lab-lines::after {
  background: var(--forest);
  border-radius: 999px;
  content: "";
  height: 12px;
  left: 24px;
  position: absolute;
  right: 78px;
  top: 34px;
}

.lab-lines::after {
  background: rgba(17, 20, 20, 0.22);
  right: 34px;
  top: 64px;
}

.work-copy {
  padding: 28px;
}

.tag {
  color: var(--forest);
}

.work-copy h3,
.studio-grid h3,
.feature-stack h3 {
  font-size: 23px;
  line-height: 1.16;
  margin: 18px 0 12px;
}

.work-copy p,
.studio-grid p,
.feature-stack p {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.58;
  margin: 0;
}

.game-feature {
  background: var(--dark);
  color: var(--on-dark);
  display: grid;
  gap: 70px;
  grid-template-columns: minmax(0, 0.8fr) minmax(420px, 1fr);
  padding: 112px max(32px, calc((100vw - 1220px) / 2));
}

.game-feature p,
.feature-stack p {
  color: rgba(248, 245, 237, 0.68);
  margin-top: 24px;
}

.feature-stack {
  display: grid;
  gap: 14px;
}

.feature-stack article {
  background: var(--dark-2);
  border: 1px solid var(--line-dark);
  border-radius: 8px;
  padding: 28px;
}

.feature-stack span {
  color: var(--brass);
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 12px;
  font-weight: 600;
}

.studio-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(4, 1fr);
}

.studio-grid article {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  min-height: 230px;
  padding: 28px;
}

.studio-grid article:nth-child(2),
.studio-grid article:nth-child(4) {
  background: var(--canvas-alt);
}

.contact-band {
  align-items: center;
  background: var(--forest-deep);
  color: var(--on-dark);
  display: flex;
  gap: 44px;
  justify-content: space-between;
  padding: 96px max(32px, calc((100vw - 1220px) / 2));
}

.contact-band p {
  color: rgba(248, 245, 237, 0.74);
  margin-top: 24px;
  max-width: 720px;
}

.site-footer {
  align-items: center;
  background: var(--dark);
  color: rgba(248, 245, 237, 0.66);
  display: flex;
  font-size: 14px;
  justify-content: space-between;
  padding: 30px max(28px, calc((100vw - 1220px) / 2));
}

.site-footer p {
  margin: 0;
}

@media (max-width: 1080px) {
  .hero,
  .section-title,
  .game-feature {
    grid-template-columns: 1fr;
  }

  .hero {
    padding-top: 132px;
  }

  .hero-stage {
    min-height: 560px;
  }

  .work-rail,
  .studio-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .work-card.large {
    grid-column: span 2;
  }
}

@media (max-width: 720px) {
  .site-header {
    height: 70px;
    padding: 0 20px;
  }

  .brand {
    gap: 10px;
  }

  .brand span:last-child {
    max-width: 98px;
  }

  .nav-links {
    gap: 12px;
  }

  .nav-links a:not(.nav-cta) {
    display: none;
  }

  .nav-cta {
    padding: 11px 14px;
  }

  .hero {
    min-height: auto;
    padding: 118px 20px 64px;
  }

  .hero h1 {
    font-size: 48px;
  }

  .hero p {
    font-size: 18px;
  }

  .hero-stage {
    min-height: 500px;
  }

  .screen-main {
    width: 100%;
  }

  .screen-grid {
    grid-template-columns: 1fr 1fr;
    padding: 16px;
  }

  .panel-nav {
    display: none;
  }

  .panel-chart,
  .panel-feed {
    grid-column: 1 / 3;
  }

  .game-screen {
    width: 250px;
  }

  .game-scene {
    height: 200px;
  }

  .studio-note {
    bottom: 108px;
    left: 14px;
    width: 220px;
  }

  .selected-work,
  .studio-section,
  .game-feature,
  .contact-band {
    padding-left: 20px;
    padding-right: 20px;
  }

  .selected-work,
  .studio-section,
  .game-feature {
    padding-bottom: 72px;
    padding-top: 72px;
  }

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

  .work-card.large {
    grid-column: auto;
  }

  .work-card.large .work-media,
  .work-media {
    min-height: 250px;
  }

  .contact-band,
  .site-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .site-footer {
    gap: 12px;
  }
}
