/* =========================================
   LoopedIn — Neumorphic Landing Page
   ========================================= */

:root {
  /* Neumorphic base palette — warm clay */
  --bg: #e0d8cf;
  --bg-light: #eae3db;
  --bg-dark: #c8c0b7;
  --surface: #e0d8cf;

  /* Shadows */
  --shadow-light: #eee7df;
  --shadow-dark: #b8b0a7;
  --shadow-raised: 6px 6px 14px var(--shadow-dark), -6px -6px 14px var(--shadow-light);
  --shadow-raised-sm: 3px 3px 8px var(--shadow-dark), -3px -3px 8px var(--shadow-light);
  --shadow-raised-lg: 10px 10px 24px var(--shadow-dark), -10px -10px 24px var(--shadow-light);
  --shadow-inset: inset 3px 3px 8px var(--shadow-dark), inset -3px -3px 8px var(--shadow-light);
  --shadow-inset-sm: inset 2px 2px 5px var(--shadow-dark), inset -2px -2px 5px var(--shadow-light);

  /* Text */
  --text-primary: #2c2520;
  --text-secondary: #6b5f54;
  --text-muted: #9a8e82;

  /* Accents */
  --accent: #c45e3a;
  --accent-soft: #d4816a;
  --accent-glow: rgba(196, 94, 58, 0.15);
  --success: #5a8a5e;
  --info: #5a7a8a;

  /* Typography */
  --font-display: 'Fraunces', serif;
  --font-body: 'DM Sans', sans-serif;

  /* Spacing */
  --section-pad: clamp(60px, 10vw, 120px);
  --container: 1200px;
  --radius: 16px;
  --radius-sm: 10px;
  --radius-xs: 6px;
}

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }
em { font-family: var(--font-display); font-style: italic; }

/* Neumorphic utility classes */
.neu-raised { box-shadow: var(--shadow-raised); border-radius: var(--radius); }
.neu-inset { box-shadow: var(--shadow-inset); border-radius: var(--radius); }
.neu-flat { box-shadow: var(--shadow-raised-sm); border-radius: var(--radius-sm); }

/* =========================================
   Navigation
   ========================================= */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 16px 32px;
  background: rgba(224, 216, 207, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  transition: box-shadow 0.3s;
}

.nav.scrolled {
  box-shadow: 0 4px 20px rgba(0,0,0,0.06);
}

.nav-inner {
  max-width: var(--container);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}

.logo-img {
  height: 32px;
  width: auto;
}

.nav-links {
  display: flex;
  gap: 32px;
}

.nav-link {
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: color 0.2s;
  letter-spacing: 0.01em;
}

.nav-link:hover { color: var(--text-primary); }

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

/* Buttons */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  background: var(--accent);
  color: #fff;
  font-family: var(--font-body);
  font-size: 0.92rem;
  font-weight: 600;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  transition: all 0.25s;
  box-shadow: 4px 4px 10px var(--shadow-dark), -2px -2px 8px var(--shadow-light), inset 0 1px 0 rgba(255,255,255,0.15);
}

.btn-primary:hover {
  background: #b3532f;
  transform: translateY(-1px);
  box-shadow: 6px 6px 16px var(--shadow-dark), -4px -4px 12px var(--shadow-light);
}

.btn-primary:active {
  transform: translateY(1px);
  box-shadow: var(--shadow-inset-sm);
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  background: transparent;
  color: var(--text-secondary);
  font-family: var(--font-body);
  font-size: 0.92rem;
  font-weight: 500;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-ghost:hover { color: var(--text-primary); }

.btn-lg { padding: 16px 36px; font-size: 1rem; }

.mobile-menu-btn {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.mobile-menu-btn span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: all 0.3s;
}

/* =========================================
   Hero Section
   ========================================= */
.hero {
  max-width: var(--container);
  margin: 0 auto;
  padding: calc(120px + 40px) 32px var(--section-pad);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 22px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-secondary);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 28px;
  border-radius: 50px;
}

.badge-dot {
  width: 8px;
  height: 8px;
  background: var(--success);
  border-radius: 50%;
  animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(90,138,94,0.4); }
  50% { opacity: 0.8; box-shadow: 0 0 0 6px rgba(90,138,94,0); }
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.8rem, 5.5vw, 4.4rem);
  line-height: 1.1;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 24px;
  letter-spacing: -0.02em;
}

.hero-title em {
  color: var(--accent);
  font-weight: 500;
}

.hero-subtitle {
  font-size: 1.12rem;
  line-height: 1.7;
  color: var(--text-secondary);
  max-width: 520px;
  margin-bottom: 36px;
}

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

/* Hero Stats */
.hero-stats {
  display: flex;
  gap: 16px;
}

.stat-item {
  padding: 18px 24px;
  text-align: center;
  min-width: 120px;
}

.stat-num {
  display: block;
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 4px;
}

