/* One2Family cinematic product walkthrough — 16:9 (1080×608 logical) */
:root {
  --oc-teal: #0d9488;
  --oc-teal-dark: #0f766e;
  --oc-teal-deep: #115e59;
  --oc-teal-soft: #ccfbf1;
  --oc-teal-muted: #99f6e4;
  --oc-bg: #f0fdfa;
  --oc-bg-panel: #ffffff;
  --oc-text: #134e4a;
  --oc-text-muted: #5c7a78;
  --oc-danger: #dc2626;
  --oc-danger-soft: #fef2f2;
  --oc-success: #059669;
  --oc-success-soft: #ecfdf5;
  --oc-warn: #d97706;
  --oc-border: #cbd5e1;
  --oc-phone-bg: #1e293b;
  --oc-stage-w: 1080;
  --oc-stage-h: 608;
  --oc-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

.oc-page {
  margin: 0;
  min-height: 100vh;
  background: linear-gradient(160deg, #042f2e 0%, #0f766e 45%, #134e4a 100%);
  color: var(--oc-text);
  font-family: var(--oc-font);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
}

.oc-page--embed {
  padding: 0;
  min-height: 0;
  background: #0f172a;
}

.oc-page--embed #oc-mount,
.oc-page--embed .oc-embed-root,
.oc-page--embed .oc-stage-wrap {
  width: 100%;
  height: 100%;
  min-height: 100%;
}

.oc-page--dev .oc-stage-wrap::after {
  content: "";
  position: absolute;
  inset: 0;
  background: url("/media/one2family-storyboard-reference.png") center / cover no-repeat;
  opacity: 0.08;
  pointer-events: none;
  border-radius: inherit;
}

.oc-header {
  width: min(100%, calc(var(--oc-stage-w) * 1px));
  margin-bottom: 16px;
  text-align: center;
  color: rgba(255, 255, 255, 0.92);
}

.oc-header h1 {
  margin: 0 0 6px;
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.oc-header p {
  margin: 0;
  font-size: 0.92rem;
  opacity: 0.78;
}

.oc-stage-wrap {
  position: relative;
  width: min(100%, calc(var(--oc-stage-w) * 1px));
  aspect-ratio: 1080 / 608;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.35);
  background: var(--oc-bg);
}

.oc-stage {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

/* ——— Scenes ——— */
.oc-scene {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  opacity: 0;
  visibility: hidden;
  transform: translateX(24px);
  transition: opacity 0.65s ease, transform 0.65s ease, visibility 0s linear 0.65s;
  pointer-events: none;
}

.oc-scene.is-active {
  opacity: 1;
  visibility: visible;
  transform: translateX(0);
  transition: opacity 0.65s ease, transform 0.65s ease, visibility 0s;
  pointer-events: auto;
  z-index: 2;
}

.oc-scene.is-exiting {
  opacity: 0;
  transform: translateX(-20px);
  z-index: 1;
}

.oc-scene--fade.is-active {
  animation: oc-crossfade-in 0.7s ease;
}

.oc-scene--expand.is-active .oc-phone {
  animation: oc-phone-expand 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

.oc-scene--slide-up.is-active .oc-copy {
  animation: oc-slide-up 0.7s ease;
}

@keyframes oc-crossfade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes oc-phone-expand {
  from { transform: scale(0.92); opacity: 0.6; }
  to { transform: scale(1); opacity: 1; }
}

@keyframes oc-slide-up {
  from { transform: translateY(16px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

/* Left copy panel */
.oc-copy {
  padding: 36px 32px 80px 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: linear-gradient(135deg, var(--oc-teal-soft) 0%, #fff 55%);
  border-right: 1px solid rgba(13, 148, 136, 0.12);
}

.oc-eyebrow {
  margin: 0 0 10px;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--oc-teal-dark);
}

.oc-headline {
  margin: 0 0 12px;
  font-size: clamp(1.35rem, 2.4vw, 1.85rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.03em;
  color: var(--oc-teal-deep);
}

.oc-subhead {
  margin: 0 0 18px;
  font-size: clamp(0.88rem, 1.4vw, 1rem);
  line-height: 1.55;
  color: var(--oc-text-muted);
}

.oc-bullets {
  margin: 0;
  padding: 0;
  list-style: none;
}

.oc-bullets li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 10px;
  font-size: 0.88rem;
  color: var(--oc-text);
  line-height: 1.4;
}

.oc-bullets li::before {
  content: "";
  flex-shrink: 0;
  width: 8px;
  height: 8px;
  margin-top: 6px;
  border-radius: 50%;
  background: var(--oc-teal);
}

/* Right phone column */
.oc-phone-col {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 28px 72px 12px;
  background: radial-gradient(ellipse at 60% 40%, rgba(13, 148, 136, 0.08), transparent 70%);
}

.oc-phone {
  width: min(100%, 248px);
  background: var(--oc-phone-bg);
  border-radius: 28px;
  padding: 10px;
  border: 2px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 20px 40px rgba(15, 23, 42, 0.28);
}

.oc-phone-notch {
  width: 38%;
  height: 5px;
  margin: 2px auto 10px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.22);
}

.oc-screen {
  background: #f8fafc;
  border-radius: 18px;
  min-height: 380px;
  overflow: hidden;
  font-size: 0.72rem;
  color: #1e293b;
}

/* ——— App UI components ——— */
.oc-app-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  background: var(--oc-teal);
  color: #fff;
  font-weight: 700;
  font-size: 0.78rem;
}

.oc-app-bar--back::before {
  content: "‹";
  margin-right: 4px;
  font-size: 1rem;
}

.oc-card {
  margin: 8px 10px;
  padding: 10px 12px;
  background: #fff;
  border: 1px solid var(--oc-border);
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.05);
}

.oc-card--member {
  display: flex;
  align-items: center;
  gap: 10px;
}

.oc-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.75rem;
  color: #fff;
  flex-shrink: 0;
}

.oc-avatar--amma { background: #ec4899; }
.oc-avatar--appa { background: #3b82f6; }
.oc-avatar--you { background: var(--oc-teal); }

.oc-member-name {
  font-weight: 700;
  font-size: 0.82rem;
  margin-bottom: 2px;
}

.oc-member-meta {
  font-size: 0.68rem;
  color: var(--oc-text-muted);
}

.oc-btn {
  display: block;
  width: calc(100% - 20px);
  margin: 10px;
  padding: 10px;
  border: none;
  border-radius: 10px;
  background: var(--oc-teal);
  color: #fff;
  font-weight: 700;
  font-size: 0.75rem;
  text-align: center;
}

.oc-btn--outline {
  background: transparent;
  border: 2px solid var(--oc-teal);
  color: var(--oc-teal-dark);
}

.oc-tabs {
  display: flex;
  gap: 4px;
  padding: 8px 10px 0;
  border-bottom: 1px solid var(--oc-border);
}

.oc-tab {
  padding: 6px 10px;
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--oc-text-muted);
  border-bottom: 2px solid transparent;
}

.oc-tab.is-active {
  color: var(--oc-teal-dark);
  border-bottom-color: var(--oc-teal);
}

.oc-section-title {
  margin: 10px 10px 6px;
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--oc-text-muted);
}

.oc-stat-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 7px 10px;
  margin: 0 10px 6px;
  background: #fff;
  border: 1px solid var(--oc-border);
  border-radius: 8px;
  font-size: 0.7rem;
}

.oc-badge {
  padding: 2px 7px;
  border-radius: 99px;
  font-size: 0.62rem;
  font-weight: 700;
}

.oc-badge--high {
  background: var(--oc-danger-soft);
  color: var(--oc-danger);
}

.oc-badge--normal {
  background: var(--oc-success-soft);
  color: var(--oc-success);
}

.oc-med-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  margin: 0 10px 6px;
  background: #fff;
  border: 1px solid var(--oc-border);
  border-radius: 8px;
}

.oc-med-check {
  width: 16px;
  height: 16px;
  border-radius: 4px;
  border: 2px solid var(--oc-teal);
  flex-shrink: 0;
}

.oc-med-check.is-done {
  background: var(--oc-teal);
  position: relative;
}

.oc-med-check.is-done::after {
  content: "✓";
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 0.55rem;
}

.oc-schedule-bar {
  margin: 8px 10px;
  padding: 8px;
  background: var(--oc-teal-soft);
  border-radius: 8px;
  text-align: center;
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--oc-teal-deep);
}

