/* duoToon (Pippa 3): our newest style, not out yet, so it's a stage behind a curtain. The clip is cropped below the
   neck on purpose: the character is a real client's likeness, not approved for the public. Base styles are the final
   look; keyframes are from-only and only run once motion.js marks the stage .in, so JS off = the calm final state. */
#duotoon {
  --dt-navy: #1f3a63; --dt-velvet: #0b5d5f; --dt-velvet2: #0e7577; --dt-velvet3: #0a4f51; --dt-fringe: var(--gold); --dt-bg: #f2e8db;
  width: 100%; box-sizing: border-box; max-width: 1120px; margin: 0 auto; padding: 64px 24px 56px;
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 48px; align-items: center;
}
#duotoon .kicker { display: flex; align-items: center; gap: 10px; margin: 0 0 10px; font: 500 15px/1.4 var(--body); color: var(--teal-ink); }
#duotoon .kicker span { width: 26px; height: 2px; border-radius: 2px; background: currentColor; }
#duotoon .kicker b { font-weight: 600; color: var(--dt-navy); }
#duotoon .head > p:last-child { color: var(--mute); margin: 0; max-width: 32em; }

/* the title catches a passing light, like the sheen on a toon-shaded surface */
.dt-shine { background: linear-gradient(100deg, var(--ink) 0 40%, var(--gold) 47%, #fff6df 50%, var(--gold) 53%, var(--ink) 60% 100%) 100% 0 / 250% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent; }
.js #duotoon .head.in .dt-shine { animation: dt-shine 6s cubic-bezier(.45, 0, .2, 1) .6s infinite both; }
@keyframes dt-shine { from { background-position: 0 0; } 45%, to { background-position: 100% 0; } }

.dt-feats { list-style: none; padding: 0; margin: 26px 0 0; display: grid; gap: 14px; }
.dt-feats li { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 14px; align-items: start; }
.dt-feats svg { width: 44px; height: 44px; padding: 6px; border-radius: 14px; background: var(--paper); box-shadow: 0 0 0 1px var(--line); overflow: visible; }
.dt-feats .k { fill: none; stroke: var(--ink); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.dt-feats .a { fill: #fde9c4; } .dt-feats .d { fill: var(--gold); }
.dt-feats span { font-size: 16px; line-height: 1.6; color: var(--mute); }
.dt-feats b { display: block; font: 600 17px/1.4 var(--body); color: var(--text); }

.dt-talk { display: flex; flex-direction: column; gap: 10px; margin-top: 26px; }
.dt-b { margin: 0; max-width: 88%; padding: 12px 18px; border-radius: 22px; font: 400 clamp(18px, 2.1vw, 21px)/1.5 var(--display); color: var(--ink);
  box-shadow: 0 8px 24px #0f131610, 0 0 0 1px var(--line); }
.dt-b small { display: block; font: 500 13px/1 var(--body); margin-bottom: 6px; }
.dt-b.pip { align-self: flex-start; border-start-start-radius: 8px; background: #effbfb; } .dt-b.pip small { color: var(--teal-ink); }
.dt-b.pippa { align-self: flex-end; border-start-end-radius: 8px; background: #fdf1da; } .dt-b.pippa small { color: var(--gold-ink); }

/* the stage */
.dt-stage { margin: 0; justify-self: center; width: 100%; max-width: 520px; }
.dt-screen { position: relative; overflow: hidden; isolation: isolate; aspect-ratio: 480 / 444; border-radius: 30px;
  background: radial-gradient(70% 60% at 50% 45%, #fbf5ec, var(--dt-bg)); box-shadow: 0 0 0 1px var(--line), 0 22px 50px #0f131624; }
.dt-screen video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
/* the light that passes over the stage every few seconds */
.dt-sweep { position: absolute; inset: -20% -60%; z-index: 1; pointer-events: none; mix-blend-mode: soft-light;
  background: linear-gradient(105deg, transparent 42%, #ffffffd9 50%, transparent 58%); transform: translateX(60%); }
.js .dt-stage.in .dt-sweep { animation: dt-sweep 7s cubic-bezier(.5, 0, .3, 1) 2.2s infinite both; }
@keyframes dt-sweep { from { transform: translateX(-60%); } 40%, to { transform: translateX(60%); } }

/* curtains: velvet folds in Pip's deep teal with Pippa's gold fringe; at rest they're gathered at the sides */
.dt-cur { position: absolute; top: 0; bottom: 0; z-index: 2; width: 50%; transform: scaleX(.15);
  background: linear-gradient(var(--dt-side), #0000 0 65%, #00000040), repeating-linear-gradient(90deg, var(--dt-velvet) 0 6px, var(--dt-velvet2) 13px, var(--dt-velvet3) 22px);
  box-shadow: inset 0 -12px 0 -6px var(--dt-fringe); }
.dt-cur.l { left: 0; transform-origin: left center; --dt-side: 90deg; }
.dt-cur.r { right: 0; transform-origin: right center; --dt-side: 270deg; }
.js .dt-stage.in .dt-cur { animation: dt-open 1.8s cubic-bezier(.65, 0, .25, 1) .4s both; }
@keyframes dt-open { from { transform: scaleX(1); } 12% { transform: scaleX(1.03); } }

.dt-valance { position: absolute; top: 0; left: 0; z-index: 3; width: 100%; height: 13%; overflow: visible; filter: drop-shadow(0 6px 6px #0f131633); }
.dt-valance .v1 { fill: var(--dt-velvet); }
.dt-valance .v2 { fill: none; stroke: var(--dt-fringe); stroke-width: 3; vector-effect: non-scaling-stroke; }

/* the «قريبًا» sign hangs from the valance and keeps swinging softly */
.dt-sign { position: absolute; z-index: 4; top: 8%; left: 31%; width: 38%; transform-origin: 50% 0; transform: rotate(-1.5deg); }
.dt-sign svg { display: block; width: 100%; height: auto; aspect-ratio: 5; margin-bottom: -2px; }
.dt-sign path { fill: none; stroke: var(--gold-ink); stroke-width: 2; stroke-linecap: round; }
.dt-sign span { display: block; text-align: center; padding: 6px 10px 4px; font: 700 clamp(22px, 5.6vw, 30px)/1.2 'Aref Ruqaa', var(--display); color: var(--pen);
  background: #fffaf0; border: 2px solid currentColor; border-radius: 12px; outline: 1px solid #e9c27b88; outline-offset: 3px; box-shadow: 0 10px 22px #0f131630; }
.js .dt-stage.in .dt-sign { animation: dt-drop .9s cubic-bezier(.3, 1.5, .5, 1) 1.6s both, dt-swing 4.2s ease-in-out 2.5s infinite alternate both; }
@keyframes dt-drop { from { opacity: 0; transform: translateY(-130%) rotate(-8deg); } }
@keyframes dt-swing { from { transform: rotate(-1.5deg); } to { transform: rotate(1.5deg); } }

.dt-stage figcaption { display: flex; gap: 10px; align-items: baseline; margin: 14px 6px 0; color: var(--mute); font-size: 15px; line-height: 1.6; }
.dt-dot { flex: none; width: 9px; height: 9px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 0 4px #e8c27a40; }
.js .dt-stage.in .dt-dot { animation: dt-pulse 2s ease-out infinite; }
@keyframes dt-pulse { from { box-shadow: 0 0 0 0 #e8c27a99; } to { box-shadow: 0 0 0 10px #e8c27a00; } }

@media (max-width: 820px) {
  #duotoon { grid-template-columns: minmax(0, 1fr); gap: 34px; padding-top: 48px; }
  .dt-stage { max-width: 420px; }
  .dt-b { max-width: 94%; }
}
/* Abood's rule (2026-10-22): the motion plays for everyone, so site.css's reduced-motion kill switch is overridden here */
@media (prefers-reduced-motion: reduce) {
  .js #duotoon .head.in .dt-shine { animation: dt-shine 6s cubic-bezier(.45, 0, .2, 1) .6s infinite both !important; }
  .js .dt-stage.in .dt-sweep { animation: dt-sweep 7s cubic-bezier(.5, 0, .3, 1) 2.2s infinite both !important; }
  .js .dt-stage.in .dt-cur { animation: dt-open 1.8s cubic-bezier(.65, 0, .25, 1) .4s both !important; }
  .js .dt-stage.in .dt-sign { animation: dt-drop .9s cubic-bezier(.3, 1.5, .5, 1) 1.6s both, dt-swing 4.2s ease-in-out 2.5s infinite alternate both !important; }
  .js .dt-stage.in .dt-dot { animation: dt-pulse 2s ease-out infinite !important; }
  .js #duotoon [data-reveal], .js #duotoon [data-stagger] > * { transition: opacity .7s ease, transform .9s cubic-bezier(.2, .75, .2, 1) !important; transition-delay: var(--md, 0ms) !important; }
}
