/* Motion for the public pages. Movement, fades and light only. Switched off by the device's "Reduce Motion" setting. */
:root { --ease: cubic-bezier(0.22, 0.7, 0.2, 1); --spring: cubic-bezier(0.34, 1.56, 0.64, 1); }
* { -webkit-tap-highlight-color: transparent; }

/* ---- page-to-page transition (browsers that support it) */
@view-transition { navigation: auto; }
::view-transition-old(root) { animation: 0.22s ease both vtOut; }
::view-transition-new(root) { animation: 0.5s var(--ease) both vtIn; }
@keyframes vtOut { to { opacity: 0; transform: scale(0.985); } }
@keyframes vtIn { from { opacity: 0; transform: translateY(24px); } }

/* ---- scroll reveals (the class "mo" is added by motion.js, so without script nothing is hidden) */
.mo .rv { opacity: 0; transform: translateY(46px) scale(0.96); filter: blur(7px); transition: opacity 0.9s var(--ease) var(--d, 0ms), transform 0.9s var(--ease) var(--d, 0ms), filter 0.9s var(--ease) var(--d, 0ms); }
.mo .rv-l { transform: translateX(-60px); }
.mo .rv-r { transform: translateX(60px); }
.mo .rv-3d { transform: perspective(900px) translateY(60px) rotateX(14deg) scale(0.94); transform-origin: 50% 100%; filter: none; }
.mo .rv-pop { transform: scale(0.82); filter: none; transition-timing-function: var(--spring); }
.mo .rv.in { opacity: 1; transform: none; filter: none; }

/* headings that rise out of a mask, word by word (letter by letter for the hero) */
.split .w { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: 0.14em; margin-bottom: -0.14em; }
.mo .split .wi { display: inline-block; transform: translateY(110%) rotate(5deg); transform-origin: 0 100%; transition: transform 1s var(--ease) calc(var(--i, 0) * 60ms + var(--d, 0ms)); }
.mo .split.in .wi { transform: none; }