.oc-doc-list .oc-card {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.oc-doc-icon {
  font-size: 1rem;
}

.oc-upload-bar {
  display: flex;
  justify-content: space-around;
  padding: 10px;
  border-top: 1px solid var(--oc-border);
  margin-top: 8px;
}

.oc-upload-icon {
  text-align: center;
  font-size: 0.62rem;
  color: var(--oc-text-muted);
}

.oc-upload-icon span {
  display: block;
  font-size: 1.1rem;
  margin-bottom: 2px;
}

/* Chat */
.oc-chat {
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 320px;
}

.oc-bubble {
  max-width: 88%;
  padding: 8px 10px;
  border-radius: 12px;
  font-size: 0.68rem;
  line-height: 1.45;
}

.oc-bubble--user {
  align-self: flex-end;
  background: var(--oc-teal);
  color: #fff;
  border-bottom-right-radius: 4px;
}

.oc-bubble--ai {
  align-self: flex-start;
  background: #fff;
  border: 1px solid var(--oc-border);
  border-bottom-left-radius: 4px;
}

.oc-ai-disclaimer {
  margin: 4px 10px 8px;
  padding: 6px 8px;
  font-size: 0.58rem;
  color: var(--oc-text-muted);
  background: #f1f5f9;
  border-radius: 6px;
  line-height: 1.35;
}

/* Doctor prep list */
.oc-prep-list {
  margin: 8px 10px;
}

.oc-prep-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 0;
  border-bottom: 1px solid var(--oc-border);
  font-size: 0.72rem;
}

