:root {
  color-scheme: dark;
  --ink: #f8f3e8;
  --muted: #b9c5bd;
  --paper: #0e1411;
  --panel: #172019;
  --line: rgba(248, 243, 232, 0.15);
  --orange: #ff6b22;
  --orange-deep: #c43f12;
  --green: #8de0b7;
  --blue: #82a6ff;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(circle at 82% 10%, rgba(130, 166, 255, 0.16), transparent 28rem),
    linear-gradient(135deg, #0e1411 0%, #111813 42%, #1a130f 100%);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

a {
  color: inherit;
}

button,
input {
  font: inherit;
}

.menu-button {
  position: fixed;
  z-index: 20;
  top: 22px;
  left: 22px;
  display: grid;
  gap: 5px;
  width: 48px;
  height: 48px;
  padding: 13px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(14, 20, 17, 0.72);
  backdrop-filter: blur(14px);
  cursor: pointer;
}

.menu-button span {
  display: block;
  width: 100%;
  height: 2px;
  border-radius: 999px;
  background: var(--ink);
  transition: transform 220ms ease, opacity 180ms ease;
}

.menu-open .menu-button span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.menu-open .menu-button span:nth-child(2) {
  opacity: 0;
}

.menu-open .menu-button span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.menu-wash {
  position: fixed;
  z-index: 10;
  top: 22px;
  left: 22px;
  width: 48px;
  height: 48px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--orange), #ffb000);
  transform: scale(0);
  transform-origin: 24px 24px;
  transition: transform 560ms cubic-bezier(.76, 0, .24, 1), border-radius 560ms ease;
}

.menu-open .menu-wash {
  border-radius: 0;
  transform: scale(90);
}

.project-overlay {
  position: fixed;
  inset: 0;
  z-index: 15;
  display: grid;
  place-items: center;
  padding: 28px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 240ms ease 120ms;
}

.menu-open .project-overlay {
  pointer-events: auto;
  opacity: 1;
}

.overlay-panel {
  width: min(760px, 100%);
}

.overlay-link {
  display: block;
  padding: 24px 0;
  border-bottom: 1px solid rgba(14, 20, 17, 0.22);
  color: #170d08;
  text-decoration: none;
}

.overlay-link span {
  display: block;
  font-size: clamp(2rem, 7vw, 5.5rem);
  font-weight: 800;
  letter-spacing: 0;
}

.overlay-link small {
  display: block;
  max-width: 42rem;
  margin-top: 8px;
  color: rgba(23, 13, 8, 0.76);
  font-size: 1rem;
}

main {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
}

.hero {
  min-height: 92vh;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(300px, .95fr);
  gap: 40px;
  align-items: center;
  padding: 96px 0 52px;
}

.hero-copy {
  padding-left: min(8vw, 70px);
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--green);
  font-size: .82rem;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
}

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

h1 {
  max-width: 12ch;
  margin-bottom: 22px;
  font-size: clamp(3.2rem, 9vw, 7.2rem);
  line-height: .9;
  letter-spacing: 0;
}

.lede {
  max-width: 35rem;
  color: var(--muted);
  font-size: clamp(1.1rem, 2vw, 1.35rem);
  line-height: 1.55;
}

.primary-action,
.secondary-action {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 800;
}

.primary-action {
  margin-top: 18px;
  padding: 0 22px;
  background: var(--orange);
  color: #170d08;
}

.secondary-action {
  border: 1px solid var(--line);
  padding: 0 16px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--ink);
  cursor: pointer;
}

.hero-art {
  position: relative;
  min-height: 520px;
  border-left: 1px solid var(--line);
}

.shape-block {
  position: absolute;
  border-radius: 8px;
}

.shape-a {
  width: 290px;
  height: 220px;
  top: 72px;
  right: 18%;
  background: var(--orange);
  transform: rotate(-10deg);
  box-shadow: 0 26px 80px rgba(255, 107, 34, .32);
}

.shape-b {
  width: 190px;
  height: 150px;
  right: 4%;
  bottom: 90px;
  background: var(--green);
  transform: rotate(13deg);
  box-shadow: 0 22px 60px rgba(141, 224, 183, .24);
}

.grid-plane {
  position: absolute;
  inset: 150px 4% 50px 14%;
  border: 1px solid var(--line);
  background-image:
    linear-gradient(rgba(248, 243, 232, .12) 1px, transparent 1px),
    linear-gradient(90deg, rgba(248, 243, 232, .12) 1px, transparent 1px);
  background-size: 34px 34px;
  transform: skewY(-8deg);
}

.projects {
  padding: 32px 0 96px;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  border-top: 1px solid var(--line);
  padding-top: 32px;
}

h2 {
  margin-bottom: 18px;
  font-size: clamp(2rem, 5vw, 4rem);
}

.project-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 24px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.project-card h3 {
  margin-bottom: 8px;
  font-size: 1.55rem;
}

.project-card p {
  max-width: 42rem;
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.55;
}

.tool-shell {
  min-height: 100vh;
  padding: 94px 0 52px;
}

.tool-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 26px;
  padding-left: min(8vw, 70px);
}

.tool-header h1 {
  margin-bottom: 0;
}

.editor-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 20px;
}

.preview-panel,
.controls-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(23, 32, 25, .68);
  backdrop-filter: blur(16px);
}

.preview-panel {
  min-height: 560px;
  padding: 16px;
}

.upload-zone {
  display: flex;
  min-height: 112px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 14px;
  border: 1px dashed rgba(248, 243, 232, .34);
  border-radius: 8px;
  background: rgba(255, 255, 255, .035);
  cursor: pointer;
}

.upload-zone input {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  opacity: 0;
}

.upload-zone span {
  font-weight: 800;
}

.upload-zone small {
  color: var(--muted);
}

canvas {
  display: block;
  width: 100%;
  max-height: 620px;
  aspect-ratio: 3 / 2;
  border-radius: 8px;
  background:
    linear-gradient(45deg, rgba(255, 255, 255, .08) 25%, transparent 25%),
    linear-gradient(-45deg, rgba(255, 255, 255, .08) 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, rgba(255, 255, 255, .08) 75%),
    linear-gradient(-45deg, transparent 75%, rgba(255, 255, 255, .08) 75%);
  background-position: 0 0, 0 12px, 12px -12px, -12px 0;
  background-size: 24px 24px;
}

.controls-panel {
  padding: 18px;
}

.control-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  margin-bottom: 22px;
}

.control-row label {
  font-weight: 800;
}

.control-row output {
  color: var(--green);
  font-variant-numeric: tabular-nums;
}

.control-row input {
  grid-column: 1 / -1;
  width: 100%;
  accent-color: var(--orange);
}

@media (max-width: 820px) {
  main {
    width: min(100% - 28px, 1180px);
  }

  .hero,
  .editor-layout {
    grid-template-columns: 1fr;
  }

  .hero-copy,
  .tool-header {
    padding-left: 0;
  }

  .hero-art {
    min-height: 310px;
    border-left: 0;
    border-top: 1px solid var(--line);
  }

  .project-card,
  .tool-header {
    align-items: stretch;
    flex-direction: column;
  }

  .tool-header h1 {
    font-size: clamp(3rem, 16vw, 5.6rem);
  }
}
