/*
 * Veyns: the chrome the three marketing pages share.
 *
 * Tokens, the bar, buttons and the pointer tilt. Page layout lives in enterprise.css; this file
 * holds only what every page uses. Keep it that way: unused classes ship to every visitor.
 */

:root {
  /* one accent, and the ink that goes on dark grounds */
  --vx-blue: #1272ff;
  --vx-blue-lit: #4f9dff;
  --vx-glow: rgba(18, 114, 255, .34);

  --vx-line: rgba(150, 185, 240, .14);
  --vx-line-2: rgba(150, 185, 240, .26);

  --vx-ink: #fff;
  --vx-ink-2: rgba(223, 234, 250, .78);
  --vx-ink-3: rgba(196, 214, 238, .7);

  /* motion: fast for the pointer, mid for arrival, slow for scroll-driven sequences */
  --vx-fast: 190ms;
  --vx-mid: 480ms;
  --vx-slow: 900ms;
  --vx-spring: cubic-bezier(.16, 1, .3, 1);
  --vx-ease: cubic-bezier(.4, 0, .2, 1);

  --vx-measure: 1280px;
  --vx-gutter: max(22px, 5vw, calc((100vw - var(--vx-measure)) / 2));
}

/* ----------------------------------------------------------- no arrival */

/*
 * There is no scroll reveal. Content failing to show in Chrome was reported three times and
 * survived two fixes (a gating class, then measuring arrival on real events); an effect that
 * can fail as a blank page doesn't get a third. The markup keeps data-reveal as a hook, but
 * nothing reads it and nothing is hidden.
 */

/* ------------------------------------------------------------- buttons */

.vx-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 46px;
  padding: 0 24px;
  border: 1px solid transparent;
  border-radius: 12px;
  font: 500 14.5px/1 var(--sans);
  letter-spacing: -.008em;
  white-space: nowrap;
  text-decoration: none;
  cursor: pointer;
  transition:
    background-color var(--vx-fast) var(--vx-ease),
    border-color var(--vx-fast) var(--vx-ease),
    color var(--vx-fast) var(--vx-ease),
    box-shadow var(--vx-mid) var(--vx-spring),
    transform var(--vx-fast) var(--vx-ease);
}
.vx-btn.lg { height: 52px; padding: 0 28px; font-size: 15px; }
.vx-btn:active:not(:disabled) { transform: translateY(1px); }
.vx-btn:disabled { opacity: .45; cursor: default; }

