/* Landing page showcase: dual-mode form, Edit agent typing demo with
   Original -> Edited pair, visual action detection, multi-language caption
   specimens, and YouTube clip downloader spotlight.
   Follows quiet-precision tokens strictly: UI display weight <= 600, no
   resting card shadows (only the spotlighted edited output uses
   --app-float-shadow), and highlighter yellow (--app-field) reserved for
   active selections, typing cursor, and marks. */

/* --- Dual-mode Hero & Closing Form --- */
.dual-form {
  display: grid;
  gap: 12px;
  max-width: 640px;
}
.dual-form .link-form {
  margin-top: 0;
}
.dual-switch {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 4px;
  width: fit-content;
  max-width: 100%;
  background: var(--app-surface-2);
  border: 1px solid var(--app-border);
  border-radius: var(--app-radius-card);
}
.dual-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 6px 14px;
  border: 1px solid transparent;
  border-radius: var(--app-radius-control);
  background: transparent;
  color: var(--app-ink-muted);
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.25;
  text-decoration: none;
  cursor: pointer;
}
.dual-tab[aria-pressed='true'] {
  background: var(--app-surface);
  color: var(--app-ink);
  border-color: var(--app-ink);
  font-weight: 600;
}
.dual-form .link-form-upload[hidden],
.dual-form .link-form-clip-note[hidden] {
  display: none;
}
.link-form-clip-note {
  grid-column: 1 / -1;
  margin: 4px 0 0;
  font-size: 14px;
  line-height: 1.5;
}
@media (hover: hover) and (pointer: fine) {
  .dual-tab:hover {
    color: var(--app-ink);
  }
}

/* --- Hero Layout (clean top bar + link form above Edit agent showcase) --- */
.hero-showcase {
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
  padding: clamp(28px, 3.6vw, 52px) var(--gutter) clamp(32px, 4vw, 52px);
}
.hero-showcase .hero-copy {
  max-width: 820px;
}
.hero-showcase h1 {
  font-size: clamp(34px, 4.4vw, 58px);
  font-weight: 600;
  line-height: 1.04;
  letter-spacing: -0.032em;
  max-width: 24ch;
  text-wrap: balance;
}
.hero-showcase .lead {
  max-width: 60ch;
  margin-top: 16px;
  font-size: clamp(16px, 1.45vw, 19px);
}
.hero-showcase .dual-form {
  margin-top: 24px;
  max-width: 660px;
}

.reel-figure {
  margin: 0;
  display: grid;
  gap: 10px;
}
.reel-stage {
  position: relative;
}

/* 44x44px video overlay controls (play/pause + sound) over footage */
.video-controls {
  position: absolute;
  right: 10px;
  bottom: 10px;
  z-index: 2;
  display: flex;
  gap: 6px;
}
.video-ctrl {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  /* dobase-allow: DOB-DESIGN-RAW-COLOR Video player overlay border over moving footage */
  border: 1px solid rgb(255 255 255 / 0.24);
  border-radius: var(--app-radius-control);
  /* dobase-allow: DOB-DESIGN-RAW-COLOR Dark translucent video control pill over footage */
  background: rgb(15 15 17 / 0.72);
  /* dobase-allow: DOB-DESIGN-RAW-COLOR White video player icon over dark footage scrim */
  color: #fff;
  cursor: pointer;
}
.video-ctrl svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.video-ctrl .icon-play,
.video-ctrl .icon-pause {
  fill: currentColor;
  stroke: none;
}
.video-ctrl[aria-pressed='false'] .icon-pause,
.video-ctrl[aria-pressed='true'] .icon-play,
.video-ctrl[aria-pressed='false'] .icon-sound,
.video-ctrl[aria-pressed='true'] .icon-muted {
  display: none;
}
@media (hover: hover) and (pointer: fine) {
  .video-ctrl:hover {
    /* dobase-allow: DOB-DESIGN-RAW-COLOR Slightly deeper overlay scrim on pointer hover */
    background: rgb(15 15 17 / 0.9);
  }
}

/* --- Section 3: Transcript Band (alternates on --app-bg below Edit agent) --- */
.demo {
  background: var(--app-bg);
}

