:root {
  color-scheme: dark;
  --bg: #050506;
  --panel: rgba(18, 18, 20, 0.9);
  --panel-2: rgba(24, 27, 34, 0.76);
  --line: rgba(255, 255, 255, 0.12);
  --text: #f6f5f1;
  --muted: rgba(246, 245, 241, 0.62);
  --accent: #ffb000;
  --blue: #1594ff;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 50% 26%, rgba(255, 176, 0, 0.1), transparent 22%),
    radial-gradient(circle at 78% 14%, rgba(21, 148, 255, 0.12), transparent 28%),
    linear-gradient(rgba(255, 255, 255, 0.022) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.018) 1px, transparent 1px),
    var(--bg);
  background-size: auto, auto, 120px 120px, 120px 120px, auto;
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

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

button,
select,
textarea {
  font: inherit;
}

.builder-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 18px;
  min-height: 70px;
  padding: 12px 24px;
  border-bottom: 1px solid var(--line);
  background: rgba(5, 5, 6, 0.82);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
  font-weight: 800;
}

.brand small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.brand-mark {
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  border-radius: 11px;
  background: url("/assets/favicon-ai.svg") center / cover no-repeat;
  box-shadow: 0 0 28px rgba(255, 176, 0, 0.22);
}

.builder-header nav {
  display: flex;
  gap: 22px;
  color: rgba(246, 245, 241, 0.72);
  font-size: 14px;
}

.builder-header nav a:hover {
  color: var(--accent);
}

.header-cta,
.primary,
.billing-card a,
.export-bar a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  border: 1px solid #f4f0e7;
  background: #f4f0e7;
  color: #08090b;
  padding: 0 18px;
  font-weight: 850;
}

.billing-card .secondary-link {
  margin-top: 10px;
  width: 100%;
  border-color: rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.045);
  color: var(--text);
}

.header-cta {
  justify-self: end;
}

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

.builder-hero {
  display: grid;
  grid-template-columns: minmax(0, 760px) minmax(300px, 360px);
  gap: 56px;
  align-items: center;
  justify-content: center;
  padding: 118px 0 30px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  width: fit-content;
  min-height: 36px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.035);
  padding: 0 14px;
  color: #d7def1;
  font-size: 13px;
}

.eyebrow i {
  width: 9px;
  height: 9px;
  background: var(--accent);
  box-shadow: 0 0 18px rgba(255, 176, 0, 0.55);
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  max-width: 760px;
  margin-top: 20px;
  font-size: clamp(40px, 4.1vw, 62px);
  line-height: 1.03;
  letter-spacing: 0;
}

.hero-copy p {
  max-width: 700px;
  margin-top: 18px;
  color: #c2cbe0;
  font-size: 17px;
  line-height: 1.58;
}

.billing-card,
.assistant-panel,
.preview-panel {
  border: 1px solid var(--line);
  background:
    radial-gradient(circle at 100% 0%, rgba(255, 176, 0, 0.1), transparent 32%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.015)),
    var(--panel);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.36);
}

.billing-card {
  padding: 22px;
}

.billing-card strong {
  display: block;
  font-size: 18px;
}

.billing-card p {
  margin: 12px 0 18px;
  color: var(--muted);
  line-height: 1.55;
}

.builder-workspace {
  display: grid;
  grid-template-columns: 420px minmax(0, 1fr);
  gap: 18px;
  padding: 26px 0 72px;
}

.builder-portfolio {
  width: 100%;
  padding: 28px 0 42px;
}

.builder-section-head {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  align-items: start;
  width: 100%;
  margin: 0 auto 24px;
}

.builder-section-head > div {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.65fr);
  gap: clamp(28px, 5vw, 72px);
  align-items: end;
}

.builder-section-head h2 {
  max-width: 760px;
  font-size: clamp(28px, 2.7vw, 42px);
  line-height: 1.08;
  letter-spacing: 0;
}

.builder-section-head p {
  max-width: 430px;
  margin: 0;
  color: #c2cbe0;
  font-size: 15px;
  line-height: 1.65;
}

.builder-project-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  align-items: stretch;
  width: 100%;
  margin: 0 auto;
}

.builder-project-card {
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-width: 0;
  min-height: 0;
  border: 1px solid rgba(255, 255, 255, 0.13);
  background:
    radial-gradient(circle at 70% 0%, rgba(255, 176, 0, 0.1), transparent 32%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.014)),
    rgba(18, 18, 20, 0.86);
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.builder-project-card:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 176, 0, 0.5);
  box-shadow: 0 26px 70px rgba(0, 0, 0, 0.38), 0 0 34px rgba(255, 176, 0, 0.08);
}

.builder-project-card img {
  display: block;
  flex: 0 0 auto;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  object-position: center top;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  background: #08090b;
}

.builder-project-card span,
.builder-project-card h3,
.builder-project-card p {
  margin-inline: 18px;
}

.builder-project-card span {
  display: inline-flex;
  align-self: flex-start;
  align-items: center;
  min-height: 30px;
  margin-top: 18px;
  border: 1px solid rgba(255, 176, 0, 0.46);
  background: rgba(255, 176, 0, 0.08);
  padding: 0 10px;
  color: #ff4fb3;
  font-size: 12px;
  font-weight: 900;
}

.builder-project-card h3 {
  margin-top: 14px;
  font-size: 22px;
  line-height: 1.12;
}

.builder-project-card p {
  margin-top: 12px;
  margin-bottom: 18px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.55;
}

.assistant-panel {
  display: grid;
  gap: 18px;
  align-content: start;
  padding: 20px;
}

.panel-head h2 {
  margin-top: 16px;
  font-size: 28px;
  line-height: 1.08;
}

