/* Shared page styles: detail */
/* ========== DETAIL PAGE (Figma artboard 1920×1080) ========== */
.page-detail {
  padding: 0;
  font-family: var(--font-display);
}

.page-detail .card {
  border: none;
  border-radius: 24px;
  background: #ffffff;
  box-shadow: 0 4px 4px 0 #00000040;
}

/* 1. Title above video — 402×67 @ 759,90 */
.page-detail .detail-title {
  position: absolute;
  top: 90px;
  left: 759px;
  width: 402px;
  height: 67px;
  margin: 0;
  font-family: var(--font-display);
  font-size: 64px;
  font-weight: 600;
  letter-spacing: -0.005em;
  line-height: 1.05;
  text-align: center;
  color: #000;
  white-space: nowrap;
  overflow: visible;
}

/* 2. Subtitle under title — nudged up for more space above video */
.page-detail .detail-subtitle {
  position: absolute;
  top: 172px;
  left: 586px;
  width: 748px;
  height: 38px;
  margin: 0;
  font-family: var(--font-display);
  font-size: 36px;
  font-weight: 400;
  letter-spacing: -0.005em;
  line-height: 1.05;
  text-align: center;
  color: #000;
  white-space: nowrap;
  overflow: visible;
}

/* Video between subtitle and How it work */
.page-detail .detail-media {
  position: absolute;
  top: 240px;
  left: 595px;
  width: 730px;
  height: 390px;
  max-height: none;
  aspect-ratio: auto;
}

/* Local MP4 player */
.video-player {
  position: relative;
  display: block;
  background: #0b1220;
  border-radius: 10px;
  box-shadow: var(--shadow);
  overflow: hidden;
  color: #fff;
}

.video-player video {
  display: block;
  width: 100%;
  height: 100%;
  /* Fill the detail slot (730×390 is wider than 16:9); avoid side letterbox bars */
  object-fit: cover;
  background: #0b1220;
  /* Keep poster crisp while idle */
  object-position: center;
}

.video-player .video-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.12), transparent 40%, transparent 60%, rgba(0, 0, 0, 0.35));
  transition: opacity 0.2s ease;
}

.video-player.is-playing .video-overlay {
  opacity: 0;
}

.video-player .big-play {
  pointer-events: auto;
  width: 78px;
  height: 78px;
  border: 3px solid rgba(255, 255, 255, 0.9);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
  display: grid;
  place-items: center;
  cursor: pointer;
  padding: 0;
}

.video-player .big-play img {
  width: 28px;
  height: 28px;
  margin-left: 3px;
}

.video-player.is-playing .big-play {
  pointer-events: none;
}

.video-player .video-controls {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px 12px;
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.8));
  opacity: 1;
  transition: opacity 0.2s ease;
}

.video-player.is-playing:not(:hover):not(:focus-within) .video-controls {
  opacity: 0;
}

.video-player .ctrl-group {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.video-player .video-btn {
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.12);
  display: grid;
  place-items: center;
  cursor: pointer;
  padding: 0;
}

.video-player .video-btn:hover {
  background: rgba(255, 255, 255, 0.22);
}

.video-player .video-btn img {
  width: 18px;
  height: 18px;
}

.video-player .video-progress {
  flex: 1;
  min-width: 0;
  accent-color: #4ade80;
  cursor: pointer;
}

.video-player .volume-slider {
  width: 72px;
  accent-color: #fff;
  cursor: pointer;
}

.video-player .video-time {
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  opacity: 0.95;
  flex-shrink: 0;
}

.video-player .video-missing {
  display: none;
  position: absolute;
  inset: 0;
  place-items: center;
  gap: 6px;
  text-align: center;
  background: rgba(11, 18, 32, 0.92);
  padding: 24px;
}

.video-player .video-missing strong {
  display: block;
  font-size: 1.1rem;
}

.video-player .video-missing span {
  display: block;
  opacity: 0.8;
  font-size: 0.9rem;
}

.video-player.is-missing .video-missing {
  display: grid;
}

.video-player.is-missing .video-overlay,
.video-player.is-missing .video-controls {
  display: none;
}

