/* landing.css — Landing page specific styles */

body {
  line-height: 1.6;
  min-height: 100vh;
}

.container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ── Hero Section ── */
.hero-section {
  position: relative;
  background: var(--bg-primary);
}

/* Header */
header {
  position: relative;
  z-index: 10;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 20px;
}

.header-nav a {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s ease;
}

.header-nav a:hover {
  color: var(--text-secondary);
}

.brand {
  display: block;
  height: 32px;
}

.brand img {
  height: 100%;
  width: auto;
  filter: saturate(1.4) brightness(1.1);
}

/* Hero content */
.hero {
  position: relative;
  z-index: 10;
  text-align: center;
  padding: 24px 0 16px;
}

.hero h1 {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin-bottom: 8px;
}

.hero .subtitle {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  margin-bottom: 10px;
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
}

/* ── Email Form ── */
.email-form {
  display: flex;
  gap: 12px;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.email-form .input-wrapper {
  position: relative;
}

.email-form input[type="email"] {
  width: 280px;
  padding: 10px 16px;
  font-size: 1rem;
  font-family: inherit;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-primary);
  outline: none;
  transition: all 0.2s ease;
}

.email-form input[type="email"]:hover {
  border-color: var(--border-default);
}

.email-form input[type="email"]:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.email-form input[type="email"]::placeholder {
  color: var(--text-muted);
}

.email-form button {
  padding: 10px 24px;
  font-size: 1rem;
  font-weight: 600;
  font-family: inherit;
  background: var(--accent-dark);
  border: none;
  border-radius: var(--radius);
  color: var(--accent);
  cursor: pointer;
  transition: all 0.2s ease;

}

.email-form button:hover {
  background: #16a34a;

}

/* ── Ticker Bar ── */
.ticker-bar {
  padding: 8px 0;
  background: rgba(255,255,255,0.02);
  border-bottom: 1px solid var(--border);
  font-size: 0.75rem;
  color: var(--text-secondary);
  overflow-x: auto;
  white-space: nowrap;
}

.ticker-inner {
  display: flex;
  align-items: center;
  gap: 20px;
}

.ticker-bar .divider { color: rgba(255,255,255,0.12); }
.ticker-bar .mono { font-family: var(--font-mono); font-weight: 600; }
.ticker-bar .green { color: var(--accent); }
.ticker-bar .pulse-dot {
  display: inline-block; width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent); box-shadow: 0 0 6px var(--accent-glow);
  animation: pulse-subtle 2s ease-in-out infinite;
}

@keyframes pulse-subtle { 0%, 100% { opacity: 1; } 50% { opacity: 0.5; } }

.ticker-bar .updated { margin-left: auto; font-family: var(--font-mono); color: var(--text-muted); font-size: 0.6875rem; }

/* ── Two-Column Layout ── */
.two-col { display: flex; gap: 16px; padding: 16px 0; }
.two-col .col-left { flex: 6; min-width: 0; }
.two-col .col-right { flex: 4; display: flex; flex-direction: column; gap: 12px; }

/* ── Deal Table ── */
.deal-table {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.deal-table-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
}

.deal-table-header .table-title {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.deal-table-header .table-badge {
  padding: 2px 8px;
  background: rgba(74,222,128,0.1);
  border: 1px solid rgba(74,222,128,0.15);
  border-radius: var(--radius);
  font-size: 0.625rem;
  font-weight: 700;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.deal-table-tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--border);
}

.deal-table-tabs .tab {
  padding: 6px 14px;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
  background: none;
  border-top: none;
  border-left: none;
  border-right: none;
  font-family: inherit;
}

.deal-table-tabs .tab:hover {
  color: var(--text-secondary);
}

.deal-table-tabs .tab.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.deal-row {
  display: grid;
  grid-template-columns: 32px 48px 1fr 64px 72px 72px;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-bottom: 1px solid var(--border);
  transition: background 0.1s ease;
  text-decoration: none;
  color: inherit;
}

.deal-row:last-child {
  border-bottom: none;
}

.deal-row:nth-child(even) {
  background: rgba(255,255,255,0.01);
}

.deal-row:hover {
  background: var(--bg-surface-hover);
}

.deal-row .row-score {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-secondary);
  text-align: center;
}

