/* App Training take 3 · Open the app. Namespace a3-. */

/* 1 · The opening login screen */
.a3-open { position: relative; height: 290vh; background: var(--tcc-ground); }
.a3-stage { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: clip; }
.a3-h1 { position: absolute; z-index: 3; left: 0; right: 0; top: calc(var(--tcc-clear) + 8px); display: flex; justify-content: center; gap: .28em;
  font-size: clamp(48px, 13vw, 76px); line-height: .95; letter-spacing: -.045em; pointer-events: none; }
.a3-h1 span { display: inline-block; will-change: transform, opacity; }
.a3-lede { position: absolute; z-index: 3; left: var(--tcc-edge); right: var(--tcc-edge); bottom: max(22px, 3vh); text-align: center;
  font: 400 var(--ap-lede)/1.5 var(--tcc-font-body); color: var(--ap-c-body); max-width: 30ch; margin-inline: auto; }
@media (min-width: 900px) {
  .a3-h1 { top: 50%; transform: translateY(-50%); justify-content: space-between; padding-inline: var(--tcc-edge);
    font-size: clamp(80px, 8vw, calc(150px + var(--tcc-up) * .1)); }
  .a3-lede { left: auto; right: var(--tcc-edge); bottom: var(--tcc-space-l); text-align: left; max-width: min(26ch, calc((100vw - min(300px, 30vw)) / 2 - var(--tcc-edge) - 32px)); }  /* never under the phone (1024 overlapped by 36px) */
}
/* The phone is drawn with clip-path, never by resizing: the stage carries --x --y --w --h --rad (the phone's rectangle,
   set by take.js each frame), the screen is clipped to it, the bezel is three clipped layers just outside it, and the
   login image is laid out once at its opened size and moved with one transform. Only clip-path, transform and opacity
   change while scrolling (polish standard A5). Without JS the same variables hold a centred phone. */
.a3-stage { --w: min(300px, 56vw); --h: calc(var(--w) * 2.1636); --x: calc((100vw - var(--w)) / 2); --y: calc(50svh - var(--h) / 2 + 2svh); --rad: 34px; }
.a3-screen, .a3-bezel, .a3-bezel i { position: absolute; inset: 0; }
.a3-screen { z-index: 2; overflow: clip; background: #000;
  clip-path: inset(var(--y) calc(100% - var(--x) - var(--w)) calc(100% - var(--y) - var(--h)) var(--x) round var(--rad)); }
