/* ============================================================
   Tailored AI Videos — page layout
   ============================================================ */

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-body);
}

img, video { max-width: 100%; display: block; }

.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 var(--space-8);
}

.section {
  padding: var(--space-24) 0;
}
.section-alt {
  background: var(--bg-secondary);
}
.section-inverse {
  background: var(--bg-inverse);
  color: var(--text-inverse-primary);
}

.section-head {
  max-width: 640px;
  margin: 0 0 var(--space-12);
}
.section-head.center {
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}
.section-head h2 {
  margin-top: var(--space-3);
}
.section-sub {
  margin-top: var(--space-3);
}

/* ---- Nav ---- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--bg-primary);
  border-bottom: 1px solid var(--border-secondary);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}
.logo {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  color: var(--text-primary);
  text-decoration: none;
}
.logo img.logo-mark { height: 28px; width: auto; }
.logo-sub {
  font-family: var(--font-label);
  font-size: var(--fs-xs);
  font-weight: var(--fw-regular);
  letter-spacing: 0.5px;
  color: var(--text-secondary);
}

.header-actions { display: flex; align-items: center; gap: var(--space-3); }

@media (max-width: 480px) {
  .header-inner {
    height: auto;
    min-height: 64px;
    flex-wrap: wrap;
    row-gap: var(--space-2);
    padding-top: var(--space-3);
    padding-bottom: var(--space-3);
  }
  .logo img.logo-mark { height: 22px; }
  .header-actions .btn-primary { padding: 10px 16px; }
}

/* ---- Hero ---- */
.hero {
  padding: var(--space-20) 0 var(--space-16);
}
.hero-inner {
  display: grid;
  grid-template-columns: 0.46fr 0.54fr;
  gap: var(--space-16);
  align-items: center;
}
.hero h1 {
  margin-top: var(--space-4);
  font-size: var(--h2);
}
.hero-sub {
  margin-top: var(--space-5);
  max-width: 480px;
}
@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; }
}

/* ---- Lead form ---- */
.lead-form {
  margin-top: var(--space-8);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  max-width: 420px;
}
.lead-form .field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3);
}
.lead-form input {
  width: 100%;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-primary);
  font-family: var(--font-body);
  font-size: var(--fs-md);
  background: var(--white);
  color: var(--text-primary);
}
.lead-form input:focus {
  outline: none;
  border-color: var(--border-accent);
}
.form-highlight {
  border-radius: var(--radius-lg);
  animation: form-highlight-pulse 1.4s var(--ease-brand);
}
@keyframes form-highlight-pulse {
  0% { box-shadow: 0 0 0 0 var(--accent-primary-40); }
  30% { box-shadow: 0 0 0 10px var(--accent-primary-20); }
  60% { box-shadow: 0 0 0 4px var(--accent-primary-30); }
  100% { box-shadow: 0 0 0 0 transparent; }
}
.form-submit-row {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  flex-wrap: wrap;
}
.form-submit-row .btn-block { flex: 1; min-width: 160px; }
.form-done {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  font-family: var(--font-label);
  font-size: var(--fs-sm);
  font-weight: var(--fw-medium);
  color: var(--accent-primary-100);
  white-space: nowrap;
  animation: form-done-in var(--dur-fast) var(--ease-brand);
}
@keyframes form-done-in {
  from { opacity: 0; transform: translateX(-4px); }
  to { opacity: 1; transform: translateX(0); }
}
.form-done-check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--bg-accent-secondary);
  font-size: 11px;
}
.form-note {
  margin-top: var(--space-2);
  font-size: var(--fs-xs);
  color: var(--text-secondary);
}

.trust-strip {
  margin-top: var(--space-10);
}
.trust-strip span {
  display: block;
  margin-bottom: var(--space-3);
}
.logo-row {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-6);
  padding: 0;
  margin: 0;
  color: var(--text-secondary);
  font-family: var(--font-label);
  font-size: var(--fs-sm);
}

/* ---- Hero visual ---- */
.hero-visual {
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border-primary);
  box-shadow: var(--shadow-lg);
}
.hero-visual img, .hero-visual video { width: 100%; }

/* ---- Trusted-by logo strip ---- */
.trusted-by {
  border-top: 1px solid var(--border-primary);
  border-bottom: 1px solid var(--border-primary);
  background: var(--bg-primary);
}
.trusted-by-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-10);
  padding-top: var(--space-5);
  padding-bottom: var(--space-5);
  flex-wrap: wrap;
}
.trusted-by-label {
  font-family: var(--font-label);
  font-size: var(--fs-xs);
  letter-spacing: 0.5px;
  text-transform: lowercase;
  color: var(--text-secondary);
}
.trusted-by-logos {
  display: flex;
  align-items: center;
  gap: var(--space-8);
  flex-wrap: wrap;
}
.trusted-by-logos img { height: 22px; width: auto; }
.trusted-by-more {
  font-family: var(--font-label);
  font-size: var(--fs-xs);
  color: var(--text-secondary);
}

