/* Homepage, in the manner of the Cayley room page: Helvetica text, soft glass cards, number fields, parallax,
   sections that melt into each other. Loads after styles.css and header.css; everything is scoped to body.hm. */

@font-face { font-family: "Rooms Helvetica"; src: local("HelveticaNeue"); font-weight: 100 900; font-style: normal; }
:root, :root[data-theme] { --font-body: "Rooms Helvetica", "Helvetica Neue", Helvetica, Arial, sans-serif; }
:root { --hm-ease: cubic-bezier(.2, .7, .2, 1); --hm-card: rgba(255, 255, 255, .86); --hm-lift: 10px 14px 36px rgba(74, 60, 140, .12), 3px 4px 12px rgba(74, 60, 140, .06); --hm-edge: rgba(45, 16, 67, .06); }
:root[data-theme="dark"] { --hm-card: rgba(40, 30, 50, .72); --hm-lift: 10px 14px 40px rgba(0, 0, 0, .42), 3px 4px 12px rgba(0, 0, 0, .25); --hm-edge: rgba(199, 178, 255, .12); }

html { background: var(--canvas); }
body.hm, :root[data-theme] body.hm { background: transparent; font-family: var(--font-body); font-synthesis-weight: none; }
.hm-membrane { position: fixed; inset: 0; z-index: 0; width: 100%; height: 100%; pointer-events: none; }
.hm > main, .hm > footer { position: relative; z-index: 1; }
.hm main { overflow-x: clip; margin-top: -74px; padding-top: 74px; }
.hm .section { border-bottom: 0; }
.hm main section[id] { scroll-margin-top: 92px; }
.hm h1, .hm h2 { text-wrap: balance; }
.hm main h2 { letter-spacing: -.03em; line-height: 1.04; }

