:root {
  color-scheme: light;
  --ink: #171819;
  --muted: #5e656b;
  --paper: #f7f4f5;
  --panel: #ffffff;
  --line: rgba(23, 24, 25, 0.12);
  --graphite: #101214;
  --accent: #ff2f8a;
  --accent-soft: #ff79b6;
  --secondary: #34e6d3;
  --warm-gray: #d6d1c7;
  --shadow: 0 26px 70px rgba(16, 18, 20, 0.16);
  --radius: 8px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
}

body::selection {
  color: #fff;
  background: var(--accent);
}

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

button {
  font: inherit;
  cursor: pointer;
}

.scroll-meter {
  position: fixed;
  inset: 0 auto auto 0;
  z-index: 60;
  width: 0;
  height: 3px;
  background: linear-gradient(90deg, #7d0d45, var(--accent), var(--accent-soft));
  transform-origin: left;
}

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

.hero {
  position: relative;
  min-height: auto;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(260px, 0.82fr) minmax(420px, 1.18fr);
  gap: clamp(28px, 5vw, 72px);
  align-items: center;
  padding: clamp(28px, 4vw, 52px) clamp(20px, 5vw, 72px) clamp(34px, 5vw, 60px);
  color: #fff;
  background: #090a0b;
  isolation: isolate;
}

.hero::before,
.hero-shade {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
}

.hero::before {
  content: "";
  background:
    linear-gradient(135deg, rgba(255, 47, 138, 0.08), transparent 38%),
    linear-gradient(rgba(255, 47, 138, 0.13) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 47, 138, 0.13) 1px, transparent 1px),
    linear-gradient(135deg, #070809 0%, #171b1d 48%, #090a0b 100%);
  background-size: auto, 68px 68px, 68px 68px, auto;
}

.hero-shade {
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(8, 9, 10, 0.9), rgba(8, 9, 10, 0.52) 46%, rgba(8, 9, 10, 0.18)),
    linear-gradient(0deg, rgba(8, 9, 10, 0.76), rgba(8, 9, 10, 0.06) 58%);
}

.hero-content {
  width: 100%;
  max-width: 720px;
}

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

h1 {
  max-width: 880px;
  margin-bottom: 18px;
  font-size: clamp(3.15rem, 8vw, 7.3rem);
  line-height: 0.92;
  letter-spacing: 0;
}

h1 span {
  display: block;
}

.hero-byline {
  margin: 0;
  color: rgba(255, 255, 255, 0.88);
  font-size: clamp(1.15rem, 2.2vw, 1.65rem);
  line-height: 1.4;
}

.section-kicker {
  margin: 0 0 12px;
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 780;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.showcase-workbench {
  position: relative;
  width: min(88%, 560px);
  justify-self: end;
  margin-inline: auto;
  overflow: visible;
}

.hero-visual-note {
  display: grid;
  min-height: clamp(360px, 42vw, 640px);
  align-items: end;
  padding: clamp(22px, 4vw, 42px);
  border: 0;
  border-radius: 0;
  background:
    linear-gradient(135deg, rgba(255, 47, 138, 0.16), transparent 34%),
    linear-gradient(315deg, rgba(52, 230, 211, 0.12), transparent 38%),
    linear-gradient(rgba(255, 47, 138, 0.12) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 47, 138, 0.12) 1px, transparent 1px),
    #101214;
  background-size: auto, auto, 46px 46px, 46px 46px, auto;
  box-shadow: none;
}

.hero-photo {
  min-height: 0;
  padding: 0;
  overflow: hidden;
  aspect-ratio: 4 / 5;
}

.hero-photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

[data-template-field] {
  color: inherit;
}

.section {
  width: min(1160px, calc(100% - 32px));
  margin-inline: auto;
  padding: clamp(72px, 9vw, 118px) 0;
}

.intro-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(360px, 1.1fr);
  gap: clamp(28px, 5vw, 76px);
  align-items: center;
}

.section-copy h2 {
  margin-bottom: 18px;
  font-size: clamp(2rem, 4vw, 4.55rem);
  line-height: 0.98;
  letter-spacing: 0;
}

.balanced-heading span {
  display: block;
}

