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

:root {
  --bg: #fafafa;
  --text-primary: #242424;
  --text-secondary: #757575;
  --text-tertiary: #a8a8a8;
  --accent: #1a8917;
  --conflict: #c94539;
  --border: #e6e6e6;
  --highlight: #f0f9ff;
  --paper: #fdf6e3;
}

body {
  background: var(--bg);
  color: var(--text-primary);
  font-family: 'Source Serif 4', Georgia, 'Times New Roman', serif;
  font-size: 21px;
  line-height: 1.58;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.container {
  max-width: 680px;
  margin: 0 auto;
  padding: 80px 24px;
  min-height: 100vh;
}

.header {
  margin-bottom: 100px;
  opacity: 0;
  animation: fadeIn 1.2s ease-in forwards;
}

.logo {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 24px;
  letter-spacing: -0.3px;
}

.title {
  font-size: 48px;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.25;
  margin-bottom: 24px;
  letter-spacing: -0.5px;
}

.subtitle {
  color: var(--text-secondary);
  font-size: 24px;
  line-height: 1.5;
  font-style: italic;
  font-weight: 400;
}

.examples-intro {
  margin-bottom: 32px;
}

.examples-intro h2 {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 12px;
  letter-spacing: -0.2px;
}

.examples-intro p {
  color: var(--text-secondary);
  font-size: 18px;
  line-height: 1.6;
}

.use-case-tabs {
  display: flex;
  gap: 12px;
  margin-bottom: 48px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}

.tab-button {
  padding: 10px 20px;
  font-size: 15px;
  font-family: inherit;
  font-weight: 400;
  color: var(--text-secondary);
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.2s;
}

.tab-button:hover {
  border-color: var(--accent);
  color: var(--text-primary);
}

.tab-button.active {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
}

.use-case-content {
  display: none;
  background: var(--paper);
  padding: 40px;
  border-radius: 5px;
  box-shadow: 3px 3px 3px rgba(0,0,0,.2), 0px 0px 6px rgba(0,0,0,.2);
}

.use-case-content.active {
  display: block;
}

.use-case-list {
  margin-top: 48px;
}

.use-case-list h3 {
  font-size: 20px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 24px;
  letter-spacing: -0.3px;
}

.use-case-list ul {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}

.use-case-list li {
  padding: 16px 20px;
  background: white;
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: 17px;
  color: var(--text-primary);
  line-height: 1.5;
}

.use-case-list li strong {
  color: var(--accent);
  font-weight: 600;
}

.use-case-list .more-text {
  margin-top: 32px;
  padding-top: 32px;
  border-top: 1px solid var(--border);
  text-align: center;
  color: var(--text-secondary);
  font-size: 18px;
  font-style: italic;
}

.document-meta {
  color: var(--text-tertiary);
  font-size: 15px;
  margin-bottom: 48px;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
}

.meta-item {
  display: flex;
  align-items: center;
  gap: 8px;
}

.status-indicator {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
  animation: pulse 2.5s ease-in-out infinite;
}

.status-indicator.syncing {
  background: #3b82f6;
}

.status-indicator.conflict {
  background: var(--conflict);
}

.section {
  margin-bottom: 56px;
  opacity: 0;
  transform: translateY(20px);
}

.section.visible {
  animation: slideIn 0.8s ease-out forwards;
}

.section-header {
  font-size: 32px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 32px;
  letter-spacing: -0.4px;
  line-height: 1.3;
  position: relative;
  cursor: help;
}

.section-source {
  color: var(--text-tertiary);
  font-size: 14px;
  font-style: italic;
  margin-left: 12px;
  font-weight: 400;
}

.section-instructions {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  margin-top: 12px;
  padding: 16px 20px;
  background: white;
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: 15px;
  font-weight: 400;
  color: var(--text-secondary);
  line-height: 1.6;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
  z-index: 10;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.section-header:hover .section-instructions {
  opacity: 1;
}

.paragraph {
  margin-bottom: 28px;
  opacity: 0;
  transform: translateY(10px);
}

.paragraph.visible {
  animation: slideIn 0.6s ease-out forwards;
}

.paragraph-text {
  display: inline;
  color: var(--text-primary);
}

.paragraph-text.typing::after {
  content: '|';
  animation: blink 1s step-end infinite;
  color: var(--text-secondary);
  margin-left: 2px;
}

.paragraph.conflict .paragraph-text {
  color: var(--conflict);
  text-decoration: line-through;
  opacity: 0.5;
}

.paragraph.highlight {
  background: var(--highlight);
  padding: 4px 8px;
  margin: 0 -8px 28px -8px;
  border-left: 3px solid var(--accent);
}

.conflict-notice {
  background: #fff5f5;
  border-left: 3px solid var(--conflict);
  padding: 24px;
  margin: 48px 0;
  font-size: 18px;
  line-height: 1.6;
  display: none;
  color: var(--text-secondary);
}

.conflict-notice.show {
  display: block;
  animation: slideIn 0.6s ease-out forwards;
}

.conflict-notice strong {
  color: var(--conflict);
  font-weight: 600;
}

.version-badge {
  position: fixed;
  top: 24px;
  right: 24px;
  color: var(--text-tertiary);
  font-size: 13px;
  background: white;
  padding: 8px 16px;
  border-radius: 20px;
  border: 1px solid var(--border);
  opacity: 0;
  animation: fadeIn 1s ease-in forwards 2s;
}

.version-number {
  color: var(--accent);
  font-weight: 600;
}

.sync-activity {
  margin-top: 80px;
  padding-top: 48px;
  border-top: 1px solid var(--border);
}

.sync-activity-title {
  color: var(--text-tertiary);
  font-size: 14px;
  margin-bottom: 24px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
}

.sync-entry {
  font-size: 15px;
  color: var(--text-secondary);
  padding: 8px 0;
  opacity: 0;
  line-height: 1.6;
}

.sync-entry.visible {
  animation: fadeIn 0.4s ease-in forwards;
}

.sync-entry .timestamp {
  color: var(--text-tertiary);
  font-size: 13px;
  font-family: 'SF Mono', 'Monaco', 'Courier New', monospace;
}

.cta-section {
  text-align: center;
  margin: 100px auto;
  padding: 64px 48px;
  background: white;
  border: 1px solid var(--border);
  border-radius: 2px;
  max-width: 560px;
}

.cta-title {
  font-size: 32px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 16px;
  letter-spacing: -0.4px;
}

.cta-description {
  color: var(--text-secondary);
  font-size: 18px;
  line-height: 1.6;
  margin-bottom: 32px;
}

.cta-form {
  display: flex;
  gap: 12px;
  max-width: 400px;
  margin: 0 auto;
}

.cta-input {
  flex: 1;
  padding: 14px 18px;
  font-size: 16px;
  font-family: inherit;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--bg);
  color: var(--text-primary);
  transition: border-color 0.2s;
}

.cta-input:focus {
  outline: none;
  border-color: var(--accent);
}

.cta-input::placeholder {
  color: var(--text-tertiary);
}

.cta-button {
  padding: 14px 28px;
  font-size: 16px;
  font-family: inherit;
  font-weight: 600;
  color: white;
  background: var(--accent);
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: opacity 0.2s;
}

.cta-button:hover {
  opacity: 0.85;
}

.footer {
  text-align: center;
  margin-top: 80px;
  padding-top: 48px;
  border-top: 1px solid var(--border);
  color: var(--text-tertiary);
  font-size: 14px;
  opacity: 0;
  animation: fadeIn 1s ease-in forwards 3s;
}

@keyframes fadeIn {
  to {
    opacity: 1;
  }
}

@keyframes slideIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes blink {
  50% {
    opacity: 0;
  }
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.4;
  }
}

