:root {
  --bg-page: #ede8dd;
  --bg-surface: #f5f0e6;
  --bg-elevated: #e5e0d4;
  --bg-card: #f5f0e6;
  --bg-card-alt: #ebe5d8;
  --text-primary: #1a1810;
  --text-secondary: #5a5647;
  --text-muted: #8a8678;
  --accent: #1a1810;
  --accent-pop: #c0392b;
  --accent-green: #2D7D46;
  --sms-green: #34c759;
  --sms-blue: #007aff;
  --danger: #c0392b;
  --ink-blue: #1a1810;
  --ink-charcoal: #1a1810;
  --parchment: #ede8dd;
  --parchment-dark: #dfd8c8;
  --border: rgba(26,24,16,0.08);
  --border-strong: rgba(26,24,16,0.15);
  --shadow-sm: 0 1px 3px rgba(26,24,16,0.05), 0 1px 2px rgba(26,24,16,0.07);
  --shadow-md: 0 4px 20px rgba(26,24,16,0.07), 0 2px 8px rgba(26,24,16,0.05);
  --shadow-lg: 0 20px 60px rgba(26,24,16,0.10), 0 8px 24px rgba(26,24,16,0.06);
  --shadow-iphone: 0 30px 80px rgba(26,24,16,0.14), 0 10px 30px rgba(26,24,16,0.10), 0 0 0 1px rgba(26,24,16,0.05);
  --font-body: 'DM Sans', -apple-system, sans-serif;
  --font-display: 'Instrument Serif', Georgia, serif;
  --font-mono: 'JetBrains Mono', monospace;
  --font-machine-mono: 'DM Mono', 'Courier New', monospace;
  --font-hand: 'Caveat', cursive;
  --iphone-bezel: #1a1810;
  --machine-ink: #1a1810;
  --machine-parchment: #ede8dd;
  --machine-red: #c0392b;
  --machine-red-dim: rgba(192, 57, 43, 0.1);
  --machine-amber: #b8860b;
  --machine-ink-light: #5a5647;
  --machine-ink-lighter: #8a8678;
}

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

html {
  scroll-behavior: smooth;
  background: var(--bg-page);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 18px;
  -webkit-font-smoothing: antialiased;
}

body {
  overflow-x: hidden;
  background: var(--bg-page);
}

/* ============ NAV ============ */
nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 0 40px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(237, 232, 221, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}

.nav-logo {
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}
.nav-logo-img {
  height: 56px;
  width: auto;
  display: block;
}

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

.nav-links a {
  font-size: 13px;
  color: var(--text-secondary);
  text-decoration: none;
  letter-spacing: 0.02em;
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--text-primary); }

.nav-cta {
  font-size: 13px !important;
  color: #fff !important;
  background: var(--accent);
  padding: 8px 20px;
  border-radius: 6px;
  font-weight: 500;
  transition: all 0.2s !important;
}
.nav-cta:hover {
  background: #2e2a22 !important;
  transform: translateY(-1px);
}

/* ============ HERO ============ */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 100px 40px 60px;
  position: relative;
  background: linear-gradient(180deg, var(--bg-page) 0%, #e3ddd0 100%);
  overflow: hidden;
}

.hero-headline {
  font-family: var(--font-display);
  font-size: clamp(36px, 5vw, 64px);
  font-weight: 400;
  font-style: italic;
  color: var(--text-primary);
  text-align: center;
  line-height: 1.15;
  max-width: 700px;
  margin-bottom: 48px;
}

.hero-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 48px;
  width: 100%;
  max-width: 1100px;
}

.hero-text-col {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 64px;
  flex: 1;
  max-width: 240px;
}

.hero-text-left { text-align: right; }
.hero-text-right { text-align: left; }

.hero-floating-text {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 400;
  font-style: italic;
  line-height: 1.35;
  color: var(--text-primary);
}

@media (max-width: 900px) {
  .hero-text-col {
    display: none;
  }
}

/* ============ iPHONE MOCKUP ============ */
.hero-gif-wrap {
  position: relative;
  z-index: 2;
  width: 280px;
  flex-shrink: 0;
}

.hero-gif {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 12px;
}

.iphone {
  position: relative;
  z-index: 2;
  width: 280px;
}

.iphone-body {
  background: linear-gradient(
    145deg,
    #2c2c2e 0%,
    #1c1c1e 20%,
    #0a0a0a 50%,
    #1c1c1e 80%,
    #2c2c2e 100%
  );
  border-radius: 48px;
  padding: 12px;
  box-shadow:
    0 1px 0 0 rgba(255,255,255,0.08),
    0 -1px 0 0 rgba(0,0,0,0.3),
    inset 0 0 0 1.5px rgba(255,255,255,0.06),
    inset 0 1px 0 0 rgba(255,255,255,0.12),
    0 4px 8px rgba(0,0,0,0.15),
    0 12px 28px rgba(0,0,0,0.18),
    0 30px 60px rgba(26,24,16,0.22),
    0 50px 100px rgba(26,24,16,0.12);
  position: relative;
}

.iphone-body::before {
  content: '';
  position: absolute;
  left: -3px;
  top: 100px;
  width: 3px;
  height: 28px;
  background: linear-gradient(180deg, #3a3a3c, #2c2c2e, #1a1a1c);
  border-radius: 2px 0 0 2px;
  box-shadow:
    0 34px 0 #2a2a2a,
    0 68px 0 #2a2a2a,
    inset 1px 0 0 rgba(255,255,255,0.08);
}
.iphone-body::after {
  content: '';
  position: absolute;
  right: -3px;
  top: 120px;
  width: 3px;
  height: 50px;
  background: linear-gradient(180deg, #3a3a3c, #2c2c2e, #1a1a1c);
  border-radius: 0 2px 2px 0;
  box-shadow: inset -1px 0 0 rgba(255,255,255,0.08);
}

.iphone-frame-highlight {
  position: absolute;
  inset: 0;
  border-radius: 48px;
  pointer-events: none;
  z-index: 1;
  background: linear-gradient(
    165deg,
    rgba(255,255,255,0.1) 0%,
    transparent 30%,
    transparent 70%,
    rgba(255,255,255,0.03) 100%
  );
}

.iphone-frame-edge {
  position: absolute;
  inset: -1px;
  border-radius: 49px;
  pointer-events: none;
  z-index: 0;
  background: linear-gradient(
    160deg,
    rgba(120,120,128,0.5) 0%,
    rgba(60,60,64,0.3) 30%,
    rgba(40,40,44,0.2) 70%,
    rgba(100,100,108,0.4) 100%
  );
}

.iphone-screen {
  background: #fff;
  border-radius: 38px;
  overflow: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
  aspect-ratio: 9 / 19.5;
  min-height: 0;
  z-index: 2;
  box-shadow:
    inset 0 0 0 0.5px rgba(0,0,0,0.3),
    0 0 0 1px rgba(0,0,0,0.15);
}

.hero-gif {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 38px;
  display: block;
}

.iphone-screen::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 38px;
  pointer-events: none;
  z-index: 20;
  background: linear-gradient(
    135deg,
    rgba(255,255,255,0.12) 0%,
    rgba(255,255,255,0.04) 15%,
    transparent 40%,
    transparent 100%
  );
}

.dynamic-island {
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  width: 100px;
  height: 28px;
  background: #000;
  border-radius: 20px;
  z-index: 10;
  box-shadow:
    0 0 0 0.5px rgba(255,255,255,0.06),
    inset 0 1px 2px rgba(0,0,0,0.5);
}

.status-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 24px 0;
  height: 52px;
  font-size: 12px;
  font-weight: 600;
  color: #000;
  position: relative;
  z-index: 5;
}
.status-time { font-size: 14px; font-weight: 600; }
.status-icons {
  display: flex;
  gap: 4px;
  align-items: center;
  font-size: 11px;
}
.status-icons svg { width: 16px; height: 12px; }

