/* ========================================
   Commons Landing Page — Styles
   ======================================== */

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

:root {
  --canvas-bg: #F7F7F5;
  --dot-grid: #D8D8D2;
  --white: #FFFFFF;
  --off-white: #FAFAF9;
  --hover: #F2F2EF;
  --yellow: #F5E642;
  --yellow-light: #FFFDE8;
  --yellow-mid: #FAF0A0;
  --yellow-dark: #C8B800;
  --yellow-border: #E8DC30;
  --text-primary: #1A1A18;
  --text-secondary: #6B6B66;
  --text-tertiary: #A8A8A2;
  --border-1: #E8E8E4;
  --border-2: #D4D4CE;
  --border-3: #BFBFB8;
  --green: #2D7D52;
  --green-bg: #EDF7F1;
  --blue: #1D6FA4;
  --blue-bg: #EEF6FC;
  --purple: #5B4FD4;
  --purple-bg: #F0EFFE;
  --amber: #A0620A;
  --amber-bg: #FEF7ED;
  --shadow: 0 1px 4px rgba(0,0,0,0.07), 0 4px 16px rgba(0,0,0,0.05);
  --shadow-heavy: 0 2px 8px rgba(0,0,0,0.1), 0 8px 32px rgba(0,0,0,0.08);
  --radius-lg: 10px;
  --radius-md: 7px;
  --radius-sm: 5px;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  color: var(--text-primary);
  background: var(--white);
  line-height: 1.6;
}

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

/* --- Navigation --- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: 56px;
  background: var(--white);
  border-bottom: 1px solid var(--border-1);
  transition: background 0.3s, backdrop-filter 0.3s;
}

.nav.scrolled {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.nav-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--text-primary);
}

.logo-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  background: var(--yellow);
  border: 1.5px solid var(--yellow-dark);
  border-radius: 5px;
  font-size: 11px;
  line-height: 1;
}

.logo-text {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  cursor: pointer;
  font-family: inherit;
  font-weight: 600;
  font-size: 14px;
  border-radius: var(--radius-sm);
  padding: 10px 20px;
  transition: transform 0.15s, box-shadow 0.15s, background 0.15s;
  text-decoration: none;
}

.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-dark {
  background: var(--text-primary);
  color: var(--white);
}
.btn-dark:hover { background: #333330; }

.btn-yellow {
  background: var(--yellow);
  color: var(--text-primary);
  border: 1.5px solid var(--yellow-dark);
}
.btn-yellow:hover { background: var(--yellow-mid); }

.btn-sm { padding: 7px 16px; font-size: 13px; }

/* --- Hero --- */
.hero {
  padding: 140px 0 60px;
  text-align: center;
}

.kicker {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: var(--text-secondary);
  margin-bottom: 16px;
}

.hero-headline {
  font-size: clamp(36px, 6vw, 60px);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: 20px;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

.hero-sub {
  font-size: clamp(16px, 2.5vw, 19px);
  color: var(--text-secondary);
  max-width: 580px;
  margin: 0 auto 36px;
  line-height: 1.5;
}

/* --- Waitlist Form --- */
.waitlist-form { max-width: 440px; margin: 0 auto; }

.waitlist-input-group {
  display: flex;
  gap: 8px;
}

.waitlist-email {
  flex: 1;
  padding: 10px 14px;
  border: 1.5px solid var(--border-2);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 14px;
  background: var(--white);
  color: var(--text-primary);
  outline: none;
  transition: border-color 0.2s;
}

.waitlist-email:focus { border-color: var(--yellow-dark); }
.waitlist-email::placeholder { color: var(--text-tertiary); }

.waitlist-proof {
  margin-top: 10px;
  font-size: 13px;
  color: var(--text-tertiary);
  text-align: center;
}

.waitlist-success {
  margin-top: 10px;
  font-size: 14px;
  color: var(--green);
  font-weight: 500;
  text-align: center;
}

/* --- Scroll Hint --- */
.scroll-hint {
  margin-top: 48px;
  color: var(--text-tertiary);
  animation: bounce 2s infinite;
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(6px); }
}

/* --- Canvas Visual --- */
.canvas-visual {
  padding: 0 24px 80px;
}

