/* ===========================================================================
   SAMEQO Feedback - showcase layer
   Loaded only on the public pages. The staff tool stays flat and quick.

   Depth is built from CSS 3D transforms rather than WebGL: a canvas scene
   would look fine on a laptop and stutter on the mid-range Android most
   visitors will arrive on, for the same visual result.

   Everything here is decorative. Every motion rule is switched off under
   prefers-reduced-motion, and every pointer effect is gated behind a real
   mouse, so a phone never runs any of it.
   =========================================================================== */

/* ---------------------------------------------------------------------------
   Stage
   --------------------------------------------------------------------------- */

.stage {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--navy);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  isolation: isolate;
}

/* Deep field - the furthest layer, a slow drifting wash of gold light. */
.stage__field {
  position: absolute;
  inset: -20%;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(38rem 30rem at 14% 8%,  rgba(218,165,32,.16), transparent 60%),
    radial-gradient(32rem 26rem at 88% 22%, rgba(218,165,32,.10), transparent 58%),
    radial-gradient(44rem 34rem at 62% 96%, rgba(70,90,190,.16), transparent 62%);
  animation: field-drift 28s ease-in-out infinite alternate;
  will-change: transform;
}

@keyframes field-drift {
  from { transform: translate3d(-1.5%, -1%, 0) scale(1); }
  to   { transform: translate3d(1.5%, 1.5%, 0) scale(1.06); }
}

/* A faint grid, thrown into perspective so it reads as a floor plane. */
.stage__grid {
  position: absolute;
  inset: auto 0 -10% 0;
  height: 55%;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(218,165,32,.10) 1px, transparent 1px),
    linear-gradient(90deg, rgba(218,165,32,.10) 1px, transparent 1px);
  background-size: 60px 60px;
  transform: perspective(40rem) rotateX(64deg);
  transform-origin: bottom center;
  mask-image: linear-gradient(to bottom, transparent, #000 55%, transparent);
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 55%, transparent);
  opacity: .55;
}

/* ---------------------------------------------------------------------------
   Orbits - the interlocking rings from the SAMEQO mark, given depth.
   Three rings at different Z, rotating at different speeds. The parallax
   script nudges the whole set toward the cursor.
   --------------------------------------------------------------------------- */

.orbits {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  perspective: 60rem;
  transform-style: preserve-3d;
}

.orbit {
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(218,165,32,.30);
  transform-style: preserve-3d;
  will-change: transform;
}
/* The gold arc riding each ring - a quarter of the circle picked out solid. */
.orbit::after {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: 50%;
  border: 2px solid transparent;
  border-top-color: var(--gold);
  border-right-color: rgba(218,165,32,.45);
}

.orbit--a {
  width: 30rem; height: 30rem;
  top: -6rem; right: -7rem;
  transform: rotateX(68deg) rotateZ(0deg);
  animation: spin-a 34s linear infinite;
}
.orbit--b {
  width: 20rem; height: 20rem;
  top: 3rem; right: 2rem;
  border-color: rgba(218,165,32,.20);
  transform: rotateX(52deg) rotateY(16deg);
  animation: spin-b 26s linear infinite reverse;
}
.orbit--c {
  width: 38rem; height: 38rem;
  bottom: -16rem; left: -12rem;
  border-color: rgba(218,165,32,.14);
  transform: rotateX(74deg);
  animation: spin-a 46s linear infinite;
}

@keyframes spin-a {
  from { transform: rotateX(68deg) rotateZ(0deg); }
  to   { transform: rotateX(68deg) rotateZ(360deg); }
}
@keyframes spin-b {
  from { transform: rotateX(52deg) rotateY(16deg) rotateZ(0deg); }
  to   { transform: rotateX(52deg) rotateY(16deg) rotateZ(360deg); }
}

/* Motes - small gold points suspended at varying depths. */
.mote {
  position: absolute;
  width: 4px; height: 4px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 12px 2px rgba(218,165,32,.55);
  opacity: .0;
  animation: mote-rise 14s ease-in-out infinite;
}
.mote:nth-child(1) { left: 12%; top: 68%; animation-delay: 0s;   }
.mote:nth-child(2) { left: 27%; top: 82%; animation-delay: 2.4s; }
.mote:nth-child(3) { left: 61%; top: 74%; animation-delay: 5.1s; }
.mote:nth-child(4) { left: 78%; top: 86%; animation-delay: 7.8s; }
.mote:nth-child(5) { left: 44%; top: 90%; animation-delay: 10.2s;}