/* --- Section 4: Find where the action happened --- */
.action-band {
  padding: clamp(48px, 6vw, 88px) var(--gutter);
  background: var(--app-surface-2);
}
.action-grid {
  display: grid;
  grid-template-columns: minmax(0, 560px) minmax(240px, 310px);
  justify-content: space-between;
  gap: clamp(28px, 4.5vw, 64px);
  align-items: center;
}
.action-copy {
  display: grid;
  gap: 24px;
  min-width: 0;
}
.action-copy .section-head {
  margin-bottom: 0;
}
.action-lead {
  font-size: clamp(17px, 1.5vw, 19px);
  line-height: 1.55;
  color: var(--app-ink);
  max-width: 52ch;
}
.action-source-card {
  display: grid;
  gap: 12px;
  max-width: 520px;
  padding: 14px;
  background: var(--app-surface);
  border: 1px solid var(--app-border);
  border-radius: var(--app-radius-card);
}
.action-source-still {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: var(--app-radius-control);
  /* dobase-allow: DOB-DESIGN-RAW-COLOR Video still backing black */
  background: black;
}
.action-source-still img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.action-source-tag {
  position: absolute;
  right: 8px;
  bottom: 8px;
  padding: 2px 7px;
  border-radius: 3px;
  /* dobase-allow: DOB-DESIGN-RAW-COLOR Media caption pill over source footage */
  background: rgb(15 15 17 / 0.78);
  /* dobase-allow: DOB-DESIGN-RAW-COLOR White text on dark footage pill */
  color: #fff;
  font-size: 11px;
  line-height: 1.3;
}
.action-peak-bar {
  display: grid;
  gap: 8px;
}
.action-peak-track {
  position: relative;
  height: 10px;
  border-radius: 4px;
  background: var(--app-surface-2);
  border: 1px solid var(--app-border);
  overflow: hidden;
}
.action-peak-seg {
  position: absolute;
  top: 0;
  bottom: 0;
  background: var(--app-field);
  border-left: 1px solid var(--app-field-ink);
  border-right: 1px solid var(--app-field-ink);
}
.action-peak-a {
  left: 12%;
  width: 12%;
}
.action-peak-b {
  left: 56%;
  width: 28%;
}
.action-peak-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 4px 12px;
  font-size: 13px;
}
.action-peak-badge {
  display: inline-block;
  padding: 1px 7px;
  border-radius: var(--app-radius-chip);
  background: var(--app-field);
  color: var(--app-field-ink);
  font-weight: 600;
}
.action-next {
  font-size: 15px;
  color: var(--app-ink-muted);
}
.action-next a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin-left: 4px;
  font-weight: 600;
  color: var(--app-ink);
}
.action-stage {
  min-width: 0;
}
.action-stage .frame {
  width: 100%;
  box-shadow: none;
}

/* --- Section 2: Edit the frame by asking (Edit Agent + Before -> After) --- */
.agent-band {
  padding: clamp(40px, 5vw, 72px) var(--gutter);
  background: var(--app-surface-2);
}
.agent-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px 24px;
  margin-bottom: 24px;
}
.agent-head .section-head {
  margin-bottom: 0;
}
.agent-engine-tag {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 4px 10px;
  border: 1px solid var(--app-border);
  border-radius: var(--app-radius-control);
  background: var(--app-surface);
  color: var(--app-ink);
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}

.agent-layout {
  display: grid;
  grid-template-columns: minmax(260px, 305px) minmax(0, 1fr);
  gap: clamp(18px, 2.6vw, 36px);
  align-items: start;
}

/* Real Studio Edit agent card mockup — tight sidebar width beside larger videos */
.agent-chat-card {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  min-height: 430px;
  background: var(--app-surface);
  border: 1px solid var(--app-border);
  border-radius: var(--app-radius-card);
  overflow: hidden;
}
.agent-chat-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--app-border);
  background: var(--app-surface);
}
.agent-chat-title-wrap {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.agent-chat-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--app-field);
  border: 1px solid var(--app-field-ink);
}
.agent-chat-title {
  font-family: var(--app-font-display);
  font-size: 15px;
  font-weight: 600;
  color: var(--app-ink);
}
.agent-chat-head-right {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.agent-chat-status {
  padding: 2px 8px;
  border-radius: var(--app-radius-chip);
  background: var(--app-surface-2);
  color: var(--app-ink-muted);
  font-size: 12px;
  font-weight: 600;
}
.agent-layout[data-agent-phase='typing'] .agent-chat-status,
.agent-layout[data-agent-phase='sending'] .agent-chat-status {
  background: var(--app-field);
  color: var(--app-field-ink);
}
.agent-replay-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 0 10px;
  border: 1px solid var(--app-border);
  border-radius: var(--app-radius-control);
  background: var(--app-surface);
  color: var(--app-ink);
  font: inherit;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
}
@media (hover: hover) and (pointer: fine) {
  .agent-replay-btn:hover {
    border-color: var(--app-ink);
  }
}