.messages-header {
  padding: 8px 16px 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}
.messages-back {
  position: absolute;
  left: 12px;
  color: var(--sms-blue);
  font-size: 13px;
  font-weight: 400;
}
.messages-back svg {
  width: 10px;
  height: 16px;
  vertical-align: middle;
  margin-right: 2px;
}
.messages-title {
  font-size: 16px;
  font-weight: 600;
  color: #000;
}

.chat-container {
  flex: 1;
  overflow-y: auto;
  padding: 8px 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  scrollbar-width: none;
}
.chat-container::-webkit-scrollbar { display: none; }

.chat-bubble {
  max-width: 78%;
  padding: 8px 12px;
  border-radius: 18px;
  font-size: 15px;
  line-height: 1.35;
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', sans-serif;
  opacity: 0;
  transform: translateY(6px) scale(0.97);
  animation: bubbleIn 0.25s ease forwards;
  word-wrap: break-word;
}

.chat-bubble.sent {
  align-self: flex-end;
  background: var(--sms-blue);
  color: white;
  border-bottom-right-radius: 6px;
}

.chat-bubble.received {
  align-self: flex-start;
  background: #e9e9eb;
  color: #000;
  border-bottom-left-radius: 6px;
}

.chat-bubble.sent + .chat-bubble.received,
.chat-container > .chat-bubble.received:first-child {
  border-bottom-left-radius: 6px;
}
.chat-bubble.received + .chat-bubble.sent,
.chat-container > .chat-bubble.sent:first-child {
  border-bottom-right-radius: 6px;
}

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

.imessage-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px 28px;
  border-top: 1px solid rgba(0,0,0,0.05);
  background: #fff;
}
.imessage-input {
  flex: 1;
  height: 34px;
  border-radius: 18px;
  border: 1px solid rgba(0,0,0,0.12);
  padding: 0 12px;
  font-size: 14px;
  background: #fff;
  display: flex;
  align-items: center;
  color: #c7c7cc;
  font-family: -apple-system, sans-serif;
}
.imessage-plus {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #e0e0e0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #8e8e93;
  font-size: 18px;
  font-weight: 300;
}

.home-indicator {
  height: 4px;
  width: 120px;
  background: #000;
  border-radius: 2px;
  margin: -16px auto 10px;
  position: relative;
  z-index: 5;
}

.conv-indicators {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-top: 28px;
}
.conv-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--text-muted);
  opacity: 0.3;
  transition: all 0.3s;
}
.conv-dot.active {
  opacity: 1;
  background: var(--accent);
  transform: scale(1.3);
}

/* ============ FLOW PHONE SECTION ============ */
.flow-phone-section {
  padding: 80px 40px 100px;
  background: var(--bg-page);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.flow-phone-heading {
  text-align: center;
  margin-bottom: 56px;
}

.flow-phone-title {
  font-family: var(--font-display);
  font-size: clamp(36px, 5vw, 64px);
  font-weight: 400;
  font-style: italic;
  color: var(--text-primary);
  line-height: 1.15;
  margin-top: 12px;
}

.flow-phone-wrapper {
  display: flex;
  align-items: center;
  gap: 60px;
  max-width: 1000px;
  width: 100%;
}

.flow-left {
  flex: 1;
  min-width: 0;
}

.flow-right {
  flex: 0 0 340px;
  display: flex;
  justify-content: center;
}

.flow-screenshot-container {
  position: relative;
  width: 320px;
  aspect-ratio: 9 / 19.5;
  max-width: 100%;
  overflow: hidden;
  border-radius: 0;
  background: transparent;
}

.flow-screenshot-container .flow-screen {
  width: 100%;
  height: 100%;
  display: block;
  border-radius: 0;
  box-shadow: none;
  object-fit: contain;
  object-position: center;
  opacity: 0;
  transition: opacity 0.5s ease, transform 0.5s ease;
  position: absolute;
  top: 0;
  left: 0;
  transform: scale(0.97);
  background: transparent;
}

.flow-screenshot-container .flow-screen.active {
  opacity: 1;
  position: absolute;
  transform: scale(1);
  z-index: 1;
}

.flow-screen {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.6s ease;
}

.flow-screen.active {
  opacity: 1;
}

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

.flow-step-btn {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 20px 24px;
  border: 1.5px solid var(--border-strong);
  border-radius: 8px;
  background: var(--bg-card);
  cursor: pointer;
  transition: all 0.3s;
  text-align: left;
  width: 100%;
}

.flow-step-btn.active {
  border-color: var(--ink-charcoal);
  background: var(--ink-charcoal);
  color: #fff;
  box-shadow: var(--shadow-md);
}

.flow-step-num {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 400;
  font-style: italic;
  background: var(--bg-elevated);
  color: var(--text-secondary);
  transition: all 0.3s;
  flex-shrink: 0;
}

.flow-step-btn.active .flow-step-num {
  background: rgba(255,255,255,0.15);
  color: #fff;
}

.flow-step-content {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.flow-step-label {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 400;
  font-style: italic;
  color: var(--text-primary);
  transition: color 0.3s;
}

.flow-step-desc {
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-muted);
  transition: color 0.3s;
  font-style: normal;
}

.flow-step-btn.active .flow-step-label {
  color: #fff;
}

.flow-step-btn.active .flow-step-desc {
  color: rgba(255, 255, 255, 0.7);
}

.flow-step-btn:not(.active):hover {
  border-color: var(--text-muted);
  background: var(--bg-elevated);
}

/* ============ MACHINE TRIGGER SECTION ============ */
.machine-trigger-section {
  padding: 20px 40px 60px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.machine-trigger-heading {
  font-family: var(--font-display);
  font-size: clamp(36px, 5vw, 64px);
  font-weight: 400;
  font-style: italic;
  color: var(--text-primary);
  text-align: center;
  line-height: 1.15;
  max-width: 700px;
  margin-bottom: 32px;
}

.popup-trigger-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  max-width: 1100px;
  width: 100%;
  padding: 40px 48px;
  background: var(--bg-card);
  border: 1.5px solid var(--border-strong);
  border-radius: 20px;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: var(--shadow-sm);
  text-align: center;
  font-family: var(--font-display);
}

.popup-trigger-btn:hover {
  box-shadow: var(--shadow-lg);
  border-color: var(--accent-pop);
  transform: translateY(-2px);
}

.popup-trigger-text {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(18px, 2.5vw, 28px);
  font-weight: 400;
  font-style: italic;
  color: var(--text-primary);
  line-height: 1.3;
}

.trigger-cta-row {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 12px 28px 12px 32px;
  background: var(--accent-pop);
  color: #fff;
  border-radius: 50px;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.02em;
  transition: all 0.3s ease;
  animation: ctaPulse 2.5s ease-in-out infinite;
}

.popup-trigger-btn:hover .trigger-cta-row {
  background: #a02d22;
  gap: 16px;
  padding-right: 24px;
}

.trigger-cta-arrow {
  display: flex;
  align-items: center;
  animation: arrowBounce 1.5s ease-in-out infinite;
}

.trigger-shimmer {
  position: absolute;
  top: 0;
  left: -100%;
  width: 60%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255,255,255,0.15) 50%,
    transparent 100%
  );
  animation: shimmerSlide 3.5s ease-in-out infinite;
  pointer-events: none;
}

