/* OriumAI motion (static/js/orium-fx.js): liquid-metal buttons, the Orium AI
   orb, the tilt-in scroll card, and Orium AI's plan cards. */

/* ------------------------------------------------------ liquid-metal button
   A dark pill inside a chrome edge. Three layers under the label, all in the
   button's own stacking context: a CSS chrome ring (always), the WebGL
   liquid-metal shader over it once it loads, and the dark inner pill that
   leaves 2px of either showing. */
.lm-btn {
  position: relative; isolation: isolate; overflow: hidden;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 28px; border: 0; border-radius: 999px;
  background: #111; color: #f2f2f7 !important; text-decoration: none !important;
  font-weight: 600; letter-spacing: .01em; cursor: pointer;
  box-shadow: 0 0 0 1px rgba(0,0,0,.3), 0 36px 14px rgba(0,0,0,.02),
              0 20px 12px rgba(0,0,0,.08), 0 9px 9px rgba(0,0,0,.12), 0 2px 5px rgba(0,0,0,.15);
  transition: transform .15s cubic-bezier(.4,0,.2,1), box-shadow .15s;
}
.lm-btn::before {
  /* A chrome disc larger than the button, turning; the button clips it. */
  content: ""; position: absolute; left: 50%; top: 50%; width: 160%; aspect-ratio: 1;
  translate: -50% -50%; z-index: -3; border-radius: 50%;
  background: conic-gradient(#8e8e93, #f5f5f7, #3a3a3c, #d1d1d6, #b9a8ff, #8e8e93);
  animation: lm-turn 5s linear infinite;
}
.lm-btn::after {
  content: ""; position: absolute; inset: 2px; border-radius: inherit; z-index: -1;
  background: linear-gradient(180deg, #202020 0%, #000 100%);
}
.lm-btn__shader { position: absolute; inset: 0; border-radius: inherit; overflow: hidden; z-index: -2; }
.lm-btn__shader canvas { position: absolute !important; inset: 0; width: 100% !important; height: 100% !important; }
.lm-btn:hover { box-shadow: 0 0 0 1px rgba(0,0,0,.4), 0 12px 6px rgba(0,0,0,.05), 0 8px 5px rgba(0,0,0,.1), 0 4px 4px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.2); }
.lm-btn:active { transform: translateY(1px) scale(.98); }
.lm-btn:focus-visible { outline: 2px solid #7a4dff; outline-offset: 3px; }
.lm-btn[disabled] { opacity: .45; cursor: default; }
.lm-btn--icon { width: 48px; padding: 0; }
@keyframes lm-turn { to { transform: rotate(360deg); } }

/* ------------------------------------------------------------ Orium AI orb */
.orb { position: relative; width: 132px; height: 132px; margin: 0 auto; }
.orb--css::before {
  content: ""; position: absolute; inset: 20%; border-radius: 50%;
  border: 3px solid transparent;
  background: linear-gradient(#0000, #0000) padding-box,
              linear-gradient(135deg, #f4e9ff, #9c43fe 30%, #5b6cf0 70%, #4cc2e9) border-box;
  filter: drop-shadow(0 0 14px rgba(156,67,254,.55)) drop-shadow(0 0 6px rgba(76,194,233,.5));
  animation: orb-turn 9s linear infinite;
}
.orb.is-live.orb--css::before { animation-duration: 2.4s; }
@keyframes orb-turn { to { transform: rotate(360deg); } }

/* ------------------------------------------------------ tilt-in scroll card */
[data-tilt-scroll] { perspective: 1000px; }
[data-tilt-card] { transform-origin: 50% 0; will-change: transform; transform: rotateX(20deg) scale(1.05); }
[data-tilt-head] { will-change: transform; }

/* ------------------------------------------------- Orium AI: talk and plans */
.ask__hero { text-align: center; padding: 8px 0 4px; }
.ask__hero-sub { color: var(--ink-muted, #6b7280); max-width: 46ch; margin: 6px auto 0; }
.ask__mic { background: transparent; border: 1px solid var(--line, #e5e7eb); border-radius: 999px;
  width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.ask__mic.is-on { border-color: #7a4dff; box-shadow: 0 0 0 4px rgba(122,77,255,.15); }
.ask__plan { border: 1px solid var(--line, #e5e7eb); border-radius: 18px; padding: 16px; margin: 8px 0 12px;
  background: var(--surface, #fff); }
.ask__plan h3 { font-size: 1.05rem; margin: 0 0 8px; }
.ask__plan ul { margin: 0 0 12px; padding-left: 1.1em; }
.ask__plan li { margin: 4px 0; line-height: 1.45; }
.ask__plan-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.ask__plan-later { background: none; border: 0; color: var(--ink-muted, #6b7280); font-weight: 600; cursor: pointer; }
.ask__plan-done { color: #0b7a55; font-weight: 700; }

@media (prefers-reduced-motion: reduce) {
  .lm-btn::before, .orb--css::before { animation: none; }
  [data-tilt-card] { transform: none !important; }
}

/* ------------------------------------------------- OriumAI Mail partner card */
.om-card { border: 1px solid var(--line, #e5e7eb); border-radius: 20px; overflow: hidden;
  background: var(--surface, #fff); margin: 12px 0; }
.om-card__art { display: block; width: 100%; height: auto; background: #edebf3; }
.om-card__body { padding: 18px 18px 20px; }
.om-card__eyebrow { color: #5b2ef5; font-size: .75rem; font-weight: 800; letter-spacing: .12em;
  text-transform: uppercase; margin: 0 0 4px; }
.om-card__title { font-size: 1.2rem; margin: 0 0 10px; }
.om-card__list { margin: 0 0 16px; padding-left: 1.1em; }
.om-card__list li { margin: 4px 0; line-height: 1.45; }

/* Ori (templates/app/_ori.html): float, blink, a quick bob while busy, one hop. */
.ori { display: inline-block; line-height: 0; position: relative; }
.ori__body { animation: ori-float 2.8s ease-in-out infinite; display: block; overflow: visible; }
.ori__img { width: var(--ori, 56px); height: var(--ori, 56px); object-fit: contain; filter: drop-shadow(0 6px 10px rgba(40, 20, 90, .16)); user-select: none; }
.ori__eyes { animation: ori-blink 5.2s infinite; transform-box: fill-box; transform-origin: center; }
.ori.is-busy .ori__body { animation-duration: .84s; }
.ori.is-hop .ori__body { animation: ori-hop .6s cubic-bezier(.3,.7,.4,1) 1; }
.ori.is-still .ori__body, .ori.is-still .ori__eyes { animation: none; }
@keyframes ori-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5%); } }
@keyframes ori-blink { 0%, 92%, 100% { transform: scaleY(1); } 95% { transform: scaleY(.1); } }
@keyframes ori-hop {
  0% { transform: translateY(0) scale(1, 1); }
  35% { transform: translateY(-30%) scale(.94, 1.06); }
  65% { transform: translateY(0) scale(1.12, .88); }
  82% { transform: translateY(0) scale(.98, 1.02); }
  100% { transform: translateY(0) scale(1, 1); }
}
@media (prefers-reduced-motion: reduce) { .ori__body, .ori__eyes { animation: none !important; } }
/* Ori's moves (templates/app/_ori.html): an animated WebP in a cell that can
   reach past Ori's box, placed so the still's center sits on the box's. */
.ori--move { display: inline-block; height: var(--ori, 56px); position: relative; width: var(--ori, 56px); }
.ori--move picture { display: contents; }
.ori__move {
  height: calc(var(--ori, 56px) * var(--oh, 1));
  left: calc(var(--ori, 56px) * (0.5 - var(--oax, 0.5)));
  max-width: none;
  pointer-events: none;
  position: absolute;
  top: calc(var(--ori, 56px) * (0.5 - var(--oay, 0.5)));
  user-select: none;
  width: calc(var(--ori, 56px) * var(--ow, 1));
}


/* Ori, talking -- the web twin of the app's <OriSays>: the character and a
   speech bubble that pops in beside it. Used on sign-in, results, empty
   states and anywhere a person needs walking through. */
.ori-says { align-items: flex-end; display: flex; gap: 10px; margin: 12px 0 16px; }
.ori-says__bubble {
  animation: ori-says-pop .45s cubic-bezier(.3, 1.4, .5, 1) both;
  background: var(--surface, #fff); border: 1px solid var(--line, #e6e3f0); border-radius: 16px;
  color: var(--ink, #1a1830); flex: 1; font-size: 15px; line-height: 1.45; margin: 0 0 10px;
  padding: 10px 14px; position: relative;
}
.ori-says__bubble::before {
  background: inherit; border-bottom: 1px solid var(--line, #e6e3f0); border-left: 1px solid var(--line, #e6e3f0);
  bottom: 14px; content: ""; height: 11px; left: -7px; position: absolute; transform: rotate(45deg); width: 11px;
}
.ori-says__bubble strong { display: block; margin-bottom: 2px; }
@keyframes ori-says-pop { from { opacity: 0; transform: translateY(6px) scale(.9); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .ori-says__bubble { animation: none; } }


/* The achievement moment (OriumFX.achieve). */
.ach {
  align-items: center; animation: ach-in .25s ease-out both; background: rgba(14, 8, 34, .88); display: flex;
  flex-direction: column; inset: 0; justify-content: center; padding: 24px; position: fixed; z-index: 2147482000;
}
.ach.is-out { animation: ach-out .2s ease-in both; }
.ach__rays {
  animation: ach-spin 12s linear infinite; background: repeating-conic-gradient(rgba(165, 148, 255, .10) 0 12deg, transparent 12deg 30deg);
  border-radius: 50%; height: 560px; position: absolute; width: 560px;
}
.ach__card { align-items: center; animation: ach-pop .5s cubic-bezier(.3, 1.5, .5, 1) both; display: flex; flex-direction: column; position: relative; text-align: center; }
.ach__badge {
  align-items: center; background: rgba(245, 179, 1, .14); border: 2px solid rgba(245, 179, 1, .5); border-radius: 50%;
  display: flex; font-size: 36px; height: 76px; justify-content: center; margin-bottom: 12px; width: 76px;
}
.ach__ori svg { animation: ori-hop .7s cubic-bezier(.3, .7, .4, 1) .2s 2; display: block; overflow: visible; }
.ach__eyebrow { color: #C9B8FF; font-size: 12px; font-weight: 700; letter-spacing: .16em; margin: 16px 0 0; text-transform: uppercase; }
.ach__title { color: #fff; font-size: 30px; font-weight: 800; margin: 8px 0 0; }
.ach__sub { color: #D9D2F5; font-size: 16px; line-height: 1.45; margin: 8px auto 0; max-width: 360px; }
.ach__go {
  background: var(--brand-fill, #4B39C4); border: 0; border-radius: 999px; bottom: 48px; color: #fff; cursor: pointer;
  font: inherit; font-size: 16px; font-weight: 700; left: 50%; max-width: 420px; padding: 16px; position: absolute;
  transform: translateX(-50%); width: calc(100% - 48px);
}
@keyframes ach-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes ach-out { to { opacity: 0; } }
@keyframes ach-pop { from { opacity: 0; transform: scale(.6); } to { opacity: 1; transform: none; } }
@keyframes ach-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .ach, .ach__card, .ach__rays, .ach__ori svg { animation: none; } }

/* ------------------------------------------------- focus-in (orium-fx.js)
   The lens, on the web: out of focus and a little low, then sharp. */
.fx-pre { opacity: 0; transform: translateY(18px); filter: blur(8px); }
.fx-pre.fx-in {
  opacity: 1; transform: none; filter: blur(0);
  transition: opacity .7s cubic-bezier(.2,.7,.2,1), transform .8s cubic-bezier(.2,.7,.2,1), filter .7s cubic-bezier(.2,.7,.2,1);
}
/* On a phone the blur goes. Blurring a whole section is a full repaint every
   frame on mobile Safari, so a fast scroll showed headings and cards smeared
   half-way in -- "misaligned", "cheap". A short lift and fade reads the same
   and costs nothing. */
@media (hover: none), (max-width: 820px) {
  .fx-pre { filter: none; transform: translateY(12px); }
  .fx-pre.fx-in { filter: none; transition: opacity .45s cubic-bezier(.2,.7,.2,1), transform .5s cubic-bezier(.2,.7,.2,1); }
}

/* ------------------------------------------------------- press and lift
   Every primary action answers a press: it lifts under the pointer and
   gives a little when pressed, the way a real button does. */
.lm-btn, .cta, .btn-primary, .btn-stripe-primary, .btn-premium, .hero-price-opt,
.hero-cta-single a, .orium-motion__cta, .fx-film__play {
  transition: transform .18s cubic-bezier(.2,.7,.2,1), box-shadow .18s ease, filter .18s ease;
}
@media (hover: hover) {
  .lm-btn:hover, .cta:hover, .btn-primary:hover, .btn-stripe-primary:hover, .hero-price-opt:hover,
  .hero-cta-single a:hover, .orium-motion__cta:hover { transform: translateY(-2px); filter: brightness(1.04); }
}
.lm-btn:active, .cta:active, .btn-primary:active, .btn-stripe-primary:active, .btn-premium:active,
.hero-price-opt:active, .hero-cta-single a:active, .orium-motion__cta:active, .fx-film__play:active,
.btn:active { transform: scale(.97) !important; transition-duration: .08s; }
[data-fx-magnet] { transition: transform .25s cubic-bezier(.2,.7,.2,1); }

/* --------------------------------------------------------------- the film */
.fx-film { background: #07060D; color: #fff; overflow: hidden; padding: clamp(56px, 9vw, 112px) 16px; position: relative; text-align: center; }
.fx-film::before { background: radial-gradient(60% 55% at 50% 60%, rgba(106,48,255,.38), rgba(106,48,255,0) 70%); content: ""; inset: 0; pointer-events: none; position: absolute; }
.fx-film__kicker { color: #B9A6FF; font-size: 13px; font-weight: 700; letter-spacing: .14em; margin: 0 0 10px; position: relative; text-transform: uppercase; }
.fx-film__title { color: #fff; font-size: clamp(32px, 5.4vw, 60px); font-weight: 800; letter-spacing: -.035em; line-height: 1.04; margin: 0 auto 14px; max-width: 16ch; position: relative; }
.fx-film__title em { color: #C9B8FF; font-family: "Instrument Serif", Georgia, serif; font-weight: 400; letter-spacing: -.01em; }
.fx-film__sub { color: rgba(255,255,255,.72); font-size: 17px; line-height: 1.55; margin: 0 auto 34px; max-width: 46ch; position: relative; }
.fx-film__picks { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: -12px auto 22px; position: relative; }
.fx-film__pick { background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.16); border-radius: 999px; color: rgba(255,255,255,.78); cursor: pointer; font: 600 14px/1 Inter, system-ui, sans-serif; padding: 10px 18px; transition: background .2s ease, border-color .2s ease, color .2s ease; }
.fx-film__pick:hover { background: rgba(255,255,255,.12); color: #fff; }
.fx-film__pick[aria-pressed="true"] { background: #6A30FF; border-color: #6A30FF; color: #fff; box-shadow: 0 8px 24px rgba(106,48,255,.45); }
.fx-film__pick:focus-visible { outline: 2px solid #B9A6FF; outline-offset: 3px; }
.fx-film__frame { aspect-ratio: 16 / 9; background: #000; border-radius: 22px; box-shadow: 0 40px 120px rgba(106,48,255,.35), 0 0 0 1px rgba(255,255,255,.08); margin: 0 auto; max-width: 1080px; overflow: hidden; position: relative; }
.fx-film.is-tall .fx-film__frame { aspect-ratio: 9 / 16; max-width: 420px; }
.fx-film__frame video { display: block; height: 100%; object-fit: cover; width: 100%; }
.fx-film__play { align-items: center; background: rgba(7,6,13,.28); border: 0; color: #fff; cursor: pointer; display: flex; flex-direction: column; gap: 14px; inset: 0; justify-content: center; position: absolute; transition: opacity .3s ease, background .3s ease; z-index: 2; }
.fx-film__play:hover { background: rgba(7,6,13,.12); }
.fx-film.is-playing .fx-film__play { opacity: 0; pointer-events: none; }
.fx-film__lens { align-items: center; background: radial-gradient(circle at 35% 30%, rgba(255,255,255,.55), rgba(156,128,255,.55) 38%, rgba(106,48,255,.85) 100%); border-radius: 50%; box-shadow: 0 0 0 10px rgba(156,128,255,.18), 0 18px 50px rgba(106,48,255,.6); display: flex; height: 92px; justify-content: center; transition: transform .25s cubic-bezier(.2,.7,.2,1), box-shadow .25s ease; width: 92px; }
.fx-film__play:hover .fx-film__lens { box-shadow: 0 0 0 16px rgba(156,128,255,.16), 0 22px 60px rgba(106,48,255,.7); transform: scale(1.06); }
.fx-film__lens svg { margin-left: 6px; }
.fx-film__label { font-size: 15px; font-weight: 700; letter-spacing: .01em; text-shadow: 0 2px 12px rgba(0,0,0,.6); }
.fx-film__fine { color: rgba(255,255,255,.45); font-size: 12px; margin: 16px auto 0; max-width: 60ch; position: relative; }
@keyframes fx-breathe { 50% { box-shadow: 0 0 0 18px rgba(156,128,255,.10), 0 18px 50px rgba(106,48,255,.6); } }
.fx-film__lens { animation: fx-breathe 2.6s ease-in-out infinite; }

@media (prefers-reduced-motion: reduce) {
  .fx-pre { opacity: 1; transform: none; filter: none; }
  .fx-film__lens { animation: none; }
  .lm-btn:hover, .cta:hover, .btn-primary:hover, .hero-price-opt:hover { transform: none; }
}
