/* ==========================================================================
   WORKFORM STATIC LANDING PAGE - STYLES
   ========================================================================== */

/* --------------------------------------------------------------------------
   CSS CUSTOM PROPERTIES (Design Tokens)
   -------------------------------------------------------------------------- */
:root {
  /* Primary Colors (Brand Blue) */
  --primary-50: #f5f7ff;
  --primary-100: #e8edff;
  --primary-200: #c9d5ff;
  --primary-300: #a1b5ff;
  --primary-400: #6d8cff;
  --primary-500: #4366ff;
  --primary-600: #2b4ccc;
  --primary-700: #1f3899;
  --primary-800: #152666;
  --primary-900: #0d1a44;
  
  /* Neutral Colors */
  --neutral-0: #ffffff;
  --neutral-50: #fafbfc;
  --neutral-100: #f4f5f7;
  --neutral-200: #e8eaed;
  --neutral-300: #d4d7dd;
  --neutral-400: #a8adb6;
  --neutral-500: #6b7280;
  --neutral-600: #4e5460;
  --neutral-700: #3a3f4a;
  --neutral-800: #262a33;
  --neutral-900: #1a1d24;
  --neutral-950: #0f1115;
  
  /* Text Colors */
  --text-lightest: var(--neutral-400);
  --text-lighter: var(--neutral-500);
  --text-light: var(--neutral-600);
  --text-dark: var(--neutral-700);
  --text-darker: var(--neutral-800);
  --text-darkest: var(--neutral-900);
  
  /* Background Colors */
  --background-lightest: var(--neutral-0);
  --background-lighter: var(--neutral-50);
  --background-light: var(--neutral-100);
  
  /* Border Colors */
  --border-light: var(--neutral-300);
  --border-lighter: var(--neutral-200);
  
  /* Status Colors */
  --emerald-100: #d1fae5;
  --emerald-400: #34d399;
  --emerald-600: #059669;
  --violet-100: #ede9fe;
  --violet-700: #6d28d9;
  
  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
  --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.15);
  
  /* Transitions */
  --ease-out-expo: cubic-bezier(0.22, 1, 0.36, 1);
  --transition-fast: 200ms var(--ease-out-expo);
  --transition-normal: 300ms var(--ease-out-expo);
  --transition-slow: 500ms var(--ease-out-expo);
}

/* --------------------------------------------------------------------------
   BASE STYLES & RESET
   -------------------------------------------------------------------------- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-darkest);
  background-color: var(--background-lightest);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

button, input {
  font-family: inherit;
  font-size: inherit;
}

a {
  text-decoration: none;
  color: inherit;
}

/* --------------------------------------------------------------------------
   ANIMATIONS
   -------------------------------------------------------------------------- */