@keyframes arrowBounce {
  0%, 100% { transform: translateX(0); }
  50% { transform: translateX(5px); }
}

@keyframes ctaPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(192, 57, 43, 0.4); }
  50% { box-shadow: 0 0 0 10px rgba(192, 57, 43, 0); }
}

@keyframes shimmerSlide {
  0% { left: -100%; }
  40% { left: 120%; }
  100% { left: 120%; }
}

/* ============ MACHINE OVERLAY (POPUP) ============ */
.machine-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2000;
  background: rgba(10, 10, 12, 0.75);
  backdrop-filter: blur(8px);
  padding: 2rem;
  overflow-y: auto;
  animation: fadeIn 0.3s ease;
}
.machine-overlay.open {
  display: flex;
  align-items: flex-start;
  justify-content: center;
}

.machine-container {
  position: relative;
  width: 100%;
  max-width: 1200px;
  margin: 2rem auto;
  background: var(--machine-parchment);
  border: 2px solid var(--machine-ink);
  border-radius: 4px;
  padding: 2rem;
  box-shadow: 4px 4px 0 rgba(26,24,16,0.1);
  animation: popUp 0.35s cubic-bezier(0.23, 1, 0.32, 1);
}

.popup-close-btn {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  background: var(--machine-red);
  color: #fafaf9;
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 1.4rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
  z-index: 10;
  line-height: 1;
}
.popup-close-btn:hover {
  background: var(--machine-ink);
}

.machine-title-bar {
  text-align: center;
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 400;
  font-style: italic;
  letter-spacing: 0.02em;
  color: var(--machine-ink);
  padding-bottom: 1rem;
  margin-bottom: 1.5rem;
  border-bottom: 2px solid var(--machine-ink);
  position: relative;
}

.machine-title-bar::before,
.machine-title-bar::after {
  content: '⚙';
  font-style: normal;
  margin: 0 0.5rem;
  opacity: 0.3;
}

.machine-svg-wrap {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.machine-svg-wrap svg {
  display: block;
  width: 100%;
  height: auto;
  min-width: 700px;
}

.label-text {
  font-family: var(--font-machine-mono);
  font-size: 9px;
  letter-spacing: 0.04em;
}

.machine-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(26,24,16,0.1);
}

.m-step {
  display: flex;
  gap: 0.8rem;
  align-items: flex-start;
  padding: 0.8rem;
  border-radius: 4px;
}

.m-step-letter {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 400;
  font-style: italic;
  border: 1.5px solid;
}
.m-step-letter.fail { border-color: var(--machine-red); color: var(--machine-red); background: var(--machine-red-dim); }
.m-step-letter.wait { border-color: var(--machine-amber); color: var(--machine-amber); background: rgba(184,134,11,0.08); }
.m-step-letter.meh { border-color: var(--machine-ink-lighter); color: var(--machine-ink-light); background: rgba(26,24,16,0.04); }

.m-step h4 {
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 600;
  margin-bottom: 0.15rem;
  color: var(--machine-ink);
}
.m-step p {
  font-family: var(--font-machine-mono);
  font-size: 0.7rem;
  color: var(--machine-ink-light);
  line-height: 1.5;
}
.m-step-tag {
  display: inline-block;
  font-family: var(--font-machine-mono);
  font-size: 0.6rem;
  padding: 0.1rem 0.4rem;
  border-radius: 2px;
  margin-top: 0.3rem;
}
.m-step-tag.fail { background: var(--machine-red-dim); color: var(--machine-red); }
.m-step-tag.wait { background: rgba(184,134,11,0.1); color: var(--machine-amber); }
.m-step-tag.cost { background: rgba(26,24,16,0.05); color: var(--machine-ink-light); }

.machine-total {
  margin-top: 1.5rem;
  padding: 1.5rem;
  background: var(--machine-red-dim);
  border: 1.5px solid rgba(192,57,43,0.25);
  border-radius: 4px;
  text-align: center;
}
.machine-total h3 {
  font-family: var(--font-display);
  font-size: 1.3rem;
  color: var(--machine-red);
  margin-bottom: 0.3rem;
}
.machine-total p {
  font-family: var(--font-machine-mono);
  font-size: 0.75rem;
  color: var(--machine-ink-light);
}

/* Machine SVG animations */
@keyframes drip {
  0%, 80% { transform: translateY(0); opacity: 1; }
  100% { transform: translateY(8px); opacity: 0; }
}
@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
@keyframes rockBell {
  0%, 100% { transform: rotate(0deg); }
  25% { transform: rotate(8deg); }
  75% { transform: rotate(-8deg); }
}
@keyframes slideX {
  0%, 100% { transform: translateX(0); }
  50% { transform: translateX(6px); }
}

.anim-spin { animation: spin 4s linear infinite; transform-origin: center; }
.anim-rock { animation: rockBell 1s ease-in-out infinite; transform-origin: center top; }
.anim-slide { animation: slideX 2s ease-in-out infinite; }
.anim-drip { animation: drip 2.5s ease-in-out infinite; }