.oc-prep-item::before {
  content: "✓";
  color: var(--oc-teal);
  font-weight: 800;
}

/* Share */
.oc-share-meta {
  font-size: 0.68rem;
  color: var(--oc-text-muted);
  margin-top: 4px;
}

.oc-share-icons {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin: 12px 10px;
  font-size: 0.62rem;
  text-align: center;
  color: var(--oc-text-muted);
}

.oc-share-icons span {
  display: block;
  font-size: 1.2rem;
  margin-bottom: 2px;
}

/* Privacy shield */
.oc-privacy {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 380px;
  background: linear-gradient(180deg, #ecfdf5, #f0fdfa);
  position: relative;
}

.oc-shield {
  width: 90px;
  height: 100px;
  background: var(--oc-teal);
  clip-path: polygon(50% 0%, 100% 22%, 100% 68%, 50% 100%, 0% 68%, 0% 22%);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 12px 32px rgba(13, 148, 136, 0.35);
}

.oc-lock {
  font-size: 2rem;
}

.oc-orbit-avatar {
  position: absolute;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid var(--oc-teal-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.oc-orbit-avatar:nth-child(2) { top: 18%; left: 22%; }
.oc-orbit-avatar:nth-child(3) { top: 14%; right: 20%; }
.oc-orbit-avatar:nth-child(4) { bottom: 22%; left: 18%; }
.oc-orbit-avatar:nth-child(5) { bottom: 18%; right: 22%; }

/* Welcome / end screens */
.oc-scene--full .oc-copy {
  grid-column: 1 / -1;
  text-align: center;
  align-items: center;
  border-right: none;
}

.oc-scene--full .oc-phone-col {
  display: none;
}

.oc-welcome-screen {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 380px;
  background: #fff;
  text-align: center;
  padding: 24px;
}

.oc-logo-mark {
  width: 72px;
  height: 72px;
  border-radius: 18px;
  background: var(--oc-teal-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
  overflow: hidden;
}

.oc-logo-mark img {
  width: 56px;
  height: auto;
}

.oc-welcome-wave {
  margin-top: auto;
  width: 100%;
  height: 48px;
  background: linear-gradient(180deg, transparent, var(--oc-teal-soft));
  border-radius: 0 0 18px 18px;
}

.oc-end-screen {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 380px;
  padding: 20px;
  text-align: center;
  background: #fff;
}

.oc-end-logo {
  width: 64px;
  margin-bottom: 8px;
}

.oc-end-company {
  width: 120px;
  max-width: 60%;
  margin-bottom: 8px;
  opacity: 0.92;
}

.oc-end-brand {
  font-weight: 800;
  font-size: 1rem;
  color: var(--oc-teal-deep);
  margin-bottom: 16px;
}

.oc-end-btns {
  width: 100%;
  max-width: 200px;
}

.oc-end-btns .oc-btn {
  margin: 6px 0;
  width: 100%;
}

.oc-end-domain {
  margin-top: 10px;
  font-size: 0.68rem;
  color: var(--oc-teal);
  font-weight: 600;
}

.oc-end-disclaimer {
  margin-top: 8px;
  font-size: 0.55rem;
  color: var(--oc-text-muted);
  line-height: 1.35;
  max-width: 200px;
}

/* Scene 12 spans full width with phone showing end card */
.oc-scene--endcard {
  grid-template-columns: 1fr 1fr;
}

.oc-scene--endcard .oc-copy {
  background: linear-gradient(135deg, var(--oc-teal) 0%, var(--oc-teal-deep) 100%);
  color: #fff;
}

.oc-scene--endcard .oc-headline,
.oc-scene--endcard .oc-subhead {
  color: #fff;
}

.oc-scene--endcard .oc-subhead {
  opacity: 0.88;
}

/* Caption bar */
.oc-caption-bar {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  background: rgba(15, 23, 42, 0.88);
  backdrop-filter: blur(8px);
  color: rgba(255, 255, 255, 0.92);
  font-size: 0.78rem;
  line-height: 1.4;
  min-height: 44px;
}

.oc-caption-bar.is-hidden {
  transform: translateY(100%);
  opacity: 0;
  pointer-events: none;
}

.oc-caption-label {
  flex-shrink: 0;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--oc-teal-muted);
}

.oc-caption-text {
  flex: 1;
}

/* Progress */
.oc-progress {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: rgba(13, 148, 136, 0.15);
  z-index: 11;
}

.oc-progress-fill {
  height: 100%;
  width: 0%;
  background: var(--oc-teal);
  transition: width 0.15s linear;
}

/* Controls (standalone page) */
.oc-controls {
  width: min(100%, calc(var(--oc-stage-w) * 1px));
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 16px;
  flex-wrap: wrap;
}

.oc-controls button {
  padding: 8px 16px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
}

.oc-controls button:hover {
  background: rgba(255, 255, 255, 0.18);
}

.oc-scene-indicator {
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.75);
  min-width: 72px;
  text-align: center;
}

/* Embed mode in resources page */
.oc-embed-root {
  width: 100%;
  background: #0f172a;
}

.oc-embed-root .oc-stage-wrap {
  width: 100%;
  border-radius: 0;
  box-shadow: none;
}

.oc-embed-root .oc-caption-bar {
  font-size: 0.72rem;
  padding: 8px 12px;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .oc-scene,
  .oc-scene.is-active,
  .oc-scene.is-exiting,
  .oc-scene--fade.is-active,
  .oc-scene--expand.is-active .oc-phone,
  .oc-scene--slide-up.is-active .oc-copy {
    animation: none !important;
    transition: none !important;
    transform: none !important;
  }

  .oc-scene:not(.oc-scene--end-static) {
    display: none !important;
  }

  .oc-scene--end-static {
    opacity: 1 !important;
    visibility: visible !important;
    display: grid !important;
  }

  .oc-progress-fill {
    width: 100% !important;
  }
}

@media (max-width: 720px) {
  .oc-scene {
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr;
  }

  .oc-copy {
    padding: 20px 18px 12px;
  }

  .oc-phone-col {
    padding: 8px 16px 64px;
  }

  .oc-screen {
    min-height: 280px;
  }
}
