/* Round two · the two phone screens (round-two.html).

   Demo 1's call screen and demo 3's lock screen, drawn inside the one phone
   in r2-devices.css (load this after it). Both share its island, status bar,
   lit ground and home bar. Sizes are design pixels times --pu, the phone's
   unit; the smallest type is 12 of them. Transform and opacity only. */

/* ======================= demo 1: the call ======================= */
/* Three states share one spot at the top: your website ringing you, the
   brief playing, then Sam. data-call on the phone says which one shows. */
.cl-top {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(40 * var(--pu));
    height: calc(96 * var(--pu));
}
.cl-state {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    opacity: 0;
    transform: translateY(calc(5 * var(--pu)));
    transition:
        opacity 220ms ease,
        transform 320ms var(--rise-ease);
}
[data-call="ring"] .cl-ring,
[data-call="brief"] .cl-brief,
[data-call="sam"] .cl-sam {
    opacity: 1;
    transform: none;
}
.cl-title {
    width: calc(150 * var(--pu));
    margin-top: calc(8 * var(--pu));
    font-size: calc(19 * var(--pu));
    font-weight: 600;
    line-height: 1.14;
    letter-spacing: -0.015em;
    color: #ffffff;
    text-wrap: balance;
}
.cl-name {
    font-size: calc(15 * var(--pu));
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: -0.01em;
    color: #ffffff;
}
.cl-sub {
    margin-top: calc(4 * var(--pu));
    font-size: calc(12 * var(--pu));
    line-height: 1.3;
    color: rgba(255, 255, 255, 0.68);
    font-variant-numeric: tabular-nums;
}
.cl-brief .cl-name {
    margin-top: calc(10 * var(--pu));
}
/* The voice: a few bars that move while the brief is speaking. */
.cl-wave {
    display: flex;
    align-items: center;
    gap: calc(3 * var(--pu));
    height: calc(22 * var(--pu));
    margin-top: calc(10 * var(--pu));
}
.cl-wave i {
    width: calc(3 * var(--pu));
    height: calc(22 * var(--pu));
    border-radius: calc(1.5 * var(--pu));
    background: #ffffff;
    transform: scaleY(0.16);
}
.is-speaking .cl-wave i {
    animation: cl-voice 900ms ease-in-out infinite;
}
.cl-wave i:nth-child(2) {
    animation-delay: -300ms;
}
.cl-wave i:nth-child(3) {
    animation-delay: -600ms;
}
.cl-wave i:nth-child(4) {
    animation-delay: -150ms;
}
.cl-wave i:nth-child(5) {
    animation-delay: -450ms;
}
.cl-wave i:nth-child(6) {
    animation-delay: -750ms;
}
.cl-wave i:nth-child(7) {
    animation-delay: -225ms;
}
@keyframes cl-voice {
    0%,
    100% {
        transform: scaleY(0.2);
    }
    30% {
        transform: scaleY(0.95);
    }
    60% {
        transform: scaleY(0.45);
    }
}
.cl-face {
    --face: calc(48 * var(--pu));
}
.cl-sam .cl-name {
    margin-top: calc(7 * var(--pu));
}
.cl-sam .cl-sub {
    margin-top: calc(2 * var(--pu));
}
/* What you hear, as live captions, word by word. It stays up, a little
   quieter, once you are talking to Sam. */
.cl-cap {
    position: absolute;
    left: calc(9 * var(--pu));
    right: calc(9 * var(--pu));
    top: calc(144 * var(--pu));
    padding: calc(8 * var(--pu)) calc(10 * var(--pu)) calc(9 * var(--pu));
    border-radius: calc(14 * var(--pu));
    background: rgba(255, 255, 255, 0.09);
    opacity: 0;
    transform: translateY(calc(6 * var(--pu)));
    transition:
        opacity 220ms ease,
        transform 320ms var(--rise-ease);
}
[data-call="brief"] .cl-cap {
    opacity: 1;
    transform: none;
}
[data-call="sam"] .cl-cap {
    opacity: 0.66;
    transform: none;
}
.cl-cap small {
    display: block;
    margin-bottom: calc(3 * var(--pu));
    font-size: calc(12 * var(--pu));
    line-height: 1.25;
    color: rgba(255, 255, 255, 0.64);
}
.cl-cap p {
    font-size: calc(12 * var(--pu));
    line-height: 1.4;
    color: rgba(255, 255, 255, 0.86);
}
.cl-cap b {
    font-weight: 600;
    color: #ffffff;
}
.cl-cap .w {
    opacity: 0;
    transition: opacity 110ms ease;
}
.cl-cap .w.on {
    opacity: 1;
}
/* The keys at the bottom: decline and accept while it rings, the call keys after. */
.cl-keys {
    position: absolute;
    left: 0;
    right: 0;
    bottom: calc(20 * var(--pu));
    height: calc(58 * var(--pu));
}
.cl-answer,
.cl-inkeys {
    position: absolute;
    inset: 0;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    opacity: 0;
    transition: opacity 200ms ease;
}
.cl-answer {
    gap: calc(48 * var(--pu));
}
.cl-inkeys {
    gap: calc(12 * var(--pu));
    align-items: center;
}
[data-call="ring"] .cl-answer,
[data-call="brief"] .cl-inkeys,
[data-call="sam"] .cl-inkeys {
    opacity: 1;
}
.cl-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: calc(4 * var(--pu));
    font-size: calc(12 * var(--pu));
    line-height: 1.2;
    color: rgba(255, 255, 255, 0.86);
}
.cl-btn .dv-round {
    width: calc(40 * var(--pu));
    height: calc(40 * var(--pu));
    transition: transform 120ms ease;
}
.cl-btn .dv-round svg {
    width: calc(19 * var(--pu));
    height: calc(19 * var(--pu));
}
.cl-decline .dv-round {
    background: rgba(255, 255, 255, 0.16);
}
.cl-accept .dv-round {
    background: #ffffff;
}
.cl-accept .dv-round svg {
    stroke: #000000;
    stroke-width: 2;
}
/* Accept calls for the thumb with a soft halo while it rings. */
.cl-accept .dv-round::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 50%;
    box-shadow: 0 0 0 calc(2 * var(--pu)) rgba(255, 255, 255, 0.5);
    opacity: 0;
}
[data-call="ring"] .cl-accept .dv-round::after {
    animation: cl-halo 1.1s ease-out infinite;
}
@keyframes cl-halo {
    from {
        opacity: 0.9;
        transform: scale(1);
    }
    to {
        opacity: 0;
        transform: scale(1.55);
    }
}
.is-answering .cl-accept .dv-round {
    transform: scale(0.84);
}
.cl-inkeys .dv-round {
    width: calc(36 * var(--pu));
    height: calc(36 * var(--pu));
    background: rgba(255, 255, 255, 0.13);
}
.cl-inkeys .dv-round svg {
    width: calc(17 * var(--pu));
    height: calc(17 * var(--pu));
    stroke: rgba(255, 255, 255, 0.88);
    stroke-width: 1.6;
}
.cl-inkeys .cl-dots {
    fill: rgba(255, 255, 255, 0.88);
    stroke: none;
}
/* It rings: a short buzz, a pause, a buzz. */
.dv-phone[data-call="ring"] {
    animation: dv-ring 1100ms linear infinite;
}
@keyframes dv-ring {
    0%,
    36%,
    100% {
        transform: none;
    }
    6%,
    18%,
    30% {
        transform: translateX(calc(-1.2 * var(--pu))) rotate(-0.7deg);
    }
    12%,
    24% {
        transform: translateX(calc(1.2 * var(--pu))) rotate(0.7deg);
    }
}

