/* ===================================================
   LandInsight — Ederland Brand Styles
   Purple + Gold palette
   =================================================== */

:root {
  --purple:       #6D28D9;
  --purple-dark:  #5B21B6;
  --purple-light: #EDE9FE;
  --purple-mid:   #7C3AED;
  --gold:         #F59E0B;
  --gold-light:   #FEF3C7;
  --gold-dark:    #D97706;
  --text:         #1C1028;
  --text-muted:   #6B7280;
  --border:       #E5E7EB;
  --bg:           #FFFFFF;
  --bg-soft:      #F9FAFB;
  --shadow-sm:    0 1px 3px rgba(109,40,217,.10), 0 1px 2px rgba(109,40,217,.06);
  --shadow-md:    0 4px 12px rgba(109,40,217,.15);
  --shadow-lg:    0 8px 24px rgba(109,40,217,.18);
  --radius:       28px;
  --radius-sm:    10px;
  --transition:   0.2s ease;
}

/* ── Reset ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Google Sans', 'Segoe UI', Roboto, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ── Layout ─────────────────────────────────────────── */
.page-wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* ── Header ─────────────────────────────────────────── */
header {
  width: 100%;
  padding: 16px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border);
}

.header-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -.3px;
}

.header-logo .accent { color: var(--purple); }
.header-logo .dot    { color: var(--gold); font-size: 22px; line-height: 0; vertical-align: -2px; }

.header-badge {
  font-size: 11px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 20px;
  background: var(--purple-light);
  color: var(--purple);
  letter-spacing: .4px;
  text-transform: uppercase;
}

/* ── Hero ───────────────────────────────────────────── */
.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 64px 24px 44px;
  width: 100%;
  max-width: 700px;
}

/* ── Logo ───────────────────────────────────────────── */
.logo-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 12px;
}

.logo-eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 6px;
}

.logo-main {
  font-size: clamp(38px, 7vw, 60px);
  font-weight: 800;
  letter-spacing: -2px;
  line-height: 1;
  color: var(--text);
}

.logo-main .land { color: var(--purple); }
.logo-main .star {
  color: var(--gold);
  font-size: .65em;
  vertical-align: super;
  margin: 0 1px;
}

.tagline {
  color: var(--text-muted);
  font-size: 15px;
  margin-bottom: 40px;
  text-align: center;
  max-width: 420px;
  line-height: 1.5;
}

/* ── Search box ─────────────────────────────────────── */
.search-box {
  width: 100%;
  max-width: 600px;
  position: relative;
  margin-bottom: 18px;
}

.search-box input {
  width: 100%;
  padding: 17px 56px 17px 22px;
  font-size: 15px;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  outline: none;
  color: var(--text);
  background: var(--bg);
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition), border-color var(--transition);
}

.search-box input:hover { border-color: #C4B5FD; }

.search-box input:focus {
  border-color: var(--purple);
  box-shadow: 0 0 0 4px rgba(109,40,217,.12), var(--shadow-sm);
}

.search-box input::placeholder { color: #9CA3AF; }

.search-icon {
  position: absolute;
  right: 18px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--purple);
  opacity: .6;
  pointer-events: none;
}

/* ── Platform badges ────────────────────────────────── */
.platforms {
  display: flex;
  gap: 8px;
  margin-bottom: 32px;
  flex-wrap: wrap;
  justify-content: center;
}

.platform-badge {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 5px 13px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  background: var(--bg-soft);
  color: var(--text-muted);
  border: 1px solid var(--border);
}

/* ── Buttons ─────────────────────────────────────────── */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 36px;
  background: var(--purple);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--transition), box-shadow var(--transition), transform var(--transition);
  box-shadow: 0 4px 14px rgba(109,40,217,.35);
  letter-spacing: .2px;
}

.btn-primary:hover {
  background: var(--purple-dark);
  box-shadow: 0 6px 20px rgba(109,40,217,.45);
  transform: translateY(-1px);
}

.btn-primary:active { transform: translateY(0); }

.btn-primary:disabled {
  background: #C4B5FD;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn-download {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 36px;
  background: var(--gold);
  color: #1C1028;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: background var(--transition), box-shadow var(--transition), transform var(--transition);
  box-shadow: 0 4px 14px rgba(245,158,11,.35);
  letter-spacing: .2px;
}

.btn-download:hover {
  background: var(--gold-dark);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(245,158,11,.45);
}

.btn-download:active  { transform: translateY(0); }
.btn-download:disabled { opacity: .7; cursor: not-allowed; transform: none; }

/* ── Progress stepper ───────────────────────────────── */
#progress-section {
  width: 100%;
  max-width: 600px;
  margin: 0 auto 48px;
  display: none;
  padding: 0 24px;
}

.stepper {
  display: flex;
  align-items: flex-start;
  justify-content: center;
}

.step {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
  max-width: 130px;
  position: relative;
}

.step:not(:last-child)::after {
  content: '';
  position: absolute;
  top: 18px;
  left: calc(50% + 18px);
  right: calc(-50% + 18px);
  height: 2px;
  background: var(--border);
  transition: background 0.4s ease;
  z-index: 0;
}