.video-player.is-fullscreen,
.video-player:fullscreen,
.video-player:-webkit-full-screen {
  width: 100vw;
  height: 100vh;
  border-radius: 0;
  background: #000;
}

.video-player.is-fullscreen video,
.video-player:fullscreen video,
.video-player:-webkit-full-screen video {
  /* Fullscreen keeps full frame without cropping */
  object-fit: contain;
  background: #000;
}

.video-player.is-fullscreen .video-controls,
.video-player:fullscreen .video-controls,
.video-player:-webkit-full-screen .video-controls {
  opacity: 1;
}

/* 1. About — 527×260 @ 47,146 */
.page-detail .detail-about {
  position: absolute;
  top: 146px;
  left: 47px;
  width: 527px;
  height: 260px;
  padding: 0;
  overflow: hidden;
}

.page-detail .detail-about-title {
  position: absolute;
  top: 43px; /* 189 - 146 */
  left: 55px; /* 102 - 47 */
  width: 402px;
  margin: 0;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 32px;
  line-height: 1.05;
  letter-spacing: -0.005em;
  color: #0291f7;
}

.page-detail .detail-about-text {
  position: absolute;
  top: 108px; /* 254 - 146 */
  left: 55px;
  width: 439px;
  margin: 0;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0;
  color: #000;
  white-space: pre-line;
}

/* DORA about is 7 lines — tighten so last line is not clipped */
.page-detail--dora .detail-about-text {
  top: 96px;
  line-height: 1.32;
}

/* App Modernization — long about title + denser body copy */
.page-detail--application-modernization .detail-about-title {
  width: 450px;
  font-size: 26px;
  white-space: nowrap;
}

.page-detail--application-modernization .detail-about-text {
  top: 86px;
  right: 24px;
  width: auto;
  bottom: 18px;
  font-size: 15px;
  line-height: 1.32;
  overflow: hidden;
}

/* 2. Why it matters — 527×578 @ 47,427 */
.page-detail .detail-why {
  position: absolute;
  top: 427px;
  left: 47px;
  width: 527px;
  height: 578px;
  padding: 0;
  overflow: hidden;
}

.page-detail .detail-why-title {
  position: absolute;
  top: 43px;
  left: 55px;
  margin: 0;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 32px;
  line-height: 1.05;
  letter-spacing: -0.005em;
  color: #68c085;
}

.page-detail .detail-why .matter-list {
  position: absolute;
  top: 103px; /* 530 - 427 — first item */
  left: 0;
  right: 0;
  bottom: 24px;
  list-style: none;
  margin: 0;
  padding: 0 31px 0 27px; /* circle @ left 74 → 27px inset */
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 28px;
}

.page-detail .matter-item,
.page-detail .benefit-item {
  display: grid;
  grid-template-columns: 108px 342px;
  column-gap: 19px; /* 201 - 74 - 108 */
  align-items: center;
  min-height: 120px;
}

/* 2.3 Logo circle — 108×108, shared Figma size across detail pages */
.page-detail .icon-bubble {
  box-sizing: border-box;
  width: 108px;
  height: 108px;
  /* (108 - 59) / 2 — pad logo into circle without flex/transform (stage zoom safe) */
  padding: 24.5px;
  border-radius: 50%;
  flex-shrink: 0;
  overflow: hidden;
  background: #f9f9f9;
  box-shadow: 0 4px 4px 0 #00000040;
}

.page-detail .icon-bubble img {
  display: block;
  width: 100%;
  height: 100%;
  margin: 0;
  object-fit: contain;
}

.page-detail .detail-item-copy {
  width: 342px;
  min-height: 0;
  white-space: pre-line;
}

/* 2.1 Why titles / 2.2 Why body */
.page-detail .matter-item strong {
  display: block;
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 16px;
  line-height: 1.25;
  letter-spacing: 0;
  color: #68c085;
}

.page-detail .matter-item span {
  display: block;
  margin: 0;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 16px;
  line-height: 1.35;
  letter-spacing: 0;
  color: #000;
}

.page-detail .matter-item strong.single-line {
  margin: 0;
  color: #68c085;
}