.stat-label {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 500;
  letter-spacing: 0.02em;
}

/* Hero Dashboard Preview */
.hero-visual {
  display: flex;
  justify-content: center;
}

.dashboard-preview {
  width: 100%;
  max-width: 500px;
  background: var(--surface);
  overflow: hidden;
}

.dash-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid rgba(0,0,0,0.04);
}

.dash-dots {
  display: flex;
  gap: 6px;
}

.dash-dots span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  box-shadow: var(--shadow-inset-sm);
}

.dash-dots span:first-child { background: #d4816a; }
.dash-dots span:nth-child(2) { background: #c9b87a; }
.dash-dots span:last-child { background: #5a8a5e; }

.dash-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  flex: 1;
}

.dash-badge {
  font-size: 0.72rem;
  padding: 4px 10px;
  background: var(--accent-glow);
  color: var(--accent);
  border-radius: 20px;
  font-weight: 600;
}

.dash-body { padding: 20px; }

.summary-card {
  display: flex;
  gap: 14px;
  padding: 16px;
  margin-bottom: 18px;
  border-radius: var(--radius-sm);
}

.summary-icon {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
}

.summary-text strong {
  display: block;
  font-size: 0.88rem;
  margin-bottom: 6px;
}

.summary-text p {
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.55;
}

.action-title {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.action-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  margin-bottom: 8px;
  font-size: 0.84rem;
  color: var(--text-secondary);
}

.action-check {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  flex-shrink: 0;
  box-shadow: var(--shadow-inset-sm);
  display: flex;
  align-items: center;
  justify-content: center;
}

.action-check.checked {
  background: var(--success);
  color: #fff;
  box-shadow: none;
}

.action-tag {
  margin-left: auto;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 20px;
  background: rgba(90,138,94,0.12);
  color: var(--success);
  white-space: nowrap;
}

.action-tag.pending {
  background: rgba(196, 94, 58, 0.1);
  color: var(--accent);
}

/* =========================================
   Integrations Bar
   ========================================= */
.integrations {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 32px var(--section-pad);
  text-align: center;
}

.integrations-label {
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  font-weight: 600;
  margin-bottom: 24px;
}

.integrations-row {
  display: flex;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
}

.integration-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-secondary);
  background: var(--surface);
  cursor: default;
  transition: transform 0.2s, box-shadow 0.2s;
}

.integration-chip:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-raised-lg);
}

/* =========================================
   Section Shared Styles
   ========================================= */
.section-header {
  text-align: center;
  margin-bottom: 60px;
}

.section-tag {
  display: inline-flex;
  padding: 8px 22px;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 20px;
  border-radius: 50px;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3.2rem);
  font-weight: 600;
  line-height: 1.15;
  color: var(--text-primary);
  letter-spacing: -0.02em;
  margin-bottom: 16px;
}

.section-title em {
  color: var(--accent);
}

.section-desc {
  font-size: 1.08rem;
  color: var(--text-secondary);
  max-width: 540px;
  margin: 0 auto;
  line-height: 1.65;
}

/* =========================================
   Features Grid
   ========================================= */
.features {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 32px var(--section-pad);
}

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

.feature-card {
  padding: 36px 30px;
  background: var(--surface);
  transition: transform 0.3s, box-shadow 0.3s;
}

.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-raised-lg);
}

.feature-icon {
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface);
  margin-bottom: 24px;
  color: var(--accent);
}

.feature-card h3 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 12px;
  color: var(--text-primary);
}

.feature-card p {
  font-size: 0.92rem;
  line-height: 1.65;
  color: var(--text-secondary);
}

/* =========================================
   How it Works
   ========================================= */
.how-section {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 32px var(--section-pad);
}

.steps {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.step {
  display: flex;
  gap: 32px;
  align-items: flex-start;
}

.step-num {
  flex-shrink: 0;
  width: 64px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--accent);
  background: var(--surface);
}

.step-content {
  flex: 1;
}

.step-content h3 {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 600;
  margin-bottom: 10px;
}

.step-content > p {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.65;
  margin-bottom: 20px;
  max-width: 500px;
}

.step-visual {
  padding: 32px;
  border-radius: var(--radius);
  min-height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Connect dots animation */
.connect-dots {
  display: flex;
  gap: 28px;
  align-items: center;
}

.c-dot {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface);
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--text-secondary);
  animation: float-dot 3s ease-in-out infinite;
  animation-delay: calc(var(--d) * 0.4s);
}

.c-center {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface);
  color: var(--accent);
}

@keyframes float-dot {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

/* AI Pulse */
.ai-pulse {
  position: relative;
  width: 80px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pulse-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid var(--accent-soft);
  opacity: 0;
  animation: pulse-ring 2.5s ease-out infinite;
}

.pulse-ring:nth-child(2) { animation-delay: 1.2s; }

@keyframes pulse-ring {
  0% { transform: scale(0.5); opacity: 0.6; }
  100% { transform: scale(1.8); opacity: 0; }
}

.pulse-core {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface);
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--accent);
  font-size: 0.9rem;
  border-radius: 50%;
  box-shadow: var(--shadow-raised);
  position: relative;
  z-index: 1;
}