.ai-connection {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  margin-top: 10px;
  color: #c8d2e8;
  font-size: 12px;
  font-weight: 750;
}

.ai-connection i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #5ee7a8;
  box-shadow: 0 0 12px rgba(94, 231, 168, 0.7);
}

label {
  display: grid;
  gap: 8px;
  color: rgba(246, 245, 241, 0.78);
  font-size: 13px;
  font-weight: 750;
}

textarea,
select {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 0;
  background: rgba(9, 10, 13, 0.86);
  color: var(--text);
  padding: 13px 14px;
  outline: none;
}

textarea:focus,
select:focus {
  border-color: rgba(255, 176, 0, 0.58);
  box-shadow: 0 0 0 3px rgba(255, 176, 0, 0.08);
}

.field-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.lock-note {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.builder-submit-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 14px;
}

.builder-submit-row .primary {
  min-width: 156px;
  cursor: pointer;
}

.builder-submit-row .primary:disabled {
  cursor: wait;
  opacity: 0.68;
}

.builder-status {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.builder-status[data-state="loading"] {
  color: #ffe0a0;
}

.builder-status[data-state="success"] {
  color: #8bf0bd;
}

.builder-status[data-state="error"] {
  color: #ff9c9c;
}

.preview-panel {
  display: grid;
  grid-template-rows: auto minmax(460px, 1fr) auto;
  min-height: 640px;
  overflow: hidden;
}

.tabs {
  display: flex;
  gap: 8px;
  padding: 12px;
  border-bottom: 1px solid var(--line);
}

.tabs button {
  min-height: 36px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.035);
  color: var(--muted);
  padding: 0 14px;
  font-weight: 800;
}

.tabs button.active {
  border-color: rgba(255, 176, 0, 0.48);
  background: rgba(255, 176, 0, 0.11);
  color: var(--text);
}

iframe,
pre {
  width: 100%;
  height: 100%;
  min-height: 460px;
  border: 0;
  background: #fff;
}

pre {
  overflow: auto;
  margin: 0;
  padding: 18px;
  background: #08090b;
  color: #dbe6ff;
  font-size: 13px;
  line-height: 1.6;
  white-space: pre-wrap;
}

.export-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 64px;
  padding: 12px 16px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
}

footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 92px;
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  border-top: 1px solid var(--line);
  color: var(--muted);
}

footer a {
  color: var(--text);
  font-weight: 800;
}

.builder-footer-legal {
  display: flex;
  flex: 1 1 100%;
  flex-wrap: wrap;
  gap: 8px 18px;
  align-items: center;
  padding: 14px 0;
  border-top: 1px solid var(--line);
}

.builder-footer-legal > span {
  flex: 1 1 520px;
  color: var(--muted);
  line-height: 1.55;
}

@media (max-width: 1080px) {
  .site-header {
    grid-template-columns: minmax(0, 1fr) auto auto;
    min-height: 66px;
    padding: 10px 20px;
    column-gap: 10px;
    row-gap: 0;
  }

  .site-header .brand {
    grid-column: 1;
    grid-row: 1;
  }

  .site-header .nav-actions {
    grid-column: 2;
    grid-row: 1;
  }

  .site-header .site-menu-toggle {
    grid-column: 3;
    grid-row: 1;
  }

  .builder-header {
    grid-template-columns: 1fr auto;
  }

  .builder-header nav {
    display: none;
  }

  .builder-hero,
  .builder-workspace {
    grid-template-columns: 1fr;
    gap: 22px;
  }

  .builder-section-head > div {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .builder-section-head p {
    max-width: 720px;
  }

  .builder-project-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .billing-card {
    max-width: 560px;
  }
}

@media (max-width: 560px) {
  body {
    background-size: auto, auto, 72px 72px, 72px 72px, auto;
  }

  .builder-header {
    min-height: 64px;
    padding: 10px 14px;
  }

  .brand-mark {
    width: 34px;
    height: 34px;
  }

  .brand small {
    display: none;
  }

  .header-cta {
    min-height: 38px;
    padding: 0 12px;
    font-size: 12px;
  }

  main,
  footer {
    width: min(100% - 28px, 1180px);
  }

  .builder-hero {
    padding: 92px 0 18px;
  }

  h1 {
    margin-top: 18px;
    font-size: clamp(32px, 9vw, 42px);
    line-height: 1.06;
  }

  .hero-copy p {
    margin-top: 16px;
    font-size: 15px;
    line-height: 1.55;
  }

  .field-grid {
    grid-template-columns: 1fr;
  }

  .builder-submit-row {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .builder-submit-row .primary {
    width: 100%;
  }

  .builder-portfolio {
    padding: 18px 0 24px;
  }

  .builder-section-head {
    gap: 16px;
    margin-bottom: 16px;
  }

  .builder-section-head h2 {
    font-size: clamp(25px, 7.2vw, 34px);
    line-height: 1.12;
  }

  .builder-section-head p {
    font-size: 15px;
  }

  .builder-project-grid {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding-bottom: 8px;
    scroll-snap-type: x mandatory;
  }

  .builder-project-card {
    flex: 0 0 min(86vw, 330px);
    min-height: 0;
    scroll-snap-align: start;
  }

  .builder-project-card p {
    font-size: 14px;
  }

  .assistant-panel,
  .billing-card {
    padding: 16px;
  }

  .preview-panel {
    min-height: 540px;
    grid-template-rows: auto minmax(360px, 1fr) auto;
  }

  iframe,
  pre {
    min-height: 360px;
  }

  .export-bar,
  footer {
    align-items: flex-start;
    flex-direction: column;
  }
}