@keyframes mote-rise {
  0%   { opacity: 0;   transform: translateY(0) scale(.6); }
  18%  { opacity: .85; }
  70%  { opacity: .5;  }
  100% { opacity: 0;   transform: translateY(-16rem) scale(1.1); }
}

/* ---------------------------------------------------------------------------
   Layout on the stage
   --------------------------------------------------------------------------- */

.stage__bar,
.stage__body,
.stage__foot { position: relative; z-index: 2; }

.stage__bar {
  padding: 1.25rem var(--gut);
  padding-top: max(1.25rem, env(safe-area-inset-top));
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; flex-wrap: wrap;
}
.stage__bar img { height: clamp(26px, 5vw, 34px); width: auto; }
.stage__bar nav { display: flex; gap: clamp(.88rem, 2.5vw, 1.5rem); flex-wrap: wrap; }
.stage__bar nav a {
  color: var(--on-navy-dim);
  font-size: .84rem; font-weight: 500; text-decoration: none;
  min-height: var(--tap); display: flex; align-items: center;
  position: relative;
}
.stage__bar nav a::after {
  content: ""; position: absolute; left: 0; right: 100%; bottom: .75rem;
  height: 1px; background: var(--gold);
  transition: right .28s cubic-bezier(.22,.61,.36,1);
}
.stage__bar nav a:hover::after,
.stage__bar nav a:focus-visible::after { right: 0; }
.stage__bar nav a:hover { color: var(--white); }

.stage__body {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr minmax(0, 27.5rem);
  gap: clamp(1.5rem, 4vw, 3.5rem);
  align-items: center;
  padding: clamp(1.5rem, 3vw, 3rem) var(--gut) clamp(2.5rem, 5vw, 4rem);
  max-width: 78rem;
  margin: 0 auto;
  width: 100%;
}
.stage__body--single { grid-template-columns: minmax(0, 42rem); justify-content: center; }

.stage__foot {
  padding: 1.25rem var(--gut) calc(1.38rem + env(safe-area-inset-bottom));
  border-top: 1px solid rgba(255,255,255,.08);
  color: var(--on-navy-dim); font-size: .78rem;
  display: flex; justify-content: space-between; gap: .88rem; flex-wrap: wrap;
}
.stage__foot .tag {
  color: var(--gold); letter-spacing: .16em; text-transform: uppercase; font-size: .69rem;
}

/* ---------------------------------------------------------------------------
   Pitch column
   --------------------------------------------------------------------------- */

.pitch__kicker {
  display: inline-flex; align-items: center; gap: .63rem;
  padding: .38rem .81rem .38rem .5rem;
  border: 1px solid rgba(218,165,32,.32);
  border-radius: 100px;
  background: rgba(218,165,32,.08);
  color: var(--gold);
  font-size: .69rem; font-weight: 600;
  letter-spacing: .2em; text-transform: uppercase;
  margin-bottom: 1.5rem;
}
.pitch__kicker .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 0 0 rgba(218,165,32,.65);
  animation: pulse 2.6s ease-out infinite;
}
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(218,165,32,.6); }
  70%  { box-shadow: 0 0 0 9px rgba(218,165,32,0); }
  100% { box-shadow: 0 0 0 0 rgba(218,165,32,0); }
}

.pitch h1 {
  font-size: clamp(2.1rem, 1.2rem + 3.6vw, 3.75rem);
  color: var(--white);
  line-height: 1.06;
  margin-bottom: 1.13rem;
  letter-spacing: -.01em;
}
/* Gold fill with a slow sheen crossing it. */
.pitch h1 .lit {
  color: var(--gold);
  background: linear-gradient(100deg,
              var(--gold) 0%, #f6dd9a 32%, var(--gold) 62%);
  background-size: 220% 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: 130% 0; }
  50%      { background-position: -30% 0; }
}