.agent-chat-body {
  display: grid;
  align-content: start;
  gap: 10px;
  padding: 12px;
  background: var(--app-bg);
}
.agent-chat-empty[hidden],
.agent-msg[hidden],
.agent-composer-placeholder[hidden] {
  display: none;
}
.agent-chat-empty {
  display: grid;
  gap: 4px;
  padding: 24px 10px;
  text-align: center;
}
.agent-empty-title {
  font-weight: 600;
  font-size: 15px;
  color: var(--app-ink);
}
.agent-empty-body {
  font-size: 13px;
  line-height: 1.5;
}

.agent-msg {
  display: grid;
  gap: 5px;
  padding: 10px 11px;
  border-radius: var(--app-radius-control);
  font-size: 13px;
  line-height: 1.46;
}
.agent-msg-user {
  background: var(--app-surface);
  border: 1px solid var(--app-border);
  color: var(--app-ink);
}
.agent-msg-role {
  font-size: 11px;
  font-weight: 600;
  color: var(--app-ink-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.agent-msg-bot {
  background: var(--app-surface-2);
  border: 1px solid var(--app-border);
  color: var(--app-ink);
}
.agent-msg-badge {
  display: inline-block;
  width: fit-content;
  padding: 2px 7px;
  border-radius: var(--app-radius-chip);
  background: var(--app-field);
  color: var(--app-field-ink);
  font-size: 11px;
  font-weight: 600;
}

/* Bottom chat box matching Studio <dobase-chat> composer */
.agent-chat-composer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 8px;
  padding: 10px 12px;
  border-top: 1px solid var(--app-border);
  background: var(--app-surface);
}
.agent-composer-field {
  min-height: 60px;
  padding: 8px 10px;
  border: 1px solid var(--app-border);
  border-radius: var(--app-radius-control);
  background: var(--app-bg);
  font-size: 13px;
  line-height: 1.44;
  color: var(--app-ink);
}
.agent-layout[data-agent-phase='typing'] .agent-composer-field {
  border-color: var(--app-ink);
}
.agent-composer-text {
  font-weight: 500;
}
.agent-cursor {
  display: inline-block;
  width: 7px;
  height: 1.15em;
  margin: 0 5px 0 0;
  vertical-align: -0.18em;
  border-radius: 2px;
  background: var(--app-field);
  border: 1px solid var(--app-field-ink);
  animation: agent-cursor-blink 0.9s steps(1, end) infinite;
}
.agent-layout[data-agent-phase='typing'] .agent-cursor {
  margin: 0 0 0 2px;
}
@keyframes agent-cursor-blink {
  0%, 55% { opacity: 1; }
  56%, 100% { opacity: 0.18; }
}
.agent-send-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--app-border);
  border-radius: var(--app-radius-control);
  background: var(--app-surface-2);
  color: var(--app-ink);
  cursor: pointer;
}
.agent-layout[data-agent-phase='typing'] .agent-send-btn,
.agent-layout[data-agent-phase='sending'] .agent-send-btn {
  background: var(--app-field);
  color: var(--app-field-ink);
  border-color: var(--app-field-ink);
}
.agent-send-btn svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Right side: Original -> Edited comparison stage (edited output larger) */
.agent-compare-stage {
  display: grid;
  grid-template-columns: minmax(0, 0.86fr) auto minmax(0, 1.14fr);
  gap: clamp(10px, 1.6vw, 18px);
  align-items: center;
  width: 100%;
  max-width: 740px;
  justify-self: start;
  min-width: 0;
}
.agent-col {
  min-width: 0;
}
.agent-col .frame {
  width: 100%;
  box-shadow: none;
}
.agent-col-after .frame {
  box-shadow: var(--app-float-shadow);
}
.agent-col-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.agent-col-tag {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border: 1px solid var(--app-border);
  border-radius: var(--app-radius-chip);
  background: var(--app-surface);
  color: var(--app-ink-muted);
  font-size: 12px;
  font-weight: 600;
}
.agent-layout[data-agent-phase='done'] .agent-col-tag-edited {
  background: var(--app-field);
  color: var(--app-field-ink);
  border-color: var(--app-field-ink);
}
.agent-layout[data-agent-phase='typing'] .agent-col-before .agent-col-tag {
  border-color: var(--app-ink);
  color: var(--app-ink);
}

