/* Resollect — fx v2: shader wallpapers + killer modal + phone storytelling */

/* ================================================== */
/* SHADER WALLPAPER LAYER                              */
/* ================================================== */
.shader_canvas {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  width: 100%;
  height: 100%;
  display: block;
}
/* When shader is on, dim the static grid backdrop so they don't fight */
body.shader-on .bg_grid,
body.shader-on .bg_orb { opacity: 0; transition: opacity 600ms ease; }
body.shader-on { background: #fff !important; }

/* Shader picker — small floating control to switch wallpapers */
.shader_picker {
  position: fixed;
  bottom: 24px; left: 24px;
  display: flex;
  gap: 6px;
  padding: 6px;
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(11,18,32,0.08);
  border-radius: 999px;
  box-shadow: 0 8px 24px -8px rgba(11,18,32,0.15);
  z-index: 50;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.shader_picker button {
  width: 28px; height: 28px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  font-family: inherit;
  font-size: 10px;
  font-weight: 600;
  color: #6b7894;
  cursor: pointer;
  transition: all 160ms ease;
  position: relative;
}
.shader_picker button:hover { background: rgba(11,18,32,0.05); color: #0b1220; }
.shader_picker button.active {
  background: #0b1220; color: #fff;
}
.shader_picker .lbl {
  display: flex; align-items: center;
  padding: 0 10px 0 14px;
  font-weight: 500;
  color: #6b7894;
}
.shader_picker .lbl::before {
  content: ''; width: 6px; height: 6px;
  background: #02A783; border-radius: 999px;
  margin-right: 8px;
  animation: pulseDot 2s ease-in-out infinite;
}
@media (max-width: 720px) {
  .shader_picker { bottom: 90px; left: 12px; padding: 4px; }
  .shader_picker .lbl { display: none; }
  .shader_picker button { width: 24px; height: 24px; font-size: 9px; }
}

/* ================================================== */
/* KILLER DEMO MODAL                                   */
/* ================================================== */
.bd_modal_v2 {
  width: min(560px, 100%);
  background: #fff;
  border-radius: 16px;
  position: relative;
  overflow: hidden;
  transform: translateY(40px) scale(0.95);
  opacity: 0;
  transition: transform 480ms cubic-bezier(0.2, 0.9, 0.2, 1.05),
              opacity 320ms ease;
  box-shadow:
    0 32px 80px -20px rgba(11,18,32,0.55),
    0 0 0 1px rgba(11,18,32,0.06);
}
.bd_overlay[data-open="true"] .bd_modal_v2 { transform: translateY(0) scale(1); opacity: 1; }

/* aurora header — animated mesh gradient */
.bd_aurora {
  position: relative;
  padding: 36px 36px 28px;
  background: #0b1220;
  color: #fff;
  overflow: hidden;
}
.bd_aurora::before {
  content: '';
  position: absolute; inset: -50%;
  background:
    radial-gradient(circle at 20% 30%, #2563EB 0%, transparent 35%),
    radial-gradient(circle at 80% 20%, #F25C37 0%, transparent 30%),
    radial-gradient(circle at 60% 80%, #02A783 0%, transparent 35%),
    radial-gradient(circle at 30% 70%, #8B5CF6 0%, transparent 30%);
  filter: blur(32px);
  opacity: 0.85;
  animation: auroraDrift 14s ease-in-out infinite alternate;
  z-index: 0;
}
.bd_aurora::after {
  /* subtle dot grid overlay */
  content: '';
  position: absolute; inset: 0;
  background-image: radial-gradient(rgba(255,255,255,0.08) 1px, transparent 1px);
  background-size: 14px 14px;
  z-index: 1;
}
.bd_aurora > * { position: relative; z-index: 2; }
@keyframes auroraDrift {
  0% { transform: translate(0, 0) rotate(0deg); }
  50% { transform: translate(-3%, 2%) rotate(2deg); }
  100% { transform: translate(2%, -2%) rotate(-1deg); }
}

.bd_aurora .pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 5px 12px;
  background: rgba(255,255,255,0.12);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 999px;
  font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase;
  font-weight: 500;
}
.bd_aurora .pill::before {
  content: ''; width: 6px; height: 6px;
  border-radius: 999px; background: #02A783;
  box-shadow: 0 0 0 4px rgba(2,167,131,0.25);
  animation: pulseDot 2s ease-in-out infinite;
}
.bd_aurora h2 {
  margin: 14px 0 8px;
  font-size: 28px; line-height: 1.15;
  font-weight: 600;
  letter-spacing: -0.022em;
  color: #fff;
  text-wrap: balance;
}
.bd_aurora h2 .accent {
  background: linear-gradient(90deg, #fff 0%, #c5d3ff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.bd_aurora p {
  margin: 0;
  font-size: 14px;
  color: rgba(255,255,255,0.72);
  line-height: 1.55;
  max-width: 44ch;
}

/* form */
.bd_form_v2 {
  padding: 26px 36px 30px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  position: relative;
}
.bd_form_v2 .field_v2 {
  display: flex;
  flex-direction: column;
  gap: 6px;
  position: relative;
}
.bd_form_v2 label {
  font-size: 10px;
  font-weight: 600;
  color: #0b1220;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-family: 'JetBrains Mono', monospace;
}
.bd_form_v2 input {
  padding: 14px 16px;
  border: 1.5px solid #e5e9f0;
  border-radius: 10px;
  font-size: 15px;
  font-family: inherit;
  color: #0b1220;
  background: #fff;
  outline: none;
  transition: border-color 180ms ease, box-shadow 220ms ease, background 180ms ease;
}
.bd_form_v2 input:hover { border-color: #c8d1e0; }
.bd_form_v2 input:focus {
  border-color: #2563EB;
  box-shadow: 0 0 0 4px rgba(37,99,235,0.12);
  background: #fdfdff;
}
.bd_form_v2 input::placeholder { color: #94a0b8; }

/* progressive border-glow as user types */
.bd_form_v2 input.has-value {
  border-color: #2563EB;
}
.bd_form_v2 input.has-value + .field_check {
  opacity: 1; transform: scale(1) translateY(0);
}
.bd_form_v2 .field_check {
  position: absolute;
  right: 14px; top: 36px;
  width: 22px; height: 22px;
  display: inline-flex; align-items: center; justify-content: center;
  background: #02A783;
  color: #fff;
  border-radius: 999px;
  opacity: 0;
  transform: scale(0.6) translateY(2px);
  transition: opacity 220ms ease, transform 280ms cubic-bezier(0.2, 0.9, 0.2, 1.2);
  pointer-events: none;
}
.bd_form_v2 .field_check svg { width: 12px; height: 12px; }

.bd_submit_v2 {
  margin-top: 6px;
  padding: 16px 24px;
  background: #2563EB;
  color: #fff;
  border: 0;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  position: relative;
  overflow: hidden;
  transition: transform 120ms ease, background 200ms ease, box-shadow 200ms ease;
  box-shadow: 0 8px 20px -6px rgba(37,99,235,0.5);
}
.bd_submit_v2:hover { background: #1E4FD1; box-shadow: 0 12px 28px -6px rgba(37,99,235,0.6); }
.bd_submit_v2:active { transform: translateY(1px); }
.bd_submit_v2::before {
  content: '';
  position: absolute;
  top: 0; bottom: 0; left: -120%;
  width: 50%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
  transform: skewX(-20deg);
  transition: left 700ms cubic-bezier(0.2, 0, 0, 1);
}
.bd_submit_v2:hover::before { left: 130%; }
.bd_submit_v2 .arr { transition: transform 200ms ease; }
.bd_submit_v2:hover .arr { transform: translateX(3px); }

.bd_meta_v2 {
  display: flex; align-items: center; justify-content: center; gap: 14px;
  flex-wrap: wrap;
  font-size: 11px;
  color: #6b7894;
  margin-top: 2px;
  letter-spacing: 0.02em;
}
.bd_meta_v2 .pip {
  display: inline-flex; align-items: center; gap: 6px;
}
.bd_meta_v2 .pip svg { width: 11px; height: 11px; color: #02A783; }

/* killer success state */
.bd_success_v2 {
  display: none;
  padding: 56px 36px 48px;
  text-align: center;
  position: relative;
}
.bd_success_v2[data-on="true"] { display: block; }
.bd_success_v2 .bigcheck {
  width: 72px; height: 72px;
  margin: 0 auto 24px;
  border-radius: 999px;
  background: #02A783;
  display: inline-flex; align-items: center; justify-content: center;
  color: #fff;
  position: relative;
  animation: checkPop 600ms cubic-bezier(0.2, 0.9, 0.2, 1.3) backwards;
}
.bd_success_v2 .bigcheck::before {
  content: ''; position: absolute; inset: -8px;
  border-radius: 999px;
  border: 2px solid #02A783;
  opacity: 0;
  animation: checkRipple 1.2s ease-out 0.2s infinite;
}
@keyframes checkPop {
  0% { transform: scale(0); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}
@keyframes checkRipple {
  0% { transform: scale(0.9); opacity: 0.6; }
  100% { transform: scale(1.4); opacity: 0; }
}
.bd_success_v2 .bigcheck svg { width: 32px; height: 32px; }
.bd_success_v2 h3 {
  font-size: 24px; font-weight: 600;
  letter-spacing: -0.018em;
  margin: 0 0 8px;
  color: #0b1220;
}
.bd_success_v2 p {
  font-size: 14px;
  color: #6b7894;
  line-height: 1.55;
  max-width: 38ch;
  margin: 0 auto;
}

/* ================================================== */
/* PHONE STORYTELLING — broken lifecycle               */
/* ================================================== */
.story {
  padding: 100px 0 80px;
  position: relative;
}
.story_grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 80px;
  align-items: center;
}
.story_text .eyebrow { color: #F25C37; }
.story_text h2 {
  font-size: clamp(36px, 5vw, 56px);
  line-height: 1.05;
  letter-spacing: -0.028em;
  font-weight: 600;
  margin: 16px 0 20px;
  color: #0b1220;
  text-wrap: balance;
}
.story_text h2 .strike {
  position: relative;
  display: inline-block;
  color: #6b7894;
}
.story_text h2 .strike::after {
  content: '';
  position: absolute;
  left: 0; right: 0; top: 55%;
  height: 3px;
  background: #F25C37;
  transform: scaleX(0);
  transform-origin: left;
  animation: strikeIn 1.4s cubic-bezier(0.2, 0, 0, 1) 0.4s forwards;
}
@keyframes strikeIn { to { transform: scaleX(1); } }
.story_text p.lede {
  font-size: 18px; line-height: 1.55;
  color: #29395a;
  max-width: 52ch;
  margin-bottom: 28px;
}
.story_metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  border-top: 1px solid #e5e9f0;
  padding-top: 24px;
}
.story_metric .num {
  font-size: 36px;
  font-weight: 600;
  letter-spacing: -0.022em;
  color: #0b1220;
  line-height: 1;
}
.story_metric .num .em { color: #F25C37; }
.story_metric .lbl {
  font-size: 12px;
  color: #6b7894;
  margin-top: 6px;
  line-height: 1.4;
}

/* phone */
.story_phone_wrap {
  position: relative;
  display: flex; justify-content: center;
}
.story_phone_glow {
  position: absolute;
  inset: -40px;
  background: radial-gradient(circle, rgba(242,92,55,0.18) 0%, transparent 60%);
  filter: blur(40px);
  z-index: 0;
  animation: phoneBreathe 4s ease-in-out infinite alternate;
}
@keyframes phoneBreathe {
  from { opacity: 0.5; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1.05); }
}
.story_phone {
  position: relative;
  width: 320px;
  height: 640px;
  background: #0b1220;
  border-radius: 44px;
  padding: 12px;
  box-shadow:
    0 40px 80px -20px rgba(11,18,32,0.5),
    inset 0 0 0 2px rgba(255,255,255,0.05);
  z-index: 1;
}
.story_phone::before {
  /* notch */
  content: '';
  position: absolute;
  top: 18px; left: 50%;
  transform: translateX(-50%);
  width: 110px; height: 26px;
  background: #000;
  border-radius: 999px;
  z-index: 3;
}
.story_screen {
  width: 100%; height: 100%;
  background: linear-gradient(180deg, #f4f5f9 0%, #e9ebf2 100%);
  border-radius: 32px;
  overflow: hidden;
  position: relative;
}
.story_status {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 28px 0;
  font-size: 13px; font-weight: 600;
  color: #0b1220;
  font-family: 'JetBrains Mono', monospace;
}
.story_status .status_icons { display: flex; gap: 5px; align-items: center; }
.story_status .status_icons svg { width: 14px; height: 14px; }
.story_appbar {
  margin-top: 18px;
  padding: 10px 20px;
  display: flex; align-items: center; justify-content: space-between;
  border-bottom: 1px solid rgba(11,18,32,0.06);
}
.story_appbar .title {
  font-size: 14px; font-weight: 600;
  color: #0b1220;
  display: flex; align-items: center; gap: 8px;
}
.story_appbar .title::before {
  content: ''; width: 24px; height: 24px;
  border-radius: 6px;
  background: linear-gradient(135deg, #02A783, #02A783);
  background: #02A783;
  display: inline-block;
}
.story_appbar .title .ico {
  width: 24px; height: 24px;
  border-radius: 6px;
  background: linear-gradient(135deg, #25D366, #128C7E);
  display: inline-flex; align-items: center; justify-content: center;
  color: #fff;
}
.story_appbar .badge {
  background: #ff3b30; color: #fff;
  font-size: 10px; font-weight: 700;
  padding: 2px 7px;
  border-radius: 999px;
  font-family: 'Inter Tight', sans-serif;
  animation: badgePulse 2s ease-in-out infinite;
}
@keyframes badgePulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.08); }
}

.story_messages {
  padding: 14px 14px 14px;
  height: 470px;
  overflow: hidden;
  position: relative;
  display: flex; flex-direction: column; gap: 10px;
  mask-image: linear-gradient(180deg, transparent 0%, #000 8%, #000 92%, transparent 100%);
  -webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 8%, #000 92%, transparent 100%);
}
.story_messages_track {
  display: flex; flex-direction: column; gap: 10px;
  animation: msgScroll 28s linear infinite;
  padding-bottom: 10px;
}
@keyframes msgScroll {
  from { transform: translateY(0); }
  to { transform: translateY(-50%); }
}
.msg {
  max-width: 80%;
  padding: 8px 12px;
  border-radius: 14px;
  font-size: 12px;
  line-height: 1.4;
  position: relative;
  word-wrap: break-word;
}
.msg .who {
  font-size: 10px; font-weight: 700;
  margin-bottom: 2px;
  font-family: 'JetBrains Mono', monospace;
  letter-spacing: 0.04em;
}
.msg .meta {
  font-size: 9px;
  margin-top: 3px;
  opacity: 0.6;
  display: flex; align-items: center; gap: 4px;
}
.msg.them {
  align-self: flex-start;
  background: #fff;
  color: #0b1220;
  border-bottom-left-radius: 4px;
  box-shadow: 0 1px 0 rgba(11,18,32,0.04);
}
.msg.them .who { color: #128C7E; }
.msg.me {
  align-self: flex-end;
  background: #DCF8C6;
  color: #0b1220;
  border-bottom-right-radius: 4px;
}
.msg.me .who { color: #075e54; }
.msg.urgent {
  background: #ffe8e3;
  color: #8c2a14;
  border: 1px solid #f7c0b1;
}
.msg.urgent .who { color: #c43c1a; }
.msg.system {
  align-self: center;
  background: rgba(11,18,32,0.06);
  color: #6b7894;
  font-size: 10px;
  padding: 4px 10px;
  border-radius: 999px;
  font-family: 'JetBrains Mono', monospace;
  letter-spacing: 0.02em;
  max-width: none;
}
.typing {
  align-self: flex-start;
  background: #fff;
  padding: 10px 14px;
  border-radius: 14px;
  border-bottom-left-radius: 4px;
  display: inline-flex; gap: 4px;
  box-shadow: 0 1px 0 rgba(11,18,32,0.04);
}
.typing span {
  width: 6px; height: 6px;
  background: #94a0b8;
  border-radius: 999px;
  animation: typingDot 1.4s ease-in-out infinite;
}
.typing span:nth-child(2) { animation-delay: 0.2s; }
.typing span:nth-child(3) { animation-delay: 0.4s; }
@keyframes typingDot {
  0%, 60%, 100% { opacity: 0.3; transform: translateY(0); }
  30% { opacity: 1; transform: translateY(-3px); }
}

/* chaos labels orbit phone */
.story_orbit {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 2;
}
.orbit_chip {
  position: absolute;
  background: #fff;
  border: 1px solid #e5e9f0;
  border-radius: 999px;
  padding: 6px 12px 6px 28px;
  font-size: 11px;
  font-weight: 500;
  color: #0b1220;
  box-shadow: 0 8px 24px -8px rgba(11,18,32,0.18);
  white-space: nowrap;
  font-family: 'JetBrains Mono', monospace;
  letter-spacing: 0.02em;
}
.orbit_chip::before {
  content: '';
  position: absolute;
  left: 10px; top: 50%;
  transform: translateY(-50%);
  width: 10px; height: 10px;
  border-radius: 999px;
  background: #F25C37;
}
.orbit_chip.green::before { background: #02A783; }
.orbit_chip.amber::before { background: #f59e0b; }
.orbit_chip.gray::before { background: #6b7894; }
.orbit_chip.c1 { top: 8%; left: -30%; animation: float1 6s ease-in-out infinite alternate; }
.orbit_chip.c2 { top: 28%; right: -28%; animation: float2 7s ease-in-out infinite alternate; }
.orbit_chip.c3 { top: 52%; left: -36%; animation: float3 8s ease-in-out infinite alternate; }
.orbit_chip.c4 { top: 72%; right: -32%; animation: float4 6.5s ease-in-out infinite alternate; }
.orbit_chip.c5 { top: 88%; left: -28%; animation: float5 7.5s ease-in-out infinite alternate; }
@keyframes float1 { from { transform: translate(0,0); } to { transform: translate(8px,-12px); } }
@keyframes float2 { from { transform: translate(0,0); } to { transform: translate(-10px,8px); } }
@keyframes float3 { from { transform: translate(0,0); } to { transform: translate(12px,-8px); } }
@keyframes float4 { from { transform: translate(0,0); } to { transform: translate(-8px,-10px); } }
@keyframes float5 { from { transform: translate(0,0); } to { transform: translate(6px,12px); } }

/* connector lines from chips to phone */
.story_orbit svg.lines {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
}
.story_orbit svg.lines path {
  fill: none;
  stroke: rgba(242,92,55,0.35);
  stroke-width: 1;
  stroke-dasharray: 3 4;
  animation: lineDash 1.6s linear infinite;
}
@keyframes lineDash { to { stroke-dashoffset: -14; } }

/* responsive story */
@media (max-width: 920px) {
  .story_grid { grid-template-columns: 1fr; gap: 50px; }
  .story_phone { width: 280px; height: 560px; }
  .story_messages { height: 400px; }
  .orbit_chip.c1 { left: -10%; top: 4%; }
  .orbit_chip.c2 { right: -10%; top: 18%; }
  .orbit_chip.c3 { left: -10%; top: 54%; }
  .orbit_chip.c4 { right: -10%; top: 70%; }
  .orbit_chip.c5 { left: 20%; top: 92%; }
}
@media (max-width: 560px) {
  .story { padding: 60px 0 40px; }
  .story_text h2 { font-size: 32px; }
  .story_metrics { grid-template-columns: 1fr; gap: 14px; }
  .story_metric .num { font-size: 28px; }
  .orbit_chip { font-size: 10px; padding: 4px 10px 4px 24px; }
}
