/* Landing page - for designers: editorial type, lots of space, the fonts are the colour.
   Accent: magenta, the matte the AI draws letters on. */
:root {
  --lp-accent: #e62ccf;
  --lp-checker-a: #ffffff;
  --lp-checker-b: #ececec;
  --lp-screen: #f2efea;
}
[data-theme="dark"] {
  --lp-checker-a: #2c2c2c;
  --lp-checker-b: #353535;
  --lp-screen: #2a2a2a;
}

/* ---------- Hero ---------- */
.lp-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: 56px;
  align-items: center;
  padding: 72px 0 56px;
}
.lp-eyebrow {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--lp-accent);
  margin-bottom: 18px;
}
.lp-title {
  font-size: clamp(2.6rem, 5vw, 4.2rem);
  line-height: 1.02;
  letter-spacing: -0.035em;
  font-weight: 700;
  margin-bottom: 22px;
}
.lp-lede {
  font-size: 1.1rem;
  line-height: 1.6;
  color: var(--text-secondary);
  max-width: 34em;
  margin-bottom: 28px;
}
.lp-search {
  max-width: 560px;
  margin: 0 0 10px;
}
.lp-hint {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 18px;
}
.lp-links {
  font-size: 14px;
  color: var(--text-muted);
}
.lp-links a {
  color: var(--text-primary);
  font-weight: 500;
  text-decoration: none;
  border-bottom: 1px solid var(--border-color);
}
.lp-links a:hover {
  border-color: var(--text-primary);
}

/* ---------- Process animation ---------- */
.lp-stage {
  margin: 0;
}
.lp-screen {
  position: relative;
  aspect-ratio: 4 / 3;
  background: var(--lp-screen);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  overflow: hidden;
}
.lp-scene {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px;
  opacity: 0;
  transform: scale(0.985);
  transition: opacity 0.5s ease, transform 0.5s ease;
  pointer-events: none;
}
.lp-stage[data-scene="1"] .lp-scene-1,
.lp-stage[data-scene="2"] .lp-scene-2,
.lp-stage[data-scene="3"] .lp-scene-3,
.lp-stage[data-scene="4"] .lp-scene-4,
.lp-stage[data-scene="5"] .lp-scene-5 {
  opacity: 1;
  transform: none;
}

/* 1. Describe */
.lp-prompt {
  width: 100%;
  max-width: 440px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 22px 24px;
}
.lp-prompt-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.lp-prompt-text {
  font-size: 1.25rem;
  line-height: 1.4;
  min-height: 3.6em;
  margin: 10px 0 16px;
  letter-spacing: -0.01em;
}
.lp-caret {
  display: inline-block;
  width: 2px;
  height: 1.1em;
  margin-left: 2px;
  vertical-align: -0.15em;
  background: var(--lp-accent);
  animation: lp-blink 0.9s step-end infinite;
}
@keyframes lp-blink { 50% { opacity: 0; } }
.lp-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.lp-chip {
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
}
.lp-scene-1.is-playing .lp-chip { animation: lp-pop 0.4s ease both; }
.lp-scene-1.is-playing .lp-chip:nth-child(1) { animation-delay: 2.6s; }
.lp-scene-1.is-playing .lp-chip:nth-child(2) { animation-delay: 2.8s; }
.lp-scene-1.is-playing .lp-chip:nth-child(3) { animation-delay: 3.0s; }
.lp-scene-1.is-playing .lp-chip:nth-child(4) { animation-delay: 3.2s; }

/* 2. Generate: the sheet is drawn in under a scan line */
.lp-sheet {
  position: relative;
  height: 100%;
  aspect-ratio: 1;
  border-radius: 8px;
  overflow: hidden;
}
.lp-sheet img {
  width: 100%;
  height: 100%;
  display: block;
  clip-path: inset(0 0 0 0);
}
.lp-scene-2.is-playing .lp-sheet img { animation: lp-draw 2.4s cubic-bezier(.5,.1,.3,1) both; }
@keyframes lp-draw { from { clip-path: inset(0 0 100% 0); } to { clip-path: inset(0 0 0 0); } }
.lp-scanline {
  position: absolute;
  left: 0;
  right: 0;
  height: 3px;
  top: 100%;
  background: #fff;
  box-shadow: 0 0 18px 6px rgba(255, 255, 255, 0.7);
  opacity: 0;
}
.lp-scene-2.is-playing .lp-scanline { animation: lp-scan 2.4s cubic-bezier(.5,.1,.3,1) both; }
@keyframes lp-scan {
  0% { top: 0; opacity: 1; }
  92% { opacity: 1; }
  100% { top: 100%; opacity: 0; }
}