.agent-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  align-self: center;
}
.agent-arrow-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border: 1px solid var(--app-border);
  border-radius: 50%;
  background: var(--app-surface);
  color: var(--app-ink);
  transition: background 180ms ease, border-color 180ms ease;
}
.agent-layout[data-agent-phase='sending'] .agent-arrow-pill,
.agent-layout[data-agent-phase='done'] .agent-arrow-pill {
  background: var(--app-field);
  color: var(--app-field-ink);
  border-color: var(--app-field-ink);
}
.agent-arrow-pill svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.agent-applying-veil {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  /* dobase-allow: DOB-DESIGN-RAW-COLOR Dark veil over edited frame before the prompt finishes */
  background: rgb(13 16 22 / 0.72);
  backdrop-filter: blur(8px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 240ms ease;
}
.agent-layout[data-agent-phase='typing'] .agent-applying-veil,
.agent-layout[data-agent-phase='sending'] .agent-applying-veil {
  opacity: 1;
}
.agent-applying-chip {
  padding: 6px 12px;
  border-radius: var(--app-radius-chip);
  background: var(--app-surface);
  color: var(--app-ink);
  border: 1px solid var(--app-border);
  font-size: 12px;
  font-weight: 600;
  transition: background 180ms ease, color 180ms ease, border-color 180ms ease;
}
.agent-layout[data-agent-phase='sending'] .agent-applying-chip {
  background: var(--app-field);
  color: var(--app-field-ink);
  border-color: var(--app-field-ink);
}

.agent-stage-cap {
  font-size: 13px;
}
.agent-next {
  margin: 32px 0 0;
  font-size: 16px;
}
.agent-next a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin-left: 6px;
  font-weight: 600;
  color: var(--app-ink);
}

/* --- Section 5: Workflow + Uses + Multi-Language Caption Specimens --- */
.workflow-band {
  background: var(--app-bg);
}
.workflow-band .uses {
  padding-bottom: 0;
}
.languages-strip {
  padding: clamp(56px, 8vw, 96px) var(--gutter) clamp(56px, 9vw, 112px);
}
.lang-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  list-style: none;
  padding: 0;
  margin: 0;
}
.lang-list li {
  min-width: 0;
}
.lang-item {
  display: grid;
  gap: 12px;
  align-content: start;
  height: 100%;
  padding: 18px 20px;
  background: var(--app-surface);
  border: 1px solid var(--app-border);
  border-radius: var(--app-radius-card);
  text-decoration: none;
  color: var(--app-ink);
}
.lang-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}
.lang-name {
  font-family: var(--app-font-display);
  font-size: 17px;
  font-weight: 600;
}
.lang-code {
  font-size: 12px;
}
.lang-specimen {
  display: block;
  font-size: clamp(18px, 1.65vw, 22px);
  font-weight: 500;
  line-height: 1.5;
  overflow-wrap: break-word;
}
.lang-hl {
  background: var(--app-field);
  color: var(--app-field-ink);
  font-weight: 600;
  padding: 0.04em 0.2em;
  border-radius: 3px;
}
.lang-gloss {
  font-size: 13px;
  line-height: 1.4;
}
@media (hover: hover) and (pointer: fine) {
  .lang-item:hover {
    border-color: var(--app-ink);
  }
  .lang-item:hover .lang-name {
    text-decoration: underline;
    text-decoration-thickness: 1px;
  }
}