.pitch__lede {
  color: #b8bdd6;
  font-size: clamp(1rem, .94rem + .35vw, 1.13rem);
  max-width: 46ch;
  margin-bottom: 1.88rem;
  line-height: 1.65;
}

/* Assurance chips - what a nervous first-time visitor actually wants to know */
.assurances { display: flex; flex-direction: column; gap: .81rem; }
.assurance {
  display: flex; align-items: flex-start; gap: .81rem;
  color: #c9cee4; font-size: .88rem; line-height: 1.5;
}
.assurance__mark {
  flex: 0 0 auto;
  width: 26px; height: 26px; border-radius: 7px;
  display: grid; place-items: center;
  background: rgba(218,165,32,.12);
  border: 1px solid rgba(218,165,32,.3);
  color: var(--gold);
  font-size: .81rem; font-weight: 700;
  transform: rotate(-6deg);
}
.assurance strong { color: var(--white); font-weight: 600; }

/* ---------------------------------------------------------------------------
   Floating card - the form and the claim check both ride on this
   --------------------------------------------------------------------------- */

.float { perspective: 90rem; }

.float__card {
  position: relative;
  background: var(--white);
  border-radius: 12px;
  transform-style: preserve-3d;
  box-shadow:
    0 1px 1px rgba(0,0,0,.10),
    0 8px 18px rgba(0,0,0,.16),
    0 26px 52px rgba(0,0,0,.30),
    0 0 0 1px rgba(255,255,255,.06);
  transition: transform .4s cubic-bezier(.22,.61,.36,1), box-shadow .4s ease;
  will-change: transform;
}
/* Gold edge along the top - the card has a lip, not just a border. */
.float__card::before {
  content: "";
  position: absolute; inset: 0 0 auto 0; height: 4px;
  border-radius: 12px 12px 0 0;
  background: linear-gradient(90deg, var(--gold-deep), var(--gold) 45%, #f0d68f 70%, var(--gold));
}
/* Sheen that follows the cursor, positioned by the tilt script. */
.float__card::after {
  content: "";
  position: absolute; inset: 0;
  border-radius: 12px;
  pointer-events: none;
  opacity: 0;
  transition: opacity .35s ease;
  background: radial-gradient(22rem 22rem at var(--mx, 50%) var(--my, 0%),
              rgba(255,255,255,.55), transparent 60%);
  mix-blend-mode: overlay;
}
.float__card.is-lit::after { opacity: 1; }

.float__inner { padding: clamp(1.38rem, 1rem + 1.4vw, 2.13rem); }

.float__head { margin-bottom: 1.25rem; }
.float__head h2 { font-size: var(--t-h2); margin-bottom: .31rem; }
.float__head p { color: var(--ink-soft); font-size: .88rem; }

/* Depth shim - a second plate peeking out behind the card. */
.float__shim {
  position: absolute;
  inset: 1.5rem -.75rem -.75rem 1.5rem;
  border-radius: 12px;
  background: linear-gradient(160deg, rgba(218,165,32,.30), rgba(218,165,32,.05));
  transform: translateZ(-40px);
  z-index: -1;
  filter: blur(.5px);
}

/* ---------------------------------------------------------------------------
   Claim check in three dimensions
   --------------------------------------------------------------------------- */

.stub { perspective: 90rem; }

.stub__card {
  position: relative;
  background: linear-gradient(155deg, #ffffff 0%, #fbf9f2 55%, #f4efe0 100%);
  border-radius: 12px;
  padding: clamp(1.5rem, 1rem + 2vw, 2.5rem);
  transform-style: preserve-3d;
  box-shadow:
    0 2px 3px rgba(0,0,0,.12),
    0 12px 26px rgba(0,0,0,.20),
    0 34px 64px rgba(0,0,0,.34);
  transition: transform .4s cubic-bezier(.22,.61,.36,1);
  overflow: hidden;
  will-change: transform;
}
.stub__card::before {
  content: "";
  position: absolute; inset: 0 0 auto 0; height: 6px;
  background: repeating-linear-gradient(90deg, var(--gold) 0 16px, transparent 16px 30px);
}
/* A single slow pass of light across the stub, like tilting a card to the sun */
.stub__card::after {
  content: "";
  position: absolute; top: 0; bottom: 0; width: 45%;
  left: -60%;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,.85), transparent);
  transform: skewX(-18deg);
  animation: stub-shine 6.5s ease-in-out 1.2s infinite;
  pointer-events: none;
}
@keyframes stub-shine {
  0%, 62%, 100% { left: -60%; }
  86%           { left: 130%; }
}