/* ---------- buttons: glass pills, one light fill gliding between the two ---------- */
.hm main .btn { border-radius: 999px; min-height: 48px; }
.hm main .btn-ghost { border: 1px solid rgba(60, 140, 210, .30); background: rgba(174, 229, 255, .20); color: #12061a; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12); }
:root[data-theme="dark"] .hm main .btn-ghost { border-color: rgba(174, 229, 255, .34); background: rgba(174, 229, 255, .08); color: #effaff; }
.hm .cta-row { position: relative; isolation: isolate; justify-content: center; gap: 12px; padding-bottom: 0; margin-bottom: 0; }
.hm .hm-glider { position: absolute; top: 0; left: 0; z-index: 0; border-radius: 999px; pointer-events: none; border: 1px solid rgba(255, 255, 255, .6);
  background: linear-gradient(180deg, rgba(214, 242, 255, .96), rgba(143, 211, 255, .88));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .75), 0 6px 18px rgba(110, 190, 255, .30), 0 0 28px rgba(174, 229, 255, .28); }
.hm .hm-glider.is-ready { transition: transform .5s cubic-bezier(.3, .7, .2, 1), width .5s cubic-bezier(.3, .7, .2, 1); }
.hm main .cta-row.has-glider .btn { position: relative; z-index: 1; background: transparent; box-shadow: none; transform: none; border: 1px solid rgba(60, 140, 210, .30); transition: color .35s ease, border-color .35s ease, background-color .35s ease; }
.hm main .cta-row.has-glider[data-active="primary"] .btn-primary, .hm main .cta-row.has-glider[data-active="ghost"] .btn-ghost { border-color: transparent; color: #12061a; }
.hm main .cta-row.has-glider[data-active="ghost"] .btn-primary, .hm main .cta-row.has-glider[data-active="primary"] .btn-ghost { background-color: rgba(174, 229, 255, .20); }
:root[data-theme="dark"] .hm main .cta-row.has-glider[data-active="ghost"] .btn-primary, .hm main .hm-final .cta-row.has-glider[data-active="ghost"] .btn-primary, .hm main .hm-final .cta-row.has-glider[data-active="primary"] .btn-ghost { color: #effaff; background-color: rgba(174, 229, 255, .10); border-color: rgba(174, 229, 255, .34); }

/* ---------- hero ---------- */
.hm .hero { overflow: visible; padding-top: clamp(56px, 7vw, 96px); }
.hm .hero::before { display: none; }
.hm .hero h1 { font-size: clamp(37px, 5.57vw, 80px); line-height: 1; letter-spacing: -.035em; color: var(--two-tone); }
.hm-glow { display: inline-block; padding: 0 .1em .12em .06em; margin-bottom: -.12em; font-style: italic; color: transparent; -webkit-background-clip: text; background-clip: text;
  background-image: linear-gradient(95deg, #8a4fd8 0%, #b15fd9 55%, #d07ad8 100%); filter: drop-shadow(0 0 6px rgba(177, 95, 217, .10)); }
:root[data-theme="dark"] .hm-glow { background-image: linear-gradient(95deg, #c3a2ff 0%, #e0a6f2 60%, #f2b8e8 100%); }
.hm .hero .lede { max-width: 680px; margin-top: 22px; font-size: clamp(15px, 1.23vw, 17px); line-height: 1.55; letter-spacing: -.004em; }
.hm .hero .cta-row { margin-top: 28px; }
.hm .hero > .container > .cta-row::before { content: ""; position: absolute; z-index: -1; left: 50%; top: 50%; width: min(560px, 100%); height: 140px; transform: translate(-50%, -50%); background: radial-gradient(closest-side, rgba(143, 211, 255, .26), rgba(143, 211, 255, 0)); pointer-events: none; }

/* the room: one floating glass window */
.hm .rg-hero-diagram { margin-top: clamp(40px, 4.6vw, 64px); }
.hm .rg-hero-diagram .p2 { z-index: 1; perspective: 1600px; }
.hm .p2-panel { max-width: 1000px; }
.hm .p2-room { padding: clamp(18px, 2.2vw, 28px); border-radius: 36px; border: 1px solid rgba(255, 255, 255, .75); background: rgba(253, 253, 255, .90); -webkit-backdrop-filter: blur(18px) saturate(1.4); backdrop-filter: blur(18px) saturate(1.4);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .95), 0 0 0 1px rgba(45, 16, 67, .05), 0 40px 90px -20px rgba(74, 60, 140, .22), 0 12px 32px rgba(74, 60, 140, .08); }
:root[data-theme="dark"] .hm .p2-room { border-color: rgba(199, 178, 255, .16); background: rgba(30, 19, 42, .84); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .07), 0 40px 90px -20px rgba(0, 0, 0, .7); }
.hm .p2-room-brand { padding-left: 4px; }
.hm .p2-layout-chat .p2-feed { padding: 18px; border: 0; border-radius: 24px; background: linear-gradient(180deg, color-mix(in srgb, #aee5ff 16%, transparent), color-mix(in srgb, #8a4fc0 4%, transparent)); }
.hm .p2-layout.p2-layout-chat { gap: 16px; align-items: stretch; }
.hm .p2-layout-chat .p2-tile { padding: 14px 16px; border-radius: 20px; background: color-mix(in srgb, #8a4fc0 6%, transparent); }
.hm .p2-gw-parts > span { border-radius: 12px; }
.hm .p2-msg p { border-radius: 6px 18px 18px 18px; padding: 9px 14px; }
.hm .p2-msg.is-me p { border-radius: 18px 6px 18px 18px; }

/* ---------- number fields ---------- */
.hm-field { position: absolute; z-index: 0; pointer-events: none; }
.hm-field canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.hm-field .cayley-field-back { filter: blur(1.6px); }
.hm-field.is-hero { top: -70px; bottom: -50px; left: calc(50% - var(--hm-vw, 100vw) / 2); width: var(--hm-vw, 100vw); opacity: .85;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent), linear-gradient(180deg, transparent, #000 18%, #000 78%, transparent); -webkit-mask-composite: source-in;
  mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent), linear-gradient(180deg, transparent, #000 18%, #000 78%, transparent); mask-composite: intersect; }

/* ---------- customers ---------- */
.hm .section.customers { padding: clamp(72px, 8vw, 112px) 0 clamp(24px, 3vw, 40px); }

/* ---------- story ---------- */
.hm .rg-story .container { position: relative; }
.hm .rg-story h2 { font-size: clamp(33px, 4.36vw, 61px); }
.hm-drift { position: absolute; z-index: 0; height: auto; object-fit: cover; border-radius: 28px; box-shadow: 0 30px 60px -24px rgba(45, 16, 67, .38); }
.hm-drift.is-a { top: -64px; right: 84px; width: 172px; }
.hm-drift.is-b { top: 74px; right: 0; width: 116px; border-radius: 22px; }
.hm .rg-story h2, .hm .rg-story .st-tabs, .hm .rg-story .st-stage { position: relative; z-index: 1; }
.hm .rg-story .st-tabs { gap: 4px; width: fit-content; max-width: 100%; margin-top: clamp(40px, 6vw, 84px); padding: 5px; border-radius: 999px; background: var(--hm-card); border: 1px solid var(--hm-edge); box-shadow: var(--hm-lift); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }
.hm .st-tab { border: 0; z-index: 1; }
.hm .st-tab.is-on { background: linear-gradient(180deg, rgba(214, 242, 255, .96), rgba(143, 211, 255, .80)); color: #12061a; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .75), 0 6px 18px rgba(110, 190, 255, .28); }
.hm .st-tab.is-on span { background: rgba(255, 255, 255, .55); color: #4b1b6f; }
.hm .st-progress { left: 20px; right: 20px; width: auto; bottom: 4px; border-radius: 2px; background: rgba(75, 27, 111, .55); transform: scaleX(0); transform-origin: left; }
.hm .st-tab.is-run .st-progress { animation: hm-progress 7s linear forwards; }
@keyframes hm-progress { to { transform: scaleX(1); } }
.hm .st-chart, .hm .st-diagram, .hm .st-v2.is-final { border-radius: 32px; border: 1px solid var(--hm-edge); box-shadow: var(--hm-lift); }
.hm .st-charts { gap: 18px; }
.hm .st-chart { padding: 24px 24px 18px; background: var(--hm-card); }
.hm .st-chart b { display: inline-block; font-size: 40px; }
.hm .st-base i { background: none; }
.hm .st-bar { border-radius: 10px 10px 4px 4px; background: linear-gradient(180deg, color-mix(in srgb, #8a4fc0 42%, transparent), color-mix(in srgb, #8a4fc0 16%, transparent)); }
.hm .st-bar.is-now { background: linear-gradient(180deg, #8a4fd8, #4b1b6f); box-shadow: 0 8px 22px rgba(138, 79, 216, .28); }
:root[data-theme="dark"] .hm .st-bar.is-now { background: linear-gradient(180deg, #d0a6ff, #8a4fd8); }
.hm .st-diagram { background: var(--hm-card); }
.hm .st-agent, .hm .st-person { border-radius: 22px; }
.hm .st-agent { background: linear-gradient(180deg, #7a3fb0, #4b1b6f); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .22), 0 8px 18px rgba(75, 27, 111, .22); }
.hm .st-comm { border-radius: 14px; }
.hm-write { -webkit-mask: linear-gradient(90deg, #000 45%, transparent 55%) 100% 0 / 300% 100%; mask: linear-gradient(90deg, #000 45%, transparent 55%) 100% 0 / 300% 100%; }
.hm-write.is-written { animation: hm-write 1.5s cubic-bezier(.45, .05, .35, 1) forwards; }
@keyframes hm-write { to { -webkit-mask-position: 0 0; mask-position: 0 0; } }

/* ---------- industries ---------- */
.hm #industries .rg-car-head h2 { max-width: 900px; font-size: clamp(30px, 4.02vw, 56px); }
.hm .rg-photo-media { overflow: hidden; border-radius: 40px; box-shadow: 0 40px 70px -40px rgba(10, 6, 20, .55); }
.hm .rg-photo-media::after { border-radius: 40px; }
.hm .rg-ring .rg-photo img { border-radius: 0; box-shadow: none; scale: 1.16; translate: 0 var(--py, 0); }
.hm .rg-ring { margin-top: 56px; }

/* ---------- trust: Earth, moving slower than the page ---------- */
.hm #trust { padding-top: 0; }
.hm-band { position: relative; isolation: isolate; overflow: hidden; width: min(1400px, calc(100% - 32px)); margin: 0 auto; border-radius: 48px; background: #05070f; box-shadow: 0 50px 100px -40px rgba(11, 29, 74, .5); clip-path: inset(var(--clip, 0px) round 48px); }
.hm-band-bg { position: absolute; z-index: -2; left: 0; top: -14%; width: 100%; height: 128%; object-fit: cover; will-change: transform; }
.hm-band::after { content: ""; position: absolute; z-index: -1; inset: 0; background: linear-gradient(180deg, rgba(4, 6, 18, .62) 0%, rgba(4, 6, 18, .28) 46%, rgba(4, 6, 18, .66) 100%), linear-gradient(90deg, rgba(4, 6, 18, .6), rgba(4, 6, 18, 0) 60%); }
.hm-band-in { display: flex; flex-direction: column; justify-content: space-between; gap: 72px; min-height: min(780px, 92vh); padding: clamp(40px, 5vw, 72px) clamp(20px, 4vw, 56px) clamp(20px, 3vw, 40px); }
.hm .hm-band h2 { font-size: clamp(33px, 4.69vw, 66px); color: #fff; }
.hm .hm-band h2 span { color: #aee5ff; }
.hm .hm-band .tile-grid { margin: 0; gap: 12px; border: 0; border-radius: 0; background: none; overflow: visible; }
.hm .hm-band .tile { padding: 22px 20px 24px; border-radius: 28px; border: 1px solid rgba(255, 255, 255, .20); background: rgba(14, 18, 40, .46); -webkit-backdrop-filter: blur(20px) saturate(1.3); backdrop-filter: blur(20px) saturate(1.3); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .16); }
.hm .hm-band .tile h3 { font-weight: 400; font-size: 16px; color: #fff; }
.hm .hm-band .tile p { font-size: 13.5px; line-height: 1.5; color: rgba(255, 255, 255, .80); }
.hm .hm-band .tile-icon { color: #aee5ff; }

/* ---------- closing card ---------- */
.hm-closing { padding: clamp(24px, 4vw, 56px) 0 clamp(72px, 9vw, 120px); }
.hm-final { position: relative; isolation: isolate; overflow: hidden; padding: clamp(72px, 10vw, 136px) 24px; border: 1px solid rgba(174, 229, 255, .20); border-radius: 48px; text-align: center;
  background: radial-gradient(90% 130% at 50% 0%, #1f3f92 0%, #122a66 48%, #0d1d4c 100%); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08), 0 24px 60px rgba(11, 29, 74, .25), 0 0 80px rgba(70, 140, 255, .10); }
.hm-final > :not(.hm-field) { position: relative; z-index: 1; }
.hm .hm-final h2 { font-size: clamp(40px, 6.09vw, 87px); line-height: 1; color: #effaff; }
.hm-final-glow { display: inline-block; padding: 0 .1em .1em .04em; margin-bottom: -.1em; font-style: italic; color: transparent; -webkit-background-clip: text; background-clip: text; background-image: linear-gradient(95deg, #aee5ff, #c9c2ff 60%, #f2b8e8); }
.hm .hm-final .lede { margin: 18px auto 0; color: #c9d6ee; font-size: clamp(15px, 1.29vw, 17.5px); }
.hm .hm-final .cta-row { margin-top: 32px; }
.hm main .hm-final .btn-ghost { color: #effaff; background: rgba(174, 229, 255, .10); border-color: rgba(174, 229, 255, .34); }
.hm-field.is-final { inset: 0; -webkit-mask-image: linear-gradient(90deg, #000 0%, rgba(0, 0, 0, .8) 8%, rgba(0, 0, 0, .12) 18%, transparent 24%, transparent 76%, rgba(0, 0, 0, .12) 82%, rgba(0, 0, 0, .8) 92%, #000 100%); mask-image: linear-gradient(90deg, #000 0%, rgba(0, 0, 0, .8) 8%, rgba(0, 0, 0, .12) 18%, transparent 24%, transparent 76%, rgba(0, 0, 0, .12) 82%, rgba(0, 0, 0, .8) 92%, #000 100%); }
.hm-field.is-final .cayley-field-front { filter: drop-shadow(0 0 3px rgba(174, 220, 255, .75)); }

/* ---------- footer ---------- */
.hm .site-footer { border-top: 0; background: linear-gradient(90deg, transparent, var(--hairline) 30%, var(--hairline) 70%, transparent) top / 100% 1px no-repeat; }

/* ---------- motion: blocks rise in once; cards lift under the pointer ---------- */
.hm-motion .hm-rise { opacity: 0; transform: translate3d(0, 28px, 0); transition: opacity .9s var(--hm-ease) var(--d, 0s), transform .9s var(--hm-ease) var(--d, 0s); }
.hm-motion .hm-rise.is-in { opacity: 1; transform: none; }
@media (hover: hover) and (pointer: fine) {
  .hm .st-chart, .hm .hm-band .tile { transition: transform .5s var(--hm-ease), background-color .3s ease; }
  .hm .st-chart:hover, .hm .hm-band .tile:hover { transform: translateY(-4px); }
  .hm .hm-band .tile:hover { background: rgba(30, 38, 74, .55); }
}

/* ---------- tablet and phone ---------- */
@media (max-width: 1100px) {
  .hm-drift { display: none; }
  .hm .rg-story .st-tabs { margin-top: 32px; }
  .hm .hm-band .rg-five { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hm .hm-band .tile:last-child { grid-column: 1 / -1; }
}
@media (max-width: 820px) {
  .hm .rg-story .st-tabs { width: 100%; flex-direction: column; border-radius: 30px; }
  .hm .st-tab { width: 100%; }
}
@media (max-width: 640px) {
  .hm .hero { padding-top: 44px; }
  .hm .hero h1 { font-size: min(42px, 9.38vw); }
  .hm .hero .lede { margin-top: 18px; font-size: 15px; line-height: 1.5; }
  .hm .cta-row { flex-direction: column; align-items: stretch; }
  .hm main .cta-row .btn { width: 100%; min-height: 52px; }
  .hm .p2-room { border-radius: 28px; padding: 14px; }
  .hm .p2-layout-chat .p2-feed { padding: 14px 12px; border-radius: 20px; }
  .hm .p2-art { height: 84px; }
  .hm-field.is-hero { top: -120px; bottom: -120px; opacity: .6; }
  .hm .st-chart, .hm .st-diagram, .hm .st-v2.is-final { border-radius: 26px; }
  .hm .rg-photo-media, .hm .rg-photo-media::after { border-radius: 32px; }
  .hm-band { width: calc(100% - 20px); border-radius: 34px; clip-path: none; }
  .hm-band-in { min-height: 0; gap: 160px; padding: 36px 14px 14px; }
  .hm-band-bg { object-position: 78% 50%; }
  .hm .hm-band .tile { -webkit-backdrop-filter: none; backdrop-filter: none; background: rgba(12, 16, 36, .66); }
  .hm .hm-band h2 { padding-inline: 8px; font-size: min(37px, 9.2vw); }
  .hm .hm-band .rg-five { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .hm .hm-band .tile { display: grid; grid-template-columns: 1fr; padding: 16px 18px 18px 58px; border-radius: 24px; position: relative; }
  .hm .hm-band .tile h3 { margin-bottom: 4px; font-size: 15px; }
  .hm .hm-band .tile-icon { position: absolute; left: 18px; top: 17px; width: 24px; height: 24px; margin: 0; }
  .hm-closing .container { padding-inline: 10px; }
  .hm-final { padding: 84px 20px; border-radius: 34px; }
  .hm .hm-final h2 { font-size: min(55px, 13.43vw); }
  .hm-field.is-final { opacity: .5; -webkit-mask-image: linear-gradient(180deg, #000, transparent 30%, transparent 78%, #000); mask-image: linear-gradient(180deg, #000, transparent 30%, transparent 78%, #000); }
}
@media (prefers-reduced-motion: reduce) { .hm .hm-glider, .hm .st-progress { transition: none; animation: none; } }
