/* ============================================================
   seed-scan-demo.css — Cloche animated seed scan walkthrough
   Scan → Add Seed → Care Plan (13-second loop)
   ============================================================ */

/* ── Root wrapper ──────────────────────────────────────────── */
.ssd-root {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  font-family: 'Outfit', system-ui, -apple-system, sans-serif;
  user-select: none;
  -webkit-user-select: none;
}

/* ── Phone frame ──────────────────────────────────────────── */
.ssd-phone-wrap {
  filter: drop-shadow(0 18px 36px rgba(26,46,13,0.22));
  border-radius: 36px;
}

.ssd-phone {
  width: 256px;
  height: 468px;
  background: #1A1C1B;
  border-radius: 36px;
  padding: 14px 10px 10px;
  position: relative;
  overflow: hidden;
}

/* Dynamic island / notch */
.ssd-phone::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 72px;
  height: 22px;
  background: #1A1C1B;
  border-radius: 0 0 14px 14px;
  z-index: 200;
}

/* Status bar row */
.ssd-phone::after {
  content: '9:41';
  position: absolute;
  top: 5px;
  left: 24px;
  font-size: 0.52rem;
  font-weight: 700;
  color: rgba(255,255,255,0.55);
  z-index: 201;
  letter-spacing: 0.02em;
}

.ssd-screen {
  width: 100%;
  height: 100%;
  background: #FAF7F2;
  border-radius: 28px;
  overflow: hidden;
  position: relative;
}

/* ── Scene system ─────────────────────────────────────────── */
.ssd-scene {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
  border-radius: 28px;
  overflow: hidden;
}

.ssd-scene.ssd-active {
  opacity: 1;
  pointer-events: auto;
}


/* ═══════════════════════════════════════════════════════════
   SCENE 1 — Camera scan
   ═══════════════════════════════════════════════════════════ */
.ssd-cam-view {
  width: 100%;
  height: 100%;
  background: #12201A;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

/* Vignette overlay */
.ssd-cam-view::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, transparent 40%, rgba(0,0,0,0.55) 100%);
  z-index: 1;
  pointer-events: none;
}

/* Seed packet card */
.ssd-cam-packet {
  background: white;
  border-radius: 10px;
  padding: 14px 16px 10px;
  width: 158px;
  text-align: center;
  box-shadow: 0 6px 24px rgba(0,0,0,0.4);
  position: relative;
  z-index: 2;
}

.ssd-pkt-brand {
  font-size: 0.5rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: #587A52;
  text-transform: uppercase;
  margin-bottom: 5px;
}

.ssd-pkt-emoji {
  font-size: 1.8rem;
  display: block;
  margin-bottom: 4px;
  line-height: 1;
}

.ssd-pkt-name {
  font-size: 0.95rem;
  font-weight: 800;
  color: #1A2E0D;
  line-height: 1.15;
  margin-bottom: 2px;
}

.ssd-pkt-sci {
  font-size: 0.55rem;
  color: #888;
  font-style: italic;
  margin-bottom: 8px;
}

.ssd-pkt-divider {
  height: 1px;
  background: #F0EDE5;
  margin: 6px 0;
}

.ssd-pkt-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.5rem;
  color: #999;
}

.ssd-pkt-year {
  font-size: 0.5rem;
  color: #bbb;
  background: #f7f5f0;
  border-radius: 4px;
  padding: 2px 7px;
  display: inline-block;
  margin-top: 5px;
  letter-spacing: 0.04em;
}

/* Scanner brackets — animate in */
.ssd-scan-brackets {
  position: absolute;
  inset: 18px;
  z-index: 10;
  opacity: 0;
  animation: ssd-brk-in 0.45s cubic-bezier(0.34, 1.2, 0.64, 1) 0.6s forwards;
}

@keyframes ssd-brk-in {
  from { opacity: 0; transform: scale(1.12); }
  to   { opacity: 1; transform: scale(1); }
}

.ssd-brk {
  position: absolute;
  width: 18px;
  height: 18px;
  border-color: #5DBF6F;
  border-style: solid;
}
.ssd-brk.tl { top: 0; left: 0;  border-width: 2.5px 0 0 2.5px; border-top-left-radius: 3px; }
.ssd-brk.tr { top: 0; right: 0; border-width: 2.5px 2.5px 0 0; border-top-right-radius: 3px; }
.ssd-brk.bl { bottom: 0; left: 0;  border-width: 0 0 2.5px 2.5px; border-bottom-left-radius: 3px; }
.ssd-brk.br { bottom: 0; right: 0; border-width: 0 2.5px 2.5px 0; border-bottom-right-radius: 3px; }