.canvas-bg {
  max-width: 900px;
  margin: 0 auto;
  background: var(--canvas-bg);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-1);
  box-shadow: var(--shadow);
  overflow: hidden;
  background-image: radial-gradient(circle, var(--dot-grid) 1px, transparent 1px);
  background-size: 24px 24px;
}

.canvas-demo {
  position: relative;
  width: 100%;
  height: 420px;
}

/* Hub Node */
.hub-node {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: var(--white);
  border: 2px solid var(--text-primary);
  border-radius: var(--radius-lg);
  padding: 16px 24px;
  box-shadow: 4px 4px 0 var(--text-primary);
  text-align: center;
  z-index: 2;
}

.hub-label {
  font-weight: 700;
  font-size: 15px;
}

.hub-meta {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 2px;
}

/* Asset Nodes */
.asset-node {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--white);
  border: 1.5px solid var(--border-2);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 500;
  box-shadow: var(--shadow);
  z-index: 2;
  transition: transform 0.3s cubic-bezier(.34,1.56,.64,1), box-shadow 0.3s;
}

.asset-node:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-heavy);
}

.node-icon { font-size: 16px; }

.node-doc    { top: 14%; left: 12%; }
.node-slides { top: 14%; right: 12%; }
.node-sheet  { bottom: 14%; left: 12%; }
.node-social { bottom: 14%; right: 12%; }
.node-video  { top: 50%; right: 8%; transform: translateY(-50%); }

/* Connection Lines */
.connections-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
}

.conn-line {
  stroke: var(--border-2);
  stroke-width: 1.5;
  stroke-dasharray: 4 6;
  animation: dashMove 2s linear infinite;
}

@keyframes dashMove {
  to { stroke-dashoffset: -20; }
}

/* Floating Cursor */
.floating-cursor {
  position: absolute;
  z-index: 3;
  display: flex;
  align-items: flex-start;
  gap: 4px;
  pointer-events: none;
  opacity: 0.9;
}

.cursor-label {
  background: var(--purple);
  color: var(--white);
  font-size: 11px;
  font-weight: 500;
  padding: 2px 8px;
  border-radius: 4px;
  margin-top: 14px;
  white-space: nowrap;
}

/* --- Sections --- */
.section {
  padding: 80px 0;
}

.section-headline {
  font-size: clamp(26px, 4vw, 36px);
  font-weight: 700;
  letter-spacing: -0.02em;
  text-align: center;
  margin-bottom: 16px;
}

.section-sub {
  font-size: 17px;
  color: var(--text-secondary);
  text-align: center;
  max-width: 560px;
  margin: 0 auto 48px;
  line-height: 1.5;
}

/* --- Problem Section --- */
.problem-section {
  background: var(--off-white);
}

.problem-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 40px;
}

.problem-card {
  background: var(--white);
  border: 1px solid var(--border-1);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  box-shadow: var(--shadow);
}

.problem-icon {
  font-size: 28px;
  margin-bottom: 14px;
}

.problem-text {
  font-size: 15px;
  line-height: 1.55;
  color: var(--text-secondary);
}

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

/* --- Solution Section --- */
.solution-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 40px;
}

.solution-card {
  background: var(--white);
  border: 1px solid var(--border-1);
  border-radius: var(--radius-lg);
  padding: 32px 24px;
  box-shadow: var(--shadow);
  text-align: center;
}

.solution-visual {
  display: flex;
  justify-content: center;
  margin-bottom: 20px;
}

.solution-title {
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 10px;
}

.solution-body {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.55;
}

/* --- Inspiration Deep Dive --- */
.inspo-section {
  background: var(--canvas-bg);
  background-image: radial-gradient(circle, var(--dot-grid) 1px, transparent 1px);
  background-size: 24px 24px;
}

