/* AI Video Production service page */
:root { --pk: #FF0A7A; --vi: #8b5cff; }

/* ---------- hero: the hex field ---------- */
.av-hero { position: relative; min-height: 100svh; display: grid; align-items: center; overflow: hidden; background: #050405; isolation: isolate; }
.av-hero > .wrap { width: 100%; }
.av-still { position: absolute; inset: 0; z-index: -3; }
.av-still img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 62% 50%; opacity: 0; transition: opacity 1.6s var(--ease); }
.av-still img.on { opacity: 1; }
.av-hexmask { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; pointer-events: none; opacity: .55; }
.av-gl { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; display: none; }
.gl .av-gl { display: block; }
.gl.ready .av-still, .gl.ready .av-hexmask { opacity: 0; transition: opacity 1s var(--ease); }
.av-hero::after { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; background: linear-gradient(90deg, rgb(5 4 5 / .94) 0%, rgb(5 4 5 / .8) 28%, rgb(5 4 5 / .2) 56%, transparent 76%), linear-gradient(0deg, var(--ink-0) 0%, transparent 26%), linear-gradient(180deg, rgb(5 4 5 / .6), transparent 22%); }
.av-hero-in { position: relative; padding-top: calc(var(--hd, 72px) + 40px); padding-bottom: 120px; pointer-events: none; }
.av-hero-in > * { max-width: 660px; pointer-events: auto; }
.av-h1 { font: 900 var(--t-3xl)/.95 var(--f-display); letter-spacing: -0.035em; text-wrap: balance; }
.av-h1 em { font-style: normal; background: linear-gradient(90deg, var(--pk), #c25cff); -webkit-background-clip: text; background-clip: text; color: transparent; }
.av-lede { margin-top: 26px; font-size: var(--t-m); line-height: 1.45; color: var(--fg-2); max-width: 470px; }
.av-hero .actions { margin-top: 34px; }

.av-prompt { position: absolute; right: var(--pad); bottom: clamp(28px, 6vh, 64px); width: min(380px, 40vw); padding: 16px 18px; border: 1px solid rgb(255 255 255 / .14); border-radius: 14px; background: rgb(8 6 8 / .6); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.av-prompt-h { display: flex; align-items: center; gap: 10px; font: 400 10px/1 var(--f-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--fg-2); margin-bottom: 12px; }
.av-prompt-h i { width: 7px; height: 7px; border-radius: 50%; background: var(--pk); animation: av-rec 1.2s steps(2) infinite; }
.av-prompt-h b { margin-left: auto; font-weight: 400; color: var(--fg-3); border: 1px solid var(--rule); padding: 4px 6px; border-radius: 4px; }
@keyframes av-rec { 50% { opacity: .2; } }
.av-prompt-t { font: 500 15px/1.45 var(--f-body); color: #fff; min-height: 2.9em; }
.av-prompt-t::after { content: ""; display: inline-block; width: 2px; height: 1em; margin-left: 3px; background: var(--pk); vertical-align: -.15em; animation: av-rec 1s steps(2) infinite; }
.av-prompt-bar { margin-top: 12px; height: 3px; border-radius: 3px; background: rgb(255 255 255 / .1); overflow: hidden; }
.av-prompt-bar i { display: block; height: 100%; width: 100%; background: linear-gradient(90deg, var(--vi), var(--pk)); transform: scaleX(var(--p, 0)); transform-origin: left; }

/* ---------- shared heads + carousels ---------- */
.av-head { display: flex; align-items: end; justify-content: space-between; gap: 24px; flex-wrap: wrap; margin-bottom: clamp(32px, 5vh, 56px); }
.av-nav { display: flex; gap: 10px; }
.av-btn { width: 52px; height: 52px; border-radius: 50%; border: 1px solid var(--rule); background: none; color: var(--fg); font-size: 20px; cursor: pointer; transition: background-color .3s, border-color .3s; }
.av-btn:hover { background: var(--pk); border-color: var(--pk); }
.av-btn:focus-visible { outline: 2px solid var(--pk); outline-offset: 3px; }
.av-make, .av-how { padding-block: clamp(80px, 12vh, 140px); border-top: 1px solid var(--rule-soft); overflow: hidden; }
.av-track { display: flex; gap: clamp(14px, 1.6vw, 24px); overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; padding: 0 var(--pad) 8px; scroll-padding-inline: var(--pad); cursor: grab; }
.av-track::-webkit-scrollbar { display: none; }
.av-track.drag { cursor: grabbing; scroll-snap-type: none; }
.av-track.drag .av-card { pointer-events: none; }
.av-track:focus-visible { outline: 2px solid var(--pk); outline-offset: -2px; }
.av-card { position: relative; flex: 0 0 clamp(270px, 28vw, 440px); height: clamp(380px, 62vh, 620px); border-radius: 18px; overflow: hidden; scroll-snap-align: start; border: 1px solid var(--rule-soft); background: var(--ink-1); }
.av-card-xl { flex-basis: clamp(300px, 50vw, 860px); }
.av-card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease); -webkit-user-drag: none; user-select: none; }
.av-card:hover img { transform: scale(1.06); }
.av-card::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgb(0 0 0 / .86), rgb(0 0 0 / .12) 45%, transparent 65%); }
.av-card::before { content: ""; position: absolute; inset: 0; z-index: 2; border-radius: inherit; box-shadow: inset 0 0 0 1px rgb(255 10 122 / 0); transition: box-shadow .5s var(--ease); pointer-events: none; }
.av-card:hover::before { box-shadow: inset 0 0 0 1.5px rgb(255 10 122 / .8); }
.av-card > div { position: absolute; left: 0; right: 0; bottom: 0; z-index: 1; padding: clamp(20px, 2vw, 30px); }
.av-card span { font: 400 var(--t-xs)/1 var(--f-mono); letter-spacing: .14em; color: var(--pk); }
.av-card h3 { font: 700 var(--t-l)/1.08 var(--f-display); margin: 12px 0 8px; letter-spacing: -0.015em; }
.av-card p { color: var(--fg-2); line-height: 1.45; max-width: 32ch; }

/* ---------- why: three big words ---------- */
.av-why { padding-block: clamp(64px, 10vh, 120px); border-top: 1px solid var(--rule-soft); background: radial-gradient(50% 120% at 50% 100%, oklch(0.22 0.09 330 / .45), transparent 70%); }
.av-why-l { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(20px, 3vw, 48px); }
.av-why-l li { border-top: 2px solid var(--pk); padding-top: 22px; }
.av-why-l b { display: block; font: 900 clamp(2.2rem, 4.6vw, 4.4rem)/.95 var(--f-display); letter-spacing: -0.035em; }
.av-why-l span { display: block; margin-top: 12px; color: var(--fg-2); }

/* ---------- try it: reframer ---------- */
.av-try { padding-block: clamp(80px, 12vh, 140px); border-top: 1px solid var(--rule-soft); }
.av-note { font: 400 var(--t-xs)/1.3 var(--f-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--fg-3); }
.av-rf { display: grid; grid-template-columns: minmax(0, 8fr) minmax(0, 3.4fr); gap: 24px; align-items: stretch; }
.av-stage { position: relative; aspect-ratio: 16 / 9; border-radius: 16px; overflow: hidden; background: #000; border: 1px solid var(--rule-soft); touch-action: pan-y; user-select: none; }
.av-stage > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: brightness(.38) saturate(.7); }
.av-frame { position: absolute; top: 50%; left: 0; height: var(--fh, 100%); width: var(--fw, 100%); transform: translate(var(--fx, 0px), -50%); cursor: grab; overflow: hidden; outline: 1.5px solid var(--pk); box-shadow: 0 0 0 1px rgb(0 0 0 / .4), 0 0 60px rgb(255 10 122 / .25); transition: width .7s var(--ease), height .7s var(--ease), transform .7s var(--ease), background-position .7s var(--ease); background-image: var(--src); background-repeat: no-repeat; background-size: var(--bw) var(--bh); background-position: calc(var(--fx, 0px) * -1) calc(var(--by, 0px) * -1); }
.av-frame.drag { cursor: grabbing; transition: width .7s var(--ease), height .7s var(--ease); }
.av-c { position: absolute; width: 16px; height: 16px; border: 0 solid #fff; }
.av-c.tl { left: 8px; top: 8px; border-width: 2px 0 0 2px; } .av-c.tr { right: 8px; top: 8px; border-width: 2px 2px 0 0; }
.av-c.bl { left: 8px; bottom: 8px; border-width: 0 0 2px 2px; } .av-c.br { right: 8px; bottom: 8px; border-width: 0 2px 2px 0; }
.av-sub { position: absolute; left: 8%; right: 8%; bottom: 9%; text-align: center; font: 600 clamp(12px, 1.5vw, 19px)/1.35 var(--f-body); color: #fff; text-shadow: 0 2px 10px rgb(0 0 0 / .9); }
.av-sub[lang="ar"] { font-family: "Noto Kufi Arabic", "Geeza Pro", "Segoe UI", Tahoma, sans-serif; font-size: clamp(13px, 1.7vw, 21px); }
.av-tag { position: absolute; left: 12px; top: 30px; white-space: nowrap; font: 400 10px/1 var(--f-mono); letter-spacing: .12em; text-transform: uppercase; color: #fff; background: var(--pk); padding: 5px 7px; border-radius: 3px; }
.av-hint { position: absolute; right: 14px; bottom: 12px; font: 400 10px/1 var(--f-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--fg-2); transition: opacity .6s; pointer-events: none; }
.av-hint.gone { opacity: 0; }
.av-ctrl { padding: clamp(20px, 2vw, 28px); border-radius: 16px; border: 1px solid var(--rule-soft); background: linear-gradient(160deg, var(--ink-1), var(--ink-0)); display: flex; flex-direction: column; }
.av-lab { font: 400 10px/1 var(--f-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--fg-3); margin-bottom: 12px; }
.av-lab:not(:first-child) { margin-top: 26px; }
.av-fmts { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
.av-fmts button, .av-lang button { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 8px 12px; border-radius: 10px; border: 1px solid var(--rule); background: rgb(255 255 255 / .02); color: var(--fg-2); font: 600 14px/1 var(--f-body); cursor: pointer; transition: border-color .3s, color .3s, background-color .3s; }
.av-fmts button { flex-direction: column; min-height: 72px; padding: 8px 2px; font: 400 12px/1 var(--f-mono); letter-spacing: .06em; }
.av-fmts i { display: block; width: var(--w); height: var(--h); border: 1.5px solid currentColor; border-radius: 3px; }
.av-fmts button:hover, .av-lang button:hover { color: var(--fg); border-color: var(--fg-3); }
.av-fmts button[aria-pressed="true"], .av-lang button[aria-pressed="true"] { border-color: var(--pk); color: #fff; background: oklch(0.22 0.07 358); }
.av-fmts button:focus-visible, .av-lang button:focus-visible { outline: 2px solid var(--pk); outline-offset: 2px; }
.av-lang { display: flex; gap: 8px; }
.av-lang button { flex: 1; }
.av-lang button[lang="ar"] { font-family: "Noto Kufi Arabic", "Geeza Pro", Tahoma, sans-serif; }
.av-spec { margin: auto 0 0; padding-top: 26px; display: grid; gap: 10px; }
.av-spec div { display: flex; justify-content: space-between; gap: 10px; padding-top: 10px; border-top: 1px solid var(--rule-soft); }
.av-spec dt { font: 400 10px/1.4 var(--f-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--fg-3); }
.av-spec dd { margin: 0; font: 600 14px/1.3 var(--f-body); color: #fff; }

/* ---------- presenter ---------- */
.av-pres { position: relative; min-height: 92svh; display: grid; align-items: center; overflow: hidden; isolation: isolate; border-top: 1px solid var(--rule-soft); }
.av-pres > .wrap { width: 100%; }
.av-pres-bg { position: absolute; inset: 0; z-index: -2; }
.av-pres-bg img { width: 100%; height: 100%; object-fit: cover; object-position: 70% 30%; }
.av-pres::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, var(--ink-0) 0%, rgb(13 11 12 / .8) 28%, transparent 60%), linear-gradient(0deg, var(--ink-0), transparent 22%), linear-gradient(180deg, var(--ink-0), transparent 16%); }
.av-pres-in { padding-block: 120px; }
.av-pres-in > * { max-width: 520px; }
.av-pres .av-lang { margin-top: 32px; max-width: 320px; }
.av-say { margin-top: 28px; padding: 20px 22px; border-radius: 14px; border: 1px solid rgb(255 255 255 / .14); background: rgb(13 11 12 / .6); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.av-wave { display: flex; align-items: center; gap: 3px; height: 44px; }
.av-wave i { flex: 1; max-width: 5px; height: 100%; border-radius: 3px; background: linear-gradient(var(--pk), var(--vi)); transform: scaleY(var(--s, .12)); transition: transform .12s linear; }
.av-line { margin: 16px 0 12px; font: 700 var(--t-m)/1.3 var(--f-display); min-height: 2.6em; }
.av-line[lang="ar"] { font-family: "Noto Kufi Arabic", "Geeza Pro", Tahoma, sans-serif; font-weight: 600; text-align: right; }

/* ---------- faq ---------- */
.sv-faq { padding-block: clamp(80px, 12vh, 140px); border-top: 1px solid var(--rule-soft); }
.sv-faq .faq { margin-top: 32px; }
.sv-faq details { border-top: 1px solid var(--rule-soft); padding: 18px 0; }
.sv-faq summary { cursor: pointer; font: 700 var(--t-m)/1.3 var(--f-display); list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.sv-faq summary::-webkit-details-marker { display: none; }
.sv-faq summary::after { content: "+"; color: var(--pk); font-size: 1.4em; line-height: 1; transition: transform .3s; }
.sv-faq details[open] summary::after { transform: rotate(45deg); }
.sv-faq details p { margin-top: 12px; max-width: 70ch; color: var(--fg-2); line-height: 1.65; }
.close-alt { display: flex; flex-wrap: wrap; gap: 0 32px; }

/* ---------- small screens ---------- */
@media (max-width: 900px) {
  .av-hero { align-items: end; }
  .av-still { bottom: auto; height: 60svh; }
  .av-still img { object-position: 42% 50%; }
  .av-still { -webkit-mask-image: linear-gradient(#000 70%, transparent); mask-image: linear-gradient(#000 70%, transparent); }
  .av-hexmask { bottom: auto; height: 60svh; -webkit-mask-image: linear-gradient(#000 60%, transparent); mask-image: linear-gradient(#000 60%, transparent); }
  .av-hero { background: var(--ink-0); }
  .av-hero::after { background: linear-gradient(180deg, rgb(5 4 5 / .55), transparent 120px), linear-gradient(0deg, var(--ink-0) calc(100% - 60svh), transparent calc(100% - 46svh)); }
  .av-hero .crumb, .av-hero .eyebrow { text-shadow: 0 1px 8px rgb(0 0 0 / .9); }
  .av-hero-in { padding-top: 47svh; padding-bottom: 40px; }
  .av-prompt { position: relative; right: auto; bottom: auto; width: auto; margin: 0 var(--pad) 48px; grid-row: 2; }
  .av-why-l { grid-template-columns: 100%; }
  .av-rf { grid-template-columns: 100%; }
  .av-card, .av-card-xl { flex-basis: 80vw; height: 112vw; max-height: 560px; }
  .av-pres { align-items: end; min-height: 0; }
  .av-pres-bg { bottom: auto; height: 104vw; }
  .av-pres-bg img { object-position: 72% 12%; }
  .av-pres::after { background: linear-gradient(0deg, var(--ink-0) 0%, var(--ink-0) calc(100% - 104vw + 60px), transparent calc(100% - 104vw + 200px)); }
  .av-pres-in { padding-top: 88vw; padding-bottom: 80px; }
}
@media (max-width: 480px) {
  .av-tag { left: 6px; top: 26px; font-size: 8px; padding: 4px 5px; }
  .av-c { width: 10px; height: 10px; }
  .av-sub { left: 5%; right: 5%; font-size: 11px; }
  .av-hint { display: none; }
  .av-fmts { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
  .av-fmts button { min-height: 64px; padding: 6px 2px; font-size: 11px; }
}

/* Our Films: the two AI films at their true shape */
.av-films { padding-block: clamp(80px, 12vh, 140px); }
.av-films-note { margin: 0; font: 400 var(--t-xs, 12px)/1.4 var(--f-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--fg-3); align-self: end; }
.av-films-grid { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: clamp(16px, 2vw, 32px); align-items: start; margin-top: clamp(28px, 4vh, 48px); }
.av-film { margin: 0; }
.av-film-play { position: relative; display: block; width: 100%; padding: 0; border: 0; background: #000; cursor: pointer; overflow: hidden; }
.av-film-play video { display: block; width: 100%; height: auto; transition: transform 1.1s cubic-bezier(.16, 1, .3, 1); }
.av-film-wide .av-film-play { aspect-ratio: 1920 / 824; }
.av-film-tall { width: clamp(220px, 24vw, 380px); }
.av-film-tall .av-film-play { aspect-ratio: 9 / 16; }
.av-film-play video { height: 100%; object-fit: contain; }
.av-film-play:hover video, .av-film-play:focus-visible video { transform: scale(1.02); }
.av-film-play:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.av-film-cue { position: absolute; left: 16px; bottom: 16px; display: inline-flex; align-items: center; gap: 10px; padding: 9px 12px; background: oklch(0.135 0.006 358 / .82);
  font: 400 var(--t-xs, 12px)/1 var(--f-mono); letter-spacing: .12em; text-transform: uppercase; color: #fff; opacity: 0; transform: translate3d(0, 6px, 0); transition: opacity .4s, transform .6s cubic-bezier(.16, 1, .3, 1); }
.av-film-cue i { width: 0; height: 0; border-left: 8px solid #FF0A7A; border-top: 5px solid transparent; border-bottom: 5px solid transparent; }
.av-film-play:hover .av-film-cue, .av-film-play:focus-visible .av-film-cue { opacity: 1; transform: none; }
.av-film figcaption { display: flex; justify-content: space-between; gap: 12px; margin-top: 12px; font: 400 var(--t-xs, 12px)/1.3 var(--f-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--fg-3); }
.av-film figcaption b { color: var(--fg); font-weight: 400; }
.av-film-box { width: min(94vw, 1600px); max-height: 92vh; padding: 0; border: 0; background: #000; color: #fff; overflow: visible; }
.av-film-box::backdrop { background: oklch(0.1 0.006 358 / .92); }
.av-film-box video { display: block; width: 100%; max-height: 92vh; object-fit: contain; background: #000; }
.av-film-close { position: absolute; top: -48px; right: 0; width: 40px; height: 40px; border: 0; background: var(--accent); color: #fff; font-size: 22px; cursor: pointer; }
@media (max-width: 767px) {
  .av-films-grid { grid-template-columns: 1fr; }
  .av-film-tall { width: min(72vw, 320px); justify-self: center; }
}
/* equal heights: each column is sized by its film's own ratio, so the two frames end on the same line (Ramy, 23 Oct) */
.av-films-grid { grid-template-columns: minmax(0, 2.3301fr) minmax(0, .5625fr); align-items: stretch; }
.av-film-tall { width: auto; }
@media (max-width: 767px) { .av-films-grid { grid-template-columns: 1fr; } .av-film-tall { width: min(72vw, 320px); } }
/* compact row (Ramy, 23 Oct): heading on the left, two small frames on the right; a press grows the film to full screen */
.av-films-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: clamp(32px, 5vw, 80px); align-items: end; }
.av-films-copy .cs-h2 { max-width: 12ch; }
.av-films-note { margin-top: 18px; }
.av-films-row .av-films-grid { margin-top: 0; width: min(62vw, 860px); }
.av-film-play { cursor: zoom-in; }
.av-film-box { width: 100vw; height: 100vh; max-width: none; max-height: none; background: transparent; overflow: hidden; }
.av-film-box[open] { display: grid; place-items: center; }
.av-film-box video { width: auto; height: auto; max-width: 92vw; max-height: 86vh; transform-origin: 0 0; will-change: transform; }
.av-film-close { top: 24px; right: 24px; }
@media (max-width: 1023px) {
  .av-films-row { grid-template-columns: 1fr; }
  .av-films-row .av-films-grid { width: 100%; }
}
.av-film-box::backdrop { background: oklch(0.08 0.004 358 / .97); }
.av-film-tall figcaption { flex-direction: column; gap: 4px; }

/* ---------- polish pass, 24 Oct ---------- */
/* closing: the shared 180vh pin has no animation on this page, so it only left dead black scroll; sit it in flow */
.motion.gl .closing { height: auto; }
.motion.gl .closing-stage { position: relative; height: auto; min-height: 100svh; }
/* type rhythm */
.cs-h2 { text-wrap: balance; }
.av-lede, .av-card p, .sv-faq .faq p { text-wrap: pretty; }
.sv-faq .faq p { max-width: 68ch; }
/* tap targets on phones: breadcrumb and footer links get a 44px hit area without moving the layout */
@media (max-width: 767px) {
  .crumb a, .ft a { display: inline-block; padding-block: 14px; margin-block: -14px; }
}
/* reduced motion: the record dot and the typing caret hold still */
@media (prefers-reduced-motion: reduce) {
  .av-prompt-h i, .av-prompt-t::after { animation: none; }
  .av-card img, .av-film-play video { transition: none; }
}

/* design fix 25 Oct: no gradient text, solid magenta */
.av-h1 em { background: none !important; -webkit-background-clip: border-box !important; background-clip: border-box !important; color: #FF0A7A !important; -webkit-text-fill-color: currentColor !important; }