/* Scan sweep line */
.ssd-scan-line {
  position: absolute;
  left: 18px;
  right: 18px;
  height: 2px;
  background: linear-gradient(90deg, transparent 0%, #5DBF6F 30%, #5DBF6F 70%, transparent 100%);
  box-shadow: 0 0 10px 3px rgba(93,191,111,0.5);
  top: 18px;
  z-index: 11;
  opacity: 0;
  animation: ssd-sweep 2.0s ease-in-out 0.9s 2;
}

@keyframes ssd-sweep {
  0%   { top: 18px;             opacity: 0; }
  8%   { top: 18px;             opacity: 1; }
  88%  { top: calc(100% - 18px); opacity: 1; }
  100% { top: calc(100% - 18px); opacity: 0; }
}

/* Scanning text */
.ssd-scan-status {
  position: absolute;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 6px;
  color: rgba(255,255,255,0.65);
  font-size: 0.6rem;
  font-weight: 500;
  white-space: nowrap;
  z-index: 12;
  opacity: 0;
  animation: ssd-fade-up 0.35s ease 1.1s forwards;
}

.ssd-scan-dot {
  width: 5px;
  height: 5px;
  background: #5DBF6F;
  border-radius: 50%;
  animation: ssd-pulse 1s ease-in-out infinite;
}

@keyframes ssd-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.4; transform: scale(0.7); }
}

/* Recognition badge (revealed via JS class) */
.ssd-recognize {
  position: absolute;
  bottom: 22px;
  left: 50%;
  transform: translateX(-50%) scale(0.8);
  background: #5DBF6F;
  color: white;
  font-size: 0.67rem;
  font-weight: 700;
  padding: 7px 18px;
  border-radius: 20px;
  white-space: nowrap;
  z-index: 13;
  opacity: 0;
  letter-spacing: 0.02em;
  transition: none;
}

.ssd-recognize.ssd-pop {
  animation: ssd-badge-pop 0.4s cubic-bezier(0.34, 1.35, 0.64, 1) forwards;
}

@keyframes ssd-badge-pop {
  from { opacity: 0; transform: translateX(-50%) scale(0.75); }
  to   { opacity: 1; transform: translateX(-50%) scale(1); }
}


/* ═══════════════════════════════════════════════════════════
   SCENE 2 — Seeds inventory
   ═══════════════════════════════════════════════════════════ */
.ssd-seeds-view {
  background: #FAF7F2;
  height: 100%;
  padding: 10px 10px 0;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* App header */
.ssd-app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  padding-bottom: 7px;
  border-bottom: 1px solid #EDE8DF;
  flex-shrink: 0;
}

.ssd-app-title {
  font-size: 0.82rem;
  font-weight: 700;
  color: #1A2E0D;
}

.ssd-count-badge {
  font-size: 0.58rem;
  color: #587A52;
  font-weight: 600;
  background: #D4E5CE;
  padding: 2px 8px;
  border-radius: 10px;
}

/* Search bar */
.ssd-search {
  display: flex;
  align-items: center;
  gap: 5px;
  background: white;
  border: 1.5px solid #EDE8DF;
  border-radius: 9px;
  padding: 6px 9px;
  margin-bottom: 7px;
  flex-shrink: 0;
}

.ssd-search-ph {
  font-size: 0.58rem;
  color: #C0B8AF;
}

/* Filter chips */
.ssd-filter-row {
  display: flex;
  gap: 4px;
  margin-bottom: 9px;
  flex-shrink: 0;
}

.ssd-chip {
  font-size: 0.55rem;
  padding: 3px 8px;
  border-radius: 18px;
  border: 1.5px solid #EDE8DF;
  color: #999;
  font-weight: 500;
  white-space: nowrap;
  background: white;
}

.ssd-chip.on {
  background: #587A52;
  border-color: #587A52;
  color: white;
}

/* New seed card */
.ssd-seed-card {
  background: white;
  border: 2px solid #587A52;
  border-radius: 14px;
  padding: 11px 11px 9px;
  box-shadow: 0 3px 14px rgba(88,122,82,0.18);
  opacity: 0;
  flex-shrink: 0;
  transform: translateY(-20px) scale(0.96);
}

.ssd-seed-card.ssd-drop-in {
  animation: ssd-card-drop 0.5s cubic-bezier(0.34, 1.1, 0.64, 1) forwards;
}