.a3-bezel { z-index: 1; }
.a3-bezel i { --o: 11px; clip-path: inset(calc(var(--y) - var(--o)) calc(100% - var(--x) - var(--w) - var(--o)) calc(100% - var(--y) - var(--h) - var(--o)) calc(var(--x) - var(--o)) round calc(var(--rad) + var(--o))); }
.a3-bezel i:nth-child(1) { background: rgba(255,255,255,.13); }
.a3-bezel i:nth-child(2) { --o: 10px; background: #050607; }
.a3-bezel i:nth-child(3) { --o: 1px; background: rgba(255,255,255,.17); }
.a3-media { position: absolute; left: 0; top: 0; width: 100vw; aspect-ratio: 1284 / 2778; transform-origin: 0 0; will-change: transform; container-type: inline-size; }
html:not(.js) .a3-media { width: var(--w); left: var(--x); top: var(--y); }
.a3-screen__img { width: 100%; height: 100%; }
.a3-login { position: absolute; inset: 0; display: grid; grid-template-rows: 9% 6% 1fr 7% 8.5% 8.5% 10% 7%; padding: 0 8%; pointer-events: none; }
.a3-login__logo { grid-row: 2; align-self: center; width: 78%; height: auto; filter: brightness(0) invert(1); }
.a3-login__k { grid-row: 4; align-self: end; padding-bottom: 2cqi; font: 400 6.2cqi/1 var(--tcc-font-body); color: #fff; }
.a3-login__f:nth-child(3) { grid-row: 5; } .a3-login__f:nth-child(4) { grid-row: 6; }
.a3-login__f { grid-column: 1; align-self: center; height: 64%; border-radius: 999px; background: rgba(245,245,245,.94); }
.a3-login__go { grid-row: 7; align-self: center; height: 58%; border-radius: 999px; background: var(--tcc-brand); }
.a3-screen__shade { position: absolute; inset: 0; opacity: 0; background: linear-gradient(to top, rgba(0,0,0,.82) 0%, rgba(0,0,0,.55) 30%, rgba(0,0,0,0) 58%); }
.a3-say { position: absolute; z-index: 4; left: var(--tcc-edge); right: var(--tcc-edge); bottom: max(36px, 7vh); opacity: 0; transform: translateY(24px); pointer-events: none;
  transition: opacity .7s var(--tcc-easing-arrive), transform .8s var(--tcc-easing-arrive); }
.a3-say.is-on { opacity: 1; transform: none; }
.a3-say__p { transition: opacity .6s var(--tcc-easing-arrive) .12s; }
.a3-say:not(.is-on) .a3-say__p { opacity: 0; }
/* the page's one statement line (A1 Statement), white because it sits on the photograph */
.a3-say__h { font: 500 var(--ap-statement)/.94 var(--tcc-font-heading); letter-spacing: -.035em; color: #fff; max-width: 15ch; text-wrap: balance; }
.a3-say__p { margin-top: 18px; max-width: 40ch; color: #fff; font-size: var(--ap-body); line-height: 1.55; }
.a3-cue { position: absolute; z-index: 3; left: 50%; bottom: 10px; transform: translateX(-50%); font: 600 var(--ap-label)/1.3 var(--tcc-font-body); letter-spacing: .08em; text-transform: uppercase; color: var(--ap-c-meta); display: none; }
@media (min-width: 900px) { .a3-cue { display: block; left: var(--tcc-edge); transform: none; bottom: var(--tcc-space-l); } }

/* reduced motion: the phone holds its login screen; the statement follows in the flow */
@media (prefers-reduced-motion: reduce) {
  .a3-open { height: auto; }
  .a3-stage { position: relative; height: 100svh; }
  .a3-say { position: relative; opacity: 1; transform: none; left: auto; right: auto; bottom: auto; padding: var(--tcc-space-l) var(--tcc-edge) var(--tcc-space-xl); }
  .a3-cue { display: none !important; }
  /* in the flow it sits on the ground, not the photo: heading and body colours, never faded */
  .a3-say .a3-say__h { color: var(--ap-c-heading); }
  .a3-say .a3-say__p { opacity: 1; color: var(--ap-c-body); }
}

/* 2 · What's in the app */
.a3-in { position: relative; z-index: 5; background: var(--tcc-ground); padding: var(--tcc-section-y) 0; border-radius: 28px 28px 0 0; margin-top: -28px; }
.a3-in__grid { display: grid; gap: var(--tcc-space-m); }
@media (min-width: 900px) { .a3-in__grid { grid-template-columns: .9fr 1.1fr; gap: var(--tcc-space-xl); } }
.a3-in__h { font-size: var(--ap-h2); line-height: 1.04; letter-spacing: -.025em; }
.a3-in__aside { align-self: start; }
@media (min-width: 900px) { .a3-in__aside { position: sticky; top: calc(var(--tcc-clear) + 24px); } }
.a3-dev { display: flex; align-items: center; gap: clamp(18px, 2.4vw, 40px); margin-top: var(--tcc-space-l); }
.a3-dev__dot { flex: none; width: clamp(22px, 2.2vw, 34px); aspect-ratio: 1; border-radius: 50%; background: var(--tcc-brand); box-shadow: 0 0 40px rgba(54,174,203,.45); }
.a3-dev__ph { position: relative; display: grid; place-items: center; width: clamp(150px, 16vw, 250px); aspect-ratio: 9 / 18.5; border-radius: clamp(24px, 2.6vw, 40px);
  box-shadow: inset 0 0 0 2px var(--tcc-brand); }
.a3-dev__ph::before { content: ''; position: absolute; top: 5.5%; left: 50%; width: 26%; height: 2.6%; border-radius: 99px; background: var(--tcc-brand); opacity: .55; transform: translateX(-50%); }
.a3-dev__word { font: 500 clamp(20px, 2.1vw, 34px)/1 var(--tcc-font-heading); letter-spacing: -.02em; color: var(--tcc-heading); transition: opacity .35s var(--tcc-easing-arrive), transform .35s var(--tcc-easing-arrive); }
.a3-dev__word.is-out { opacity: 0; transform: translateY(10px); }
.a3-items { display: grid; }
.a3-items li { display: grid; gap: 10px; align-content: center; padding: var(--tcc-space-l) 0; border-top: 1px solid var(--tcc-border); opacity: .4; transition: opacity .5s var(--tcc-easing-arrive); }
.a3-items li.is-on, html:not(.js) .a3-items li { opacity: 1; }
/* 34vh: one swap of the phone's word per item at a reading pace, without the empty bands 46vh left once the titles
   became Sub-headings */
@media (min-width: 900px) { .a3-items li { min-height: 34vh; } }
.a3-items__k { font: 600 var(--ap-label)/1.3 var(--tcc-font-body); letter-spacing: .08em; text-transform: uppercase; color: var(--ap-c-meta); transition: color .4s var(--tcc-easing-soft); }
/* cyan marks the item the phone is showing (the active state), not every label */
.a3-items li.is-on .a3-items__k { color: var(--ap-c-accent); }
.a3-items h3 { font-size: var(--ap-h3); line-height: 1.1; letter-spacing: -.015em; max-width: 22ch; }
.a3-items p { color: var(--ap-c-body); max-width: 44ch; }
@media (max-width: 899px) {
  /* phones: each item carries its own small phone holding its word, the client's dot beside it */
  .a3-dev { display: none; }
  .a3-items li { opacity: 1; grid-template-columns: 86px 1fr; grid-template-rows: auto auto auto 1fr; column-gap: 18px; row-gap: 8px; align-items: start; }
  .a3-items li::before { content: attr(data-word-is); grid-row: 1 / span 4; display: grid; place-items: center; width: 86px; aspect-ratio: 9 / 16;
    border-radius: 16px; box-shadow: inset 0 0 0 1.5px var(--tcc-brand); font: 500 14px/1 var(--tcc-font-heading); color: var(--tcc-heading); }
}

/* 3 · Who writes it */
.a3-who-writes { padding: var(--tcc-section-y) 0; background: var(--tcc-surface); }
.a3-ww__grid { display: grid; gap: var(--tcc-space-l); align-items: center; }
@media (min-width: 1024px) { .a3-ww__grid { grid-template-columns: .8fr 1.2fr; gap: var(--tcc-space-xl); } }
.a3-ww__ph { margin: 0; }
.a3-ww__ph img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; border-radius: var(--tcc-radius-card); }
.a3-ww__ph figcaption { margin-top: 12px; font-size: var(--ap-meta); line-height: 1.5; color: var(--ap-c-meta); }
.a3-ww__words h2 { font-size: var(--ap-h2); line-height: 1.04; letter-spacing: -.025em; }
.a3-ww__lede { margin-top: var(--tcc-space-xs); font-size: var(--ap-lede); line-height: 1.5; color: var(--ap-c-body); max-width: 40ch; }
.a3-ww__pair { margin-top: var(--tcc-space-l); }
.a3-ww__pair .ap-coach__cut { width: min(100%, 260px); }
.a3-pick { margin-top: 16px; padding: 4px 20px; }
.a3-ww__chosen { margin-top: var(--tcc-space-s); display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 0 10px; color: var(--ap-c-meta); font-size: var(--ap-meta); }

/* 4 · Who it's for */
.a3-for { padding: var(--tcc-section-y) 0; background: var(--tcc-ground); }
.a3-for__h { font-size: var(--ap-h2); line-height: 1.04; }
.a3-for__list { margin-top: var(--tcc-space-l); display: grid; }
.a3-for__list li { display: grid; gap: 8px; padding: clamp(22px, 2.6vw, 38px) 0; border-top: 1px solid var(--tcc-border); }
@media (min-width: 900px) { .a3-for__list li { grid-template-columns: 1.1fr 1fr; align-items: baseline; gap: var(--tcc-space-l); } }
/* each group is a Sub-heading under the section heading (they were 84px, bigger than the heading they sit under) */
.a3-for__list b { font: 500 var(--ap-h3)/1.1 var(--tcc-font-heading); letter-spacing: -.015em; color: var(--ap-c-heading); }
.a3-for__list span { color: var(--ap-c-body); max-width: 44ch; }

/* 5 · How it starts */
.a3-start { padding: var(--tcc-section-y) 0 var(--tcc-space-2xl); background: var(--tcc-ground); border-top: 1px solid var(--tcc-border); }
.a3-start__h { font-size: var(--ap-h2); line-height: 1.04; margin-bottom: var(--tcc-space-l); }