.deal-row .row-tier {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 2px 6px;
  border-radius: var(--radius);
  font-size: 0.5625rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.deal-row .row-tier.tier-hot {
  background: rgba(239,68,68,0.15);
  color: #ef4444;
  border: 1px solid rgba(239,68,68,0.25);
}

.deal-row .row-tier.tier-great {
  background: rgba(34,197,94,0.15);
  color: #22c55e;
  border: 1px solid rgba(34,197,94,0.25);
}

.deal-row .row-tier.tier-good {
  background: rgba(74,222,128,0.12);
  color: var(--accent);
  border: 1px solid rgba(74,222,128,0.2);
}

.deal-row .row-tier.tier-fair {
  background: rgba(161,161,170,0.1);
  color: #a1a1aa;
  border: 1px solid rgba(161,161,170,0.2);
}

.deal-row .row-name {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.deal-row .row-source {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 6px;
  border-radius: var(--radius);
  font-size: 0.5625rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border: 1px solid;
  white-space: nowrap;
}

.deal-row .row-source.src-rentler {
  background: rgba(59,130,246,0.1);
  color: #3b82f6;
  border-color: rgba(59,130,246,0.2);
}

.deal-row .row-source.src-ksl {
  background: rgba(168,85,247,0.1);
  color: #a855f7;
  border-color: rgba(168,85,247,0.2);
}

.deal-row .row-source.src-craigslist {
  background: rgba(249,115,22,0.1);
  color: #f97316;
  border-color: rgba(249,115,22,0.2);
}

.deal-row .row-price {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--text-primary);
  text-align: right;
}

.deal-row .row-savings {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent);
  text-align: right;
}

.deal-row .row-savings.above-market {
  color: var(--warning);
}


/* ── Deal Table Column Header ── */
.deal-row-header {
  border-bottom: 1px solid var(--border) !important;
  background: rgba(255,255,255,0.02) !important;
  cursor: default;
  pointer-events: none;
}

.deal-row-header span {
  font-size: 0.5625rem !important;
  font-weight: 700 !important;
  color: var(--text-muted) !important;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-family: var(--font-mono) !important;
}

.deal-table-footer {
  padding: 8px 16px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.deal-table-footer .footer-count {
  font-size: 0.6875rem;
  color: var(--text-muted);
}

.deal-table-footer a {
  font-size: 0.6875rem;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s ease;
}

.deal-table-footer a:hover {
  color: var(--accent);
}

/* ── Sidebar Widgets ── */
.sidebar-widget {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.widget-label {
  padding: 8px 12px;
  font-size: 0.625rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border-bottom: 1px solid var(--border);
  background: rgba(255,255,255,0.01);
}

.source-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  border-bottom: 1px solid var(--border);
  font-size: 0.8125rem;
}

.source-row:last-child {
  border-bottom: none;
}

.source-row .source-name {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-secondary);
  font-weight: 500;
}

.source-row .source-count {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
}

.source-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}

