/* OSTREL ring try-on, desktop side: the builder button and the link sheet (non-modal: the builder stays usable,
   and changing the ring here makes a new picture on both screens). */
.to-cta { display: flex; align-items: center; gap: 12px; width: 100%; margin-top: 10px; min-height: 52px; padding: 10px 16px; background: var(--ink); color: var(--paper); border: 1px solid var(--ink); text-align: left; font: inherit; }
.to-cta:hover { background: var(--graphite); }
.to-cta b { font: 400 21px/1.1 var(--serif); font-weight: 400; display: block; }
.to-cta small { display: block; font: 500 10px/1.3 var(--mono); letter-spacing: .09em; text-transform: uppercase; color: rgba(250, 248, 244, .72); margin-top: 3px; }
.to-cta-i { width: 30px; height: 30px; flex: none; border: 1px solid rgba(250, 248, 244, .6); border-radius: 50%; display: grid; place-items: center; }
.to-cta-i::after { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--brass); }
.to-cta.on .to-cta-i::after { background: #9fb98a; box-shadow: 0 0 0 4px rgba(159, 185, 138, .25); }

/* the sheet itself is the shared OSTREL pairing card: builder/pair-sheet.css. The picture of the ring on the hand
   takes the QR's place once the phone has sent its photo; a light veil passes over it while a new one is made. */
.to-sheet .to-check:empty { display: none; }
.to-sheet .to-check { margin-top: 16px; }
.to-dres { margin: 20px 0 0; }
.to-dres-f { position: relative; background: #15130f; overflow: hidden; }
.to-dres-f img { display: block; width: 100%; height: auto; max-height: min(42vh, 380px); object-fit: contain; }
.to-dres-mk { position: absolute; inset: 0; display: grid; place-items: end center; padding-bottom: 14px; background: rgba(21, 19, 15, .3); }
.to-dres-mk p { position: relative; margin: 0; padding: 8px 12px; background: rgba(21, 19, 15, .72); color: var(--paper); font: 500 10.5px/1.3 var(--mono); letter-spacing: .08em; text-transform: uppercase; }
.to-dres-scan { position: absolute; inset: 0; background: linear-gradient(105deg, rgba(250, 248, 244, 0) 30%, rgba(250, 248, 244, .26) 50%, rgba(250, 248, 244, 0) 70%); background-size: 260% 100%; }
@media (prefers-reduced-motion: no-preference) { .to-dres-scan { animation: to-dres-scan 2.2s var(--ease) infinite; } }
@keyframes to-dres-scan { from { background-position: 130% 0; } to { background-position: -30% 0; } }
.to-dres figcaption { display: grid; gap: 3px; padding-top: 10px; }
.to-dres figcaption b { font: 400 19px/1.2 var(--serif); }
.to-dres figcaption small { font: 500 10px/1.4 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--stone); }

/* the little phone beside the button (phone-anim.js): a 7.2 s loop of the phone side. Without motion (or before it
   plays) it shows one still: the ring on the finger. Sizes are fixed, so loading the pictures never moves the page. */
.to-try { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "btn ph" "steps ph"; column-gap: 22px; align-items: start; margin-top: 10px; }
.to-try > .to-cta { grid-area: btn; margin-top: 0; }
.to-steps { grid-area: steps; align-self: center; list-style: none; margin: 14px 0 0; padding: 0; }
.to-steps li { display: flex; gap: 12px; align-items: baseline; padding: 9px 0; border-top: 1px solid var(--line); font: 500 10.5px/1.35 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--graphite); }
.to-steps span { color: var(--brass-d); }
.to-ph { --pw: 112px; grid-area: ph; position: relative; width: var(--pw); aspect-ratio: 112 / 228; border-radius: 22px; background: var(--ink); cursor: pointer;
  box-shadow: inset 0 0 0 1px rgba(184, 146, 74, .5), 0 22px 34px -22px rgba(21, 19, 15, .7); }
.to-ph-s { position: absolute; inset: 5px; border-radius: 17px; overflow: hidden; background: #2b2722; transform: translateZ(0); }
.to-ph-s > div, .to-ph-s img, .to-ph-s svg, .to-ph-flash, .to-ph-shim, .to-ph-shim2 { position: absolute; inset: 0; width: 100%; height: 100%; }
.to-ph-s img { object-fit: cover; display: block; }
.to-ph-isl { position: absolute; top: 10px; left: 50%; width: 26px; height: 7px; margin-left: -13px; border-radius: 4px; background: var(--ink); }
.to-ph-g { fill: none; stroke: var(--brass); stroke-width: 5; stroke-linecap: round; stroke-linejoin: round; opacity: 0; }
.to-ph-shut { position: absolute; left: 50%; bottom: 9px; width: 20px; height: 20px; margin-left: -10px; border-radius: 50%; border: 2px solid var(--paper); opacity: 0; }
.to-ph-shut::after { content: ""; position: absolute; inset: 2px; border-radius: 50%; background: var(--paper); }
.to-ph-flash { background: var(--paper); opacity: 0; }
.to-ph-work { background: rgba(21, 19, 15, .42); opacity: 0; display: grid; place-items: center; }
.to-ph-work p { position: relative; margin: 0; font: italic 400 12.5px/1.1 var(--serif); color: var(--paper); }
.to-ph-shim, .to-ph-shim2 { background: linear-gradient(105deg, transparent 30%, rgba(250, 248, 244, .34) 50%, transparent 70%); transform: translateX(-100%); }
.to-ph-shim2 { opacity: 0; }
/* the still: the picture with the ring, closer in */
.to-ph-res { transform-origin: 50% 55%; transform: scale(1.7); }
.to-ph-res [data-pic="white"] { opacity: 0; }
.to-ph-chip { position: absolute; left: 7px; right: 7px; top: 24px; margin: 0; padding: 5px 7px 6px; background: var(--paper); color: var(--ink); font: 400 12px/1 var(--serif); opacity: 0; box-shadow: 0 6px 14px -8px rgba(21, 19, 15, .6); }
.to-ph-chip small { display: block; margin-bottom: 3px; font: 500 6.5px/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--brass-d); }

