/* What fills each opening stage. The frame and copy are shared (service-hero.css);
   here each service's own media takes the screen: the film, the site, the reels,
   the diagram that builds itself, the turning figure, and for "about" type alone.
   Scroll motion for all of them lives in service-motion.css. */

/* Ads: the film "דקה 90" edge to edge. */
.seo-document [data-stage="ads"] .stage-media video { object-position: 50% 45%; }

/* Web: the Shokolitely tour fills the screen as if you were on the site; with scroll
   it settles into a browser window (service-motion.css). */
.seo-document [data-stage="web"] .stage-media .hero-frame { display: grid; grid-template-rows: auto minmax(0, 1fr); inset: 72px 0 0; background: var(--deep); }
.seo-document [data-stage="web"] .hero-frame > [data-preview] { position: relative; inset: auto; }
.seo-document .browser-lip { display: flex; gap: 8px; align-items: center; height: 28px; padding-inline: 16px; background: var(--deep); border-bottom: 1px solid rgb(202 205 234 / 24%); direction: ltr; }
.seo-document .browser-lip i { width: 8px; height: 8px; background: var(--lilac); opacity: .7; }
.seo-document [data-stage="web"] .stage-media video { object-position: 50% 0%; }

/* Content: a blurred still of the reel as the room, two reels standing in it. */
.seo-document [data-stage="content"] .stage-media { background: var(--deep) url("/media/film/social/shokolitely-reel-poster.webp") 50% 30% / cover no-repeat; }
.seo-document [data-stage="content"] .stage-media::before { content: ""; position: absolute; inset: -40px; background: inherit; filter: blur(28px) brightness(.55) saturate(1.1); }
.seo-document [data-stage="content"] .hero-frame { display: flex; justify-content: flex-end; align-items: center; gap: clamp(20px, 2.6vw, 44px); padding-inline: var(--page-gutter); }
.seo-document [data-stage="content"] .reel { position: relative; flex: none; height: min(68svh, 700px); aspect-ratio: 9 / 16; overflow: clip; background: var(--deep); outline: 1px solid rgb(243 242 238 / 55%); outline-offset: 8px; }
.seo-document [data-stage="content"] .reel :is([data-preview-stage], video) { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.seo-document [data-stage="content"] .reel:nth-child(2) { height: min(54svh, 560px); margin-top: 12svh; }

/* Automation: the stage splits, the diagram builds on a lilac screen. */
.seo-document [data-stage="automation"] .stage-media { inset-inline-start: auto; width: 50%; background: var(--lilac); }
.seo-document [data-stage="automation"] .stage-media::after { content: none; }
.seo-document [data-stage="automation"] .hero-frame { display: grid; place-items: center; padding: calc(var(--stage-header) * 0) clamp(32px, 4vw, 72px); color: var(--deep); }
.seo-document [data-stage="automation"] .automation-diagram { width: min(100%, 560px); display: grid; gap: 0; color: var(--deep); }
.seo-document [data-stage="automation"] .automation-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 24px; font-size: 16px; }
.seo-document [data-stage="automation"] .automation-steps span { padding-top: 10px; border-top: 2px solid var(--deep); }
body.seo-document #service-automation :is(.auto-form, .lead-table, .wa-toast) { padding: 22px 24px; font-size: 18px; background: var(--paper); color: var(--deep); }
body.seo-document #service-automation .wa-toast { background: var(--deep); color: var(--paper); }
.seo-document [data-stage="automation"] .auto-form { width: 84%; }
.seo-document [data-stage="automation"] .lead-table { width: 92%; margin-inline-start: auto; }
.seo-document [data-stage="automation"] .wa-toast { width: 86%; margin-inline-start: 6%; }
.seo-document [data-stage="automation"] .fake-field { display: grid; align-items: center; gap: 12px; min-height: 40px; }
.seo-document [data-stage="automation"] :is(.table-head, .lead-entry) { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.seo-document [data-stage="automation"] .table-head { padding-bottom: 10px; font-size: 16px; }
.seo-document [data-stage="automation"] .lead-entry { padding-top: 14px; }
.seo-document [data-stage="automation"] .toast-lines { display: grid; gap: 8px; padding-top: 12px; }
.seo-document [data-stage="automation"] .toast-lines i:last-child { width: 65%; }
.seo-document [data-stage="automation"] .field-fill { display: block; width: 85%; }
.seo-document [data-stage="automation"] .field-service { width: 62%; }
.seo-document [data-stage="automation"] :is(.lead-entry i, .toast-lines i) { display: block; }
body.seo-document #service-automation .auto-connector { height: 36px; margin-inline-start: 34%; }
/* The copy side is plain ink: no film under it, so no shadow either. */
.seo-document [data-stage="automation"] :is(h1, .page-intro, .page-eyebrow, .page-breadcrumb) { text-shadow: none; }

/* Persona: the figure turns on the page's own backdrop, no frame around it. */
.seo-document [data-stage="persona"] .stage-media::after { content: none; }
.seo-document [data-stage="persona"] .persona-loop { position: absolute; inset: auto; top: 50%; left: 4vw; width: min(92svh, 48vw); aspect-ratio: 1; translate: 0 -50%; }
.seo-document .persona-loop :is(img, canvas) { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.seo-document .persona-loop canvas { display: block; }
/* The frames' backdrop is a shade off the page: feather the square's edges away. */
.seo-document .persona-loop :is(img, canvas) {
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent), linear-gradient(transparent, #000 6%, #000 96%, transparent);
  -webkit-mask-composite: source-in;
  mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent), linear-gradient(transparent, #000 6%, #000 96%, transparent);
  mask-composite: intersect;
}
.seo-document .persona-loop[data-loop="playing"] img { visibility: hidden; }

/* About: type is the stage. Three ruled lines cross it like a title card. */
.seo-document [data-stage="about"] .stage-media::after { content: none; }
.seo-document .stage-type i { position: absolute; inset-inline: 0; height: 1px; background: rgb(202 205 234 / 28%); transform-origin: right center; }
.seo-document .stage-type i:nth-child(1) { top: 22%; }
.seo-document .stage-type i:nth-child(2) { top: 52%; background: var(--amber); inset-inline-end: 38%; }
.seo-document .stage-type i:nth-child(3) { top: 82%; }
.seo-document [data-stage="about"] .stage-copy { justify-self: stretch; width: auto; margin-inline-start: 0; }
.seo-document [data-stage="about"] .page-heading { display: grid; grid-template-columns: minmax(0, 1fr); }
.seo-document [data-stage="about"] .page-heading h1 { max-width: none; font-size: clamp(72px, 12.4vw, 210px); line-height: .9; letter-spacing: -.055em; }
.seo-document [data-stage="about"] .page-heading h1 > span { display: block; }
.seo-document [data-stage="about"] .page-heading h1 > span + span { padding-inline-start: 1.1em; color: var(--lilac); }
.seo-document [data-stage="about"] :is(h1, .page-intro, .page-eyebrow, .page-breadcrumb) { text-shadow: none; }

/* The film still exists for the wide layout only (it fills the cell beside the offer). */
.seo-document .about-still { display: none; margin: 0; }
@media (min-width: 721px) {
  /* The still takes the cell under the name, on the reading side; the last row absorbs its
     extra height so the offer and both buttons keep their own rhythm. */
  .seo-document [data-stage="about"] .page-heading { grid-template-columns: minmax(0, 1fr) minmax(280px, min(520px, 40%)); grid-template-rows: auto auto auto 1fr; grid-template-areas: "eyebrow eyebrow" "title title" "still intro" "still actions"; column-gap: 6vw; }
  .seo-document [data-stage="about"] .page-eyebrow { grid-area: eyebrow; }
  .seo-document [data-stage="about"] .page-heading h1 { grid-area: title; margin-bottom: 32px; }
  .seo-document [data-stage="about"] .page-intro { grid-area: intro; }
  .seo-document [data-stage="about"] .hero-actions { grid-area: actions; align-self: start; }
  /* A projected frame: square corners, one lilac keyline set off the edge. It is the 2:1 crop
     whenever the first screen has room for it; on a short screen it becomes a wider strip
     (down to 3.4:1) that keeps the top, where the face is (hair to chin = top 47% of the
     file). Room = screen - (146px + two title lines) - 114px. Measured 23.11: the consent
     strip still covers the frame's last 40px on a first visit, so the third width term keeps
     the chin above it (face height = .235 of the width; 4.1 leaves a few px of neck). */
  .seo-document [data-stage="about"] .about-still {
    --still-room: max(150px, calc(100svh - 1.8 * clamp(72px, 12.4vw, 210px) - 260px));
    grid-area: still; display: block; align-self: start;
    width: min(100% - 16px, 3.4 * var(--still-room), 4.1 * (var(--still-room) - 40px)); aspect-ratio: 2 / 1; max-height: var(--still-room);
    /* The keyline, not the picture, lines up with the name above and clears the corner tools. */
    margin: 8px;
    outline: 1px solid rgb(202 205 234 / 42%); outline-offset: 7px;
    background: #0d0f24;
  }
  .seo-document [data-stage="about"] .about-still img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 50% 0%; }
}

@media (max-width: 720px) {
  /* Phones: media fills the space above the copy plate. */
  .seo-document [data-stage="web"] .stage-media video { object-position: 50% 0%; }
  .seo-document [data-stage="content"] .hero-frame { justify-content: center; align-items: stretch; padding: 0; }
  .seo-document [data-stage="content"] .reel { height: 100%; width: 100%; aspect-ratio: auto; outline: 0; }
  .seo-document [data-stage="content"] .reel:nth-child(2) { display: none; }
  .seo-document [data-stage="automation"] .stage-media { width: 100%; inset: 0; }
  .seo-document [data-stage="automation"] .hero-frame { align-items: start; padding: calc(56px) 20px 0; }
  .seo-document [data-stage="automation"] .automation-diagram { width: 100%; }
  .seo-document [data-stage="automation"] .automation-steps { display: none; }
  body.seo-document #service-automation :is(.auto-form, .lead-table, .wa-toast) { padding: 12px 14px; font-size: 16px; }
  body.seo-document #service-automation .auto-connector { height: 18px; }
  .seo-document [data-stage="automation"] .fake-field { min-height: 30px; }
  .seo-document [data-stage="automation"] .table-head { padding-bottom: 6px; }
  .seo-document [data-stage="automation"] .lead-entry { padding-top: 8px; }
  .seo-document [data-stage="automation"] .toast-lines { padding-top: 8px; }
  .seo-document [data-stage="automation"] .page-breadcrumb { color: var(--deep); }
  .seo-document [data-stage="persona"] .persona-loop { top: 48px; left: 50%; width: min(100vw, 44svh); translate: -50% 0; }
  .seo-document [data-stage="about"] .page-heading h1 { font-size: clamp(56px, 18vw, 76px); }
  .seo-document [data-stage="about"] .stage-pin { min-height: 0; }
  .seo-document [data-stage="about"] .stage-copy { padding-top: 40px; background: transparent; }
  .seo-document [data-stage="about"] .stage-type i:nth-child(2) { inset-inline-end: 20%; }
}

@media (max-height: 540px) and (min-width: 600px) {
  .seo-document [data-stage="content"] .reel { height: 72svh; }
  .seo-document [data-stage="content"] .reel:nth-child(2) { height: 60svh; }
  .seo-document [data-stage="automation"] .automation-steps { display: none; }
  body.seo-document #service-automation :is(.auto-form, .lead-table, .wa-toast) { padding: 10px 14px; font-size: 16px; }
  body.seo-document #service-automation .auto-connector { height: 12px; }
  .seo-document [data-stage="automation"] .stage-media { width: 30%; }
  .seo-document [data-stage="automation"] .hero-frame { padding-inline: 20px; }
  .seo-document [data-stage="automation"] .stage-copy { width: min(60vw, 560px); }
  .seo-document [data-stage="about"] .page-heading { grid-template-areas: "eyebrow eyebrow" "title title" "intro actions"; grid-template-columns: minmax(0, 1fr) auto; column-gap: 32px; align-items: end; }
  .seo-document [data-stage="about"] .page-heading h1 { margin-bottom: 12px; font-size: 52px; }
  .seo-document [data-stage="about"] .page-intro { font-size: 16px; }
  .seo-document [data-stage="about"] .hero-actions { flex-wrap: nowrap; }
}

/* At the top of the page the build has not started (automation-reveal.mjs starts it
   with the pin). Waiting cards show as faint frames in their final slots, so the
   first screen never opens on an empty lilac half. */
body.seo-document #service-automation :is(.auto-form, .lead-table, .wa-toast) { opacity: max(.45, var(--auto-o, 1)); }
body.seo-document #service-automation .automation-steps span { opacity: max(.4, var(--auto-o, 1)); }

/* The site carries its own headlines: a deeper scrim on the copy side keeps ours on top. */
@media (min-width: 721px) {
  .seo-document [data-stage="web"] .stage-media::after {
    background: linear-gradient(270deg, rgb(14 16 46 / 92%) 0%, rgb(14 16 46 / 80%) 36%, rgb(14 16 46 / 0%) 64%);
  }
}

/* Tablets and narrow laptops (QA, 24.11.2026). The copy column is 46vw there, wider than the
   clean side of the stage, so it ran onto the media: white type on the lilac diagram panel
   (1.19:1), and on the reels and the site tour (worst pixel 1.6 to 2.6). Measured on the
   painted pixels behind every text line; landscape phones keep their own layout above. */
@media (min-width: 721px) and (max-width: 1100px) and (min-height: 541px) {
  /* Automation: the diagram holds the far half, so the copy keeps to its own half. From
     1101px the shared 46vw column already ends before the panel. */
  .seo-document [data-stage="automation"] .stage-copy { width: calc(50vw - max(var(--page-gutter), 88px) - 24px); }
  .seo-document [data-stage="automation"] .page-heading h1 { max-width: none; font-size: clamp(40px, 6.2vw, 68px); }
  .seo-document [data-stage="automation"] .page-intro { max-width: none; }
}
@media (min-width: 721px) and (max-width: 1279px) and (min-height: 541px) {
  /* Site and reels: the picture stays full; the copy rests on its own ink plate, as it
     does on a phone. The plate belongs to the copy block, 24px around it. */
  .seo-document :is([data-stage="web"], [data-stage="content"]) .page-heading { position: relative; }
  .seo-document :is([data-stage="web"], [data-stage="content"]) .page-heading::before {
    content: ""; position: absolute; z-index: -1; inset: -24px; background: rgb(14 16 46 / 84%);
  }
}