.stub__label {
  font-size: .69rem; font-weight: 600; letter-spacing: .3em;
  text-transform: uppercase; color: var(--ink-soft); margin-bottom: .88rem;
}
.stub__code {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-weight: 700;
  font-size: clamp(1.5rem, .9rem + 3.6vw, 2.75rem);
  letter-spacing: .04em;
  line-height: 1.2;
  color: var(--navy);
  overflow-wrap: anywhere;
  /* Lifted off the card face rather than printed flat on it. */
  transform: translateZ(28px);
  text-shadow: 0 1px 0 rgba(255,255,255,.9), 0 2px 6px rgba(15,18,58,.18);
}
.stub__perf {
  position: relative;
  margin: 1.5rem clamp(-2.5rem, -1rem - 2vw, -1.5rem) 1.25rem;
  border-top: 2px dashed #d5d0c0;
}
.stub__perf::before,
.stub__perf::after {
  content: "";
  position: absolute; top: -11px;
  width: 20px; height: 20px; border-radius: 50%;
  background: var(--navy);
  box-shadow: inset 0 2px 4px rgba(0,0,0,.45);
}
.stub__perf::before { left: -10px; }
.stub__perf::after  { right: -10px; }

.stub__why { font-size: .84rem; color: var(--ink-soft); position: relative; z-index: 1; }
.stub__why strong { color: var(--ink); font-weight: 600; }

/* ---------------------------------------------------------------------------
   Journey - the tracking rail with depth
   --------------------------------------------------------------------------- */

