:root {
  --bg: #f4f5f7;
  --panel: rgba(255, 255, 255, 0.72);
  --panel-strong: rgba(255, 255, 255, 0.92);
  --ink: #101114;
  --muted: #646a73;
  --line: rgba(16, 17, 20, 0.12);
  --blue: #1463ff;
  --blue-dark: #084ac7;
  --green: #0f7b5c;
  --orange: #c96c1f;
  --shadow: 0 28px 90px rgba(26, 31, 44, 0.14);
  --radius: 26px;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 15% 10%, rgba(20, 99, 255, 0.16), transparent 28%),
    radial-gradient(circle at 88% 18%, rgba(15, 123, 92, 0.16), transparent 30%),
    radial-gradient(circle at 62% 92%, rgba(201, 108, 31, 0.14), transparent 30%),
    var(--bg);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", sans-serif;
  line-height: 1.45;
  overflow: hidden;
}

button,
a,
input,
textarea {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

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

.app-shell {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  height: 100dvh;
  padding: max(14px, env(safe-area-inset-top)) 18px max(18px, env(safe-area-inset-bottom));
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: min(1180px, 100%);
  margin: 0 auto 16px;
}

.brand,
.tab,
.button,
.icon-button {
  border: 0;
  cursor: pointer;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 46px;
  padding: 7px 12px 7px 7px;
  border-radius: 999px;
  color: var(--ink);
  background: var(--panel-strong);
  box-shadow: 0 10px 30px rgba(16, 17, 20, 0.08);
  font-weight: 900;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  color: #ffffff;
  background: linear-gradient(135deg, var(--ink), #3d4659);
}

.view-tabs {
  display: inline-flex;
  gap: 4px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.54);
  backdrop-filter: blur(24px) saturate(150%);
}

.tab {
  min-height: 38px;
  padding: 8px 13px;
  border-radius: 999px;
  color: var(--muted);
  background: transparent;
  font-size: 0.92rem;
  font-weight: 820;
}

.tab.is-active {
  color: #ffffff;
  background: var(--ink);
}

.view-stage {
  position: relative;
  width: min(1180px, 100%);
  min-height: 0;
  margin: 0 auto;
}

.view {
  position: absolute;
  inset: 0;
  display: none;
  min-height: 0;
  padding: clamp(18px, 3vw, 34px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(30px) saturate(160%);
  overflow: hidden;
}

.view.is-active {
  display: block;
}

.home-layout,
.builder-layout,
.about-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(330px, 0.68fr);
  gap: clamp(18px, 3vw, 34px);
  height: 100%;
  min-height: 0;
  align-items: center;
}

.hero-copy {
  max-width: 720px;
}

.eyebrow,
.card-kicker,
.question-kicker,
.card-label {
  margin: 0 0 10px;
  color: var(--blue);
  font-size: 0.86rem;
  font-weight: 900;
}

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

h1 {
  max-width: 760px;
  margin-bottom: 18px;
  font-size: clamp(3rem, 7.5vw, 6.1rem);
  line-height: 0.94;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 12px;
  font-size: clamp(2rem, 4vw, 3.25rem);
  line-height: 1;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 10px;
  font-size: 1.28rem;
  line-height: 1.16;
}

.hero-copy p:not(.eyebrow),
.view-heading p,
.project-card p,
.process-list span,
.about-layout p,
.contact-card p,
.question-card p {
  color: var(--muted);
  font-size: 1.04rem;
}

.action-row,
.contact-actions,
.brief-actions,
.intake-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.action-row {
  margin-top: 28px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  min-width: 132px;
  padding: 12px 18px;
  border-radius: 999px;
  font-weight: 900;
  transition: transform 150ms ease, background 150ms ease, opacity 150ms ease;
}

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

.button.primary {
  color: #ffffff;
  background: var(--blue);
}

.button.primary:hover {
  background: var(--blue-dark);
}

.button.secondary {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid var(--line);
}

.process-card,
.brief-panel,
.intake-panel,
.contact-card {
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.66);
  box-shadow: 0 18px 52px rgba(16, 17, 20, 0.09);
}

.process-card {
  padding: 22px;
}

.process-list {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.process-list li {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.64);
}

.process-list strong,
.process-list span {
  display: block;
}

.process-list strong {
  margin-bottom: 4px;
}

.view-heading {
  max-width: 820px;
  margin-bottom: 22px;
}

