/**
 * StudioSwarm Promotional Portal & Creator Landing Styles
 * Calibrated darkroom reference aesthetic matching StudioSwarm PWA workspace.
 */

:root {
  --bg-deep: #09090b;
  --bg-surface: #121215;
  --bg-card: #18181b;
  --bg-card-hover: #222226;
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-active: rgba(16, 185, 129, 0.35);
  --text-main: #f4f4f5;
  --text-muted: #a1a1aa;
  --text-dim: #71717a;
  --emerald: #10b981;
  --emerald-glow: rgba(16, 185, 129, 0.25);
  --amber: #f59e0b;
  --amber-glow: rgba(245, 158, 11, 0.2);
  --font-sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Geist", "Inter", "Segoe UI", Roboto, sans-serif;
  --font-mono: "SF Mono", "Geist Mono", "JetBrains Mono", Menlo, Consolas, monospace;
}

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

body.landing-page {
  background-color: var(--bg-deep);
  color: var(--text-main);
  font-family: var(--font-sans);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  position: relative;
}

/* Background Atmosphere */
.ambient-glow {
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 1000px;
  height: 600px;
  background: radial-gradient(circle, rgba(16, 185, 129, 0.09) 0%, rgba(9, 9, 11, 0) 70%);
  pointer-events: none;
  z-index: 0;
}

.ambient-grid {
  position: fixed;
  inset: 0;
  background-image: linear-gradient(to right, rgba(255, 255, 255, 0.02) 1px, transparent 1px),
                    linear-gradient(to bottom, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
  z-index: 0;
}

/* Navigation */
.landing-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  background: rgba(9, 9, 11, 0.8);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-subtle);
  z-index: 100;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text-main);
  font-weight: 600;
  font-size: 15px;
  letter-spacing: -0.01em;
}

.brand-icon-box {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.2), rgba(16, 185, 129, 0.05));
  border: 1px solid rgba(16, 185, 129, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--emerald);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 24px;
  list-style: none;
}

.nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 500;
  transition: color 0.15s ease;
}

.nav-links a:hover {
  color: var(--text-main);
}

.nav-cta-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Buttons */
.btn-ghost-nav {
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-muted);
  padding: 7px 14px;
  font-size: 13.5px;
  font-weight: 500;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-ghost-nav:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.04);
}

.btn-primary-nav {
  background: var(--emerald);
  color: #000;
  border: none;
  padding: 7px 16px;
  font-size: 13px;
  font-weight: 600;
  border-radius: 6px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  transition: all 0.15s ease;
  box-shadow: 0 0 16px var(--emerald-glow);
}

.btn-primary-nav:hover {
  background: #34d399;
  transform: translateY(-1px);
}

.btn-hero-primary {
  background: var(--emerald);
  color: #000;
  border: 1px solid #34d399;
  padding: 13px 28px;
  font-size: 15px;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  box-shadow: 0 4px 24px var(--emerald-glow);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-hero-primary:hover {
  background: #34d399;
  transform: translateY(-2px);
  box-shadow: 0 6px 32px rgba(16, 185, 129, 0.4);
}

.btn-hero-secondary {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-main);
  border: 1px solid var(--border-subtle);
  padding: 13px 26px;
  font-size: 15px;
  font-weight: 500;
  border-radius: 8px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  backdrop-filter: blur(8px);
  transition: all 0.2s ease;
}

.btn-hero-secondary:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.18);
  transform: translateY(-1px);
}

/* Hero Section */
.hero-section {
  position: relative;
  z-index: 10;
  padding: 140px 24px 80px;
  max-width: 1140px;
  margin: 0 auto;
  text-align: center;
}

.hero-pill-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.25);
  padding: 6px 14px;
  border-radius: 9999px;
  font-size: 12.5px;
  color: var(--emerald);
  font-weight: 500;
  margin-bottom: 24px;
  animation: fadeIn 0.5s ease;
}