.source-dot.rentler { background: #3b82f6; }
.source-dot.craigslist { background: #f97316; }
.source-dot.ksl { background: #a855f7; }

.how-step {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 8px 12px;
  border-bottom: 1px solid var(--border);
}

.how-step:last-child {
  border-bottom: none;
}

.how-step .step-num {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 700;
  color: var(--accent);
  width: 16px;
  flex-shrink: 0;
  padding-top: 1px;
}

.how-step .step-text {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  line-height: 1.4;
}

.how-step .step-text strong {
  color: var(--text-primary);
  font-weight: 600;
}

/* ── Success State ── */
.success-state {
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 24px 40px;
  background: rgba(34, 197, 94, 0.06);
  border: 1px solid rgba(34, 197, 94, 0.15);
  border-radius: var(--radius);
  animation: fadeInScale 0.3s ease;
}

.success-state.show {
  display: flex;
}

.success-state .icon {
  width: 48px;
  height: 48px;
  background: var(--accent);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.success-state h3 {
  color: var(--accent);
  font-size: 1.125rem;
}

.success-state p {
  color: var(--text-secondary);
  font-size: 0.875rem;
}

@keyframes fadeInScale {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

/* ── Section Divider ── */
.section-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border), transparent);
  border: none;
  margin: 0;
}

/* ── Preview Section ── */
.preview-section {
  background: var(--bg-secondary);
  padding: 80px 0;
}

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

.section-header h2 {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-primary);
}

.section-header .badge {
  padding: 4px 10px;
  background: rgba(74, 222, 128, 0.1);
  border: 1px solid rgba(74, 222, 128, 0.15);
  border-radius: var(--radius);
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.posted-ago {
  font-size: 0.75rem;
  color: var(--text-muted, #888);
  margin-top: 0.25rem;
}

.market-confidence {
  font-size: 0.6875rem;
  color: var(--text-muted);
  margin-top: 4px;
  opacity: 0.7;
}

.see-all {
  text-align: center;
}

.see-all a {
  color: var(--text-muted);
  font-size: 0.875rem;
  text-decoration: none;
  transition: color 0.2s;
}

.see-all a:hover {
  color: var(--text-secondary);
}

/* ── Check a Listing ── */
.check-section {
  padding: 64px 0;
  border-bottom: 1px solid var(--border);
}

.check-section h2 {
  text-align: center;
  font-size: 1.5rem;
  margin-bottom: 8px;
}

.check-subtitle {
  text-align: center;
  color: var(--text-secondary);
  margin-bottom: 24px;
}

.check-form {
  max-width: 600px;
  margin: 0 auto;
}

.check-input-row {
  display: flex;
  gap: 12px;
}

.check-input-row input {
  flex: 1;
  padding: 14px 20px;
  font-size: 0.9375rem;
  font-family: inherit;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-primary);
  outline: none;
  transition: border-color 0.2s;
}

.check-input-row input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.check-input-row button {
  padding: 14px 28px;
  font-size: 0.9375rem;
  font-weight: 600;
  font-family: inherit;
  background: var(--accent-dark);
  border: none;
  border-radius: var(--radius);
  color: var(--accent);
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.check-input-row button:hover {
  background: #16a34a;
}

.check-input-row button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.check-hint {
  text-align: center;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 8px;
}

.check-result-card {
  max-width: 600px;
  margin: 24px auto 0;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}

.check-result-card .result-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 16px;
}

.check-result-card .result-price {
  font-size: 1.5rem;
  font-weight: 700;
  font-family: var(--font-mono);
}

.check-result-card .result-details {
  color: var(--text-secondary);
  font-size: 0.875rem;
  margin-bottom: 12px;
}

.price-gauge {
  position: relative;
  height: 8px;
  background: linear-gradient(to right, #22c55e, #a1a1aa, #ef4444);
  border-radius: var(--radius);
  margin: 16px 0 8px;
}

.price-gauge .marker {
  position: absolute;
  top: -4px;
  width: 16px;
  height: 16px;
  background: white;
  border: 2px solid var(--bg-primary);
  border-radius: 50%;
  transform: translateX(-50%);
  box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.gauge-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.6875rem;
  color: var(--text-muted);
}

.alternatives {
  margin-top: 20px;
  border-top: 1px solid var(--border);
  padding-top: 16px;
}

.alternatives h4 {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.alt-listing {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
}

.alt-listing:last-child {
  border-bottom: none;
}

.alt-listing a {
  color: var(--text-primary);
  text-decoration: none;
  font-size: 0.875rem;
}

.alt-listing a:hover {
  color: var(--accent);
}

.alt-listing .alt-price {
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 0.875rem;
}

.check-error {
  max-width: 600px;
  margin: 16px auto 0;
  padding: 12px 20px;
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.2);
  border-radius: var(--radius);
  color: #ef4444;
  font-size: 0.875rem;
  text-align: center;
}

/* ── Footer ── */
footer {
  padding: 40px 0;
  border-top: 1px solid var(--border);
  text-align: center;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.footer-social {
  display: flex;
  align-items: center;
  gap: 12px;
}

.footer-nav {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  justify-content: center;
}

.footer-nav a {
  color: var(--text-muted);
  font-size: 0.8125rem;
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer-nav a:hover {
  color: var(--text-secondary);
}

.footer-meta {
  color: var(--text-muted);
  font-size: 0.8125rem;
}

.footer-meta a {
  color: var(--text-secondary);
  text-decoration: none;
}

.footer-meta a:hover {
  color: var(--text-primary);
}

.footer-updated {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.social-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease, filter 0.2s ease;
}

.social-icon:hover {
  opacity: 0.8;
}

/* ── Loading skeleton for deal rows ── */
.deal-row.skeleton .row-score,
.deal-row.skeleton .row-tier,
.deal-row.skeleton .row-name,
.deal-row.skeleton .row-price {
  background: linear-gradient(90deg, var(--bg-surface-hover), rgba(255,255,255,0.04), var(--bg-surface-hover));
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius);
  color: transparent;
}

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ── Responsive ── */
@media (max-width: 768px) {
  .hero {
    padding: 16px 0 12px;
  }

  .hero h1 {
    font-size: 1.25rem;
  }

  .email-form {
    flex-direction: column;
    padding: 0 8px;
  }

  .email-form input[type="email"] {
    width: 100%;
  }

  .email-form button {
    width: 100%;
  }

  .two-col {
    flex-direction: column;
  }

  .two-col .col-right {
    flex: unset;
  }

  .deal-row {
    grid-template-columns: 32px 48px 1fr 64px 72px;
  }

  .deal-row .row-savings {
    display: none;
  }

  .ticker-bar {
    flex-wrap: wrap;
    white-space: normal;
  }

  .ticker-bar .updated {
    margin-left: 0;
  }

  .check-input-row {
    flex-direction: column;
  }

  .check-input-row button {
    width: 100%;
  }

  .preview-section {
    padding: 56px 0;
  }
}

@media (max-width: 480px) {
  .deal-row {
    grid-template-columns: 32px 1fr 64px 72px;
  }

  .deal-row .row-tier {
    display: none;
  }

  .container {
    padding: 0 16px;
  }
}