.inspo-walkthrough {
  max-width: 740px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.inspo-step {
  display: grid;
  grid-template-columns: 40px 1fr 320px;
  gap: 20px;
  align-items: start;
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.inspo-step.visible {
  opacity: 1;
  transform: translateY(0);
}

.step-number {
  width: 36px;
  height: 36px;
  background: var(--yellow);
  border: 1.5px solid var(--yellow-dark);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
  flex-shrink: 0;
}

.step-title {
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 6px;
}

.step-desc {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* Step Visuals */
.step-visual {
  background: var(--white);
  border: 1px solid var(--border-1);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
}

/* Mini Canvas */
.mini-canvas {
  padding: 20px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: flex-start;
}

.mini-node {
  background: var(--white);
  border: 1.5px solid var(--border-2);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 500;
}

.mini-node-active {
  border-color: var(--yellow-dark);
  box-shadow: 0 0 0 3px var(--yellow-light);
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
  width: 100%;
  max-width: 200px;
}

.mini-node-active > span { display: flex; align-items: center; gap: 6px; }

.mini-node-expanded {
  padding-top: 8px;
  border-top: 1px solid var(--border-1);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.mini-content-line {
  height: 6px;
  background: var(--border-1);
  border-radius: 3px;
  width: 100%;
}
.mini-content-line.short { width: 65%; }

.inspo-trigger-btn {
  margin-top: 4px;
  background: var(--yellow-light);
  border: 1px solid var(--yellow-border);
  border-radius: 20px;
  padding: 5px 12px;
  font-size: 12px;
  font-weight: 600;
  color: var(--yellow-dark);
  cursor: default;
  align-self: flex-start;
}

.mini-node-dim { opacity: 0.45; }
.mini-node-bottom { position: relative; }

/* Inspiration Panel Demo */
.inspo-panel-demo {
  padding: 16px;
}

.inspo-panel-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 14px;
  padding: 8px 12px;
  background: var(--yellow-light);
  border-radius: var(--radius-sm);
  margin-bottom: 12px;
}

.inspo-panel-icon {
  color: var(--yellow-dark);
  font-size: 14px;
}

.inspo-types {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}

.inspo-type-chip {
  font-size: 12px;
  padding: 5px 10px;
  border-radius: 20px;
  background: var(--off-white);
  border: 1px solid var(--border-1);
  color: var(--text-secondary);
  font-weight: 500;
}
.inspo-type-chip.active {
  background: var(--yellow-light);
  border-color: var(--yellow-border);
  color: var(--text-primary);
}

.inspo-type-desc {
  font-size: 12px;
  color: var(--text-tertiary);
  font-style: italic;
  padding: 0 4px;
}

/* Add Tabs */
.inspo-add-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 14px;
}

.add-tab {
  font-size: 12px;
  padding: 5px 12px;
  border-radius: var(--radius-sm);
  background: var(--off-white);
  border: 1px solid var(--border-1);
  color: var(--text-secondary);
  font-weight: 500;
}
.add-tab.active {
  background: var(--white);
  border-color: var(--border-2);
  color: var(--text-primary);
}

/* Inspiration Items */
.inspo-items {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.inspo-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--border-1);
  border-radius: var(--radius-md);
  background: var(--off-white);
}

.inspo-item-icon { font-size: 16px; flex-shrink: 0; }

.inspo-item-info {
  flex: 1;
  min-width: 0;
}

.inspo-item-name {
  display: block;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.inspo-item-source {
  display: block;
  font-size: 11px;
  color: var(--text-tertiary);
}

.inspo-badge {
  font-size: 10px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 20px;
  white-space: nowrap;
  flex-shrink: 0;
}
.badge-blue   { background: var(--blue-bg);   color: var(--blue); }
.badge-purple { background: var(--purple-bg); color: var(--purple); }
.badge-amber  { background: var(--amber-bg);  color: var(--amber); }
.badge-green  { background: var(--green-bg);  color: var(--green); }

/* AI Panel Demo */
.ai-panel-demo {
  padding: 16px;
}

.ai-context-bar {
  font-size: 11px;
  color: var(--text-secondary);
  background: var(--off-white);
  border: 1px solid var(--border-1);
  border-radius: var(--radius-sm);
  padding: 6px 12px;
  margin-bottom: 14px;
}

.ai-message {
  border-radius: var(--radius-md);
  padding: 12px 14px;
  font-size: 13px;
  line-height: 1.55;
  margin-bottom: 10px;
}

.ai-user-msg {
  background: var(--text-primary);
  color: var(--white);
  margin-left: 40px;
}

.ai-response-msg {
  background: var(--off-white);
  border: 1px solid var(--border-1);
}

.ai-response-msg p { margin-bottom: 8px; }
.ai-response-msg p:last-of-type { margin-bottom: 12px; }

.ai-attribution {
  border-top: 1px solid var(--border-1);
  padding-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.ai-attr-item {
  font-size: 11px;
  color: var(--yellow-dark);
  font-weight: 500;
}

/* Aha Callout */
.aha-callout {
  background: var(--yellow-light);
  border: 1.5px solid var(--yellow-border);
  border-radius: var(--radius-lg);
  padding: 20px 28px;
  text-align: center;
  font-size: 17px;
  font-weight: 500;
  margin-top: 48px;
  max-width: 640px;
  margin-left: auto;
  margin-right: auto;
}

/* --- Use Cases --- */
.usecases-section {
  background: var(--off-white);
}

.usecase-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 40px;
}

.usecase-card {
  background: var(--white);
  border: 1px solid var(--border-1);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow);
}

.usecase-mini-canvas {
  position: relative;
  height: 100px;
  margin-bottom: 16px;
  background: var(--canvas-bg);
  border-radius: var(--radius-md);
  background-image: radial-gradient(circle, var(--dot-grid) 1px, transparent 1px);
  background-size: 16px 16px;
}

.uc-hub {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 22px;
  background: var(--white);
  border: 1.5px solid var(--text-primary);
  border-radius: var(--radius-sm);
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 2px 2px 0 var(--text-primary);
  z-index: 2;
}

.uc-node {
  position: absolute;
  font-size: 16px;
  background: var(--white);
  border: 1px solid var(--border-2);
  border-radius: var(--radius-sm);
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
}

.uc-n1 { top: 10%; left: 15%; }
.uc-n2 { top: 10%; right: 15%; }
.uc-n3 { bottom: 10%; left: 15%; }
.uc-n4 { bottom: 10%; right: 15%; }

.uc-lines {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}
.uc-lines line {
  stroke: var(--border-2);
  stroke-width: 1;
  stroke-dasharray: 3 4;
}

.usecase-title {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 6px;
}

.usecase-body {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* --- CTA Section --- */
.cta-section {
  text-align: center;
  padding: 100px 0;
}

.cta-sub {
  font-size: 16px;
  color: var(--text-secondary);
  margin-bottom: 32px;
}

/* --- Footer --- */
.footer {
  border-top: 1px solid var(--border-1);
  padding: 24px 0;
}

.footer-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.footer-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.footer-copy {
  font-size: 13px;
  color: var(--text-tertiary);
}

.footer-right a {
  color: var(--text-secondary);
  transition: color 0.2s;
}
.footer-right a:hover { color: var(--text-primary); }

/* ==========================================
   Responsive
   ========================================== */

@media (max-width: 768px) {
  .hero { padding: 120px 0 48px; }

  .waitlist-input-group {
    flex-direction: column;
  }
  .waitlist-input-group .btn { width: 100%; }

  .problem-grid,
  .solution-grid,
  .usecase-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .inspo-step {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .step-number {
    width: 32px;
    height: 32px;
    font-size: 13px;
  }

  .step-visual {
    width: 100%;
  }

  .canvas-demo { height: 320px; }

  .node-doc    { top: 8%;  left: 4%; }
  .node-slides { top: 8%;  right: 4%; }
  .node-sheet  { bottom: 8%; left: 4%; }
  .node-social { bottom: 8%; right: 4%; }
  .node-video  { top: 50%; right: 2%; }

  .hub-node { padding: 12px 16px; }
  .hub-label { font-size: 13px; }

  .asset-node { padding: 8px 10px; font-size: 12px; }
  .node-icon { font-size: 14px; }

  .section { padding: 60px 0; }

  .footer-inner { flex-direction: column; gap: 12px; text-align: center; }
  .footer-left { flex-direction: column; gap: 8px; }
}

@media (max-width: 480px) {
  .hero-headline { font-size: 32px; }
  .section-headline { font-size: 24px; }
  .canvas-demo { height: 280px; }
  .node-label { display: none; }
}