.hero-title {
  font-size: clamp(38px, 6vw, 68px);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.035em;
  margin-bottom: 22px;
  background: linear-gradient(180deg, #ffffff 40%, #a1a1aa 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  font-size: clamp(16px, 2vw, 20px);
  color: var(--text-muted);
  max-width: 740px;
  margin: 0 auto 36px;
  line-height: 1.6;
  font-weight: 400;
}

.hero-cta-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-bottom: 32px;
  flex-wrap: wrap;
}

.hero-guarantees {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 28px;
  font-size: 12.5px;
  color: var(--text-dim);
  font-family: var(--font-mono);
  flex-wrap: wrap;
}

.hero-guarantee-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.hero-guarantee-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--emerald);
  box-shadow: 0 0 8px var(--emerald);
}

/* Interactive Teaser Mockup */
.hero-mockup-wrapper {
  margin-top: 56px;
  border-radius: 14px;
  border: 1px solid var(--border-subtle);
  background: linear-gradient(180deg, rgba(24, 24, 27, 0.8) 0%, rgba(18, 18, 21, 0.95) 100%);
  box-shadow: 0 24px 64px -12px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(255, 255, 255, 0.05);
  overflow: hidden;
  position: relative;
}

.mockup-header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 18px;
  border-bottom: 1px solid var(--border-subtle);
  background: rgba(18, 18, 21, 0.6);
  font-size: 12px;
  color: var(--text-dim);
}

.mockup-controls {
  display: flex;
  gap: 6px;
}

.mockup-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #27272a;
}

.mockup-dot.red { background: #ef4444; }
.mockup-dot.yellow { background: #f59e0b; }
.mockup-dot.green { background: #10b981; }

.mockup-body {
  padding: 32px 28px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
  align-items: center;
  text-align: left;
}

@media (max-width: 768px) {
  .mockup-body {
    grid-template-columns: 1fr;
  }
}

.mockup-feed-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  padding: 20px;
}

.mockup-file-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  font-size: 13px;
}

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

.mockup-file-name {
  font-family: var(--font-mono);
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 8px;
}

.mockup-file-meta {
  color: var(--emerald);
  font-size: 12px;
  font-family: var(--font-mono);
}

.mockup-speed-hud {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.speed-metric-box {
  background: rgba(16, 185, 129, 0.04);
  border: 1px solid rgba(16, 185, 129, 0.2);
  border-radius: 10px;
  padding: 18px;
}

.speed-metric-num {
  font-size: 34px;
  font-weight: 700;
  font-family: var(--font-mono);
  color: var(--emerald);
  letter-spacing: -0.02em;
}

.speed-metric-label {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* Sections */
.section-container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 100px 24px;
  position: relative;
  z-index: 10;
}

.section-eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--emerald);
  margin-bottom: 12px;
}

.section-heading {
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin-bottom: 16px;
}

.section-desc {
  font-size: 16px;
  color: var(--text-muted);
  max-width: 640px;
  line-height: 1.6;
  margin-bottom: 48px;
}

/* Live ROI Calculator */
.calc-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  padding: 40px;
  box-shadow: 0 16px 40px -8px rgba(0, 0, 0, 0.5);
}

.calc-slider-group {
  margin-bottom: 36px;
}

.calc-slider-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.calc-slider-title {
  font-size: 16px;
  font-weight: 600;
}

.calc-slider-val {
  font-family: var(--font-mono);
  font-size: 24px;
  font-weight: 700;
  color: var(--emerald);
}

.calc-range-input {
  width: 100%;
  height: 8px;
  border-radius: 4px;
  background: #27272a;
  outline: none;
  -webkit-appearance: none;
  cursor: pointer;
}

.calc-range-input::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--emerald);
  box-shadow: 0 0 12px var(--emerald);
  cursor: pointer;
  transition: transform 0.1s ease;
}

.calc-range-input::-webkit-slider-thumb:hover {
  transform: scale(1.15);
}