.pipe-flow {
  stroke-dasharray: 8 6;
  animation: dashFlow 1.5s linear infinite;
}
@keyframes dashFlow {
  from { stroke-dashoffset: 28; }
  to { stroke-dashoffset: 0; }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes popUp {
  from { opacity: 0; transform: scale(0.95) translateY(20px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

/* ============ PIVOT ============ */
.pivot {
  text-align: center;
  padding: 100px 40px 80px;
  position: relative;
  background: var(--bg-page);
}

.pivot-inner {
  max-width: 700px;
  margin: 0 auto;
}

.pivot-line {
  width: 48px;
  height: 3px;
  background: var(--accent);
  margin: 0 auto 32px;
  border-radius: 2px;
}

.pivot h2 {
  font-family: var(--font-display);
  font-size: clamp(36px, 5vw, 64px);
  font-weight: 400;
  font-style: italic;
  color: var(--text-primary);
  line-height: 1.15;
  margin: 0 auto 20px;
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}
.pivot h2.visible {
  opacity: 1;
  transform: translateY(0);
}

.pivot-sub {
  font-size: 19px;
  line-height: 1.6;
  color: var(--text-secondary);
  max-width: 500px;
  margin: 0 auto;
}

/* ============ PRODUCT DEMO ============ */
.product-demo {
  padding: 80px 40px 100px;
  display: flex;
  flex-direction: column;
  align-items: center;
  background: var(--bg-page);
  border-top: 1px solid var(--border-strong);
  border-bottom: 1px solid var(--border-strong);
}

.demo-heading {
  font-family: var(--font-display);
  font-size: clamp(36px, 5vw, 64px);
  font-weight: 400;
  font-style: italic;
  color: var(--text-primary);
  text-align: center;
  margin-bottom: 12px;
}

.demo-subtitle-desc {
  font-size: 19px;
  color: var(--text-secondary);
  text-align: center;
  line-height: 1.6;
  max-width: 560px;
  margin-bottom: 48px;
}

.sms-pipeline {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr auto 1fr;
  align-items: stretch;
  gap: 0;
  max-width: 1060px;
  width: 100%;
}

.pipeline-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: 12px;
  padding: 28px 20px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 12px;
  position: relative;
  transition: box-shadow 0.3s, border-color 0.3s;
}
.pipeline-card:hover {
  box-shadow: var(--shadow-sm);
  border-color: var(--border-strong);
}

.pipeline-num {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 0.1em;
}

.pipeline-icon {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  background: var(--bg-page);
  border: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: center;
}

.pipeline-title {
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
}

.pipeline-desc {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.55;
  margin: 0;
  flex: 1;
}

.pipeline-tag {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 4px;
  background: rgba(26,24,16,0.06);
  color: var(--text-muted);
  margin-top: auto;
}
.pipeline-tag-red {
  background: rgba(192,57,43,0.08);
  color: var(--machine-red);
}
.pipeline-tag-amber {
  background: rgba(184,134,11,0.08);
  color: var(--machine-amber);
}

.pipeline-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 6px;
  opacity: 0.3;
}

.pipeline-footnote {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 32px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  opacity: 0.7;
  transition: opacity 0.8s ease 1.2s;
}


/* ============ KNOWING COPY ============ */
.knowing-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  max-width: 1000px;
  margin: 80px auto 0;
}

.knowing-card {
  background: var(--bg-card);
  border: 1.5px solid var(--border-strong);
  border-radius: 4px;
  padding: 40px 36px;
  opacity: 1;
  transform: none;
}
.knowing-problem {
  border-top: 3px solid var(--machine-red);
}
.knowing-solution {
  border-top: 3px solid var(--ink-charcoal);
}

.knowing-card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}

.knowing-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.problem-icon {
  background: rgba(192, 57, 43, 0.08);
}
.solution-icon {
  background: rgba(26, 24, 16, 0.06);
}

.knowing-card-title {
  font-family: var(--font-display);
  font-size: clamp(26px, 3.5vw, 34px);
  font-weight: 400;
  font-style: italic;
  color: var(--text-primary);
  line-height: 1.35;
  margin-bottom: 28px;
}

.knowing-card-body {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.knowing-point {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.knowing-point-marker {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  color: var(--machine-red);
  background: rgba(192, 57, 43, 0.06);
  border: 1px solid rgba(192, 57, 43, 0.15);
  border-radius: 2px;
  padding: 3px 6px;
  flex-shrink: 0;
  margin-top: 3px;
  letter-spacing: 0.04em;
}
.knowing-point-marker.solution-marker {
  color: var(--ink-charcoal);
  background: rgba(26, 24, 16, 0.04);
  border-color: rgba(26, 24, 16, 0.12);
}

.knowing-point p {
  font-size: 18px;
  line-height: 1.7;
  color: var(--text-secondary);
  margin: 0;
}
.knowing-point p em {
  color: var(--text-primary);
  font-style: normal;
  font-weight: 500;
}
.knowing-point p strong {
  color: var(--text-primary);
  font-weight: 700;
}

.knowing-result {
  margin-top: 24px;
  padding: 14px 18px;
  background: var(--parchment-dark);
  border: 1px dashed rgba(26, 24, 16, 0.2);
  border-radius: 3px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-primary);
  font-weight: 500;
  letter-spacing: 0.01em;
}
.knowing-result svg {
  flex-shrink: 0;
  opacity: 0.5;
}

.knowing-result {
  font-size: 13px;
}

.knowing-result span {
  font-size: 13px;
}

/* ============ NOTIFICATION PIVOT ============ */
.how-textly-works {
  padding: 100px 60px;
  background: var(--parchment-dark);
  border-top: 1px solid var(--border-strong);
  border-bottom: 1px solid var(--border-strong);
}

.htw-header {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 60px;
}

.htw-title {
  font-family: var(--font-display);
  font-size: clamp(36px, 5vw, 64px);
  font-weight: 400;
  font-style: italic;
  color: var(--text-primary);
  line-height: 1.15;
  margin-bottom: 20px;
}

.htw-subtitle {
  font-size: 19px;
  color: var(--text-secondary);
  line-height: 1.6;
}
.htw-subtitle strong {
  color: var(--text-primary);
  font-weight: 600;
}

.htw-steps {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 0;
  max-width: 1100px;
  margin: 0 auto;
}

.htw-step {
  flex: 1;
  max-width: 240px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 0 16px;
}

.htw-step-number {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1.5px solid var(--border-strong);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 16px;
  background: var(--bg-page);
}

.htw-step-icon {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  background: var(--bg-page);
  border: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}

.htw-step-title {
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 8px;
}

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

.htw-step-connector {
  display: flex;
  align-items: center;
  padding-top: 52px;
  flex-shrink: 0;
}

.section-tag {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 8px;
  border: 1px solid var(--border-strong);
  display: inline-block;
  padding: 4px 12px;
  border-radius: 2px;
  background: var(--bg-surface);
}


/* ============ PRICING ============ */
.pricing-section {
  padding: 100px 60px;
}

.pricing-container {
  max-width: 1200px;
  margin: 0 auto;
}

.pricing-header {
  text-align: center;
  margin-bottom: 16px;
}

.pricing-header h2 {
  font-family: var(--font-display);
  font-size: clamp(36px, 5vw, 64px);
  font-weight: 400;
  font-style: italic;
  color: var(--text-primary);
  line-height: 1.15;
  margin-bottom: 16px;
}

.pricing-header p {
  font-size: 19px;
  color: var(--text-secondary);
  line-height: 1.6;
}

.pricing-toggle {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  margin-bottom: 48px;
}

.toggle-label {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-muted);
  transition: color 0.2s;
  cursor: pointer;
}