/* 3. Extract: the matte fades away, the clean letter remains */
.lp-extract {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 28px;
  width: 100%;
  height: 100%;
}
.lp-cell {
  position: relative;
  flex: 0 0 auto;
  width: min(52%, 300px);
  aspect-ratio: 1;
  border-radius: 10px;
  overflow: hidden;
}
.lp-checker {
  background-color: var(--lp-checker-a);
  background-image:
    linear-gradient(45deg, var(--lp-checker-b) 25%, transparent 25%),
    linear-gradient(-45deg, var(--lp-checker-b) 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, var(--lp-checker-b) 75%),
    linear-gradient(-45deg, transparent 75%, var(--lp-checker-b) 75%);
  background-size: 18px 18px;
  background-position: 0 0, 0 9px, 9px -9px, -9px 0;
}
.lp-cell img {
  position: absolute;
  inset: 0;
  margin: auto;
}
.lp-cell-matte { width: 100%; height: 100%; }
.lp-cell-clean { max-width: 80%; max-height: 80%; opacity: 0; }
.lp-scene-3.is-playing .lp-cell-matte { animation: lp-fade-out 0.9s ease 1s both; }
.lp-scene-3.is-playing .lp-cell-clean { animation: lp-fade-in 0.9s ease 1s both; }
@keyframes lp-fade-out { to { opacity: 0; } }
@keyframes lp-fade-in { from { opacity: 0; } to { opacity: 1; } }
.lp-checklist {
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: 14px;
  color: var(--text-secondary);
}
.lp-checklist li {
  padding-left: 26px;
  position: relative;
  margin: 10px 0;
}
.lp-checklist li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--lp-accent);
  font-weight: 700;
}
.lp-scene-3.is-playing .lp-checklist li { animation: lp-pop 0.4s ease both; }
.lp-scene-3.is-playing .lp-checklist li:nth-child(1) { animation-delay: 0.3s; }
.lp-scene-3.is-playing .lp-checklist li:nth-child(2) { animation-delay: 1.6s; }
.lp-scene-3.is-playing .lp-checklist li:nth-child(3) { animation-delay: 2.2s; }