.vx-btn.solid { background: var(--en-blue, #0f62e6); color: #fff; box-shadow: 0 6px 22px -8px var(--vx-glow); }
.vx-btn.solid:hover:not(:disabled) { background: #1b6ff2; box-shadow: 0 12px 34px -10px rgba(15, 98, 230, .55); }
.vx-btn.ghost { background: transparent; border-color: rgba(255, 255, 255, .3); color: #fff; }
.vx-btn.ghost:hover:not(:disabled) { border-color: rgba(255, 255, 255, .62); background: rgba(255, 255, 255, .08); }
.vx-btn.line { background: transparent; border-color: var(--en-line-2, #ccd8e8); color: var(--en-ink, #0a1526); }
.vx-btn.line:hover:not(:disabled) { border-color: var(--en-blue, #0f62e6); color: var(--en-blue, #0f62e6); }

.vx-chev { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; transition: transform var(--vx-mid) var(--vx-spring); }
.vx-btn:hover .vx-chev { transform: translateX(3px); }
.vx-chev.down { transform: rotate(90deg); }
.vx-btn:hover .vx-chev.down { transform: rotate(90deg) translateX(3px); }

.vx-palm-link {
  display: block;
  margin-top: 20px;
  padding: 0;
  border: 0;
  background: none;
  font: 400 13.5px/1 var(--sans);
  color: rgba(204, 220, 242, .82);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
  transition: color var(--vx-fast) var(--vx-ease);
}
.vx-palm-link:hover:not(:disabled) { color: #fff; }
.vx-palm-link:disabled { opacity: .5; cursor: default; }
.vx-error { margin-top: 10px; min-height: 1.2em; font-size: 13.5px; color: #ff9b9b; }

/* ---------------------------------------------------------- navigation */

/*
 * The bar is a sibling of the page wrappers, so their custom properties don't reach it (it once
 * lost its padding that way). The measure and gutter live on :root, and the bar resets its own
 * link styling instead of relying on a page-scoped reset.
 */
.vx-nav {
  --vx-nav-h: 76px;
  --vx-nav-ink: rgba(255, 255, 255, .74);
  --vx-nav-ink-lit: #fff;
  --vx-nav-pill: rgba(255, 255, 255, .11);
  --vx-nav-pill-on: rgba(79, 157, 255, .22);

  position: sticky;
  top: 0;
  z-index: 40;
  background: transparent;
  border-bottom: 1px solid transparent;
  transition: background-color 420ms var(--vx-ease), border-color 420ms var(--vx-ease), backdrop-filter 420ms var(--vx-ease);
}
.vx-nav :where(a) { color: inherit; text-decoration: none; }

/* Once the page scrolls, the bar gets its own background. */
.vx-nav.stuck {
  --vx-nav-h: 60px;
  background: rgba(2, 8, 17, .7);
  backdrop-filter: blur(20px) saturate(150%);
  border-bottom-color: var(--vx-line);
}

.vx-nav-in {
  display: flex;
  align-items: center;
  gap: clamp(16px, 2.2vw, 38px);
  height: var(--vx-nav-h);
  padding-inline: var(--vx-gutter);
  transition: height 420ms var(--vx-ease);
}

.vx-brand { flex: none; display: flex; align-items: center; }
.vx-brand img { width: auto; height: clamp(50px, 4vw, 60px); transition: height 420ms var(--vx-ease); }
.vx-nav.stuck .vx-brand img { height: 48px; }

.vx-links { display: flex; align-items: center; gap: 2px; margin-inline: auto; min-width: 0; }
.vx-links a {
  position: relative;
  padding: 9px 14px;
  border-radius: 10px;
  font: 500 14.5px/1 var(--sans);
  letter-spacing: -.008em;
  white-space: nowrap;
  color: var(--vx-nav-ink);
  transition: color 220ms var(--vx-ease);
}
/* A pill that grows into place; an underline on every item reads as document links. */
.vx-links a::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: var(--vx-nav-pill);
  opacity: 0;
  transform: scale(.88);
  transition: opacity 300ms var(--vx-spring), transform 300ms var(--vx-spring), background-color 220ms var(--vx-ease);
}
.vx-links a:hover { color: var(--vx-nav-ink-lit); }
.vx-links a:hover::before { opacity: 1; transform: none; }
.vx-links a.on { color: var(--vx-nav-ink-lit); }
.vx-links a.on::before { opacity: 1; transform: none; background: var(--vx-nav-pill-on); }

.vx-nav-cta { display: flex; align-items: center; gap: 10px; flex: none; }
.vx-nav-cta .vx-btn { height: 40px; padding: 0 20px; font-size: 14px; }

.vx-burger { display: none; }

/*
 * An invisible mark at the top of each page; an observer on it tells the bar the page has
 * scrolled. Not a scroll handler: that runs in an animation frame, and where frames aren't
 * delivered the bar would stay transparent down a white page (white type on white).
 */
.vx-nav-sentinel {
  position: absolute;
  top: 0;
  left: 0;
  width: 1px;
  height: 30px;
  pointer-events: none;
  visibility: hidden;
}

/* ------------------------------------------------- cards that answer back */

/*
 * A small tilt towards the pointer, a lift, and a light that follows it. Past about six degrees
 * a tilt reads as an animation rather than a surface. The script adds the class only where a
 * pointer can hover, so touch screens get a flat card, not one stuck at its last tapped angle.
 */
.vx-tilt {
  transform:
    perspective(1000px)
    rotateX(calc(var(--tilt-y, 0) * -3.5deg))
    rotateY(calc(var(--tilt-x, 0) * 5deg))
    translate3d(0, var(--tilt-lift, 0), 0);
  transform-style: preserve-3d;
}
.vx-tilt:hover { --tilt-lift: -6px; }
.vx-tilt::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(
    260px circle at var(--sheen-x, 50%) var(--sheen-y, 50%),
    var(--sheen, rgba(255, 255, 255, .09)),
    transparent 62%
  );
  opacity: 0;
  transition: opacity 320ms var(--vx-ease);
  pointer-events: none;
}
.vx-tilt:hover::after { opacity: 1; }
.vx-tilt > * { position: relative; z-index: 1; }

/* ---------------------------------------------------- reduced motion */

@media (prefers-reduced-motion: reduce) {
  :is(.vx, .en) *,
  :is(.vx, .en) *::before,
  :is(.vx, .en) *::after {
    animation: none !important;
    transition-duration: 1ms !important;
  }
  .vx-tilt { transform: none; }
}

/* ----------------------------------------------- the bar on a small screen */

/* Below this width the links become a full-screen sheet with large type and targets. */
@media (max-width: 1060px) {
  .vx-burger {
    display: grid;
    align-content: center;
    gap: 5px;
    order: 3;
    width: 44px;
    height: 44px;
    padding: 0 10px;
    margin-left: auto;
    border: 1px solid var(--vx-line-2);
    border-radius: 12px;
    background: none;
    cursor: pointer;
    transition: border-color 220ms var(--vx-ease), background-color 220ms var(--vx-ease);
  }
  .vx-burger span {
    display: block;
    height: 1.5px;
    border-radius: 2px;
    background: var(--vx-nav-ink-lit);
    transition: transform 380ms var(--vx-spring), opacity 180ms var(--vx-ease);
  }
  .vx-nav.open .vx-burger span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
  .vx-nav.open .vx-burger span:nth-child(2) { opacity: 0; }
  .vx-nav.open .vx-burger span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

  .vx-nav-cta { order: 2; }
  .vx-nav-cta .vx-btn { height: 38px; padding: 0 16px; font-size: 13.5px; }
  /* Sign In is in the sheet; the bar keeps only the primary action. */
  .vx-nav-cta .vx-btn.ghost { display: none; }

  /* The sheet: fixed to the viewport, with the bar on top of it. */
  .vx-links {
    position: fixed;
    inset: 0;
    z-index: -1;
    display: grid;
    align-content: start;
    gap: 2px;
    margin: 0;
    padding: calc(var(--vx-nav-h) + 26px) var(--vx-gutter) 40px;
    background: rgba(2, 8, 17, .96);
    backdrop-filter: blur(24px) saturate(140%);
    opacity: 0;
    visibility: hidden;
    transition: opacity 320ms var(--vx-ease), visibility 320ms;
    overflow-y: auto;
    overscroll-behavior: contain;
  }
  .vx-nav.open .vx-links { opacity: 1; visibility: visible; }

  .vx-links a {
    padding: 18px 0;
    border-radius: 0;
    border-bottom: 1px solid var(--vx-line);
    font-size: clamp(22px, 6vw, 30px);
    font-weight: 600;
    letter-spacing: -.028em;
    color: #fff;
    /* staggered entry once the sheet opens */
    opacity: 0;
    transform: translateY(14px);
    transition: opacity 420ms var(--vx-spring), transform 420ms var(--vx-spring);
  }
  .vx-links a::before { content: none; }
  .vx-nav.open .vx-links a { opacity: 1; transform: none; }
  .vx-nav.open .vx-links a:nth-child(2) { transition-delay: 50ms; }
  .vx-nav.open .vx-links a:nth-child(3) { transition-delay: 100ms; }
  .vx-nav.open .vx-links a:nth-child(4) { transition-delay: 150ms; }
  .vx-nav.open .vx-links a:nth-child(5) { transition-delay: 200ms; }
  .vx-nav.open .vx-links a:nth-child(6) { transition-delay: 250ms; }
  .vx-nav.open .vx-links a:nth-child(7) { transition-delay: 300ms; }
  .vx-links a.on { color: var(--vx-blue-lit); }

  /* While the sheet is open the bar is dark on every page. */
  .vx-nav.open,
  .vx-nav.open.light.stuck { background: rgba(2, 8, 17, .96); border-bottom-color: transparent; }
  .vx-nav.open.light.stuck { --vx-nav-ink-lit: #fff; }
  .vx-nav.open.light.stuck .vx-brand img { content: url("/palm-logo-white.png?v=pg3"); }
  .vx-nav.open.light.stuck .vx-burger { border-color: var(--vx-line-2); }
  .vx-nav.open.light.stuck .vx-burger span { background: #fff; }
}

@media (max-width: 1060px) and (prefers-reduced-motion: reduce) {
  .vx-links a { opacity: 1; transform: none; }
}

/* ------------------------------------------------ the bar, floating */

/*
 * Below the hero the bar becomes a pill inset from the top and both edges, so it reads as an
 * object on the page rather than a lid clamped to the top.
 */
@media (min-width: 1061px) {
  .vx-nav.stuck {
    top: 14px;
    background: transparent;
    backdrop-filter: none;
    border-bottom-color: transparent;
  }
  .vx-nav.stuck .vx-nav-in {
    max-width: calc(var(--vx-measure) + 40px);
    margin-inline: auto;
    height: 58px;
    padding-inline: 12px 12px;
    border-radius: 18px;
    background: rgba(255, 255, 255, .86);
    backdrop-filter: blur(16px) saturate(160%);
    box-shadow: 0 1px 2px rgba(20, 20, 25, .05), 0 14px 30px -18px rgba(20, 20, 25, .32);
  }
  /* same inset as the links, so the logo doesn't touch the pill's edge */
  .vx-nav.stuck .vx-brand { padding-left: 12px; }

  /* over the hero it stays a transparent band */
  .vx-nav:not(.stuck) .vx-nav-in { background: none; box-shadow: none; }
}

/* A dark pill for the primary action. */
.vx-nav.light.stuck .vx-btn.solid {
  background: var(--en-ink, #3d3d3d);
  box-shadow: 0 1px 2px rgba(20, 20, 25, .12);
}
.vx-nav.light.stuck .vx-btn.solid:hover:not(:disabled) { background: #2b2b2b; }