.section-copy p:not(.section-kicker) {
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.78;
  overflow-wrap: break-word;
}

.materials-panel {
  padding: clamp(20px, 3vw, 32px);
  border: 1px solid var(--line);
  border-radius: 0;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.materials-panel p {
  margin: 0 0 18px;
  color: var(--ink);
  font-size: clamp(1.05rem, 1.8vw, 1.3rem);
  line-height: 1.5;
}

.materials-panel ul {
  display: grid;
  gap: 10px;
  margin: 0;
  padding-left: 1.2rem;
  color: var(--muted);
  font-size: clamp(0.98rem, 1.5vw, 1.1rem);
  line-height: 1.55;
}

.code-section {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(22px, 3vw, 36px);
  align-items: start;
}

.code-section .section-copy {
  max-width: 100%;
}

.code-section .section-copy h2 {
  margin-bottom: 0;
}

.code-window {
  width: 100%;
  min-height: 420px;
  max-height: 720px;
  overflow: hidden;
  border: 0;
  border-radius: 0;
  background: #151719;
  box-shadow: var(--shadow);
}

.window-bar {
  display: flex;
  gap: 8px;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.09);
}

.window-bar span {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #ff5f57;
}

.window-bar span:nth-child(2) {
  background: #ffbd2e;
}

.window-bar span:nth-child(3) {
  background: #28c840;
}

.code-window-bar {
  align-items: center;
  justify-content: space-between;
  min-height: 58px;
  gap: 18px;
}

.window-dots {
  display: flex;
  flex: 0 0 auto;
  gap: 8px;
}

.code-window-bar p {
  min-width: 0;
  margin: 0;
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.9rem;
  font-weight: 760;
  line-height: 1.2;
}

.code-controls {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 10px;
}

.code-controls button {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid rgba(255, 47, 138, 0.68);
  border-radius: 0;
  color: #fff;
  background: rgba(255, 47, 138, 0.14);
  line-height: 1;
  transition: border-color 160ms ease, background 160ms ease;
}

.code-controls button:hover,
.code-controls button:focus-visible {
  border-color: var(--accent-soft);
  background: rgba(255, 47, 138, 0.26);
}

.code-controls button:focus-visible {
  outline: 3px solid rgba(255, 47, 138, 0.72);
  outline-offset: 3px;
}

.window-bar .code-controls span {
  width: auto;
  height: auto;
  min-width: 42px;
  border-radius: 0;
  color: var(--accent-soft);
  background: transparent;
  font-size: 0.8rem;
  font-weight: 760;
  line-height: 1;
  text-align: center;
}

.code-frame {
  position: relative;
}

pre {
  min-height: 364px;
  margin: 0;
  padding: clamp(18px, 3vw, 30px);
  max-height: 654px;
  overflow: auto;
}

.code-slide {
  display: none;
}

.code-slide.is-active {
  display: block;
}

code {
  color: #e6edf1;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: clamp(0.78rem, 1.5vw, 0.94rem);
  line-height: 1.72;
}