/* ===========================================
   SCROLL ANIMATION - Scattered Title/Subtitle
   =========================================== */

.scroll-elements {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 100;
}

.title-fixed {
  position: fixed;
  top: 24px;
  left: 24px;
  font-size: 24px;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: -0.5px;
  opacity: 0;
  transform-origin: top left;
  transition: all 0.5s ease;
  white-space: nowrap;
}

body.header-scrolled .title-fixed {
  opacity: 1;
  font-size: 28px;
}

.subtitle-part {
  position: fixed;
  font-size: 12px;
  font-style: italic;
  color: var(--text-secondary);
  opacity: 0;
  transition: all 0.5s ease;
  line-height: 1.4;
}

body.header-scrolled .subtitle-part {
  font-size: 17px;
}

.subtitle-left {
  left: 16px;
  top: 50%;
  writing-mode: vertical-rl;
  transform: translateY(-50%) rotate(180deg) translateX(20px);
}

body.header-scrolled .subtitle-left {
  opacity: 1;
  transform: translateY(-50%) rotate(180deg) translateX(0);
}

.subtitle-top {
  top: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(-20px);
}

body.header-scrolled .subtitle-top {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.subtitle-right {
  right: 16px;
  top: 50%;
  writing-mode: vertical-rl;
  transform: translateY(-50%) translateX(-20px);
}

body.header-scrolled .subtitle-right {
  opacity: 1;
  transform: translateY(-50%) translateX(0);
}

body.header-scrolled .header .title,
body.header-scrolled .header .subtitle {
  opacity: 0;
  transition: opacity 0.3s ease;
}

.header .title,
.header .subtitle {
  transition: opacity 0.3s ease;
}

/* Phase 2: Deep scroll - subtitle collapses under title */
body.header-scrolled-deep .title-fixed {
  font-size: 22px;
}

body.header-scrolled-deep .subtitle-part {
  writing-mode: horizontal-tb;
  font-size: 11px;
}

body.header-scrolled-deep .subtitle-left {
  top: 80px;
  left: 24px;
  transform: none;
}

body.header-scrolled-deep .subtitle-top {
  top: 100px;
  left: 24px;
  transform: none;
}

body.header-scrolled-deep .subtitle-right {
  top: 120px;
  left: 24px;
  right: auto;
  transform: none;
}

@media (max-width: 768px) {
  .container {
    padding: 48px 20px;
  }

  .title {
    font-size: 36px;
  }

  .subtitle {
    font-size: 20px;
  }

  .section-header {
    font-size: 28px;
  }

  body {
    font-size: 19px;
  }

  .version-badge {
    display: none;
  }

  .cta-section {
    padding: 40px 24px;
  }

  .cta-form {
    flex-direction: column;
  }

  .cta-button {
    width: 100%;
  }

  /* Disable scroll animation on mobile */
  .scroll-elements {
    display: none;
  }

  body.header-scrolled .header .title,
  body.header-scrolled .header .subtitle {
    opacity: 1;
  }
}