/* Report lines */
.report-lines {
  width: 100%;
  max-width: 240px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.r-line {
  height: 10px;
  width: var(--w);
  border-radius: 20px;
  box-shadow: var(--shadow-raised-sm);
  background: var(--surface);
  animation: line-grow 1.5s ease-out forwards;
  transform-origin: left;
}

@keyframes line-grow {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}

/* =========================================
   Automation Section
   ========================================= */
.automation-section {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 32px var(--section-pad);
}

.auto-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.auto-text .section-tag { margin-bottom: 20px; }

.auto-text .section-title {
  text-align: left;
  margin-bottom: 16px;
}

.auto-text .section-desc {
  text-align: left;
  margin: 0 0 32px 0;
}

.auto-features {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.auto-features li {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.af-icon {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface);
  color: var(--accent);
  border-radius: var(--radius-sm);
}

.auto-features li strong {
  display: block;
  font-size: 0.95rem;
  margin-bottom: 3px;
}

.auto-features li span {
  font-size: 0.84rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* Workflow Demo */
.workflow-demo {
  position: relative;
  width: 100%;
  min-height: 320px;
  background: var(--surface);
  padding: 24px;
  overflow: hidden;
}

.wf-node {
  position: absolute;
  left: var(--x);
  top: var(--y);
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-secondary);
  background: var(--surface);
  border-radius: var(--radius-sm);
  white-space: nowrap;
  z-index: 2;
}

.wf-node-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.wf-node-dot.trigger { background: var(--accent); }
.wf-node-dot.process { background: var(--info); }
.wf-node-dot.approval { background: #c9b87a; }
.wf-node-dot.action { background: var(--success); }

.wf-line {
  position: absolute;
  width: 100%;
  height: 100%;
  color: var(--text-muted);
  z-index: 1;
  opacity: 0.3;
}

/* =========================================
   CTA Section
   ========================================= */
.cta-section {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 32px var(--section-pad);
}

.cta-card {
  text-align: center;
  padding: 60px 48px;
  background: var(--surface);
}

.cta-card h2 {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3.5vw, 2.6rem);
  font-weight: 600;
  margin-bottom: 14px;
  color: var(--text-primary);
}

.cta-card > p {
  font-size: 1.05rem;
  color: var(--text-secondary);
  margin-bottom: 32px;
}

.cta-actions {
  margin-bottom: 16px;
}

.cta-note {
  font-size: 0.82rem;
  color: var(--text-muted);
}

/* =========================================
   Footer
   ========================================= */
.footer {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 32px 40px;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 60px;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(0,0,0,0.06);
  margin-bottom: 24px;
}

.footer-logo {
  height: 28px;
  width: auto;
  margin-bottom: 14px;
  opacity: 0.7;
}

.footer-brand p {
  font-size: 0.88rem;
  color: var(--text-muted);
  max-width: 260px;
  line-height: 1.6;
}

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

.footer-col h4 {
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-secondary);
  margin-bottom: 16px;
}

.footer-col a {
  display: block;
  font-size: 0.88rem;
  color: var(--text-muted);
  padding: 4px 0;
  transition: color 0.2s;
}

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

.footer-bottom {
  text-align: center;
  font-size: 0.82rem;
  color: var(--text-muted);
}

/* =========================================
   Reveal Animation
   ========================================= */
[data-reveal] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

[data-reveal].revealed {
  opacity: 1;
  transform: translateY(0);
}

/* =========================================
   Responsive
   ========================================= */
@media (max-width: 1024px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 48px;
  }
  .hero-visual { order: -1; }
  .auto-content { grid-template-columns: 1fr; gap: 40px; }
  .features-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .nav-links, .nav-actions { display: none; }
  .mobile-menu-btn { display: flex; }

  .hero { padding-top: 100px; }
  .hero-title { font-size: 2.4rem; }
  .hero-stats { flex-wrap: wrap; gap: 12px; }
  .stat-item { min-width: 100px; padding: 14px 18px; }

  .features-grid { grid-template-columns: 1fr; }

  .step { flex-direction: column; gap: 16px; }

  .integrations-row { gap: 10px; }
  .integration-chip { padding: 10px 16px; font-size: 0.82rem; }

  .footer-inner { flex-direction: column; gap: 32px; }
  .footer-links { gap: 32px; flex-wrap: wrap; }

  .cta-card { padding: 40px 28px; }
}

@media (max-width: 480px) {
  .hero-cta { flex-direction: column; align-items: stretch; }
  .btn-lg { justify-content: center; }
  .hero-stats { flex-direction: column; }
  .stat-item { min-width: unset; }
}