.toggle-label.active {
  color: var(--text-primary);
}

.toggle-switch {
  position: relative;
  width: 56px;
  height: 30px;
  background: var(--ink-blue);
  border-radius: 15px;
  cursor: pointer;
  transition: background 0.2s;
  border: none;
  padding: 0;
  outline: none;
}

.toggle-switch:focus-visible {
  box-shadow: 0 0 0 3px rgba(26, 58, 92, 0.3);
}

.toggle-switch::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 24px;
  height: 24px;
  background: #ffffff;
  border-radius: 50%;
  transition: transform 0.2s;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.toggle-switch.monthly::after {
  transform: translateX(0);
}

.toggle-switch.annual::after {
  transform: translateX(26px);
}

.annual-badge {
  background: #dcfce7;
  color: #16a34a;
  font-size: 14px;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 6px;
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.pricing-card {
  background: var(--bg-card);
  border: 1px solid var(--border-strong);
  border-radius: 16px;
  padding: 32px;
  position: relative;
  transition: all 0.2s;
}

.pricing-card:hover {
  box-shadow: var(--shadow-md);
}

.pricing-card.featured {
  border-color: var(--ink-blue);
  box-shadow: 0 0 0 1px var(--ink-blue);
}

.pricing-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--ink-blue);
  color: white;
  padding: 6px 16px;
  border-radius: 50px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.pricing-card h3 {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 6px;
  color: var(--text-primary);
}

.pricing-description {
  font-size: 19px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 20px;
}

.pricing-price {
  margin-bottom: 6px;
}

.pricing-price .amount {
  font-size: 44px;
  font-weight: 800;
  color: var(--text-primary);
}

.pricing-price .period {
  font-size: 15px;
  color: var(--text-muted);
  font-weight: 500;
}

.pricing-billing {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 20px;
}

.pricing-includes {
  background: rgba(26, 58, 92, 0.06);
  border-radius: 10px;
  padding: 14px;
  margin-bottom: 20px;
  text-align: center;
}

.pricing-includes .main {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 2px;
}

.pricing-includes .sub {
  font-size: 12px;
  color: var(--ink-blue);
}

.pricing-features {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 24px;
  padding: 0;
}

.pricing-features li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  color: var(--text-secondary);
}

.pricing-features svg {
  color: var(--ink-charcoal);
  flex-shrink: 0;
  opacity: 0.5;
}

.pricing-cta {
  width: 100%;
  padding: 12px 20px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s;
  text-align: center;
  text-decoration: none;
  display: block;
  box-sizing: border-box;
}

.pricing-cta.primary {
  background: var(--ink-blue);
  color: white;
  border: none;
}

.pricing-cta.primary:hover {
  background: var(--ink-charcoal);
}

.pricing-cta.secondary {
  background: var(--bg-card);
  color: var(--text-primary);
  border: 1px solid var(--border-strong);
}

.pricing-cta.secondary:hover {
  background: var(--bg-elevated);
}

.pricing-footer-note {
  text-align: center;
  margin-top: 40px;
  color: var(--text-muted);
  font-size: 14px;
}

.pricing-footer-note a {
  color: var(--ink-blue);
  text-decoration: none;
  font-weight: 600;
}

/* ============ CTA SECTION ============ */
.cta-section {
  padding: 100px 60px;
  text-align: center;
  background: var(--ink-charcoal);
}

.cta-section h2 {
  font-family: var(--font-display);
  font-size: clamp(36px, 5vw, 64px);
  font-weight: 400;
  font-style: italic;
  line-height: 1.15;
  margin-bottom: 20px;
  color: #ffffff;
}

.cta-section .cta-subtitle {
  font-size: 19px;
  color: rgba(255, 255, 255, 0.9);
  max-width: 560px;
  margin: 0 auto 36px;
  line-height: 1.6;
}

.cta-section .cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--parchment);
  color: var(--ink-charcoal);
  padding: 16px 32px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 16px;
  text-decoration: none;
  transition: all 0.2s;
}

.cta-section .cta-btn:hover {
  background: var(--parchment-dark);
  transform: translateY(-2px);
}

.cta-section .cta-btn svg {
  width: 18px;
  height: 18px;
}

.cta-section .cta-tagline {
  margin-top: 24px;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.8);
}

/* ============ FOOTER ============ */
.site-footer {
  padding: 60px 60px 40px;
  background: var(--bg-parchment);
  color: var(--text-secondary);
  border-top: 1px solid var(--border-light);
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 48px;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-logo-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}

.footer-logo-wrap .nav-logo-img {
  height: 50px;
}

.footer-brand p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
}

.footer-column h4 {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-charcoal);
  margin-bottom: 20px;
}