/* --- Section 6: YouTube Clip Downloader Spotlight --- */
.clipper-band {
  padding: clamp(56px, 8vw, 112px) var(--gutter);
  background: var(--app-surface-2);
}
.clipper-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: clamp(28px, 5vw, 72px);
  align-items: center;
}
.clipper-visual {
  display: grid;
  gap: 12px;
  min-width: 0;
}
.clip-preview-stage {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: var(--app-radius-card);
  border: 1px solid var(--app-border);
  /* dobase-allow: DOB-DESIGN-RAW-COLOR Video still backing black */
  background: black;
}
.clip-preview-stage img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.clip-range-bar {
  display: grid;
  gap: 8px;
  padding: 12px 14px;
  background: var(--app-surface);
  border: 1px solid var(--app-border);
  border-radius: var(--app-radius-card);
}
.clip-range-track {
  position: relative;
  height: 12px;
  border-radius: 4px;
  background: var(--app-surface-2);
  border: 1px solid var(--app-border);
  overflow: hidden;
}
.clip-range-fill {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 34%;
  width: 26%;
  background: var(--app-field);
  border-left: 2px solid var(--app-field-ink);
  border-right: 2px solid var(--app-field-ink);
}
.clip-range-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 4px 12px;
  font-size: 13px;
  font-weight: 600;
}
.clip-range-meta .muted {
  font-weight: 400;
}

.clipper-copy {
  display: grid;
  gap: 16px;
  min-width: 0;
}
.clipper-copy h2 {
  font-size: clamp(26px, 3.4vw, 40px);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.02em;
}
.clipper-lead {
  margin: 0;
  font-size: 17px;
  line-height: 1.55;
  max-width: 52ch;
}
.clipper-form {
  margin-top: 4px;
}
.clipper-tiers {
  margin: 4px 0 0;
  display: grid;
  gap: 0;
  border-top: 1px solid var(--app-border);
}
.clipper-tiers > div {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 4px 16px;
  padding: 10px 0;
  border-bottom: 1px solid var(--app-border);
  font-size: 14px;
}
.clipper-tiers dt {
  font-weight: 600;
  color: var(--app-ink);
}
.clipper-tiers dd {
  margin: 0;
  color: var(--app-ink-muted);
}

/* --- Section 7: Pricing Showcase --- */
.pricing-showcase {
  background: var(--app-bg);
}
.plans-wrap .plans {
  background: var(--app-surface);
  border-left: 1px solid var(--app-border);
  border-right: 1px solid var(--app-border);
  border-radius: var(--app-radius-card);
  overflow: hidden;
}

/* --- Section 8: Closing CTA --- */
.closing-showcase {
  background: var(--app-surface-2);
  border-top: 1px solid var(--app-border);
}

/* --- Motion Preference --- */
@media (prefers-reduced-motion: reduce) {
  .agent-cursor {
    animation: none;
  }
  .agent-arrow-pill,
  .agent-applying-veil,
  .agent-col-after .frame-video {
    transition: none;
  }
}

/* --- Responsive Breakpoints --- */
@media (max-width: 1020px) {
  .agent-layout {
    grid-template-columns: 1fr;
    align-items: start;
  }
  .agent-chat-card {
    min-height: 0;
  }
  .agent-compare-stage {
    max-width: 680px;
    justify-self: center;
  }
}

@media (max-width: 860px) {
  .action-grid {
    grid-template-columns: 1fr;
  }
  .action-stage {
    justify-self: center;
    width: min(76vw, 320px);
  }
  .lang-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .clipper-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  .dual-switch {
    display: grid;
    grid-template-columns: 1fr 1fr;
    width: 100%;
  }
  .dual-tab {
    padding: 6px 8px;
    font-size: 13px;
    text-align: center;
  }
  .agent-compare-stage {
    grid-template-columns: minmax(0, 0.88fr) 24px minmax(0, 1.12fr);
    gap: 8px;
  }
  .agent-arrow-pill {
    width: 24px;
    height: 24px;
  }
  .agent-arrow-pill svg {
    width: 13px;
    height: 13px;
  }
  .agent-col-tag {
    font-size: 11px;
    padding: 2px 6px;
  }
  .agent-compare-stage .video-controls {
    right: 6px;
    bottom: 6px;
    gap: 4px;
  }
  .agent-compare-stage .video-ctrl {
    width: 36px;
    height: 36px;
  }
  .lang-list {
    grid-template-columns: 1fr;
  }
}