/* ---- How it works ---- */
.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-8);
}
.step {
  border-top: 2px solid var(--border-primary);
  padding-top: var(--space-4);
}
.step-num {
  display: inline-block;
  font-family: var(--font-label);
  color: var(--text-accent-primary);
  margin-bottom: var(--space-2);
}
.step h3 { margin: 0 0 var(--space-2); }
.step p { margin: 0; color: var(--text-secondary); }

@media (max-width: 860px) {
  .steps { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .steps { grid-template-columns: 1fr; }
}

/* ---- Generation demo ---- */
.demo-card {
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-lg);
  background: var(--white);
  box-shadow: var(--shadow-md);
  padding: var(--space-10);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-10);
  align-items: center;
}
@media (max-width: 900px) {
  .demo-card { grid-template-columns: 1fr; padding: var(--space-6); }
}

.demo-upload {
  border: 1px dashed var(--border-primary);
  border-radius: var(--radius-md);
  padding: var(--space-6);
  text-align: center;
  background: var(--bg-secondary);
}
.demo-upload img {
  border-radius: var(--radius-sm);
  margin: 0 auto var(--space-4);
  max-height: 180px;
  object-fit: cover;
}
.demo-brief {
  width: 100%;
  margin-top: var(--space-4);
  padding: 12px 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-primary);
  font-family: var(--font-body);
  font-size: var(--fs-md);
  resize: vertical;
  min-height: 72px;
}

.demo-progress {
  text-align: center;
}
.progress-track {
  height: 8px;
  border-radius: var(--radius-pill);
  background: var(--neutral-20);
  overflow: hidden;
  margin: var(--space-6) 0 var(--space-3);
}
.progress-fill {
  height: 100%;
  background: var(--bg-accent-primary);
  border-radius: var(--radius-pill);
  transition: width var(--dur-slow) var(--ease-brand);
}

.demo-result video {
  border-radius: var(--radius-md);
  border: 1px solid var(--border-primary);
  aspect-ratio: 9 / 16;
  object-fit: cover;
  max-height: 420px;
  margin: 0 auto;
}
.demo-result-actions {
  display: flex;
  gap: var(--space-3);
  margin-top: var(--space-4);
  justify-content: center;
}

/* ---- Proof carousel (ported from instantclips.ai) ---- */
.proof-section {
  padding-bottom: var(--space-16);
}
.proof-head {
  max-width: 640px;
  margin: 0 auto var(--space-8);
  text-align: center;
}
.proof-head h2 { margin-top: var(--space-3); }
.proof-view-all {
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  color: var(--text-accent-primary);
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}

.proof-viewport {
  position: relative;
  overflow: hidden;
}
.proof-fade {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 80px;
  z-index: 2;
  pointer-events: none;
}
.proof-fade-left { left: 0; background: linear-gradient(to right, var(--bg-primary), transparent); }
.proof-fade-right { right: 0; background: linear-gradient(to left, var(--bg-primary), transparent); }

.proof-track {
  display: flex;
  gap: var(--space-4);
  width: max-content;
  animation-name: proof-scroll;
  animation-timing-function: linear;
  animation-iteration-count: infinite;
}
.proof-track:hover { animation-play-state: paused; }
@keyframes proof-scroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(calc(-50% - var(--space-2))); }
}

.proof-cell {
  flex: none;
  width: 140px;
  aspect-ratio: 9 / 16;
  border-radius: var(--radius-lg);
  overflow: hidden;
  position: relative;
  box-shadow: var(--shadow-md);
  cursor: pointer;
  background: var(--neutral-20);
}
.proof-cell video { width: 100%; height: 100%; object-fit: cover; }
@media (min-width: 640px) {
  .proof-cell { width: 180px; }
}

/* ---- Video modal ---- */
.video-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(16, 16, 16, 0.95);
  backdrop-filter: blur(4px);
}
.video-modal-close {
  position: absolute;
  top: var(--space-5);
  right: var(--space-5);
  background: rgba(16, 16, 16, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--white);
  border-radius: var(--radius-pill);
  width: 44px;
  height: 44px;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}
.video-modal-player {
  max-width: 90vw;
  max-height: 85vh;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  background: var(--neutral-100);
}

