:root {
  color-scheme: light;
  --ink: #17191f;
  --muted: #667085;
  --page: #f6f8fb;
  --surface: #ffffff;
  --surface-soft: #eef4f2;
  --line: #d9e1ea;
  --green: #18806f;
  --green-soft: #d8f2eb;
  --blue: #2359b8;
  --coral: #d9574c;
  --amber: #ca8b17;
  --shadow: 0 22px 70px rgba(25, 31, 44, 0.1);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    linear-gradient(180deg, rgba(24, 128, 111, 0.1), transparent 340px),
    var(--page);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

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

button,
input,
select {
  font: inherit;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 20px;
  width: min(1220px, calc(100% - 40px));
  margin: 0 auto;
  padding: 14px 0;
  background: color-mix(in srgb, var(--page) 88%, transparent);
  backdrop-filter: blur(18px);
}

.brand,
.nav-links,
.header-action,
.metric-row,
.panel-heading,
.segmented,
.toggle-list label,
.primary-action,
.site-footer {
  display: flex;
  align-items: center;
}

.brand {
  min-width: 0;
  gap: 10px;
  font-weight: 850;
}

.brand span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.brand-mark {
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  object-fit: contain;
}

.nav-links {
  gap: 24px;
  color: var(--muted);
  font-size: 15px;
  font-weight: 750;
}

.header-action {
  justify-self: end;
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid var(--ink);
  border-radius: 8px;
  background: var(--surface);
  font-weight: 820;
}

main {
  overflow: hidden;
}

.app-shell,
.workspace,
.deliverables,
.site-footer {
  width: min(1220px, calc(100% - 40px));
  margin: 0 auto;
}

.app-shell {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(390px, 0.75fr);
  gap: 28px;
  align-items: stretch;
  min-height: calc(100vh - 72px);
  padding: 54px 0 64px;
}

.intro-panel {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 620px;
}

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

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

h1 {
  max-width: 780px;
  margin-bottom: 24px;
  font-size: clamp(48px, 7vw, 88px);
  line-height: 0.98;
  letter-spacing: 0;
}

.intro-panel > p {
  max-width: 680px;
  color: #424a55;
  font-size: 20px;
  line-height: 1.75;
}

.metric-row {
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 26px;
}

.metric-row div {
  min-width: 150px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.metric-row strong,
.metric-row span {
  display: block;
}

.metric-row strong {
  margin-bottom: 4px;
  font-size: 26px;
}

.metric-row span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 760;
}

.creator-panel,
.preview-panel,
.script-panel,
.deliverable-grid article {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow);
}

.creator-panel {
  align-self: center;
  padding: 22px;
}

.panel-heading {
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
}

.panel-heading h2,
.section-heading h2 {
  margin-bottom: 0;
  font-size: clamp(26px, 3vw, 42px);
  line-height: 1.05;
  letter-spacing: 0;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  background: var(--green-soft);
  color: var(--green);
  font-size: 12px;
  font-weight: 900;
}

.status-pill.ready {
  background: #e7eefc;
  color: var(--blue);
}

.creator-form {
  display: grid;
  gap: 18px;
}

.field,
.option-group {
  display: grid;
  gap: 8px;
}

.field span,
.option-group > span {
  color: #384252;
  font-size: 13px;
  font-weight: 850;
}

.field input,
.field select {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  padding: 0 13px;
}

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

