/* ============================================================
   REFINE — loads last, wins.
   Three corrections:
     1. no pills. soft rounded rectangles instead of capsules.
     2. one alignment column. every section edge lines up.
     3. an authored motion system, not scattered fade-ins.
   ============================================================

   @author Thomas G. and Sophia, SOPHIA XT LLC (sophiaxt.com)
   @sophia-mark sx1 df5ae605af70 b2c71189cf09 tDSpU31GOWD-yfKAh98938dVQPZDxhfcm4GcXw0NfGUY2rBlqCDcPACC1-hCqPXk0vcJx7Ru8A9tE-nYqv9lCw
 */

/* ------------------------------------------------------------
   1 · DE-PILL
   Capsules read as toy UI at this scale. Everything moves to a
   consistent soft rectangle: 14px on controls, 22px on cards.
   ------------------------------------------------------------ */
:root {
  --r-ctl:  14px;
  --r-card: 22px;
  --r-big:  28px;
}

.btn,
.tag, .chip, .stamp,
.srch, .srch__i, .sel, .finp,
.seg, .seg__btn,
.hdr__link, .hdr__in,
.marq,
.loc__st, .fin__n, .step__n,
.crmbox__tag, .crmbox__p code,
.hero__flag, .rail__count {
  border-radius: var(--r-ctl) !important;
}

.fact, .duo__c, .ccard, .fin, .step, .loc,
.pcard, .cfg, .qsum, .cfg__done, .crmbox,
.pricenote, .artw__c, .mnav, .qbar, .note, .cat__rail {
  border-radius: var(--r-card) !important;
}

.cta, .sect--alt, .ftr { border-radius: var(--r-big) !important; }
.ftr { border-radius: var(--r-big) var(--r-big) 0 0 !important; }

/* the header is a bar again, not a lozenge */
.hdr__in { border-radius: var(--r-ctl) !important; }
.hdr__link { padding: 10px 14px; }

/* round number badges stay round — a circle is not a pill */
.fin__n, .step__n { border-radius: 50% !important; }

/* ------------------------------------------------------------
   2 · ALIGNMENT
   Everything was drifting because bands were inset by a gutter
   while plain sections were not, so no two left edges matched.
   Bands are full-bleed now and all content sits in one column.
   ------------------------------------------------------------ */
.sect--alt, .cta {
  margin-inline: 0 !important;
  border-radius: 0 !important;
}
.sect--alt { background: var(--c-wash-grey); }
.cta {
  margin-top: var(--s-24);
  background: linear-gradient(135deg, var(--c-wash-cyan), var(--c-wash-pink));
}
.cta__in { max-width: var(--w-content); }

.marq { margin-inline: 0 !important; border-radius: 0 !important; }