/* ---- Thank-you modal ---- */
.thanks-modal {
  position: fixed;
  inset: 0;
  z-index: 110;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-6);
  background: rgba(16, 16, 16, 0.5);
  backdrop-filter: blur(4px);
  animation: thanks-fade-in var(--dur-fast) var(--ease-brand);
}
@keyframes thanks-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}
.thanks-modal-card {
  position: relative;
  width: 100%;
  max-width: 420px;
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: var(--space-10) var(--space-8) var(--space-8);
  text-align: center;
  animation: thanks-rise var(--dur-med) var(--ease-brand);
}
@keyframes thanks-rise {
  from { opacity: 0; transform: translateY(12px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.thanks-modal-close {
  position: absolute;
  top: var(--space-4);
  right: var(--space-4);
  background: var(--bg-secondary);
  border: none;
  border-radius: var(--radius-pill);
  width: 36px;
  height: 36px;
  font-size: 18px;
  line-height: 1;
  color: var(--text-secondary);
  cursor: pointer;
}
.thanks-modal-close:hover { background: var(--neutral-30); }
.thanks-modal-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  margin: 0 auto var(--space-5);
  border-radius: 50%;
  background: var(--bg-accent-secondary);
  color: var(--accent-primary-100);
  font-size: 26px;
}
.thanks-modal-card h2 { margin: 0 0 var(--space-3); }
.thanks-modal-card p { color: var(--text-secondary); margin: 0 0 var(--space-6); }

/* ---- Clips gallery ---- */
.clips-gallery {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: flex;
  flex-direction: column;
  background: var(--white);
}
.clips-gallery-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding: var(--space-4) var(--space-8);
  border-bottom: 1px solid var(--border-secondary);
}
.clips-gallery-header h2 { margin-top: var(--space-1); }
.clips-gallery-close {
  flex: none;
  background: var(--neutral-20);
  border: none;
  border-radius: var(--radius-pill);
  width: 40px;
  height: 40px;
  font-size: 20px;
  cursor: pointer;
  color: var(--text-secondary);
}
.clips-gallery-close:hover { background: var(--neutral-30); }
.clips-gallery-grid {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: var(--space-6) var(--space-8);
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-auto-rows: max-content;
  align-content: start;
  gap: var(--space-3);
}
@media (min-width: 640px) { .clips-gallery-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 900px) { .clips-gallery-grid { grid-template-columns: repeat(4, 1fr); } }
@media (min-width: 1200px) { .clips-gallery-grid { grid-template-columns: repeat(6, 1fr); } }
.clips-gallery-item {
  position: relative;
  aspect-ratio: 9 / 16;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: none;
  padding: 0;
  cursor: pointer;
  background: var(--neutral-20);
}
.clips-gallery-item video { width: 100%; height: 100%; object-fit: cover; }
.clips-gallery-play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(16, 16, 16, 0.15);
  color: var(--white);
  font-size: 20px;
  opacity: 0;
  transition: opacity var(--dur-fast) var(--ease-brand);
}
.clips-gallery-item:hover .clips-gallery-play,
.clips-gallery-item:focus-visible .clips-gallery-play { opacity: 1; }

/* ---- FAQ ---- */
.faq-list {
  max-width: 720px;
}
.faq-item {
  border-top: 1px solid var(--border-primary);
  padding: var(--space-5) 0;
}
.faq-item:last-child { border-bottom: 1px solid var(--border-primary); }
.faq-question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  background: none;
  border: none;
  text-align: left;
  cursor: pointer;
  font-family: var(--font-body);
  font-size: var(--fs-xl);
  font-weight: var(--fw-medium);
  color: var(--text-primary);
  padding: 0;
}
.faq-icon {
  font-family: var(--font-label);
  color: var(--text-accent-primary);
  transition: transform var(--dur-fast) var(--ease-brand);
}
.faq-item.open .faq-icon { transform: rotate(45deg); }
.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--dur-med) var(--ease-brand);
}
.faq-item.open .faq-answer { max-height: 400px; }
.faq-answer p {
  margin: var(--space-3) 0 0;
  color: var(--text-secondary);
}

/* ---- Final CTA ---- */
.cta-banner {
  text-align: center;
}
.cta-banner h2 { color: var(--text-inverse-primary); }
.cta-banner p { color: var(--accent-secondary-90); margin-top: var(--space-3); }
.cta-banner-button { margin-top: var(--space-8); }

/* ---- Footer ---- */
.site-footer {
  border-top: 1px solid var(--border-secondary);
  padding: var(--space-12) 0;
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--space-8);
}
.footer-nav {
  display: flex;
  gap: var(--space-6);
  list-style: none;
  padding: 0;
  margin: 0;
}
.footer-nav a { color: var(--text-secondary); text-decoration: none; }
.footer-copy { color: var(--text-secondary); font-size: var(--fs-xs); }

.skip-link {
  position: absolute;
  left: -9999px;
}
.skip-link:focus {
  left: var(--space-4);
  top: var(--space-4);
  background: var(--white);
  padding: var(--space-2) var(--space-4);
  z-index: 100;
}

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
}

.toast {
  position: fixed;
  bottom: var(--space-6);
  left: 50%;
  transform: translate(-50%, 120%);
  background: var(--neutral-100);
  color: var(--white);
  padding: 12px 20px;
  border-radius: var(--radius-md);
  font-size: var(--fs-sm);
  transition: transform var(--dur-med) var(--ease-brand);
  z-index: 60;
}
.toast.visible { transform: translate(-50%, 0); }