.segmented {
  gap: 6px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.segmented button {
  flex: 1;
  min-height: 38px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-weight: 800;
}

.segmented .active {
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 8px 20px rgba(25, 31, 44, 0.08);
}

.toggle-list {
  align-items: stretch;
  flex-direction: column;
  gap: 10px;
}

.toggle-list label {
  gap: 10px;
  min-height: 42px;
  color: #313947;
  font-weight: 720;
}

.toggle-list input {
  width: 18px;
  height: 18px;
  accent-color: var(--green);
}

.primary-action {
  justify-content: center;
  min-height: 52px;
  border: 0;
  border-radius: 8px;
  background: var(--ink);
  color: #fff;
  font-weight: 860;
}

.workspace {
  display: grid;
  grid-template-columns: minmax(360px, 0.82fr) minmax(0, 1fr);
  gap: 24px;
  align-items: stretch;
  padding: 20px 0 78px;
}

.preview-panel,
.script-panel {
  padding: 22px;
}

.phone-frame {
  width: min(100%, 360px);
  aspect-ratio: 9 / 16;
  margin: 0 auto;
  border: 10px solid var(--ink);
  border-radius: 38px;
  background: #0f1720;
  padding: 16px;
}

.video-stage {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  border-radius: 26px;
  background:
    linear-gradient(160deg, rgba(24, 128, 111, 0.84), rgba(35, 89, 184, 0.54)),
    linear-gradient(180deg, #fff6e7, #d8f2eb);
}

.caption-card {
  position: absolute;
  top: 22px;
  right: 18px;
  left: 18px;
  padding: 16px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9);
}

.caption-card span {
  display: block;
  margin-bottom: 8px;
  color: var(--green);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.caption-card strong {
  display: block;
  margin-bottom: 8px;
  font-size: 30px;
}

.caption-card p {
  margin-bottom: 0;
  color: #3d4653;
  line-height: 1.45;
}

.avatar-block {
  position: absolute;
  right: 42px;
  bottom: 92px;
  left: 42px;
  height: 45%;
  border-radius: 120px 120px 24px 24px;
  background:
    radial-gradient(circle at 50% 22%, #f4c7a7 0 42px, transparent 43px),
    linear-gradient(180deg, #26344a 0 56%, #111827 56%);
}

.avatar-block span {
  position: absolute;
  top: 28px;
  left: 50%;
  width: 78px;
  height: 34px;
  transform: translateX(-50%);
  border-radius: 999px 999px 12px 12px;
  background: #2b231f;
}

.subtitle {
  position: absolute;
  right: 18px;
  bottom: 20px;
  left: 18px;
  padding: 12px;
  border-radius: 8px;
  background: rgba(23, 25, 31, 0.78);
  color: #fff;
  font-size: 14px;
  font-weight: 760;
  line-height: 1.45;
  text-align: center;
}

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

.script-list li {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.script-list span {
  display: block;
  margin-bottom: 8px;
  color: var(--coral);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.script-list p {
  margin-bottom: 0;
  color: #2f3743;
  font-size: 18px;
  line-height: 1.55;
}

.deliverables {
  padding: 0 0 82px;
}

.section-heading {
  max-width: 780px;
  margin-bottom: 26px;
}

.deliverable-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.deliverable-grid article {
  min-height: 220px;
  padding: 22px;
}

.deliverable-grid span {
  color: var(--amber);
  font-size: 13px;
  font-weight: 900;
}

.deliverable-grid h3 {
  margin: 52px 0 12px;
  font-size: 28px;
}

.deliverable-grid p {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.65;
}

.site-footer {
  justify-content: space-between;
  gap: 20px;
  padding: 24px 0 36px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 760;
}

@media (max-width: 980px) {
  .topbar {
    grid-template-columns: 1fr auto;
  }

  .nav-links {
    display: none;
  }

  .app-shell,
  .workspace,
  .deliverable-grid {
    grid-template-columns: 1fr;
  }

  .app-shell {
    min-height: auto;
    padding-top: 42px;
  }

  .intro-panel {
    min-height: auto;
  }
}

@media (max-width: 620px) {
  .topbar,
  .app-shell,
  .workspace,
  .deliverables,
  .site-footer {
    width: min(100% - 28px, 1220px);
  }

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

  .brand span {
    max-width: 190px;
  }

  .header-action {
    min-height: 38px;
    padding: 0 11px;
    font-size: 14px;
  }

  h1 {
    font-size: clamp(42px, 13vw, 64px);
  }

  .intro-panel > p {
    font-size: 18px;
  }

  .creator-panel,
  .preview-panel,
  .script-panel {
    padding: 18px;
  }

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

  .segmented {
    display: grid;
  }

  .phone-frame {
    border-width: 8px;
    border-radius: 30px;
  }

  .caption-card strong {
    font-size: 26px;
  }

  .site-footer {
    align-items: flex-start;
    flex-direction: column;
  }
}