.project-strip {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(255px, 310px);
  gap: 14px;
  height: calc(100% - 168px);
  min-height: 310px;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 3px 4px 14px;
  scroll-snap-type: x mandatory;
}

.project-card {
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 300px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.72);
}

.project-card.featured {
  background: linear-gradient(160deg, rgba(20, 99, 255, 0.14), rgba(255, 255, 255, 0.76));
}

.project-card span {
  margin-bottom: auto;
  color: var(--green);
  font-weight: 900;
}

.builder-layout {
  align-items: stretch;
}

.intake-panel,
.brief-panel {
  display: grid;
  min-height: 0;
  padding: 22px;
}

.intake-panel {
  grid-template-rows: auto auto minmax(0, 1fr) auto;
}

.brief-panel {
  grid-template-rows: auto minmax(0, 1fr) auto;
}

.intake-top,
.brief-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.step-pill {
  flex: 0 0 auto;
  padding: 8px 12px;
  border-radius: 999px;
  color: #ffffff;
  background: var(--ink);
  font-weight: 900;
}

.progress-track {
  height: 8px;
  margin: 12px 0 18px;
  border-radius: 999px;
  background: rgba(16, 17, 20, 0.1);
  overflow: hidden;
}

.progress-track span {
  display: block;
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--blue), var(--green));
  transition: width 180ms ease;
}

.question-card {
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.72);
}

.answer-slot {
  display: grid;
  gap: 10px;
  min-height: 0;
  margin-top: 18px;
  overflow-y: auto;
  padding-right: 2px;
}

.choice-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.choice,
.chip {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.86);
  cursor: pointer;
  text-align: left;
  font-weight: 850;
}

.choice {
  min-height: 72px;
  padding: 14px;
}

.chip {
  min-height: 44px;
  padding: 10px 13px;
}

.choice.is-selected,
.chip.is-selected {
  color: #ffffff;
  background: var(--ink);
  border-color: var(--ink);
}

.field {
  display: grid;
  gap: 8px;
}

.field label {
  color: var(--muted);
  font-weight: 850;
}

.field input,
.field textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 18px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.9);
  outline: none;
}

.field input {
  min-height: 50px;
  padding: 0 14px;
}

.field textarea {
  min-height: 132px;
  resize: vertical;
  padding: 13px 14px;
}

.field input:focus,
.field textarea:focus {
  border-color: rgba(20, 99, 255, 0.56);
  box-shadow: 0 0 0 4px rgba(20, 99, 255, 0.12);
}

.intake-actions {
  justify-content: space-between;
  margin-top: 16px;
}

.brief-header h3 {
  margin-bottom: 0;
}

.icon-button {
  min-height: 36px;
  padding: 8px 12px;
  border-radius: 999px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.82);
  font-size: 0.9rem;
  font-weight: 900;
}

.brief-output {
  margin: 14px 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.76);
  white-space: pre-wrap;
  overflow: auto;
  font: 0.92rem/1.5 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.about-layout {
  align-items: center;
}

.contact-card {
  padding: 22px;
}

.contact-actions {
  margin-top: 22px;
}

.toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 30;
  padding: 12px 16px;
  border-radius: 999px;
  color: #ffffff;
  background: var(--ink);
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition: opacity 160ms ease, transform 160ms ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 900px) {
  body {
    overflow: auto;
  }

  .app-shell {
    height: auto;
    min-height: 100dvh;
  }

  .topbar {
    align-items: stretch;
    flex-direction: column;
  }

  .view-tabs {
    width: 100%;
    overflow-x: auto;
  }

  .tab {
    flex: 1 0 auto;
  }

  .view-stage {
    min-height: 720px;
  }

  .view {
    overflow: auto;
  }

  .home-layout,
  .builder-layout,
  .about-layout {
    grid-template-columns: 1fr;
    height: auto;
    align-items: start;
  }

  .project-strip {
    height: auto;
    min-height: 320px;
  }
}

@media (max-width: 620px) {
  .app-shell {
    padding-left: 10px;
    padding-right: 10px;
  }

  .view {
    padding: 18px;
    border-radius: 22px;
  }

  h1 {
    font-size: clamp(2.75rem, 14vw, 4.2rem);
  }

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

  .intake-top,
  .brief-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .button {
    width: 100%;
  }

  .intake-actions .button {
    width: calc(50% - 5px);
    min-width: 0;
  }
}