@keyframes ssd-card-drop {
  from { opacity: 0; transform: translateY(-20px) scale(0.96); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.ssd-card-top {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 9px;
}

.ssd-card-icon { font-size: 1.3rem; flex-shrink: 0; line-height: 1; margin-top: 1px; }

.ssd-card-mid { flex: 1; min-width: 0; }

.ssd-card-name {
  font-size: 0.8rem;
  font-weight: 700;
  color: #1A2E0D;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ssd-card-badges {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}

.ssd-badge {
  font-size: 0.52rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 6px;
}

.ssd-badge-pkt {
  background: #FFF3E0;
  color: #7B5A2A;
  border: 1px solid #E8C98A;
}

.ssd-badge-steps {
  background: #D4E5CE;
  color: #2A4D26;
}

.ssd-plan-btn {
  flex-shrink: 0;
  background: #587A52;
  color: white;
  border: none;
  border-radius: 7px;
  font-size: 0.48rem;
  font-weight: 700;
  padding: 5px 6px;
  cursor: default;
  font-family: inherit;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.ssd-card-actions {
  display: flex;
  gap: 6px;
}

.ssd-act-btn {
  flex: 1;
  padding: 6px 4px;
  border-radius: 9px;
  font-size: 0.56rem;
  font-weight: 600;
  cursor: default;
  border: none;
  font-family: inherit;
}

.ssd-act-view {
  background: #F0EDE5;
  color: #1A2E0D;
}

.ssd-act-regen {
  background: #2A4D26;
  color: white;
}

/* Toast */
.ssd-toast {
  position: absolute;
  bottom: 14px;
  left: 10px;
  right: 10px;
  background: #2A4D26;
  color: white;
  font-size: 0.62rem;
  font-weight: 600;
  padding: 9px 13px;
  border-radius: 11px;
  display: flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 4px 18px rgba(26,46,13,0.28);
  opacity: 0;
  transform: translateY(10px);
}

.ssd-toast.ssd-show {
  animation: ssd-toast-in 0.3s ease forwards, ssd-toast-out 0.3s ease 2.2s forwards;
}

@keyframes ssd-toast-in {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes ssd-toast-out {
  from { opacity: 1; transform: translateY(0); }
  to   { opacity: 0; transform: translateY(5px); }
}


/* ═══════════════════════════════════════════════════════════
   SCENE 3 — Care plan bottom sheet
   ═══════════════════════════════════════════════════════════ */
.ssd-plan-bg {
  height: 100%;
  position: relative;
  overflow: hidden;
  background: #FAF7F2;
}

/* Dim backdrop showing seeds page */
.ssd-plan-backdrop {
  padding: 10px 10px 0;
  opacity: 0.35;
}

/* Dark overlay */
.ssd-plan-overlay {
  position: absolute;
  inset: 0;
  background: rgba(26,46,13,0.3);
  z-index: 1;
}

/* Bottom sheet */
.ssd-sheet {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: white;
  border-radius: 20px 20px 0 0;
  padding: 12px 13px 14px;
  box-shadow: 0 -8px 28px rgba(26,46,13,0.16);
  z-index: 2;
  transform: translateY(100%);
  max-height: 86%;
  overflow: hidden;
}

.ssd-sheet.ssd-up {
  animation: ssd-sheet-rise 0.52s cubic-bezier(0.34, 1.08, 0.64, 1) forwards;
}

@keyframes ssd-sheet-rise {
  from { transform: translateY(100%); }
  to   { transform: translateY(0); }
}

.ssd-sheet-handle {
  width: 32px;
  height: 4px;
  background: #EDE8DF;
  border-radius: 2px;
  margin: 0 auto 12px;
}

/* Sheet header */
.ssd-sheet-hdr {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid #EDE8DF;
}

.ssd-sh-icon { font-size: 1.4rem; flex-shrink: 0; }

.ssd-sh-title {
  font-size: 0.82rem;
  font-weight: 700;
  color: #1A2E0D;
  line-height: 1.2;
}

.ssd-sh-sub {
  font-size: 0.58rem;
  color: #999;
  margin-top: 1px;
}

.ssd-sh-check {
  margin-left: auto;
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  background: #587A52;
  color: white;
  border-radius: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.58rem;
  font-weight: 700;
  opacity: 0;
  transform: scale(0.5);
}

.ssd-sh-check.ssd-pop {
  animation: ssd-pop 0.4s cubic-bezier(0.34, 1.4, 0.64, 1) forwards;
}

@keyframes ssd-pop {
  from { opacity: 0; transform: scale(0.5); }
  to   { opacity: 1; transform: scale(1); }
}

/* Plan steps */
.ssd-steps { display: flex; flex-direction: column; gap: 7px; }

.ssd-step {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  opacity: 0;
  transform: translateX(-10px);
}

.ssd-step.ssd-in {
  animation: ssd-step-slide 0.38s ease forwards;
}

@keyframes ssd-step-slide {
  from { opacity: 0; transform: translateX(-10px); }
  to   { opacity: 1; transform: translateX(0); }
}

.ssd-step-num {
  width: 20px;
  height: 20px;
  border-radius: 10px;
  background: #D4E5CE;
  color: #587A52;
  font-size: 0.56rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
}

.ssd-step-num.done {
  background: #587A52;
  color: white;
}

.ssd-step-title {
  font-size: 0.68rem;
  font-weight: 600;
  color: #1A2E0D;
  line-height: 1.3;
  margin-bottom: 1px;
}

.ssd-step-note {
  font-size: 0.57rem;
  color: #999;
  line-height: 1.3;
}


/* ═══════════════════════════════════════════════════════════
   Caption + progress dots (below phone)
   ═══════════════════════════════════════════════════════════ */
.ssd-caption {
  text-align: center;
  min-height: 22px;
  position: relative;
  width: 256px;
}

.ssd-cap {
  font-size: 0.78rem;
  font-weight: 500;
  color: #587A52;
  position: absolute;
  width: 100%;
  opacity: 0;
  transform: translateY(5px);
  transition: opacity 0.38s ease, transform 0.38s ease;
  line-height: 1.4;
  left: 0;
}

.ssd-cap.ssd-on {
  opacity: 1;
  transform: translateY(0);
  position: relative;
}

.ssd-dots {
  display: flex;
  gap: 5px;
  align-items: center;
  justify-content: center;
}

.ssd-dot {
  width: 6px;
  height: 6px;
  border-radius: 3px;
  background: #D4E5CE;
  transition: all 0.3s ease;
}

.ssd-dot.on {
  width: 18px;
  background: #587A52;
}


/* ═══════════════════════════════════════════════════════════
   Shared helpers
   ═══════════════════════════════════════════════════════════ */
@keyframes ssd-fade-up {
  from { opacity: 0; transform: translateX(-50%) translateY(5px); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* Landing page wrapper — side by side layout */
.lp-scan-demo-section {
  padding: 64px 24px 72px;
  background: linear-gradient(160deg, #F5F1EA 0%, #FAF7F2 60%, #EDF5E9 100%);
}

.lp-scan-demo-inner {
  max-width: 960px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 64px;
}

.lp-scan-demo-phone {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.lp-scan-demo-text {
  flex: 1;
}

.lp-scan-demo-text h2 {
  font-family: 'DM Serif Display', Georgia, serif;
  font-size: 2rem;
  color: #1A2E0D;
  line-height: 1.2;
  margin-bottom: 14px;
}

.lp-scan-demo-text h2 em {
  font-style: italic;
  color: #C4724E;
}

.lp-scan-demo-text p {
  font-size: 0.95rem;
  color: #555;
  line-height: 1.6;
  margin-bottom: 24px;
}

.lp-scan-steps {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.lp-scan-step {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.lp-scan-step-icon {
  width: 36px;
  height: 36px;
  background: white;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(26,46,13,0.1);
}

.lp-scan-step-body h4 {
  font-size: 0.9rem;
  font-weight: 700;
  color: #1A2E0D;
  margin-bottom: 2px;
}

.lp-scan-step-body p {
  font-size: 0.8rem;
  color: #777;
  margin-bottom: 0;
  line-height: 1.4;
}

/* Responsive: stack on mobile */
@media (max-width: 700px) {
  .lp-scan-demo-inner {
    flex-direction: column;
    gap: 32px;
    align-items: center;
  }
  .lp-scan-demo-text {
    text-align: center;
  }
  .lp-scan-demo-text h2 {
    font-size: 1.6rem;
  }
  .lp-scan-steps {
    align-items: flex-start;
    text-align: left;
    max-width: 320px;
    margin: 0 auto;
  }
}

/* Onboarding embed — compact centering */
.ob-scan-demo-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: 20px;
}

.ob-scan-demo-wrap .ssd-phone {
  width: 220px;
  height: 390px;
}

.ob-scan-demo-wrap .ssd-caption {
  width: 220px;
}

/* ── Accessibility: reduce motion ──────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .ssd-scan-brackets,
  .ssd-scan-line,
  .ssd-scan-status,
  .ssd-recognize,
  .ssd-seed-card,
  .ssd-toast,
  .ssd-sheet,
  .ssd-step,
  .ssd-sh-check,
  .ssd-cap {
    animation: none !important;
    transition: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
}