.calc-results-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

@media (max-width: 768px) {
  .calc-results-grid {
    grid-template-columns: 1fr;
  }
}

.calc-result-box {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  padding: 22px;
  text-align: center;
}

.calc-result-box.highlight {
  border-color: rgba(16, 185, 129, 0.35);
  background: linear-gradient(180deg, rgba(16, 185, 129, 0.05) 0%, rgba(24, 24, 27, 0.8) 100%);
}

.calc-result-num {
  font-family: var(--font-mono);
  font-size: 32px;
  font-weight: 700;
  color: var(--emerald);
  margin-bottom: 6px;
}

.calc-result-label {
  font-size: 13px;
  color: var(--text-muted);
}

/* Feature Grid */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

@media (max-width: 880px) {
  .features-grid {
    grid-template-columns: 1fr;
  }
}

.feature-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 32px;
  transition: all 0.25s ease;
}

.feature-card:hover {
  background: var(--bg-card-hover);
  border-color: rgba(255, 255, 255, 0.16);
  transform: translateY(-3px);
}

.feature-icon-wrap {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.25);
  color: var(--emerald);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}

.feature-card-title {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 10px;
  letter-spacing: -0.01em;
}

.feature-card-desc {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.6;
}

/* Comparison Matrix */
.comparison-table-wrap {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  overflow-x: auto;
}

.comparison-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 14px;
}

.comparison-table th,
.comparison-table td {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-subtle);
}

.comparison-table th {
  background: rgba(255, 255, 255, 0.02);
  color: var(--text-dim);
  font-weight: 500;
  font-family: var(--font-mono);
  font-size: 12px;
  text-transform: uppercase;
}

.comparison-table th.col-studioswarm,
.comparison-table td.col-studioswarm {
  background: rgba(16, 185, 129, 0.04);
  font-weight: 600;
  color: var(--emerald);
}

.comparison-table tr:last-child td {
  border-bottom: none;
}

/* Creator Workflow Tabs */
.workflow-tabs-header {
  display: flex;
  gap: 12px;
  margin-bottom: 28px;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 12px;
  overflow-x: auto;
}

.workflow-tab-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 500;
  padding: 8px 16px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.workflow-tab-btn.active {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-main);
  border-bottom: 2px solid var(--emerald);
}

.workflow-tab-btn:hover {
  color: var(--text-main);
}

.workflow-tab-panel {
  display: none;
}

.workflow-tab-panel.active {
  display: block;
}

/* Security Whitepaper Box */
.security-banner {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.08) 0%, rgba(24, 24, 27, 0.95) 100%);
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: 14px;
  padding: 44px;
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 40px;
  align-items: center;
}

@media (max-width: 800px) {
  .security-banner {
    grid-template-columns: 1fr;
  }
}

.security-checklist {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.security-check-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 14.5px;
  color: var(--text-muted);
}

.check-badge {
  color: var(--emerald);
  font-weight: bold;
}

/* FAQ Accordion */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.faq-item {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  overflow: hidden;
  transition: border-color 0.15s ease;
}

.faq-item:hover {
  border-color: rgba(255, 255, 255, 0.16);
}

.faq-question {
  width: 100%;
  text-align: left;
  background: transparent;
  border: none;
  padding: 20px 24px;
  font-size: 16px;
  font-weight: 600;
  color: var(--text-main);
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
}

.faq-chevron {
  transition: transform 0.2s ease;
}

.faq-item.open .faq-chevron {
  transform: rotate(180deg);
}

.faq-answer {
  display: none;
  padding: 0 24px 22px;
  font-size: 14.5px;
  color: var(--text-muted);
  line-height: 1.6;
}

.faq-item.open .faq-answer {
  display: block;
}

/* Footer */
.landing-footer {
  border-top: 1px solid var(--border-subtle);
  padding: 60px 24px;
  max-width: 1140px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13.5px;
  color: var(--text-dim);
  flex-wrap: wrap;
  gap: 20px;
}