/* Outcome & Benefits — same gutter as left column (21px from video) */
.page-detail .detail-outcomes {
  position: absolute;
  top: 146px;
  left: 1365px; /* video ends 1325; left card→video also 21px */
  width: 527px;
  height: 859px;
  padding: 0;
  overflow: hidden;
}

.page-detail .detail-outcomes-title {
  position: absolute;
  top: 43px;
  left: 55px;
  margin: 0;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 32px;
  line-height: 1.05;
  letter-spacing: -0.005em;
  color: #328999;
}

.page-detail .detail-outcomes .benefit-list {
  position: absolute;
  top: 103px;
  left: 0;
  right: 0;
  bottom: 28px;
  list-style: none;
  margin: 0;
  padding: 0 31px 0 27px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.page-detail .benefit-item strong {
  display: block;
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 16px;
  line-height: 1.25;
  letter-spacing: 0;
  color: #328999;
}

.page-detail .benefit-item span {
  display: block;
  margin: 0;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 16px;
  line-height: 1.35;
  letter-spacing: 0;
  color: #000;
}

.page-detail .benefit-item strong.single-line {
  margin: 0;
  color: #328999;
}

/* —— DORA color system (Figma Desktop 37) —— */
.page-detail--dora .matter-item strong.single-line {
  font-weight: 400;
  color: #000;
}

.page-detail--dora .detail-outcomes-title {
  color: #328999;
}

.page-detail--dora .detail-item-copy--rich {
  font-family: var(--font-display);
  font-size: 16px;
  line-height: 1.41;
  letter-spacing: 0;
}

.page-detail--dora .benefit-item .detail-hl,
.page-detail--dora .benefit-item .detail-ink {
  display: inline; /* override .benefit-item span { display:block } */
}

.page-detail--dora .benefit-item .detail-hl {
  font-weight: 700;
  color: #328999;
}

.page-detail--dora .benefit-item .detail-ink {
  font-weight: 400;
  color: #000;
}

/* —— AIDEA Agent (Figma: green why accents + teal outcomes) —— */
.page-detail--aidea .detail-about-title,
.page-detail--aidea .workflow-title {
  color: #0291f7;
}

.page-detail--aidea .detail-why-title {
  color: #68c085;
}

.page-detail--aidea .detail-outcomes-title {
  color: #328999;
}

.page-detail--aidea .detail-item-copy--rich {
  font-family: var(--font-display);
  font-size: 16px;
  line-height: 1.35;
  letter-spacing: 0;
}

.page-detail--aidea .matter-item .detail-hl,
.page-detail--aidea .matter-item .detail-ink,
.page-detail--aidea .benefit-item .detail-hl,
.page-detail--aidea .benefit-item .detail-ink {
  display: inline;
}

.page-detail--aidea .matter-item .detail-hl {
  font-weight: 700;
  color: #68c085;
}

.page-detail--aidea .matter-item .detail-ink {
  font-weight: 400;
  color: #000;
}

.page-detail--aidea .benefit-item .detail-hl {
  font-weight: 700;
  color: #328999;
}

.page-detail--aidea .benefit-item .detail-ink {
  font-weight: 400;
  color: #000;
}

/* Outcome accent/body sit tight on consecutive lines */
.page-detail--aidea .benefit-item .detail-item-copy--rich {
  line-height: 1.28;
}

/* —— Application Modernization (Figma: black why titles + teal outcomes) —— */
.page-detail--application-modernization .detail-about-title,
.page-detail--application-modernization .workflow-title {
  color: #0291f7;
}

.page-detail--application-modernization .detail-why-title {
  color: #68c085;
}

.page-detail--application-modernization .detail-outcomes-title,
.page-detail--application-modernization .benefit-item strong {
  color: #328999;
}

/* Why body: regular weight, continuous sentence (Figma) */
.page-detail--application-modernization .matter-item strong,
.page-detail--application-modernization .matter-item strong.single-line {
  display: inline;
  color: #000;
  font-weight: 400;
  white-space: pre-line;
}

.page-detail--application-modernization .matter-item span,
.page-detail--application-modernization .benefit-item span {
  color: #000;
  font-weight: 400;
}

/* Outcome title ↔ body: tighter than default block stack */
.page-detail--application-modernization .benefit-item .detail-item-copy {
  line-height: 1.25;
}

.page-detail--application-modernization .benefit-item strong {
  margin: 0;
  line-height: 1.2;
}

.page-detail--application-modernization .benefit-item span {
  margin: 0;
  margin-top: 1px;
  line-height: 1.3;
}

/* Long centered title — Application Modernization */
/* Same 64px title as other detail pages — widen box for the longer name */
.page-detail--application-modernization .detail-title {
  top: 90px;
  left: 300px;
  width: 1320px;
  height: 67px;
  font-size: 56px;
  line-height: 1.05;
  white-space: nowrap;
}

.page-detail--application-modernization .detail-subtitle {
  top: 172px;
  font-size: 36px;
}

/* 3–4. How it work title + black divider lines */
.page-detail .workflow-section {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.page-detail .workflow-section .workflow-steps,
.page-detail .workflow-section .workflow-step {
  pointer-events: auto;
}

.page-detail .workflow-title {
  position: absolute;
  top: 656px;
  left: 596px;
  width: 728px; /* 5×140 + 4×12 */
  height: 33px;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 16px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 32px;
  line-height: 1.05;
  letter-spacing: -0.005em;
  text-align: center;
  justify-content: center;
  color: #0291f7;
  white-space: nowrap;
}

.page-detail .workflow-title::before,
.page-detail .workflow-title::after {
  content: "";
  flex: 1 1 auto;
  height: 0;
  border-top: 1px solid #000;
}

/* 5–6. How it work cards — 140×193 @ 716,596 */
.page-detail .workflow-steps {
  position: absolute;
  top: 716px;
  left: 596px;
  width: 728px;
  height: 193px;
  display: flex;
  gap: 12px;
  margin: 0;
  padding: 0;
}

.page-detail .workflow-step {
  box-sizing: border-box;
  width: 140px;
  height: 193px;
  flex: 0 0 140px;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 12px 6px 8px;
  border-radius: 24px;
  background: #ffffff;
  box-shadow: 0 4px 4px 0 #00000040;
  text-align: center;
}

.page-detail .workflow-step-media {
  width: 120px;
  height: 90px;
  flex: 0 0 90px;
  border-radius: 12px;
  overflow: hidden;
  background: #dbeafe;
}

.page-detail .workflow-step-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.page-detail .workflow-step-label {
  display: block;
  flex: 1 1 auto;
  width: 100%;
  margin-top: 14px; /* a bit more space between image and label */
  padding: 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 14px;
  line-height: 1.2;
  letter-spacing: -0.015em;
  text-align: center;
  color: #0291f7;
  white-space: pre-line;
}

/* 7. Bottom footnote — 653×82 @ 634,923 */
.page-detail .detail-footnote {
  position: absolute;
  top: 923px;
  left: 634px;
  width: 653px;
  height: 82px;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px 20px;
  margin: 0;
  text-align: center;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 400;
  color: #000;
  line-height: 1.35;
  border-radius: 24px;
  white-space: pre-line;
}

.coming-soon-note {
  margin: 0.5rem 0 0;
  padding: 0.75rem;
  border-radius: 10px;
  background: #f8fafc;
  border: 1px dashed #94a3b8;
  color: #64748b;
  font-size: 0.9rem;
  text-align: center;
}

/* Video-like media placeholder (Phase 2 visual only) */
.media-placeholder {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  aspect-ratio: 16 / 9;
  max-height: 360px;
  background: #0b1220;
  border-radius: 10px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.media-play {
  width: 78px;
  height: 78px;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.9);
  background: rgba(255, 255, 255, 0.12);
  position: relative;
}

.media-play::after {
  content: "";
  position: absolute;
  left: 30px;
  top: 22px;
  border-style: solid;
  border-width: 16px 0 16px 26px;
  border-color: transparent transparent transparent #fff;
}

.media-bar {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 42px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 14px;
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.75));
  color: #fff;
  font-size: 12px;
}

.media-bar-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #4ade80;
  flex-shrink: 0;
}

.media-bar-track {
  flex: 1;
  height: 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.25);
  overflow: hidden;
}

.media-bar-track i {
  display: block;
  width: 28%;
  height: 100%;
  background: #4ade80;
}

.media-bar-time {
  opacity: 0.9;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