/* Background zoom animation */
@keyframes bgZoom {
  0% {
    transform: scale(2.5);
    opacity: 0;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

/* Fade in from top */
@keyframes fadeInDown {
  0% {
    opacity: 0;
    transform: translateY(-30px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Fade in from bottom */
@keyframes fadeInUp {
  0% {
    opacity: 0;
    transform: translateY(20px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Scale in */
@keyframes scaleIn {
  0% {
    opacity: 0;
    transform: scale(0.85);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

/* Word reveal animation */
@keyframes wordReveal {
  0% {
    opacity: 0;
    transform: translateY(20px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Logo item reveal */
@keyframes logoItemReveal {
  0% {
    opacity: 0;
    transform: scale(0.5) translateY(15px);
  }
  100% {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

/* Demo card fade in */
@keyframes demoCardIn {
  0% {
    opacity: 0;
    transform: scale(0.95) translateY(20px);
  }
  100% {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

/* Pulse animation for loading dots */
@keyframes pulse {
  0%, 100% {
    opacity: 0.3;
  }
  50% {
    opacity: 1;
  }
}

/* Timeline item fade in */
@keyframes timelineReveal {
  0% {
    opacity: 0;
    transform: translateY(-8px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Timeline item slide in for new items */
@keyframes timelineSlideIn {
  0% {
    opacity: 0;
    max-height: 0;
  }
  100% {
    opacity: 1;
    max-height: 100px;
  }
}

/* Check mark bounce */
@keyframes checkBounce {
  0% {
    transform: scale(0);
  }
  50% {
    transform: scale(1.2);
  }
  100% {
    transform: scale(1);
  }
}

/* Spring animation for success message */
@keyframes springIn {
  0% {
    opacity: 0;
    transform: scale(0.9);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

/* --------------------------------------------------------------------------
   LAYOUT
   -------------------------------------------------------------------------- */
.landing-container {
  min-height: 100vh;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* Background */
.background {
  position: absolute;
  inset: 0;
  animation: bgZoom 6s var(--ease-out-expo) forwards;
  will-change: transform, opacity;
}

.background img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Header */
.header {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  padding: 1.5rem;
  opacity: 0;
  animation: fadeInDown 1s var(--ease-out-expo) 0.3s forwards;
}

@media (min-width: 1024px) {
  .header {
    padding: 1.5rem 3rem;
  }
}

.header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 80rem;
  margin: 0 auto;
}

.logo-link {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  transition: transform var(--transition-fast);
}

.logo-link:hover {
  transform: scale(1.02);
}

.logo-link:active {
  transform: scale(0.98);
}

.logo-img {
  width: 32px;
  height: 32px;
}

.logo-text {
  color: var(--neutral-900);
  font-weight: 600;
  letter-spacing: -0.025em;
}

/* Main content */
.main-content {
  position: relative;
  z-index: 10;
  padding: 5rem 1.5rem;
  flex: 1;
  display: flex;
  align-items: center;
}

@media (min-width: 1024px) {
  .main-content {
    padding: 5rem 3rem;
  }
}

.main-inner {
  max-width: 80rem;
  margin: 0 auto;
  width: 100%;
}

/* Hero layout */
.hero-grid {
  display: flex;
  flex-direction: column;
  gap: 3rem;
}

@media (min-width: 1024px) {
  .hero-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 5rem;
    align-items: center;
  }
}

/* Left column */
.hero-content {
  /* Content column */
}

/* Tag/Badge */
.tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-light);
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(8px);
  border: 1px solid var(--neutral-200);
  border-radius: 9999px;
  padding: 0.5rem 1rem;
  margin-bottom: 1.5rem;
  opacity: 0;
  animation: scaleIn 0.8s var(--ease-out-expo) 0.2s forwards;
}

/* Headline */
.headline {
  font-size: 2.25rem;
  font-weight: 700;
  color: var(--neutral-900);
  line-height: 1.1;
  letter-spacing: -0.05em;
  margin-bottom: 1.5rem;
}

@media (min-width: 640px) {
  .headline {
    font-size: 3rem;
  }
}

@media (min-width: 1024px) {
  .headline {
    font-size: 3rem;
  }
}

.headline .word {
  display: inline-block;
  opacity: 0;
  animation: wordReveal 0.5s var(--ease-out-expo) forwards;
}

/* Description */
.description {
  font-size: 1.125rem;
  line-height: 1.75;
  color: var(--neutral-500);
  max-width: 32rem;
  opacity: 0;
  animation: fadeInUp 0.8s var(--ease-out-expo) 1.2s forwards;
}

@media (min-width: 1024px) {
  .description {
    font-size: 1.25rem;
  }
}

/* Email section */
.email-section {
  margin-top: 2rem;
  opacity: 0;
  animation: fadeInUp 0.8s var(--ease-out-expo) 1.5s forwards;
}

.email-capture {
  margin-bottom: 3rem;
}

/* Form */
.email-form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

@media (min-width: 640px) {
  .email-form {
    flex-direction: row;
  }
}

.honeypot {
  position: absolute;
  left: -9999px;
  opacity: 0;
  pointer-events: none;
}

.email-input {
  height: 3rem;
  padding: 0 1rem;
  border-radius: 0.5rem;
  border: 1px solid var(--neutral-300);
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(8px);
  color: var(--neutral-900);
  width: 100%;
  transition: all var(--transition-fast);
}

@media (min-width: 640px) {
  .email-input {
    width: 18rem;
  }
}

.email-input::placeholder {
  color: var(--neutral-400);
}

.email-input:focus {
  outline: none;
  box-shadow: 0 0 0 2px var(--neutral-900);
  border-color: transparent;
  transform: scale(1.02);
}

.submit-btn {
  height: 3rem;
  padding: 0 2rem;
  background: var(--neutral-900);
  color: white;
  border: none;
  border-radius: 0.5rem;
  font-weight: 500;
  font-size: 1rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  box-shadow: var(--shadow-lg), 0 0 0 0 rgba(0, 0, 0, 0.1);
  transition: all var(--transition-fast);
}

.submit-btn:hover {
  background: var(--neutral-800);
  transform: scale(1.03);
}

.submit-btn:active {
  transform: scale(0.98);
}

.submit-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.submit-btn svg {
  width: 1rem;
  height: 1rem;
  transition: transform var(--transition-fast);
}

.submit-btn:hover svg {
  transform: translateX(2px);
}

/* Success state */
.success-message {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-dark);
  animation: springIn 0.4s var(--ease-out-expo) forwards;
}

.success-icon {
  width: 2rem;
  height: 2rem;
  border-radius: 9999px;
  background: var(--emerald-100);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: checkBounce 0.4s var(--ease-out-expo) forwards;
}

.success-icon svg {
  width: 1rem;
  height: 1rem;
  color: var(--emerald-600);
}

.success-text {
  font-size: 0.875rem;
  font-weight: 500;
}

/* Integrations */
.integrations {
  padding-top: 2rem;
  border-top: 1px solid rgba(209, 213, 219, 0.6);
}

.integrations-label {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-dark);
  margin-bottom: 1rem;
}

.logo-grid {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.logo-item {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.75rem;
  backdrop-filter: blur(12px);
  background: rgba(255, 255, 255, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-sm);
  cursor: default;
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.logo-item.revealed {
  animation: logoItemReveal 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

.logo-item:hover {
  transform: scale(1.15) translateY(-3px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
  background: rgba(255, 255, 255, 0.8);
}

.logo-item img {
  width: 20px;
  height: 20px;
  opacity: 0.8;
}

.more-text {
  font-size: 0.75rem;
  color: var(--text-dark);
  margin-left: 0.25rem;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.more-text.visible {
  opacity: 1;
}

/* --------------------------------------------------------------------------
   DEMO CARD (Right Column)
   -------------------------------------------------------------------------- */
.demo-wrapper {
  position: relative;
  opacity: 0;
  animation: demoCardIn 1.2s var(--ease-out-expo) 1.8s forwards;
}

.demo-card {
  position: relative;
  border-radius: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.3);
  box-shadow: var(--shadow-2xl);
  overflow: hidden;
  background: linear-gradient(to bottom right, 
    rgba(255, 255, 255, 0.8), 
    rgba(255, 255, 255, 0.7), 
    rgba(255, 255, 255, 0.6));
  padding: 1.25rem 0.75rem;
  transition: box-shadow 0.3s ease;
}

@media (min-width: 640px) {
  .demo-card {
    padding: 1.75rem 1.25rem;
  }
}

@media (min-width: 1024px) {
  .demo-card {
    background: linear-gradient(to bottom right, 
      rgba(255, 255, 255, 0.5), 
      rgba(255, 255, 255, 0.4), 
      rgba(255, 255, 255, 0.3));
    padding: 2.5rem 1.75rem;
  }
}

.demo-card:hover {
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

/* Activity feed container with fade mask */
.activity-feed-container {
  height: 350px;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(to top, black 80%, transparent 100%);
  mask-image: linear-gradient(to top, black 80%, transparent 100%);
}

@media (min-width: 640px) {
  .activity-feed-container {
    height: 400px;
  }
}

@media (min-width: 1024px) {
  .activity-feed-container {
    height: 500px;
  }
}

/* Activity feed */
.activity-feed {
  position: relative;
  height: 100%;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

/* Timeline item */
.timeline-item {
  position: relative;
  display: flex;
  flex-shrink: 0;
  overflow: hidden;
  opacity: 0;
}

.timeline-item.revealed {
  animation: timelineReveal 0.35s ease-out forwards;
}

.timeline-item.new-item {
  animation: timelineSlideIn 0.5s ease-out forwards;
}

/* Left icon column */
.timeline-icon-col {
  width: 1.25rem;
  flex-shrink: 0;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding-top: 12px;
  margin: 0 0.25rem;
}

@media (min-width: 640px) {
  .timeline-icon-col {
    width: 1.5rem;
    margin: 0 0.5rem;
    padding-top: 14px;
  }
}

.timeline-icon {
  width: 0.75rem;
  height: 0.75rem;
  color: var(--text-lightest);
}

@media (min-width: 640px) {
  .timeline-icon {
    width: 0.875rem;
    height: 0.875rem;
  }
}

/* Loading skeleton for icon */
.skeleton-circle {
  width: 0.75rem;
  height: 0.75rem;
  border-radius: 9999px;
  background: var(--background-light);
  animation: pulse 1.5s ease-in-out infinite;
}

@media (min-width: 640px) {
  .skeleton-circle {
    width: 0.875rem;
    height: 0.875rem;
  }
}

/* Content column */
.timeline-content-col {
  flex: 1;
  border-left: 1px solid var(--border-light);
}

.timeline-content {
  display: flex;
  gap: 0.25rem;
  padding: 0.5rem 0.5rem 0.5rem 0.5rem;
  align-items: flex-start;
}

@media (min-width: 640px) {
  .timeline-content {
    gap: 0.5rem;
    padding: 0.75rem 1rem 0.75rem 0.75rem;
  }
}

/* Indicator dot */
.indicator-dot {
  width: 4px;
  height: 4px;
  border-radius: 9999px;
  flex-shrink: 0;
  margin-left: -10px;
  margin-right: 2px;
  margin-top: 5px;
}

@media (min-width: 640px) {
  .indicator-dot {
    width: 5px;
    height: 5px;
    margin-left: -15px;
    margin-right: 4px;
    margin-top: 7px;
  }
}

.indicator-dot.input {
  background: var(--border-light);
}

.indicator-dot.action {
  background: var(--emerald-400);
}

.indicator-dot.loading {
  animation: pulse 1.5s ease-in-out infinite;
}

/* Text content */
.timeline-text {
  flex: 1;
  min-width: 0;
  font-size: 0.75rem;
  color: var(--text-light);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (min-width: 640px) {
  .timeline-text {
    font-size: 0.875rem;
  }
}

.timeline-text .headline-text {
  /* Normal action text */
}

.timeline-text .headline-text.input-text {
  color: var(--text-lighter);
}

.timeline-text .source-logo,
.timeline-text .target-logo {
  display: inline;
  vertical-align: middle;
  margin: 0 0.25rem;
  width: 0.75rem;
  height: 0.75rem;
}

@media (min-width: 640px) {
  .timeline-text .source-logo,
  .timeline-text .target-logo {
    margin: 0 0.375rem;
    width: 0.875rem;
    height: 0.875rem;
  }
}

.timeline-text .separator {
  color: var(--text-lightest);
  margin: 0 0.25rem;
}

@media (min-width: 640px) {
  .timeline-text .separator {
    margin: 0 0.375rem;
  }
}

.timeline-text .app-name {
  color: var(--text-lighter);
  margin-left: 0.125rem;
}

@media (min-width: 640px) {
  .timeline-text .app-name {
    margin-left: 0.25rem;
  }
}

.timeline-text .assignee-avatar {
  display: inline-flex;
  align-items: center;
  vertical-align: text-bottom;
}

.timeline-text .assignee-avatar img {
  width: 1rem;
  height: 1rem;
  border-radius: 9999px;
  object-fit: cover;
}

@media (min-width: 640px) {
  .timeline-text .assignee-avatar img {
    width: 1.25rem;
    height: 1.25rem;
  }
}

.timeline-text .assignee-initials {
  width: 1rem;
  height: 1rem;
  border-radius: 9999px;
  background: var(--violet-100);
  color: var(--violet-700);
  font-size: 8px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

@media (min-width: 640px) {
  .timeline-text .assignee-initials {
    width: 1.25rem;
    height: 1.25rem;
    font-size: 9px;
  }
}

.timeline-text .assignee-name {
  color: var(--text-dark);
  font-weight: 500;
  margin-left: 0.25rem;
}

.timeline-text .subtext {
  color: var(--text-lightest);
}

.timeline-text .subtext-value {
  color: var(--text-dark);
  font-weight: 500;
}

/* Loading dots */
.loading-dots {
  height: 1rem;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

@media (min-width: 640px) {
  .loading-dots {
    height: 1.25rem;
  }
}

.loading-dot {
  width: 4px;
  height: 4px;
  border-radius: 9999px;
  background: var(--neutral-400);
}

.loading-dot:nth-child(1) {
  animation: pulse 1s ease-in-out infinite;
}

.loading-dot:nth-child(2) {
  animation: pulse 1s ease-in-out 0.2s infinite;
}

.loading-dot:nth-child(3) {
  animation: pulse 1s ease-in-out 0.4s infinite;
}

/* --------------------------------------------------------------------------
   UTILITIES
   -------------------------------------------------------------------------- */
.hidden {
  display: none !important;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