.footer-column ul {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-column ul li a {
  font-size: 14px;
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.2s;
}

.footer-column ul li a:hover {
  color: var(--ink-charcoal);
}

.integration-icons {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
}

.integration-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.integration-icon.gmail { background: var(--bg-surface); }
.integration-icon.microsoft { background: #0078d4; }
.integration-icon.excel { background: #217346; }

.footer-bottom {
  max-width: 1200px;
  margin: 40px auto 0;
  padding-top: 24px;
  border-top: 1px solid var(--border-light);
  text-align: center;
  font-size: 13px;
  color: var(--text-tertiary);
}

/* ============ MOBILE ============ */
.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 24px;
  cursor: pointer;
  padding: 4px;
}

@media (max-width: 768px) {
  nav { padding: 0 20px; }

  .nav-links {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: rgba(237, 232, 221, 0.95);
    backdrop-filter: blur(20px);
    flex-direction: column;
    padding: 20px;
    gap: 16px;
    border-bottom: 1px solid var(--border);
  }
  .nav-links.open { display: flex; }
  .mobile-menu-btn { display: block; }

  .hero { padding: 100px 20px 60px; }
  .hero-gif-wrap { width: 270px; }

  .flow-phone-section { padding: 40px 20px 60px; }
  .flow-phone-wrapper { flex-direction: column; gap: 32px; }
  .flow-right { flex: none; width: 100%; max-width: 300px; }
  .flow-screenshot-container { width: 100%; }
  .flow-steps { gap: 10px; }
  .flow-step-btn { padding: 16px 18px; gap: 12px; }

  .machine-trigger-section { padding: 20px 20px 40px; }
  .popup-trigger-btn { padding: 24px 20px; gap: 16px; }
  .popup-trigger-text { font-size: 20px; }
  .trigger-cta-row { font-size: 13px; padding: 10px 22px 10px 26px; }

  .machine-overlay { padding: 1rem; }
  .machine-container { padding: 1rem; }
  .machine-steps { grid-template-columns: 1fr; }

  .pivot { padding: 60px 24px 40px; }
  .pivot-sub { font-size: 15px; }

  .product-demo { padding: 60px 16px 80px; }
  .demo-heading { font-size: 28px; margin-bottom: 8px; }
  .sms-pipeline { grid-template-columns: 1fr 1fr; gap: 16px; }
  .pipeline-arrow { display: none; }
  .pipeline-card { padding: 20px 16px; }

  .knowing-grid { grid-template-columns: 1fr; gap: 20px; margin-top: 50px; }
  .knowing-card { padding: 28px 22px; }
  .knowing-card-title { font-size: 22px; }

  .how-textly-works { padding: 60px 20px 80px; }
  .htw-steps { flex-direction: column; align-items: center; gap: 24px; }
  .htw-step { max-width: 320px; }
  .htw-step-connector { display: none; }

  .pricing-section { padding: 60px 20px 80px; }
  .pricing-grid { grid-template-columns: 1fr; max-width: 400px; margin: 0 auto; }
  .pricing-card { padding: 28px; }

  .cta-section { padding: 60px 24px 80px; }
  .cta-section h2 { font-size: 28px; }

  .site-footer { padding: 40px 20px 32px; }
  .footer-content {
    grid-template-columns: 1fr;
    gap: 32px;
  }
}

@media (min-width: 769px) and (max-width: 1200px) {
  .pricing-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ============ SCROLL-TRIGGERED MECHANICALS ============ */
.mechanical-divider {
  position: relative;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px 0;
  overflow: hidden;
  pointer-events: none;
}

.mechanical-divider svg {
  display: block;
}

.mech-gear {
  transform-origin: center;
  transition: none;
}

.mech-gear.spinning {
  animation: gearSpin 6s linear infinite;
}

.mech-gear.spinning-reverse {
  animation: gearSpin 8s linear infinite reverse;
}

.mech-gear.spinning-fast {
  animation: gearSpin 3s linear infinite;
}

@keyframes gearSpin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.mech-money {
  opacity: 0;
  transition: opacity 0.3s;
}

.mech-money.dripping .money-symbol {
  animation: moneyDrip 2s ease-in-out infinite;
}

.mech-money.dripping {
  opacity: 1;
}

@keyframes moneyDrip {
  0% { transform: translateY(-8px); opacity: 0; }
  15% { opacity: 1; }
  70% { opacity: 1; }
  100% { transform: translateY(24px); opacity: 0; }
}

.mech-pipe {
  stroke-dasharray: 12 8;
  stroke-dashoffset: 0;
  transition: none;
}

.mech-pipe.flowing {
  animation: pipeFlow 1.2s linear infinite;
}

@keyframes pipeFlow {
  from { stroke-dashoffset: 40; }
  to { stroke-dashoffset: 0; }
}

.mech-label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  fill: var(--text-muted);
  opacity: 0;
  transition: opacity 0.6s ease 0.3s;
}

.mechanical-divider.active .mech-label {
  opacity: 1;
}

.mech-drip-line {
  opacity: 0;
}

.mech-drip-line.dripping {
  animation: dripLine 1.8s ease-in-out infinite;
}

@keyframes dripLine {
  0%, 80% { transform: translateY(0); opacity: 0.7; }
  100% { transform: translateY(12px); opacity: 0; }
}

.mech-fee-tag {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.05em;
  fill: var(--danger);
  opacity: 0;
  transition: opacity 0.5s ease 0.5s;
}

.mechanical-divider.active .mech-fee-tag {
  opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
  .mech-gear.spinning,
  .mech-gear.spinning-reverse,
  .mech-gear.spinning-fast,
  .mech-pipe.flowing,
  .mech-money.dripping .money-symbol,
  .mech-drip-line.dripping,
  .anim-spin,
  .anim-rock,
  .anim-slide,
  .anim-drip,
  .pipe-flow,
  .haptic-buzz,
  .ghost-particle,
  .paper-fall-icon,
  .stamp-denied.slammed,
  .blueprint-connector.visible {
    animation: none !important;
  }
  .mech-gear.spinning,
  .mech-gear.spinning-reverse {
    opacity: 0.5;
  }
  .mech-money.dripping {
    opacity: 1;
  }
  .mech-money.dripping .money-symbol {
    opacity: 0.5;
    transform: none;
  }
  .coffee-stain { display: none; }
  .blueprint-bg-grid { display: none; }
}

/* ============ BLUEPRINT BACKGROUND GRID ============ */
.blueprint-bg-grid {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0;
  transition: opacity 0.5s ease;
}
.blueprint-bg-grid.active {
  opacity: 1;
}
.blueprint-bg-grid svg {
  width: 100%;
  height: 100%;
}

/* ============ MARGINALIA ANNOTATIONS ============ */
.marginalia {
  position: absolute;
  font-family: var(--font-machine-mono);
  font-size: 9px;
  color: var(--text-muted);
  opacity: 0;
  pointer-events: none;
  letter-spacing: 0.04em;
  transition: opacity 1s ease;
  white-space: nowrap;
  user-select: none;
}
.marginalia.visible {
  opacity: 0.25;
}
.marginalia-left {
  left: 12px;
  writing-mode: vertical-lr;
  text-orientation: mixed;
  transform: rotate(180deg);
}
.marginalia-right {
  right: 12px;
}

/* ============ COFFEE STAINS (PARALLAX) ============ */
.coffee-stain {
  position: absolute;
  pointer-events: none;
  border-radius: 50%;
  opacity: 0.06;
  z-index: 0;
  transition: transform 0.1s linear;
}
.coffee-stain-1 {
  width: 180px;
  height: 180px;
  background: radial-gradient(ellipse at center, transparent 55%, rgba(160, 120, 60, 0.3) 60%, rgba(160, 120, 60, 0.15) 70%, transparent 75%);
  top: 600px;
  left: 40px;
}
.coffee-stain-2 {
  width: 120px;
  height: 120px;
  background: radial-gradient(ellipse at center, transparent 50%, rgba(140, 100, 50, 0.25) 58%, rgba(140, 100, 50, 0.1) 68%, transparent 74%);
  top: 1800px;
  right: 60px;
}


/* ============ CUSTOM CURSOR ============ */
body {
  cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%231a1810' stroke-width='1.5'%3E%3Cline x1='12' y1='3' x2='12' y2='21'/%3E%3Cline x1='3' y1='12' x2='21' y2='12'/%3E%3Ccircle cx='12' cy='12' r='4' opacity='0.3'/%3E%3C/svg%3E") 12 12, crosshair;
}
button, a, .flow-step-btn, .pricing-cta, .popup-trigger-btn, .nav-cta, .cta-btn, .toggle-switch {
  cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%231a1810' stroke-width='1.5'%3E%3Cpath d='M14.7 6.3a1 1 0 000 1.4l1.6 1.6a1 1 0 001.4 0l3.77-3.77a6 6 0 01-7.94 7.94l-6.91 6.91a2.12 2.12 0 01-3-3l6.91-6.91a6 6 0 017.94-7.94l-3.76 3.76z'/%3E%3C/svg%3E") 12 12, pointer;
}

/* ============ HAPTIC BUZZ ANIMATION ============ */
@keyframes hapticBuzz {
  0%, 100% { transform: translateX(0); }
  10% { transform: translateX(-2px) rotate(-0.5deg); }
  20% { transform: translateX(2px) rotate(0.5deg); }
  30% { transform: translateX(-1px); }
  40% { transform: translateX(1px); }
  50% { transform: translateX(0); }
}
.haptic-buzz {
  animation: hapticBuzz 0.4s ease-in-out;
}

/* ============ SKELETON TOOLTIP ============ */
.skeleton-tooltip-zone {
  position: relative;
  cursor: help;
}
.skeleton-speech-bubble {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%) scale(0.9);
  background: var(--bg-card);
  border: 1.5px solid var(--border-strong);
  border-radius: 4px;
  padding: 8px 12px;
  font-family: var(--font-hand);
  font-size: 13px;
  color: var(--text-secondary);
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s, transform 0.3s;
  box-shadow: var(--shadow-sm);
  z-index: 10;
}
.skeleton-speech-bubble::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-top-color: var(--bg-card);
}
.skeleton-tooltip-zone:hover .skeleton-speech-bubble {
  opacity: 1;
  transform: translateX(-50%) scale(1);
}

