:root {
  color-scheme: dark;
  --ink: #f4f7f5;
  --muted: #aebbb6;
  --soft: #d5ddd9;
  --line: rgba(244, 247, 245, 0.16);
  --bg: #0d1112;
  --bg-2: #141a1b;
  --panel: rgba(18, 24, 25, 0.92);
  --green: #50d890;
  --green-deep: #12362a;
  --coral: #ff8066;
  --blue: #65b8ff;
  --amber: #f3bf4e;
  --violet: #9f8cff;
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

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

button,
input,
textarea {
  font: inherit;
  letter-spacing: 0;
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
  padding: 18px 32px;
  background: rgba(13, 17, 18, 0.82);
  border-bottom: 1px solid rgba(244, 247, 245, 0.1);
  backdrop-filter: blur(14px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  width: max-content;
  font-weight: 720;
}

.brand-mark {
  display: grid;
  grid-template-columns: repeat(2, 8px);
  grid-template-rows: repeat(2, 8px);
  gap: 3px;
}

.brand-mark span {
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: var(--green);
}

.brand-mark span:nth-child(2) {
  background: var(--coral);
}

.brand-mark span:nth-child(3) {
  background: var(--blue);
}

.brand-mark span:nth-child(4) {
  background: var(--amber);
}

.site-nav {
  display: flex;
  gap: 8px;
  justify-content: center;
}

.site-nav a,
.header-action,
.button,
.chip {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius);
  white-space: nowrap;
}

.site-nav a,
.header-action {
  padding: 0 14px;
  color: var(--muted);
  font-size: 0.94rem;
}

.site-nav a:hover,
.header-action:hover {
  color: var(--ink);
  background: rgba(244, 247, 245, 0.08);
}

.header-action {
  justify-self: end;
  border: 1px solid var(--line);
}

.hero {
  position: relative;
  min-height: 86vh;
  display: grid;
  align-items: end;
  overflow: hidden;
  padding: 128px 32px 72px;
  background: #0d1112;
}

.ambient-grid {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: repeat(6, minmax(150px, 1fr));
  grid-auto-rows: 190px;
  gap: 14px;
  padding: 90px 26px 20px;
  opacity: 0.86;
  transform: rotate(-4deg) scale(1.06);
}

.ambient-grid::after {
  content: "";
  position: absolute;
  inset: -2px;
  background: linear-gradient(90deg, rgba(13, 17, 18, 0.92), rgba(13, 17, 18, 0.36), rgba(13, 17, 18, 0.88));
  pointer-events: none;
}

.ambient-tile {
  border-radius: var(--radius);
  border: 1px solid rgba(255, 255, 255, 0.13);
  min-height: 150px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}

.tile-a,
.tile-f {
  background:
    linear-gradient(135deg, rgba(80, 216, 144, 0.9), rgba(18, 54, 42, 0.9)),
    repeating-linear-gradient(45deg, transparent 0 18px, rgba(255, 255, 255, 0.12) 18px 20px);
}

.tile-b,
.tile-h {
  background:
    radial-gradient(circle at 30% 35%, rgba(255, 255, 255, 0.2), transparent 32%),
    linear-gradient(135deg, #21313a, rgba(101, 184, 255, 0.72));
}

.tile-c,
.tile-i {
  background:
    linear-gradient(180deg, rgba(255, 128, 102, 0.92), #5f251d),
    repeating-linear-gradient(0deg, transparent 0 28px, rgba(255, 255, 255, 0.12) 28px 30px);
}

.tile-d,
.tile-j {
  background: linear-gradient(135deg, #392f18, rgba(243, 191, 78, 0.92));
}

.tile-e,
.tile-g {
  background: linear-gradient(135deg, #1f1b36, rgba(159, 140, 255, 0.8));
}

.tile-a,
.tile-d,
.tile-i {
  grid-row: span 2;
}

.tile-f {
  grid-column: span 2;
}

.hero-inner {
  position: relative;
  z-index: 2;
  width: min(780px, 100%);
  padding-bottom: 12px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--green);
  font-size: 0.86rem;
  font-weight: 760;
  text-transform: uppercase;
}

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

h1 {
  margin-bottom: 20px;
  font-size: 5.2rem;
  line-height: 0.96;
  font-weight: 820;
}

h2 {
  margin-bottom: 16px;
  font-size: 2.7rem;
  line-height: 1.06;
  font-weight: 780;
}

h3 {
  margin-bottom: 10px;
  font-size: 1.2rem;
  line-height: 1.18;
}

.hero-copy {
  max-width: 650px;
  color: var(--soft);
  font-size: 1.28rem;
  line-height: 1.5;
}

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

.button {
  border: 1px solid var(--line);
  padding: 0 18px;
  font-weight: 720;
}

.button.primary {
  color: #06100c;
  background: var(--green);
  border-color: var(--green);
}

.button.secondary {
  color: var(--ink);
  background: rgba(244, 247, 245, 0.08);
}

.studio-band,
.formats-band,
.embed-band,
.launch-band {
  padding: 88px 32px;
}

.studio-band {
  background: var(--bg-2);
}

.formats-band {
  background: #f3f1ea;
  color: #18201e;
}

.embed-band {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(360px, 1fr);
  gap: 42px;
  align-items: center;
  background: #121515;
}

.launch-band {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 36px;
  background: #0d1112;
  border-top: 1px solid var(--line);
}

.section-heading,
.studio-shell,
.format-list,
.embed-band,
.launch-band,
.site-footer {
  max-width: 1180px;
  margin: 0 auto;
}

.section-heading {
  margin-bottom: 34px;
}

.section-heading p,
.embed-copy p,
.launch-band p {
  max-width: 720px;
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.62;
}

.formats-band .section-heading p,
.formats-band p {
  color: #4f5a55;
}

.studio-shell {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(13, 17, 18, 0.76);
  overflow: hidden;
}

.control-bar {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 16px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.035);
}

.control-group {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.control-label {
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 700;
  margin-right: 4px;
}

.chip {
  min-width: 86px;
  border: 1px solid var(--line);
  color: var(--muted);
  background: transparent;
  padding: 0 12px;
  cursor: pointer;
}

.chip:hover,
.chip.is-active {
  color: var(--ink);
  border-color: rgba(80, 216, 144, 0.72);
  background: rgba(80, 216, 144, 0.12);
}

.preview-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-auto-rows: 250px;
  gap: 14px;
  padding: 16px;
}

.preview-grid[data-layout-mode="wall"] {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-auto-rows: 330px;
}

.preview-grid[data-layout-mode="wall"] .post-card {
  grid-column: span 1;
  grid-row: span 1;
}

.post-card {
  display: grid;
  grid-template-rows: minmax(120px, 1fr) auto;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #161d1e;
}

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

.post-card.wide {
  grid-column: span 2;
}

.post-media {
  min-height: 120px;
}

.media-1 {
  background:
    linear-gradient(135deg, rgba(9, 17, 14, 0.08), rgba(9, 17, 14, 0.44)),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.12) 0 1px, transparent 1px 54px),
    linear-gradient(135deg, #62d98f, #155f46);
}

.media-2 {
  background:
    radial-gradient(circle at 72% 20%, rgba(255, 255, 255, 0.22), transparent 28%),
    linear-gradient(135deg, #ff8066, #3a1813);
}

.media-3 {
  background:
    linear-gradient(135deg, rgba(9, 17, 14, 0.3), transparent),
    linear-gradient(160deg, #65b8ff, #172735);
}

.media-4 {
  background:
    repeating-linear-gradient(45deg, transparent 0 18px, rgba(255, 255, 255, 0.12) 18px 20px),
    linear-gradient(135deg, #f3bf4e, #4a3511);
}

.post-meta {
  padding: 16px;
}

.source-pill {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  margin-bottom: 10px;
  border-radius: 999px;
  color: #07100c;
  background: var(--green);
  font-size: 0.76rem;
  font-weight: 760;
}

.tone-coral .source-pill {
  background: var(--coral);
}

.tone-blue .source-pill {
  background: var(--blue);
}

.tone-amber .source-pill {
  background: var(--amber);
}

.post-meta strong {
  display: block;
  font-size: 1.02rem;
  line-height: 1.25;
}

.post-meta p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.48;
}

.format-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  border: 1px solid rgba(24, 32, 30, 0.18);
  background: rgba(24, 32, 30, 0.18);
}

.format-list article {
  min-height: 260px;
  padding: 28px;
  background: #f8f6ef;
}

.format-number {
  display: inline-flex;
  margin-bottom: 38px;
  color: #2d6f57;
  font-weight: 820;
}

.code-panel {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #080a0b;
}

.code-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.86rem;
}

pre {
  margin: 0;
  padding: 24px;
  overflow-x: auto;
  color: #d8f7e5;
  font: 0.98rem/1.7 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 28px 32px 42px;
  color: var(--muted);
  border-top: 1px solid var(--line);
}

@media (max-width: 960px) {
  .site-header {
    grid-template-columns: 1fr auto;
  }

  .site-nav {
    display: none;
  }

  h1 {
    font-size: 4rem;
  }

  h2 {
    font-size: 2.15rem;
  }

  .ambient-grid {
    grid-template-columns: repeat(4, minmax(140px, 1fr));
  }

  .control-bar,
  .launch-band {
    align-items: flex-start;
    flex-direction: column;
  }

  .preview-grid,
  .preview-grid[data-layout-mode="wall"] {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .embed-band,
  .format-list {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .site-header {
    padding: 12px 16px;
  }

  .header-action {
    display: none;
  }

  .hero,
  .studio-band,
  .formats-band,
  .embed-band,
  .launch-band {
    padding-left: 18px;
    padding-right: 18px;
  }

  .hero {
    min-height: 82vh;
    padding-top: 112px;
    padding-bottom: 54px;
  }

  h1 {
    font-size: 3rem;
  }

  h2 {
    font-size: 1.78rem;
  }

  .hero-copy {
    font-size: 1.08rem;
  }

  .ambient-grid {
    grid-template-columns: repeat(3, minmax(120px, 1fr));
    grid-auto-rows: 150px;
    opacity: 0.72;
  }

  .studio-shell {
    margin-left: -2px;
    margin-right: -2px;
  }

  .control-group.compact {
    width: 100%;
  }

  .preview-grid,
  .preview-grid[data-layout-mode="wall"] {
    grid-template-columns: 1fr;
    grid-auto-rows: auto;
  }

  .post-card,
  .post-card.large,
  .post-card.wide,
  .preview-grid[data-layout-mode="wall"] .post-card {
    grid-column: auto;
    grid-row: auto;
  }

  .post-media {
    min-height: 210px;
  }

  .site-footer {
    flex-direction: column;
    padding-left: 18px;
    padding-right: 18px;
  }
}