@media (prefers-reduced-motion: no-preference) {
  .to-try.is-ready .to-ph-s *, .to-try.is-ready .to-steps li { animation: 7.2s linear infinite both paused; }
  .to-try.is-playing .to-ph-s *, .to-try.is-playing .to-steps li { animation-play-state: running; }
  .to-try.is-ready .to-ph-cam img { animation-name: to-ph-align; animation-timing-function: var(--ease); }
  .to-try.is-ready .to-ph-g { animation-name: to-ph-guide; }
  .to-try.is-ready .to-ph-shut { animation-name: to-ph-shut; }
  .to-try.is-ready .to-ph-flash { animation-name: to-ph-flash; }
  .to-try.is-ready .to-ph-work { animation-name: to-ph-work; }
  .to-try.is-ready .to-ph-shim, .to-try.is-ready .to-ph-shim2 { animation-name: to-ph-sweep; animation-duration: 1.1s; }
  .to-try.is-ready .to-ph-res { animation-name: to-ph-res; animation-timing-function: cubic-bezier(.45, 0, .2, 1); }
  .to-try.is-ready .to-ph-res [data-pic="white"] { animation-name: to-ph-white; }
  .to-try.is-ready .to-ph-res .to-ph-shim2 { animation-name: to-ph-sweep, to-ph-shim2; animation-duration: 1.1s, 7.2s; }
  .to-try.is-ready .to-ph-chip { animation-name: to-ph-chip; }
  .to-try.is-ready .to-steps li { color: var(--stone); }
  .to-try.is-ready .to-steps li:nth-child(1) { animation-name: to-st-1; }
  .to-try.is-ready .to-steps li:nth-child(2) { animation-name: to-st-2; }
  .to-try.is-ready .to-steps li:nth-child(3) { animation-name: to-st-3; }
}
/* the camera picture fades to the dark screen and back between loops, so the two hands never cross-fade.
   0-1.9 s camera: the hand settles into the outline, the outline turns brass, the shutter; 1.9-3.3 s "Placing your
   ring…"; 3.3-4.6 s the picture, closing in on the ring; 4.4 s a metal chosen elsewhere; 4.8-5.6 s the new picture */
@keyframes to-ph-align { 0% { opacity: 0; transform: translate(6%, -4%) rotate(-3deg) scale(1.16); } 4% { opacity: 1; transform: translate(6%, -4%) rotate(-3deg) scale(1.16); } 20%, 92% { opacity: 1; transform: none; } 93%, 100% { opacity: 0; transform: translate(6%, -4%) rotate(-3deg) scale(1.16); } }
@keyframes to-ph-guide { 0%, 2% { opacity: 0; stroke: var(--paper); stroke-dasharray: 9 9; } 6%, 17% { opacity: .9; stroke: var(--paper); stroke-dasharray: 9 9; } 20%, 25% { opacity: 1; stroke: var(--brass); stroke-dasharray: 9 0; } 27%, 100% { opacity: 0; stroke: var(--brass); stroke-dasharray: 9 0; } }
@keyframes to-ph-shut { 0%, 3% { opacity: 0; transform: none; } 7%, 21% { opacity: 1; transform: none; } 23% { opacity: 1; transform: scale(.78); } 25% { opacity: 1; transform: none; } 27%, 100% { opacity: 0; } }
@keyframes to-ph-flash { 0%, 23% { opacity: 0; } 24% { opacity: .85; } 28%, 100% { opacity: 0; } }
@keyframes to-ph-work { 0%, 26% { opacity: 0; } 29%, 44% { opacity: 1; } 48%, 100% { opacity: 0; } }
@keyframes to-ph-sweep { 0% { transform: translateX(-100%); } 100% { transform: translateX(100%); } }
@keyframes to-ph-res { 0%, 44% { opacity: 0; transform: none; } 48% { opacity: 1; transform: none; } 63%, 94% { opacity: 1; transform: scale(1.7); } 100% { opacity: 0; transform: scale(1.7); } }
@keyframes to-ph-white { 0%, 73% { opacity: 0; } 78%, 100% { opacity: 1; } }
@keyframes to-ph-shim2 { 0%, 64% { opacity: 0; } 66%, 74% { opacity: 1; } 78%, 100% { opacity: 0; } }
@keyframes to-ph-chip { 0%, 59% { opacity: 0; transform: translateY(-8px); } 62%, 89% { opacity: 1; transform: none; } 92%, 100% { opacity: 0; transform: none; } }
@keyframes to-st-1 { 0%, 25% { color: var(--ink); } 28%, 97% { color: var(--stone); } 100% { color: var(--ink); } }
@keyframes to-st-2 { 0%, 26% { color: var(--stone); } 29%, 59% { color: var(--ink); } 62%, 100% { color: var(--stone); } }
@keyframes to-st-3 { 0%, 59% { color: var(--stone); } 62%, 94% { color: var(--ink); } 97%, 100% { color: var(--stone); } }

@media (max-width: 640px) {
  .to-try { grid-template-columns: auto minmax(0, 1fr); grid-template-areas: "ph steps" "btn btn"; column-gap: 18px; row-gap: 14px; align-items: center; }
  .to-ph { --pw: 96px; }
  .to-steps { align-self: center; margin: 0; }
  .to-steps li:first-child { border-top: 0; }
}