/* ============ HAND-DRAWN ARROW SKETCH ============ */
.sketch-arrow {
  stroke-dasharray: 200;
  stroke-dashoffset: 200;
  transition: stroke-dashoffset 1.2s ease;
}
.sketch-arrow.drawn {
  stroke-dashoffset: 0;
}
.sketch-text {
  opacity: 0;
  transition: opacity 0.8s ease 0.6s;
}
.sketch-text.drawn {
  opacity: 1;
}

/* ============ SCROLL-LINKED GEARS ============ */
.mech-gear-scroll {
  transition: none !important;
}

/* ============ GHOST FLOAT PARTICLES ============ */
.ghost-particle {
  position: absolute;
  font-size: 14px;
  opacity: 0;
  pointer-events: none;
  animation: ghostParticleFloat 2.5s ease-out forwards;
}
@keyframes ghostParticleFloat {
  0% { opacity: 0.6; transform: translateY(0) scale(1); }
  100% { opacity: 0; transform: translateY(-60px) scale(0.4); }
}

/* ============ PAPER FALL ANIMATION ============ */
@keyframes paperFall {
  0% { transform: translateY(-30px) rotate(-5deg); opacity: 0; }
  30% { opacity: 0.7; }
  100% { transform: translateY(20px) rotate(8deg); opacity: 0; }
}
.paper-fall-icon {
  position: absolute;
  font-size: 16px;
  pointer-events: none;
  animation: paperFall 1.5s ease-in forwards;
}

/* ============ DENIED STAMP ============ */
@keyframes stampSlam {
  0% { transform: scale(2) rotate(-15deg); opacity: 0; }
  60% { transform: scale(0.95) rotate(-15deg); opacity: 1; }
  80% { transform: scale(1.05) rotate(-15deg); }
  100% { transform: scale(1) rotate(-15deg); opacity: 1; }
}
.stamp-denied {
  position: absolute;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  color: var(--machine-red);
  border: 2px solid var(--machine-red);
  padding: 2px 8px;
  pointer-events: none;
  opacity: 0;
}
.stamp-denied.slammed {
  animation: stampSlam 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

/* ============ SOUND TOGGLE ============ */
.sound-toggle {
  display: flex;
  align-items: center;
  gap: 4px;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-muted);
  background: none;
  border: 1px solid var(--border-strong);
  padding: 4px 8px;
  border-radius: 3px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transition: all 0.2s;
}
.sound-toggle:hover {
  color: var(--text-primary);
  border-color: var(--text-muted);
}
.sound-toggle.active {
  color: var(--text-primary);
  border-color: var(--text-primary);
}

.sound-toggle svg {
  width: 12px;
  height: 12px;
}

/* ============ CASE STUDIES ============ */
.cs-hero {
  padding: 140px 40px 60px;
  text-align: center;
  max-width: 960px;
  margin: 0 auto;
}
.cs-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(36px, 5vw, 56px);
  color: var(--text-primary);
  margin-bottom: 12px;
  font-weight: 400;
}
.cs-hero .cs-subtitle {
  font-family: var(--font-body);
  font-size: 18px;
  color: var(--text-muted);
  max-width: 680px;
  margin: 0 auto 48px;
  line-height: 1.6;
}
.cs-stats-row {
  display: flex;
  justify-content: center;
  gap: 48px;
  flex-wrap: wrap;
  margin-bottom: 48px;
}
.cs-stat { text-align: center; }
.cs-stat-value {
  font-family: var(--font-display);
  font-size: clamp(32px, 4vw, 48px);
  color: var(--accent-pop);
  font-weight: 400;
  display: block;
}
.cs-stat-label {
  font-family: var(--font-mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}
.cs-filters {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 52px;
}
.cs-filter-btn {
  font-family: var(--font-mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 8px 20px;
  border: 1px solid var(--border-strong);
  border-radius: 24px;
  color: var(--text-muted);
  background: transparent;
  cursor: pointer;
  transition: all 0.2s;
}
.cs-filter-btn:hover { border-color: var(--accent-pop); color: var(--accent-pop); }
.cs-filter-btn.active {
  background: var(--accent-pop);
  color: #fff;
  border-color: var(--accent-pop);
}
.cs-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 40px 80px;
}
.cs-card {
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: 14px;
  padding: 32px 28px;
  transition: transform 0.25s, box-shadow 0.25s;
  display: flex;
  flex-direction: column;
  position: relative;
}
.cs-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0,0,0,0.08);
}
.cs-card.featured::before {
  content: 'FEATURED';
  position: absolute;
  top: 16px;
  right: 16px;
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  background: var(--accent-pop);
  color: #fff;
  padding: 3px 10px;
  border-radius: 10px;
}
.cs-card-industry {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent-pop);
  margin-bottom: 10px;
}
.cs-card h3 {
  font-family: var(--font-display);
  font-size: clamp(18px, 2vw, 22px);
  color: var(--text-primary);
  font-weight: 400;
  margin-bottom: 10px;
  line-height: 1.3;
}
.cs-card-summary {
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.55;
  margin-bottom: 20px;
  flex-grow: 1;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.cs-card-metrics {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--border-light);
}
.cs-card-metric { text-align: center; }
.cs-card-metric .val {
  font-family: var(--font-display);
  font-size: 20px;
  color: var(--accent-pop);
  display: block;
}
.cs-card-metric .lbl {
  font-family: var(--font-mono);
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}
.cs-card-cta {
  font-family: var(--font-mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent-pop);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: gap 0.2s;
}
.cs-card-cta:hover { gap: 12px; }