.footer-links {
  display: flex;
  gap: 20px;
}

.footer-links a {
  color: var(--text-dim);
  text-decoration: none;
  transition: color 0.15s ease;
}

.footer-links a:hover {
  color: var(--text-main);
}

/* User Registration & Auth Modal */
.auth-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.auth-modal-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

.auth-modal-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  width: 100%;
  max-width: 440px;
  padding: 32px;
  position: relative;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(255, 255, 255, 0.05);
  transform: translateY(12px);
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.auth-modal-backdrop.open .auth-modal-card {
  transform: translateY(0);
}

.auth-modal-close {
  position: absolute;
  top: 18px;
  right: 18px;
  background: transparent;
  border: none;
  color: var(--text-dim);
  font-size: 18px;
  cursor: pointer;
  padding: 4px;
}

.auth-modal-close:hover {
  color: var(--text-main);
}

.auth-tabs-toggle {
  display: flex;
  background: #18181b;
  border-radius: 8px;
  padding: 4px;
  margin-bottom: 24px;
}

.auth-tab-btn {
  flex: 1;
  padding: 8px;
  border-radius: 6px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 13.5px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
}

.auth-tab-btn.active {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-main);
}

.auth-form-group {
  margin-bottom: 16px;
}

.auth-label {
  display: block;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.auth-input,
.auth-select {
  width: 100%;
  background: #18181b;
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 14px;
  outline: none;
  font-family: inherit;
  transition: border-color 0.15s ease;
}

.auth-input:focus,
.auth-select:focus {
  border-color: var(--emerald);
  box-shadow: 0 0 0 2px var(--emerald-glow);
}

.auth-submit-btn {
  width: 100%;
  background: var(--emerald);
  color: #000;
  border: none;
  padding: 12px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  margin-top: 8px;
}

.auth-submit-btn:hover {
  background: #34d399;
}

.auth-divider {
  display: flex;
  align-items: center;
  text-align: center;
  color: var(--text-dim);
  font-size: 12px;
  margin: 18px 0;
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  border-bottom: 1px solid var(--border-subtle);
}

.auth-divider span {
  padding: 0 10px;
}

.btn-google-auth {
  width: 100%;
  background: #18181b;
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 13.5px;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: all 0.15s ease;
}

.btn-google-auth:hover {
  background: #27272a;
  border-color: rgba(255, 255, 255, 0.16);
}

/* User Account Badge in Navbar */
.user-profile-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  padding: 4px 10px;
  border-radius: 9999px;
  font-size: 13px;
  color: var(--text-main);
}

/* AI Agent Code Showcase */
.agent-code-card {
  background: #0d0d10;
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.6);
  margin-top: 24px;
}

.agent-code-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  background: rgba(255, 255, 255, 0.02);
  border-bottom: 1px solid var(--border-subtle);
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-dim);
}

.agent-code-pre {
  padding: 24px;
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.65;
  color: #e4e4e7;
  overflow-x: auto;
  white-space: pre;
}

.agent-badges-row {
  display: flex;
  gap: 12px;
  margin-top: 20px;
  flex-wrap: wrap;
}

.agent-badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  padding: 6px 14px;
  border-radius: 8px;
  font-size: 12.5px;
  color: var(--text-muted);
  text-decoration: none;
  font-family: var(--font-mono);
  transition: all 0.15s ease;
}

.agent-badge-pill:hover {
  background: rgba(16, 185, 129, 0.08);
  border-color: rgba(16, 185, 129, 0.3);
  color: var(--emerald);
}

.code-keyword { color: #f43f5e; font-weight: 600; }
.code-fn { color: #38bdf8; }
.code-str { color: #34d399; }
.code-comment { color: #71717a; font-style: italic; }

.user-profile-avatar {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--emerald);
  color: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 11px;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}