/* 4. Refine: editor guides and moving sliders */
.lp-editor {
  display: flex;
  align-items: center;
  gap: 28px;
  width: 100%;
  justify-content: center;
}
.lp-glyph-box {
  position: relative;
  flex: 0 0 auto;
  width: min(50%, 280px);
  aspect-ratio: 1;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 14%;
}
.lp-glyph-box img {
  /* sits exactly on the baseline guide (bottom: 14%) once the nudge settles */
  position: absolute;
  left: 50%;
  bottom: 14%;
  max-width: 64%;
  max-height: 70%;
  transform: translateX(-50%);
}
.lp-scene-4.is-playing .lp-glyph-box img { animation: lp-nudge 3s ease-in-out both; }
@keyframes lp-nudge {
  0%, 20% { transform: translate(-50%, -14px); }
  55%, 100% { transform: translate(-50%, 0); }
}
.lp-guide { position: absolute; opacity: 0; }
.lp-guide-cap, .lp-guide-base { left: 0; right: 0; height: 0; }
.lp-guide-cap { top: 13%; border-top: 1px dashed #e67e22; }
.lp-guide-base { bottom: 14%; border-top: 2px solid #3498db; }
.lp-guide-left, .lp-guide-right { top: 0; bottom: 0; width: 0; }
.lp-guide-left { left: 14%; border-left: 2px solid #27ae60; }
.lp-guide-right { right: 12%; border-left: 2px solid #8e44ad; }
.lp-scene-4.is-playing .lp-guide { animation: lp-fade-in 0.5s ease both; }
.lp-scene-4.is-playing .lp-guide-base { animation-delay: 0.1s; }
.lp-scene-4.is-playing .lp-guide-cap { animation-delay: 0.3s; }
.lp-scene-4.is-playing .lp-guide-left { animation-delay: 0.5s; }
.lp-scene-4.is-playing .lp-guide-right { animation-delay: 0.7s; }
.lp-controls { display: flex; flex-direction: column; gap: 16px; min-width: 150px; }
.lp-control { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--text-secondary); }
.lp-track {
  position: relative;
  height: 4px;
  border-radius: 2px;
  background: var(--border-color);
}
.lp-knob {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 14px;
  height: 14px;
  margin: -7px 0 0 -7px;
  border-radius: 50%;
  background: var(--text-primary);
}
.lp-scene-4.is-playing .lp-knob-a { animation: lp-slide-a 3s ease-in-out both; }
.lp-scene-4.is-playing .lp-knob-b { animation: lp-slide-b 3s ease-in-out 0.4s both; }
.lp-scene-4.is-playing .lp-knob-c { animation: lp-slide-c 3s ease-in-out 0.8s both; }
@keyframes lp-slide-a { 0%, 20% { left: 30%; } 55%, 100% { left: 52%; } }
@keyframes lp-slide-b { 0% { left: 50%; } 50% { left: 68%; } 100% { left: 60%; } }
@keyframes lp-slide-c { 0% { left: 50%; } 60%, 100% { left: 38%; } }

/* 5. Export: the finished font sets a word */
.lp-export {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 26px;
  width: 100%;
}
.lp-word {
  max-width: 92%;
  max-height: 46%;
}
.lp-scene-5.is-playing .lp-word { animation: lp-wipe 1.2s cubic-bezier(.4,0,.2,1) both; }
@keyframes lp-wipe { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
.lp-files { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.lp-file {
  font-size: 13px;
  font-weight: 600;
  padding: 7px 14px;
  border-radius: 8px;
  background: var(--text-primary);
  color: var(--bg-primary);
}
.lp-file-alt {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  font-weight: 500;
}
.lp-scene-5.is-playing .lp-file { animation: lp-pop 0.4s ease both; }
.lp-scene-5.is-playing .lp-file:nth-child(1) { animation-delay: 1.1s; }
.lp-scene-5.is-playing .lp-file:nth-child(2) { animation-delay: 1.25s; }
.lp-scene-5.is-playing .lp-file:nth-child(3) { animation-delay: 1.4s; }
.lp-scene-5.is-playing .lp-file:nth-child(4) { animation-delay: 1.7s; }

@keyframes lp-pop {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}

/* Step bar */
.lp-steps {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
  margin-top: 14px;
}
.lp-step {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 4px 0;
  background: none;
  border: none;
  border-top: 2px solid var(--border-color);
  color: var(--text-muted);
  font: inherit;
  font-size: 13px;
  cursor: pointer;
  text-align: left;
}
.lp-step-num {
  font-size: 11px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.lp-step.is-active {
  color: var(--text-primary);
  border-top-color: var(--lp-accent);
}
.lp-step:hover { color: var(--text-primary); }
.lp-step-caption {
  margin-top: 10px;
  font-size: 14px;
  color: var(--text-secondary);
  min-height: 1.6em;
}

/* ---------- Showcase marquee ---------- */
.lp-showcase {
  padding: 40px 0 24px;
  border-top: 1px solid var(--border-color);
}
.lp-showcase-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 22px;
}
.lp-showcase h2 { font-size: 1.1rem; letter-spacing: -0.01em; }
.lp-more {
  font-size: 14px;
  color: var(--text-primary);
  text-decoration: none;
  font-weight: 500;
}
.lp-marquee {
  display: block;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
}
.lp-marquee-track {
  display: flex;
  align-items: center;
  gap: 64px;
  width: max-content;
  animation: lp-marquee 135s linear infinite; /* ~7.5s per image; scale with the image count */
}
.lp-marquee:hover .lp-marquee-track { animation-play-state: paused; }
.lp-marquee img { height: 72px; width: auto; }
[data-theme="dark"] .lp-marquee img.lp-vector { filter: invert(1); }
@keyframes lp-marquee { to { transform: translateX(-50%); } }

/* ---------- Sections ---------- */
.lp-section {
  padding: 72px 0 24px;
}
.lp-section h2 {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  letter-spacing: -0.03em;
  margin-bottom: 10px;
}
.lp-section-sub {
  color: var(--text-secondary);
  margin-bottom: 32px;
}
.lp-how {
  list-style: none;
  padding: 0;
  margin: 32px 0 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
}
.lp-how span {
  font-size: 13px;
  font-weight: 700;
  color: var(--lp-accent);
  font-variant-numeric: tabular-nums;
}
.lp-how h3 { font-size: 1.05rem; margin: 6px 0 8px; }
.lp-how p { font-size: 14px; color: var(--text-secondary); line-height: 1.6; }
.lp-types {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-top: 28px;
}
.lp-type {
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 24px 26px;
}
.lp-type h3 { font-size: 1.1rem; margin-bottom: 10px; }
.lp-type p { font-size: 14px; color: var(--text-secondary); line-height: 1.65; margin-bottom: 10px; }
.lp-type-note { color: var(--text-muted) !important; margin-bottom: 0 !important; }

/* ---------- Responsive & motion ---------- */
@media (max-width: 980px) {
  .lp-hero { grid-template-columns: 1fr; gap: 40px; padding-top: 40px; }
  .lp-how { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
  .lp-how, .lp-types { grid-template-columns: 1fr; }
  .lp-step { font-size: 0; gap: 0; justify-content: center; }
  .lp-step-num { font-size: 12px; }
  .lp-extract, .lp-editor { gap: 16px; }
  .lp-checklist { font-size: 12px; }
  .lp-marquee img { height: 52px; }
}
@media (prefers-reduced-motion: reduce) {
  .lp-scene, .lp-scene * { animation: none !important; transition: none !important; }
  .lp-cell-matte { opacity: 0; }
  .lp-cell-clean { opacity: 1; }
  .lp-marquee-track { animation: none; flex-wrap: wrap; width: auto; }
}