.cs-card-img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-radius: 10px;
  margin-bottom: 18px;
}
.cs-hero-img {
  width: 100%;
  max-width: 900px;
  height: 320px;
  object-fit: cover;
  border-radius: 14px;
  margin: 0 auto 48px;
  display: block;
}
.cs-detail-img {
  width: 100%;
  height: 340px;
  object-fit: cover;
  border-radius: 12px;
  margin: 0 0 40px;
}
@media (max-width: 768px) {
  .cs-hero-img { height: 200px; }
  .cs-card-img { height: 140px; }
  .cs-detail-img { height: 220px; }
}

/* Case Study Detail */
.cs-detail {
  max-width: 820px;
  margin: 0 auto;
  padding: 120px 40px 0;
}
.cs-breadcrumb {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 32px;
}
.cs-breadcrumb a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s;
}
.cs-breadcrumb a:hover { color: var(--accent-pop); }
.cs-breadcrumb span { margin: 0 6px; opacity: 0.4; }
.cs-detail-industry {
  font-family: var(--font-mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent-pop);
  margin-bottom: 8px;
}
.cs-detail h1 {
  font-family: var(--font-display);
  font-size: clamp(28px, 4vw, 42px);
  color: var(--text-primary);
  font-weight: 400;
  line-height: 1.25;
  margin-bottom: 16px;
}
.cs-detail-intro {
  font-family: var(--font-body);
  font-size: 17px;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 24px;
}
.cs-metric-badge {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 20px;
  color: var(--accent-pop);
  background: rgba(192,57,43,0.08);
  padding: 10px 24px;
  border-radius: 8px;
  margin-bottom: 36px;
}
.cs-org-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 16px;
  margin-bottom: 48px;
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: 10px;
}
.cs-org-item { text-align: center; }
.cs-org-label {
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  display: block;
  margin-bottom: 4px;
}
.cs-org-value {
  font-family: var(--font-body);
  font-size: 15px;
  color: var(--text-primary);
  font-weight: 500;
}
.cs-section {
  margin-bottom: 48px;
}
.cs-section h2 {
  font-family: var(--font-display);
  font-size: clamp(22px, 3vw, 30px);
  color: var(--text-primary);
  font-weight: 400;
  margin-bottom: 16px;
}
.cs-section p {
  font-family: var(--font-body);
  font-size: 16px;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 16px;
}
.cs-challenges {
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: 10px;
  padding: 28px 32px;
  margin: 24px 0;
}
.cs-challenges h3 {
  font-family: var(--font-mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent-pop);
  margin-bottom: 16px;
}
.cs-challenges ul { list-style: none; padding: 0; }
.cs-challenges li {
  font-family: var(--font-body);
  font-size: 15px;
  color: var(--text-secondary);
  padding: 8px 0 8px 20px;
  border-bottom: 1px solid var(--border-light);
  position: relative;
  line-height: 1.5;
}
.cs-challenges li:last-child { border-bottom: none; }
.cs-challenges li::before {
  content: '\2715';
  position: absolute;
  left: 0;
  color: var(--accent-pop);
  font-size: 12px;
  top: 10px;
}
.cs-quote {
  border-left: 3px solid var(--accent-pop);
  padding: 28px 32px;
  margin: 40px 0;
  background: var(--surface);
  border-radius: 0 10px 10px 0;
}
.cs-quote blockquote {
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(16px, 2vw, 20px);
  color: var(--text-primary);
  line-height: 1.6;
  margin: 0 0 12px;
}
.cs-quote cite {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
  font-style: normal;
  letter-spacing: 0.04em;
}
.cs-results-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 20px;
  margin: 32px 0 48px;
}
.cs-result-item {
  text-align: center;
  padding: 24px 16px;
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: 10px;
}
.cs-result-value {
  font-family: var(--font-display);
  font-size: clamp(28px, 3.5vw, 40px);
  color: var(--accent-pop);
  display: block;
  font-weight: 400;
  margin-bottom: 4px;
}
.cs-result-label {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}
.cs-bottom-cta {
  text-align: center;
  padding: 64px 40px;
  margin: 48px 0 0;
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: 14px;
}
.cs-bottom-cta h2 {
  font-family: var(--font-display);
  font-size: clamp(24px, 3vw, 36px);
  color: var(--text-primary);
  font-weight: 400;
  margin-bottom: 12px;
}
.cs-bottom-cta p {
  font-family: var(--font-body);
  font-size: 16px;
  color: var(--text-muted);
  max-width: 520px;
  margin: 0 auto 28px;
  line-height: 1.6;
}
.cs-bottom-cta .cs-cta-btn {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  background: var(--accent-pop);
  color: #fff;
  padding: 14px 36px;
  border-radius: 8px;
  text-decoration: none;
  transition: background 0.2s, transform 0.2s;
}
.cs-bottom-cta .cs-cta-btn:hover {
  background: #a5311f;
  transform: translateY(-1px);
}
.cs-bottom-cta .cs-cta-sub {
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 12px;
}
.cs-nav-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 32px 0;
  border-top: 1px solid var(--border-light);
  margin: 48px 0 0;
}
.cs-nav-link {
  font-family: var(--font-mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s;
}
.cs-nav-link:hover { color: var(--accent-pop); }

.cs-detail-footer {
  max-width: 820px;
  margin: 0 auto;
  padding: 0 40px 80px;
}

@media (max-width: 1024px) {
  .cs-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  .cs-hero { padding: 120px 20px 40px; }
  .cs-stats-row { gap: 24px; }
  .cs-grid { grid-template-columns: 1fr; padding: 0 20px 60px; gap: 20px; }
  .cs-detail { padding: 120px 20px 0; }
  .cs-detail-footer { padding: 0 20px 60px; }
  .cs-org-grid { grid-template-columns: repeat(2, 1fr); }
  .cs-results-grid { grid-template-columns: repeat(2, 1fr); }
  .cs-challenges { padding: 20px 24px; }
  .cs-quote { padding: 20px 24px; }
  .cs-bottom-cta { padding: 40px 24px; }
  .cs-filters { gap: 8px; }
  .cs-filter-btn { padding: 6px 14px; font-size: 11px; }
}

/* ============ SCROLLBAR ============ */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-page); }
::-webkit-scrollbar-thumb { background: #ddd; border-radius: 3px; }