/* ---- hero */
.dark-hero { position: relative; overflow: hidden; isolation: isolate; }
.dark-hero::before, .dark-hero::after { content: ""; position: absolute; z-index: -1; width: 60vmax; height: 60vmax; border-radius: 50%; filter: blur(80px); opacity: 0.55; pointer-events: none; }
.dark-hero::before { left: -20vmax; top: -25vmax; background: radial-gradient(circle, var(--accent-dark), transparent 65%); animation: drift1 14s ease-in-out infinite alternate; }
.dark-hero::after { right: -22vmax; bottom: -30vmax; background: radial-gradient(circle, color-mix(in srgb, var(--accent-dark) 55%, #fff), transparent 65%); animation: drift2 17s ease-in-out infinite alternate; }
@keyframes drift1 { to { transform: translate(18vmax, 12vmax) scale(1.2); } }
@keyframes drift2 { to { transform: translate(-16vmax, -10vmax) scale(1.15); } }
.dark-hero h1 { background: linear-gradient(100deg, #fff 20%, color-mix(in srgb, var(--accent-dark) 45%, #fff) 45%, color-mix(in srgb, var(--accent-dark) 70%, #fff) 60%, #fff 85%); background-size: 250% 100%; -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; animation: sheen 7s ease-in-out infinite; }
@keyframes sheen { 0%, 100% { background-position: 100% 0; } 50% { background-position: 0 0; } }
.hero-in { will-change: transform, opacity; }

/* scroll progress */
#prog { position: fixed; left: 0; top: 0; height: 3px; width: 100%; z-index: 60; transform-origin: 0 50%; transform: scaleX(0); background: linear-gradient(90deg, var(--accent), var(--accent-dark)); pointer-events: none; }

/* header */
.bar { transition: box-shadow 0.3s ease, background-color 0.3s ease; }
.bar.scrolled { box-shadow: 0 1px 0 var(--line), 0 8px 30px rgba(0, 0, 0, 0.1); }
.nav a { position: relative; transition: color 0.2s ease; }
.nav a::after { content: ""; position: absolute; left: 0; right: 0; bottom: -3px; height: 2px; border-radius: 2px; background: var(--accent); transform: scaleX(0); transform-origin: 0 50%; transition: transform 0.35s var(--ease); }
.nav a:hover::after { transform: scaleX(1); }
.brand, a { transition: color 0.2s ease, opacity 0.2s ease; }

/* ---- buttons: spring press, tap ripple, shimmer on the main call to action */
.btn { position: relative; overflow: hidden; transition: transform 0.35s var(--spring), filter 0.2s ease, box-shadow 0.3s ease, background-color 0.2s ease, opacity 0.2s ease; }
.btn:active:not(:disabled) { transform: scale(0.9); transition-duration: 0.1s; }
.cta .btn:not(.ghost)::after, #hero-cta::after { content: ""; position: absolute; top: 0; left: -80%; width: 50%; height: 100%; background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.45), transparent); transform: skewX(-20deg); animation: shine 3.6s ease-in-out 1.5s infinite; pointer-events: none; }
@keyframes shine { 0%, 60% { left: -80%; } 100% { left: 160%; } }
.rip { position: absolute; border-radius: 50%; pointer-events: none; background: currentColor; opacity: 0.28; transform: scale(0); animation: rip 0.7s ease-out forwards; }
@keyframes rip { to { transform: scale(1); opacity: 0; } }
@media (hover: hover) {
  .btn:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 10px 28px color-mix(in srgb, var(--accent) 35%, transparent); }
  .btn.soft:hover:not(:disabled), .btn.ghost:hover:not(:disabled) { box-shadow: 0 8px 22px rgba(0, 0, 0, 0.12); }
}

/* ---- cards */
.gcard, .tile, .quote { position: relative; transition: transform 0.45s var(--spring), box-shadow 0.35s ease, filter 0.2s ease; }
.gcard img { transition: transform 0.8s var(--ease); }
.gcard, .tile, .quote, .photo { overflow: hidden; }
.gcard:active, .tile:active, .quote:active { transform: scale(0.97); transition-duration: 0.12s; }
@media (hover: hover) {
  .gcard:hover, .tile:hover, .quote:hover { transform: translateY(-6px) scale(1.012); box-shadow: 0 22px 54px rgba(0, 0, 0, 0.16); }
  .gcard:hover img { transform: scale(1.09); }
}

/* ---- photos fade and scale in as they load */
.fi { opacity: 0; transform: scale(1.12); filter: blur(10px); transition: opacity 0.7s ease, transform 0.9s var(--ease), filter 0.7s ease; }
.fi.ld { opacity: 1; transform: none; filter: none; }

/* ---- picking photos */
.photo { transition: transform 0.35s var(--spring), outline-color 0.2s ease; }
.photo:active { transform: scale(0.9); transition-duration: 0.1s; }
.dot { transition: background-color 0.2s ease; }
.photo.on .dot { animation: pop 0.5s var(--spring); }
@keyframes pop { 0% { transform: scale(0.2) rotate(-40deg); } 100% { transform: none; } }
.photo.on img { animation: tilePop 0.55s var(--ease); }
@keyframes tilePop { 0% { transform: scale(1.18); filter: brightness(1.5); } 100% { transform: none; filter: none; } }
.photo.on::after { content: ""; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 0 0 4px var(--accent); animation: ringOut 0.6s ease-out forwards; pointer-events: none; }
@keyframes ringOut { from { box-shadow: inset 0 0 0 22px var(--accent); opacity: 0.9; } to { box-shadow: inset 0 0 0 3px var(--accent); opacity: 0.6; } }
.settle { animation: settle 0.55s var(--spring); display: inline-block; }
@keyframes settle { 0% { opacity: 0.2; transform: translateY(18px) scale(1.4); color: var(--accent); } 100% { opacity: 1; transform: none; } }

/* ---- viewer, sheets */
.viewer:not(.hide), .lb:not(.hide) { animation: fade 0.3s ease; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.viewer:not(.hide) img, .lb:not(.hide) img { animation: zoomIn 0.5s var(--spring); }
@keyframes zoomIn { from { opacity: 0; transform: scale(0.8); } to { opacity: 1; transform: none; } }
.viewer img.sl { animation: slideL 0.4s var(--ease); }
.viewer img.sr { animation: slideR 0.4s var(--ease); }
@keyframes slideL { from { opacity: 0; transform: translateX(80px) scale(0.96); } to { opacity: 1; transform: none; } }
@keyframes slideR { from { opacity: 0; transform: translateX(-80px) scale(0.96); } to { opacity: 1; transform: none; } }
.sheet[open] { animation: sheetIn 0.55s var(--spring); }
.sheet[open]::backdrop { animation: fade 0.35s ease; }
@keyframes sheetIn { from { opacity: 0; transform: translateY(30px) scale(0.94); } to { opacity: 1; transform: none; } }
@media (max-width: 560px) { .sheet[open] { animation-name: sheetUp; animation-timing-function: cubic-bezier(0.2, 1.1, 0.3, 1); } }
@keyframes sheetUp { from { transform: translateY(100%); } to { transform: none; } }

/* ---- paid order: the check draws itself, then confetti (motion.js) */
.okmark { display: block; width: 84px; height: 84px; margin: 0 0 16px; filter: drop-shadow(0 6px 18px color-mix(in srgb, var(--good) 40%, transparent)); }
.okmark circle, .okmark path { fill: none; stroke: var(--good); stroke-width: 3.5; stroke-linecap: round; stroke-linejoin: round; }
.okmark circle { stroke-dasharray: 151; stroke-dashoffset: 151; animation: draw 0.8s var(--ease) forwards, okpop 0.7s var(--spring) 0.8s; transform-origin: 50% 50%; }
.okmark path { stroke-dasharray: 36; stroke-dashoffset: 36; animation: draw 0.5s var(--ease) 0.55s forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes okpop { 50% { transform: scale(1.12); } }
#confetti { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 80; pointer-events: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .mo .rv, .mo .split .wi { opacity: 1; transform: none; filter: none; }
  .fi { opacity: 1; transform: none; filter: none; }
  .okmark circle, .okmark path { stroke-dashoffset: 0; }
  .dark-hero h1 { animation: none !important; }
  #prog, #confetti { display: none; }
}

/* elements waiting to slide in from the side must never create sideways scrolling */
html, body { overflow-x: clip; }