code:empty::before {
  content: "";
  display: block;
  min-height: 20em;
  background:
    linear-gradient(#e6edf1, #e6edf1) 0 0.7em / 92% 1px no-repeat,
    linear-gradient(#e6edf1, #e6edf1) 0 2.4em / 78% 1px no-repeat,
    linear-gradient(#e6edf1, #e6edf1) 0 4.1em / 88% 1px no-repeat,
    linear-gradient(#e6edf1, #e6edf1) 0 5.8em / 66% 1px no-repeat,
    linear-gradient(#e6edf1, #e6edf1) 0 7.5em / 82% 1px no-repeat,
    linear-gradient(#e6edf1, #e6edf1) 0 9.2em / 72% 1px no-repeat,
    linear-gradient(#e6edf1, #e6edf1) 0 10.9em / 86% 1px no-repeat,
    linear-gradient(#e6edf1, #e6edf1) 0 12.6em / 58% 1px no-repeat;
  opacity: 0.22;
}

.process-section {
  display: grid;
  gap: clamp(40px, 7vw, 86px);
  width: min(1240px, calc(100% - 32px));
  margin-inline: auto;
  padding: clamp(72px, 9vw, 118px) 0;
}

.process-entry {
  display: grid;
  gap: clamp(18px, 3vw, 28px);
}

.process-copy {
  max-width: 920px;
  margin: 0;
  color: var(--ink);
  font-size: clamp(1.2rem, 2.2vw, 2rem);
  font-weight: 400;
  line-height: 1.5;
}

.process-media {
  display: grid;
  gap: 16px;
}

.media-blank {
  display: grid;
  place-items: center;
  width: 100%;
  aspect-ratio: 16 / 9;
  padding: clamp(18px, 4vw, 42px);
  border: 0;
  border-radius: 0;
  color: rgba(255, 255, 255, 0.78);
  background:
    linear-gradient(135deg, rgba(255, 47, 138, 0.16), transparent 34%),
    linear-gradient(315deg, rgba(52, 230, 211, 0.12), transparent 38%),
    linear-gradient(rgba(255, 255, 255, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.06) 1px, transparent 1px),
    #151719;
  background-size: auto, auto, 40px 40px, 40px 40px, auto;
  box-shadow: none;
  font-size: clamp(1rem, 1.8vw, 1.35rem);
  font-weight: 720;
  line-height: 1.4;
  text-align: center;
}

.process-media img,
.process-media video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  object-fit: contain;
}

.process-media img:not(.diagram-media) {
  background: transparent;
}

.process-media .rotated-photo {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: contain;
}

.diagram-media {
  padding: 0;
  background: transparent;
}

.process-carousel {
  position: relative;
  overflow: hidden;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.carousel-frame {
  position: relative;
  aspect-ratio: 16 / 9;
}

.carousel-frame img,
.carousel-frame video,
.carousel-slide {
  position: absolute;
  inset: 0;
  height: 100%;
  border: 0;
  box-shadow: none;
  object-fit: contain;
  opacity: 0;
  pointer-events: none;
  transition: opacity 160ms ease;
}

.carousel-frame img.is-active,
.carousel-frame video.is-active,
.carousel-slide.is-active {
  opacity: 1;
  pointer-events: auto;
}

.carousel-button {
  position: absolute;
  top: 50%;
  z-index: 2;
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 0;
  color: #fff;
  background: rgba(10, 10, 10, 0.58);
  cursor: pointer;
  font-size: 1.35rem;
  font-weight: 800;
  line-height: 1;
  transform: translateY(-50%);
  transition: background 160ms ease, border-color 160ms ease;
}

.carousel-button:hover,
.carousel-button:focus-visible {
  border-color: #fff;
  background: rgba(10, 10, 10, 0.82);
}

.carousel-button:focus-visible {
  outline: 3px solid rgba(255, 47, 138, 0.72);
  outline-offset: 3px;
}

.carousel-button.previous {
  left: 14px;
}

.carousel-button.next {
  right: 14px;
}

.site-footer {
  display: flex;
  width: min(1160px, calc(100% - 32px));
  min-height: 86px;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-inline: auto;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.9rem;
}

.site-footer p {
  margin: 0;
  font-weight: 760;
}

.site-footer a {
  font-weight: 760;
  transition: color 160ms ease;
}

.site-footer a:hover {
  color: var(--ink);
}

[data-reveal] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 700ms ease, transform 700ms ease;
}

[data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}

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

  .hero-content {
    max-width: 820px;
  }

  .showcase-workbench,
  .hero .showcase-workbench {
    width: min(86%, 540px);
    justify-self: center;
  }
}

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

  .intro-grid,
  .code-section {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .hero {
    padding: 28px 10px 44px;
  }

  h1 {
    font-size: clamp(2.6rem, 14vw, 4rem);
  }

  .section {
    width: min(100% - 24px, 1160px);
  }

  .process-section {
    width: min(100% - 24px, 1240px);
  }

  .code-window {
    min-height: 340px;
  }

  .section-copy p:not(.section-kicker) {
    font-size: 0.95rem;
    line-height: 1.68;
  }

  .code-window-bar {
    align-items: stretch;
    flex-wrap: wrap;
  }

  .code-window-bar p {
    order: 3;
    flex-basis: 100%;
  }

  pre {
    min-height: 284px;
  }
}

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