/* one column, one gutter, everywhere */
.sect__in, .hero__in, .phead__in, .cta__in, .ftr__in, .ftr__bot, .facts {
  max-width: var(--w-wide);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.sect:not(.sect--wide) > .sect__in { max-width: var(--w-content); }

/* section heads share one baseline with the grid under them */
.shead { margin-bottom: var(--s-10); }
.shead__h { margin-top: var(--s-4); }

/* equal-height cards so rows do not stagger */
.cats, .fins, .steps, .locs, .duo { align-items: stretch; }
.ccard, .fin, .step, .loc, .duo__c { height: 100%; }

/* the hero art column was optically low against the copy */
@media (min-width: 1024px) {
  .hero__in { align-items: center; }
  .hero__art { margin-top: 0; }
}

/* ------------------------------------------------------------
   3 · MOTION
   One idea: everything arrives the way paint lands — it comes up
   from under, swells very slightly past its size, and settles.
   Same curve, same distance, staggered inside a section. Nothing
   on this page fades in from nowhere.
   ------------------------------------------------------------ */
.js [data-reveal] {
  opacity: 0;
  transform: translate3d(0, 26px, 0) scale(.976);
  transition:
    opacity .62s var(--ease-soft),
    transform .72s cubic-bezier(.22, 1.1, .32, 1);
  transition-delay: var(--d, 0ms);
  will-change: opacity, transform;
}
.js [data-reveal].is-in { opacity: 1; transform: none; }
/* no JS: nothing is ever hidden */
html:not(.js) [data-reveal] { opacity: 1 !important; transform: none !important; }

/* drifting colour clouds behind the hero */
@keyframes drift-a {
  0%, 100% { transform: translate3d(0,0,0) scale(1); }
  50%      { transform: translate3d(-26px, 18px, 0) scale(1.06); }
}
@keyframes drift-b {
  0%, 100% { transform: translate3d(0,0,0) scale(1); }
  50%      { transform: translate3d(22px, -16px, 0) scale(1.08); }
}
.hero::before { animation: drift-a 19s ease-in-out infinite; }
.hero::after  { animation: drift-b 23s ease-in-out infinite; }
.plate::before { animation: drift-a 26s ease-in-out infinite; }

/* cards lift and their art grows a touch */
.ccard, .pcard {
  transition: transform .42s cubic-bezier(.22,1.1,.32,1), box-shadow .42s var(--ease-soft);
}
.ccard .plate__img, .pcard .plate__img {
  transition: transform .5s cubic-bezier(.22,1.1,.32,1);
}
.ccard:hover, .pcard:hover { transform: translateY(-8px); box-shadow: var(--sh-lg); }
.ccard:hover .plate__img, .pcard:hover .plate__img { transform: scale(1.07) rotate(-1.5deg); }

/* buttons press rather than bounce */
.btn { transition: transform .22s cubic-bezier(.22,1.1,.32,1), box-shadow .22s var(--ease-soft), background-color .2s var(--ease-soft); }
.btn:hover  { transform: translateY(-3px); }
.btn:active { transform: translateY(-1px) scale(.985); }

/* the nav pip slides under the active item */
.hdr__nav { position: relative; }
.hdr__link { position: relative; }
.hdr__link::after {
  content: "";
  position: absolute; left: 14px; right: 14px; bottom: 6px;
  height: 3px; border-radius: 3px;
  background: var(--c-cyan);
  transform: scaleX(0); transform-origin: left;
  transition: transform .34s cubic-bezier(.22,1.1,.32,1);
}
.hdr__link:hover::after, .hdr__link.is-active::after { transform: scaleX(1); }
.hdr__link.is-active { background: transparent; color: var(--c-ink); font-weight: 600; }

/* the counting numbers on the fact row */
.fact__n { font-variant-numeric: tabular-nums; }

/* the tag gets a slow sheen, so the eye starts at the top of the copy */
@keyframes sheen {
  0%   { background-position: -140% 0; }
  60%  { background-position: 240% 0; }
  100% { background-position: 240% 0; }
}
.tag--cyan, .tag--pink, .tag--yellow {
  background-image: linear-gradient(100deg,
    rgba(255,255,255,0) 30%, rgba(255,255,255,.55) 46%, rgba(255,255,255,0) 62%);
  background-size: 220% 100%;
  background-repeat: no-repeat;
  animation: sheen 6.5s ease-in-out 1.4s infinite;
}

/* ------------------------------------------------------------
   REDUCED MOTION — everything above collapses to a plain state
   ------------------------------------------------------------ */
@media (prefers-reduced-motion: reduce) {
  [data-reveal] { opacity: 1 !important; transform: none !important; transition: none !important; }
  .hero::before, .hero::after, .plate::before,
  .tag--cyan, .tag--pink, .tag--yellow { animation: none !important; }
  .ccard, .pcard, .btn, .hdr__link::after,
  .ccard .plate__img, .pcard .plate__img { transition: none !important; }
  .ccard:hover, .pcard:hover, .btn:hover { transform: none !important; }
}

/* scroll parallax feeds this var from motion.js */
.hero__art img { transform: translate3d(0, var(--py, 0), 0); }
@keyframes bob { 0%,100% { transform: translate3d(0, var(--py,0), 0); } 50% { transform: translate3d(0, calc(var(--py,0px) - 12px), 0); } }

/* On a 28px-tall tag a 14px radius is half the height, which is still a
   capsule. Small elements get a radius proportional to their size. */
.tag, .chip, .stamp, .loc__st, .crmbox__tag, .rail__count, .hero__flag {
  border-radius: 9px !important;
}
.tag { padding: 9px 16px; letter-spacing: .07em; }
.stamp { padding: 7px 13px; }
.chip { padding: 6px 12px; }

/* the segmented control reads better as one rounded block with square-ish
   divisions inside it than as three separate lozenges */
.seg { border-radius: 12px !important; overflow: hidden; padding: 3px; }
.seg__btn { border-radius: 9px !important; }

/* search + select sit on the same 14px as the buttons beside them */
.srch, .srch__i, .sel, .finp { border-radius: 14px !important; }