.journey { position: relative; margin: 2rem 0 .5rem; }
.journey__line {
  position: absolute; left: 0; right: 0; top: 11px; height: 2px;
  background: rgba(255,255,255,.14);
  border-radius: 2px;
}
.journey__fill {
  position: absolute; left: 0; top: 11px; height: 2px;
  background: linear-gradient(90deg, var(--gold-deep), var(--gold));
  border-radius: 2px;
  box-shadow: 0 0 14px rgba(218,165,32,.7);
  width: 0;
  transition: width 1.1s cubic-bezier(.22,.61,.36,1) .25s;
}
.journey__row { position: relative; display: flex; }
.journey__step { flex: 1; text-align: center; min-width: 0; }
.journey__node {
  width: 24px; height: 24px; border-radius: 50%;
  margin: 0 auto .69rem;
  background: #232752;
  border: 2px solid rgba(255,255,255,.18);
  display: grid; place-items: center;
  position: relative;
  transition: transform .4s cubic-bezier(.34,1.56,.64,1), background .4s ease, border-color .4s ease;
}
.journey__node span {
  width: 7px; height: 7px; border-radius: 50%;
  background: rgba(255,255,255,.3);
  transition: background .4s ease;
}
.journey__step.is-done .journey__node {
  background: var(--gold); border-color: var(--gold);
}
.journey__step.is-done .journey__node span { background: var(--navy); }
.journey__step.is-current .journey__node {
  background: var(--white); border-color: var(--gold);
  transform: scale(1.32);
  box-shadow: 0 0 0 6px rgba(218,165,32,.22), 0 0 22px rgba(218,165,32,.6);
}
.journey__step.is-current .journey__node span {
  background: var(--gold);
  animation: pulse-node 2s ease-out infinite;
}
@keyframes pulse-node {
  0%,100% { opacity: 1; }
  50%     { opacity: .35; }
}
.journey__name {
  font-size: clamp(.59rem, .5rem + .35vw, .72rem);
  letter-spacing: .07em; text-transform: uppercase;
  font-weight: 600; color: #8a90b4;
  padding: 0 3px;
  overflow-wrap: break-word;
}
.journey__step.is-done .journey__name { color: #b9bfd8; }
.journey__step.is-current .journey__name { color: var(--gold); }

/* The login panel hosts its own, smaller version of the scene. */
.login__side { position: relative; overflow: hidden; }
.login__side .orbits { perspective: 40rem; }

/* Glass panel for content sitting directly on the navy */
.glass {
  background: rgba(255,255,255,.045);
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 12px;
  padding: clamp(1.25rem, 1rem + 1.2vw, 1.88rem);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 18px 44px rgba(0,0,0,.24);
}
.glass h2 { color: var(--white); font-size: var(--t-h2); margin-bottom: .5rem; }
.glass p  { color: #b8bdd6; }
.glass__quote {
  background: rgba(0,0,0,.20);
  border-left: 3px solid var(--gold);
  border-radius: 0 8px 8px 0;
  padding: 1rem 1.19rem;
  color: #dcdfee; font-size: .94rem;
  white-space: pre-wrap; overflow-wrap: break-word;
  line-height: 1.62;
}

.reply-card {
  background: rgba(218,165,32,.09);
  border: 1px solid rgba(218,165,32,.22);
  border-radius: 10px;
  padding: .94rem 1.13rem;
}
.reply-card__meta {
  font-size: .69rem; letter-spacing: .12em; text-transform: uppercase;
  color: var(--gold); font-weight: 600; margin-bottom: .44rem;
}
.reply-card p { color: #dcdfee; font-size: .91rem; white-space: pre-wrap; }

/* ---------------------------------------------------------------------------
   Scroll reveal
   --------------------------------------------------------------------------- */

.rise {
  opacity: 0;
  transform: translate3d(0, 22px, 0);
  transition: opacity .7s cubic-bezier(.22,.61,.36,1), transform .7s cubic-bezier(.22,.61,.36,1);
}
.rise.is-in { opacity: 1; transform: none; }
.rise--1 { transition-delay: .08s; }
.rise--2 { transition-delay: .16s; }
.rise--3 { transition-delay: .24s; }
.rise--4 { transition-delay: .32s; }

/* Fallback: if the observer never runs, nothing should stay invisible. */
.no-js .rise { opacity: 1; transform: none; }

/* ---------------------------------------------------------------------------
   Responsive
   --------------------------------------------------------------------------- */

@media (max-width: 1080px) {
  .stage__body { grid-template-columns: 1fr; gap: 2.25rem; }
  .pitch { max-width: 42rem; }
  .orbit--a { width: 22rem; height: 22rem; }
  .orbit--b { display: none; }
}

@media (max-width: 640px) {
  .stage__grid { height: 40%; opacity: .35; }
  .orbit--a { width: 17rem; height: 17rem; top: -4rem; right: -5rem; }
  .orbit--c { width: 24rem; height: 24rem; bottom: -11rem; left: -8rem; }
  .mote { display: none; }
  .float__shim { display: none; }
  .stage__foot { flex-direction: column; gap: .38rem; }
  .journey__name { font-size: .56rem; letter-spacing: .02em; }
  .journey__node { width: 20px; height: 20px; }
  .journey__line, .journey__fill { top: 9px; }
}

/* Tilt only where there is a real pointer. Touch devices skip it entirely. */
@media (hover: none), (pointer: coarse) {
  .float__card, .stub__card { transform: none !important; }
  .float__card::after { display: none; }
}

/* ---------------------------------------------------------------------------
   Motion off
   Decoration is not worth making somebody unwell. Everything still reads.
   --------------------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  .stage__field,
  .orbit,
  .mote,
  .pitch h1 .lit,
  .pitch__kicker .dot,
  .stub__card::after,
  .journey__step.is-current .journey__node span {
    animation: none !important;
  }
  .pitch h1 .lit {
    -webkit-text-fill-color: var(--gold);
    background: none;
  }
  .mote { display: none; }
  .float__card, .stub__card { transition: none; }
  .journey__fill { transition: none; }
  .rise { opacity: 1; transform: none; transition: none; }
}

@media print {
  .stage { background: #fff; }
  .stage__field, .stage__grid, .orbits, .mote { display: none; }
  .stub__card::after { display: none; }
  .stub__perf::before, .stub__perf::after { background: #fff; }
}