.step.done:not(:last-child)::after,
.step.active:not(:last-child)::after { background: var(--purple); }

.step-circle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 2px solid var(--border);
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-muted);
  transition: all 0.4s ease;
  position: relative;
  z-index: 1;
}

.step.active .step-circle {
  border-color: var(--purple);
  background: var(--purple);
  color: #fff;
  box-shadow: 0 0 0 4px rgba(109,40,217,.2);
}

.step.done .step-circle {
  border-color: var(--gold);
  background: var(--gold);
  color: #1C1028;
}

.step-label {
  margin-top: 8px;
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 500;
  text-align: center;
  transition: color 0.3s;
}

.step.active .step-label { color: var(--purple); font-weight: 700; }
.step.done .step-label   { color: var(--gold-dark); }

.step.active .step-circle::after {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 2px solid transparent;
  border-top-color: var(--purple);
  animation: spin 1s linear infinite;
}

.step.done .step-circle::after { display: none; }

@keyframes spin { to { transform: rotate(360deg); } }

/* ── Error ──────────────────────────────────────────── */
#error-section {
  width: 100%;
  max-width: 600px;
  margin: 0 auto 24px;
  display: none;
  padding: 0 24px;
}

.error-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px 20px;
  background: #FEF2F2;
  border: 1px solid #FECACA;
  border-radius: var(--radius-sm);
  color: #DC2626;
  font-size: 14px;
  line-height: 1.5;
}

/* ── Results ─────────────────────────────────────────── */
#results-section {
  width: 100%;
  max-width: 820px;
  margin: 0 auto;
  padding: 0 24px 80px;
  display: none;
}

.results-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
  flex-wrap: wrap;
  gap: 16px;
  padding-bottom: 20px;
  border-bottom: 2px solid var(--purple-light);
}

.results-meta h2 {
  font-size: 20px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -.3px;
}

.results-meta .video-url {
  font-size: 12px;
  color: var(--text-muted);
  max-width: 420px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-top: 3px;
}

.platform-tag {
  display: inline-block;
  padding: 3px 12px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .6px;
  background: var(--purple-light);
  color: var(--purple);
  margin-top: 4px;
}

/* ── Section cards ──────────────────────────────────── */
.section-grid {
  display: grid;
  gap: 20px;
}

.section-card {
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: 14px;
  padding: 24px 28px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition), border-color var(--transition);
}

.section-card:hover {
  box-shadow: var(--shadow-md);
  border-color: #C4B5FD;
}

/* Transcript card gets a different accent */
.section-card.transcript-card {
  background: var(--bg-soft);
  border-color: var(--border);
}

.section-card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.section-number {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 800;
  flex-shrink: 0;
}

.section-number.n1 { background: var(--purple-light); color: var(--purple); }
.section-number.n2 { background: var(--purple); color: #fff; }
.section-number.n3 { background: var(--gold); color: #1C1028; }

.section-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -.1px;
}

/* Transcript body */
.transcript-body {
  font-size: 13.5px;
  color: var(--text-muted);
  line-height: 1.8;
  max-height: 180px;
  overflow: hidden;
  position: relative;
  transition: max-height 0.4s ease;
}

.transcript-body.expanded { max-height: none; }

.transcript-fade {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 60px;
  background: linear-gradient(transparent, var(--bg-soft));
  pointer-events: none;
  transition: opacity 0.3s;
}

.transcript-body.expanded + .transcript-fade { opacity: 0; }

.btn-expand {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 10px;
  padding: 5px 0;
  background: none;
  border: none;
  color: var(--purple);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity var(--transition);
}

.btn-expand:hover { opacity: .7; }

/* Analysis section body */
.section-body {
  font-size: 14.5px;
  color: var(--text);
  line-height: 1.75;
}

.section-body p { margin-bottom: 8px; }
.section-body p:last-child { margin-bottom: 0; }

.section-body ul {
  padding-left: 4px;
  margin: 6px 0;
  list-style: none;
}

.section-body ul li {
  position: relative;
  padding-left: 18px;
  margin-bottom: 8px;
  line-height: 1.65;
}

.section-body ul li::before {
  content: '★';
  position: absolute;
  left: 0;
  color: var(--gold);
  font-size: 10px;
  top: 4px;
}

/* ── Download area ──────────────────────────────────── */
.download-area {
  display: flex;
  justify-content: center;
  margin-top: 36px;
  padding-top: 28px;
  border-top: 1px solid var(--border);
}

/* ── Footer ─────────────────────────────────────────── */
footer {
  text-align: center;
  padding: 20px 24px;
  font-size: 12px;
  color: var(--text-muted);
  border-top: 1px solid var(--border);
  margin-top: auto;
}

footer span { color: var(--purple); font-weight: 600; }

/* ── Responsive ─────────────────────────────────────── */
@media (max-width: 600px) {
  .hero { padding: 40px 16px 24px; }
  .section-card { padding: 18px 16px; }
  .btn-download { width: 100%; justify-content: center; }
  .results-header { flex-direction: column; align-items: flex-start; }
}