/* ======================= demo 3: the lock screen ======================= */
.ls-clock {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(34 * var(--pu));
    font-size: calc(34 * var(--pu));
    font-weight: 600;
    line-height: 1;
    letter-spacing: -0.03em;
    text-align: center;
    font-variant-numeric: tabular-nums;
    color: rgba(255, 255, 255, 0.95);
}
/* Notifications stack above the quick keys, newest on top, as a phone lays
   them. Each keeps its place from the start, so a landing moves nothing. */
.ls-stack {
    position: absolute;
    left: calc(6 * var(--pu));
    right: calc(6 * var(--pu));
    bottom: calc(46 * var(--pu));
    display: flex;
    flex-direction: column;
    gap: calc(4 * var(--pu));
}
.nt {
    padding: calc(7 * var(--pu)) calc(9 * var(--pu)) calc(8 * var(--pu));
    border-radius: calc(15 * var(--pu));
    background: rgba(255, 255, 255, 0.13);
    opacity: 0;
    transform: translateY(calc(-14 * var(--pu))) scale(0.94);
    transform-origin: 50% 0;
    transition:
        opacity 200ms ease 60ms,
        transform 420ms var(--pop-ease) 40ms;
}
.nt.in {
    opacity: 1;
    transform: none;
}
.nt-top {
    display: flex;
    align-items: center;
    gap: calc(5 * var(--pu));
    font-size: calc(12 * var(--pu));
    line-height: 1.3;
}
.nt-app {
    display: grid;
    place-items: center;
    flex: none;
    width: calc(15 * var(--pu));
    height: calc(15 * var(--pu));
    border-radius: calc(4 * var(--pu));
    background: #4a4a4f;
}
.nt-app svg {
    width: calc(10 * var(--pu));
    height: calc(10 * var(--pu));
    fill: none;
    stroke: #ffffff;
    stroke-width: 2.2;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.nt-top b {
    font-weight: 600;
    color: #ffffff;
}
.nt-when {
    margin-left: auto;
    color: rgba(255, 255, 255, 0.68);
}
/* Three steps, as a phone shows mail: the sender bold white on the top row,
   the subject regular on its own line, the preview dimmer. The owner,
   2026-09-15: the sender and the subject "looks like it's trying to be one
   sentence" when both carry the same size and weight. */
.nt-subj {
    margin-top: calc(3 * var(--pu));
    font-size: calc(12 * var(--pu));
    font-weight: 400;
    line-height: 1.3;
    color: rgba(255, 255, 255, 0.94);
}
.nt-mail .nt-body {
    color: rgba(255, 255, 255, 0.66);
}
.nt-body {
    margin-top: calc(1 * var(--pu));
    font-size: calc(12 * var(--pu));
    line-height: 1.35;
    color: rgba(255, 255, 255, 0.86);
}
.ls-quick {
    position: absolute;
    left: calc(18 * var(--pu));
    right: calc(18 * var(--pu));
    bottom: calc(12 * var(--pu));
    display: flex;
    justify-content: space-between;
}
.ls-quick .dv-round {
    width: calc(28 * var(--pu));
    height: calc(28 * var(--pu));
    background: rgba(255, 255, 255, 0.13);
}
.ls-quick .dv-round svg {
    width: calc(15 * var(--pu));
    height: calc(15 * var(--pu));
}

@media (prefers-reduced-motion: reduce) {
    .nt,
    .cl-state,
    .cl-cap,
    .cl-cap .w {
        transition: none;
    }
}
