/* Section 2 (research 66, owner 15.10): the PROBLEM — a big question with a clock in its "o"; the owner's problems burst
   out of the clock as small title-only cards and land around the headline. The SOLUTION scene follows (flow-a.css).
   Colours: neutral cards, red cross = a problem (meaning colour), warm circle = time / the agent. Motion: js/routine-a.js. */
#aufgaben.rta { position: relative; max-width: none; padding: 0; margin: 0; }
.rta-pin { position: relative; height: 100svh; overflow: hidden; }

/* ---------- the question ---------- */
.rta-head { position: absolute; inset: 0; display: grid; place-content: center; padding: 0 clamp(16px, 5vw, 96px); text-align: center; transform-origin: 50% 40%; }
.rta .rta-h2 { max-width: 12ch; margin: 0 auto; font: 500 clamp(48px, 7.4vw, 124px)/1.0 var(--font); letter-spacing: -0.04em; text-wrap: balance; }

/* the round letter: a circle the size of the letter's bowl; the flying circle lands exactly here */
/* the real letter is inside, transparent (SEO audit 21.10); overflow: hidden keeps the baseline at the bottom edge */
.rta-o { position: relative; display: inline-block; width: 0.6em; height: 0.6em; margin: 0 0.035em; vertical-align: -0.035em; overflow: hidden; color: transparent; line-height: 0.6em; }
.rta-o__slot { position: absolute; inset: 0; display: block; width: 100%; height: 100%; border-radius: 50%; box-shadow: inset 0 0 0 max(2px, 0.04em) rgba(var(--warm-rgb), 0.35); }
.rta.is-landed .rta-o__slot, .rta.is-static .rta-o__slot, .rta-ball { background: radial-gradient(circle at 35% 30%, #f7a676, var(--warm) 55%, #c95a24); box-shadow: 0 0.05em 0.16em -0.04em rgba(var(--warm-rgb), 0.85); }
.rta-o__slot .rta-clock { opacity: 0; }
.rta.is-landed .rta-o__slot .rta-clock, .rta.is-static .rta-o__slot .rta-clock { opacity: 1; }
.rta-clock { display: block; width: 100%; height: 100%; overflow: visible; }
.rta-clock line { stroke: #fff; stroke-linecap: round; }
.rta-clock__ticks line { stroke-width: 3; opacity: 0.55; }
.rta-clock__h { stroke-width: 7; }
.rta-clock__m { stroke-width: 5; }
.rta-clock circle { fill: #fff; }

/* the flying circle: screen coordinates, above the hero and the header */
.rta-ball { position: fixed; left: 0; top: 0; z-index: 30; border-radius: 50%; visibility: hidden; pointer-events: none; box-shadow: 0 10px 26px -10px rgba(var(--warm-rgb), 0.9); }
/* the hero button while its circle is away: an empty warm ring */
.cta.is-lent[data-dot] .cta__dot { background: rgba(var(--warm-rgb), 0.08); box-shadow: inset 0 0 0 2px rgba(var(--warm-rgb), 0.45); }
.cta.is-lent .cta__dot > * { opacity: 0; }


.rta-w { display: inline-block; }   /* each word flies in on its own */

/* the big clock: grows out of the letter into the centre once the question fades */
.rta-big { --bd: min(36vh, 300px); position: absolute; left: 50%; top: 50%; z-index: 1; width: var(--bd); height: var(--bd); margin: calc(var(--bd) / -2) 0 0 calc(var(--bd) / -2); border-radius: 50%; visibility: hidden;
  background: radial-gradient(circle at 35% 30%, #f7a676, var(--warm) 55%, #c95a24); box-shadow: 0 30px 70px -24px rgba(var(--warm-rgb), 0.75), 0 0 0 18px rgba(var(--warm-rgb), 0.08), 0 0 0 40px rgba(var(--warm-rgb), 0.05); }
.rta-big .rta-clock { width: 100%; height: 100%; }

/* ---------- the problems around the clock ---------- */
.rta-pains { position: absolute; inset: 0; list-style: none; margin: 0; padding: 0; pointer-events: none; }
.rta-pain { position: absolute; z-index: 2; display: flex; align-items: center; gap: 14px; width: min(360px, 28vw); box-sizing: border-box; padding: 18px 22px 18px 16px; border-radius: 22px;
  background: rgba(255, 255, 255, 0.86); -webkit-backdrop-filter: blur(14px) saturate(160%); backdrop-filter: blur(14px) saturate(160%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.9), 0 24px 48px -24px rgba(var(--shade), 0.45); font: 600 clamp(16px, 1.3vw, 21px)/1.28 var(--font); color: var(--ink); text-wrap: balance; }
.rta-pain__x { flex: none; display: grid; place-items: center; width: 34px; height: 34px; padding: 9px; box-sizing: border-box; border-radius: 50%; color: #fff; background: var(--negative-fill); box-shadow: 0 4px 10px -4px rgba(var(--red-rgb), 0.6); }
.rta-pain__x .icon { display: block; width: 100%; height: 100%; }
.rta-pain__x svg { display: block; width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 3; stroke-linecap: round; }
/* landing places (desktop): three on each side of the clock, the middle ones a little closer to it */
.rta-pain:nth-child(1) { left: 5%; top: 13%; }
.rta-pain:nth-child(2) { right: 5%; top: 15%; }
.rta-pain:nth-child(3) { left: 9%; top: 43%; }
.rta-pain:nth-child(4) { right: 9%; top: 45%; }
.rta-pain:nth-child(5) { left: 5%; top: 72%; }
.rta-pain:nth-child(6) { right: 5%; top: 74%; }

/* tablets and desktops: the problem cards are placed inside the page width, on the grid (not from the window edge) */
@media (min-width: 600px) and (min-height: 501px) { .rta-pains { inset: 0 var(--edge-vw); } }
/* large screens (QA 20.10: six small cards on a big empty screen): a bigger clock and bigger cards */
@media (min-width: 1600px) { .rta-big { --bd: min(40vh, 360px); } .rta-pain:nth-child(3) { left: 2%; } .rta-pain:nth-child(4) { right: 2%; } .rta-pain { width: min(420px, 26vw); padding: 22px 28px 22px 18px; gap: 16px; font-size: 19px; border-radius: var(--r-l); } .rta-pain__x { width: 40px; height: 40px; padding: 11px; } }
@media (min-width: 900px) and (max-width: 1199px) { .rta-big { --bd: min(30vh, 220px); } .rta-pain { width: 30vw; } .rta-pain:nth-child(3) { left: 4%; } .rta-pain:nth-child(4) { right: 4%; } }

/* ---------- the data card + Kaia ---------- */
.rta-data { --side: var(--edge); position: relative; z-index: 31; display: grid;   /* z 31: the flying «calls» card (.rta-bridge, z 30) passes under it on its way to the iPhone */
   grid-template-columns: auto minmax(0, 1fr); gap: clamp(18px, 2.4vw, 32px); align-items: start;
  margin: clamp(48px, 7vw, 96px) var(--side) 0; padding: clamp(28px, 4.4vw, 64px); border-radius: var(--r-xl); background: var(--ink); color: #fff;
  box-shadow: 0 30px 60px -30px rgba(33, 33, 33, 0.7); }
.rta-data__ic { display: grid; place-items: center; width: 64px; height: 64px; padding: 18px; border-radius: 50%; color: #fff; background: radial-gradient(circle at 35% 30%, #f7a676, var(--warm) 55%, #c95a24); }
.rta-data__ic svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.rta .rta-data h3 { margin: 0; font: 600 clamp(24px, 2.8vw, 42px)/1.1 var(--font); letter-spacing: -0.025em; text-wrap: balance; }
.rta-data p { max-width: 56ch; margin: 16px 0 0; font-size: clamp(16px, 1.3vw, 19px); line-height: 1.5; color: rgba(255, 255, 255, 0.82); }
.rta-tags { list-style: none; margin: 18px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.rta-tags li { padding: 7px 12px; border-radius: 999px; font: 500 13px/1.2 var(--font); }
.rta-data .rta-tags li { background: rgba(255, 255, 255, 0.12); color: #fff; box-shadow: none; }

/* ---------- tablets (portrait) and phones ---------- */
@media (max-width: 899px) {
  .rta .rta-h2 { max-width: 15ch; font-size: clamp(32px, 9.4vw, 52px); }   /* phones (headline check 20.10): fr/ru took 5–6 lines at 40 px in 12ch */
  .rta-pain { padding: 10px 14px 10px 10px; gap: 10px; border-radius: 16px; font-size: 14.5px; }
  .rta-pain__x { width: 24px; height: 24px; padding: 6px; }
  .rta-data { grid-template-columns: 1fr; padding: 24px; border-radius: var(--r-l); }
}
/* tablets (portrait): the clock in the centre, three problems above it and three below */
@media (min-width: 600px) and (max-width: 899px) {
  .rta-big { --bd: min(22vw, 180px); }
  .rta-pain { width: 66vw; font-size: 14.5px; }
  .rta-pain:nth-child(1) { left: 4%; top: 8%; } .rta-pain:nth-child(2) { right: 4%; top: 18%; } .rta-pain:nth-child(3) { left: 6%; top: 28%; }
  .rta-pain:nth-child(4) { right: 4%; top: 62.5%; } .rta-pain:nth-child(5) { left: 4%; top: 73%; } .rta-pain:nth-child(6) { right: 6%; top: 83.5%; }
}
/* phones: no big clock (owner 15.10) — the six problems stand in a column with equal gaps, centred, zigzag a little */
@media (max-width: 599px) {
  .rta-big { display: none; }
  .rta-pains { display: flex; flex-direction: column; justify-content: center; gap: clamp(10px, 2.2vh, 18px); padding: 64px 4vw 92px; box-sizing: border-box; }
  .rta-pain, .rta-pains .rta-pain:nth-child(n) { position: relative; inset: auto; width: auto; }   /* drop the desktop / tablet places: the column lays them out */
  .rta-pain:nth-child(odd) { margin-right: 7vw; } .rta-pain:nth-child(even) { margin-left: 7vw; }
}
@media (max-width: 599px) and (max-height: 700px) {
  .rta-pain { padding: 8px 12px 8px 8px; gap: 8px; font-size: 13px; }
  .rta-pain__x { width: 22px; height: 22px; padding: 6px; }
}
@media (max-width: 599px) and (max-height: 600px) { .rta-pains { gap: 7px; padding: 50px 3vw 78px; } .rta-pain { padding: 6px 10px 6px 7px; line-height: 1.22; } }
/* low landscape screens (phones turned, ≤ 500 px high; QA 20.10: the tablet places piled the cards on the clock):
   no clock, the six problems in two even columns */
@media (min-width: 600px) and (max-height: 500px) {
  .rta-big { display: none; }
  .rta-pains { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-content: center; gap: 8px 12px; padding: 60px var(--edge-vw) 72px; box-sizing: border-box; }
  .rta-pain, .rta-pains .rta-pain:nth-child(n) { position: relative; inset: auto; width: auto; margin: 0; padding: 8px 12px 8px 8px; gap: 8px; font-size: 13px; line-height: 1.25; }
  .rta-pain__x { width: 22px; height: 22px; padding: 6px; }
}
@media (max-width: 340px) { .rta-pain { font-size: 12px; } .rta-pain:nth-child(odd) { margin-right: 4vw; } .rta-pain:nth-child(even) { margin-left: 4vw; } }

/* ---------- reduce motion: no pin; the question, then the problems as a plain list ---------- */
.rta.is-static .rta-pin { height: auto; overflow: visible; }
.rta.is-static .rta-head { position: static; padding-block: clamp(72px, 10vw, 140px) 32px; }
.rta.is-static .rta-pains { position: static; display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; padding: 0 clamp(12px, 2.2vw, 32px); }
.rta.is-static .rta-pain { position: static; max-width: 360px; }
.rta.is-static .rta-big { display: none; }
@media (max-width: 340px) and (max-height: 600px) {   /* 320 × 568: no zigzag, so the long German / French / Italian lines fit in two rows */
  .rta-pains .rta-pain:nth-child(n) { margin: 0; font-size: 11.5px; }
  .rta-pains { padding-top: 48px; }
}

/* the bridge to the solution (owner 16.10, variant A): the «calls» card stretches into the iPhone of the next block.
   A copy flies above the page from the card to the iPhone; the card fades, the call screen comes up */
.rta-bridge { position: fixed; left: 0; top: 0; z-index: 30; visibility: hidden; pointer-events: none; }
.rta-bridge > * { position: absolute; inset: 0; box-sizing: border-box; }
.rta-bridge .rta-pain { position: absolute; inset: 0; left: 0; top: 0; right: auto; width: 100%; height: 100%; transform: none; overflow: hidden; }
.rta-bridge__phone { padding: 3.2%; border-radius: inherit; background: linear-gradient(145deg, #3a3a3e, #121214); box-shadow: 0 50px 90px -40px rgba(20, 24, 40, 0.65); opacity: 0; }
.rta-bridge__screen { position: relative; height: 100%; border-radius: inherit; overflow: hidden; container-type: size;
  background: radial-gradient(120% 70% at 20% 10%, #5a6c8f, transparent 60%), radial-gradient(100% 70% at 90% 90%, #7a5a6a, transparent 60%), linear-gradient(170deg, #2d3448, #1d2030); }
.rta-bridge__screen i { position: absolute; bottom: 12%; width: min(23cqw, 11cqh); aspect-ratio: 1; border-radius: 50%; }   /* round buttons stay round while the box stretches */
.rta-bridge__screen i:first-child { left: 10%; background: #ff3b30; } .rta-bridge__screen i:last-child { right: 10%; background: #34c759; }
