/*
 * vxmodules.com — holding page.
 *
 * Graphite & Ember, dark only. Not a preference-driven dark mode: the mark is
 * a lit isometric object and the whole page is composed around that, so a
 * light variant would be a worse page rather than the same page inverted. The
 * light cut of the mark lives in brand/mark-light.svg for use elsewhere.
 *
 * Ember is the one warm accent in an otherwise cool family — Voxel Toolkit
 * holds #2B4ACB, VX Points holds #0F766E, Code Wattz is navy #1D307C. That is
 * the whole reason for the hue: two products cannot share one accent and still
 * read as two products.
 */

:root {
  --bg:        #0E1116;
  --bg-lift:   #161A22;
  --ink:       #F6F7FA;
  --body:      #98A1B2;
  --muted:     #7D8595;
  --line:      #242935;
  --line-soft: #1A1E27;
  --field:     #232936;

  --accent:    #EA6A0A;
  --accent-hi: #FB923C;
  --accent-lo: #B4490A;
  --on-accent: #120C06;

  --wire:      #454E63;
  --ok:        #4ADE80;
  --bad:       #FF9086;

  --sans:    'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --display: 'Space Grotesk', var(--sans);
  --mono:    'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
}

* { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  /* `clip`, not `hidden`: the ember glow is deliberately wider than the mark
     column, and this keeps it from widening the document. */
  overflow-x: clip;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--body);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* --------------------------------------------------------------------------
   Isometric field
   Ruled at 26.565° — atan(1/2), the same projection the mark is drawn in, so
   the background is literally the grid the logo sits on. Gradient angles are
   the line angles plus 90°.
   -------------------------------------------------------------------------- */

.field {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    repeating-linear-gradient(116.565deg, transparent 0 43px, var(--field) 43px 44px),
    repeating-linear-gradient(63.435deg,  transparent 0 43px, var(--field) 43px 44px);
  -webkit-mask-image: radial-gradient(115% 90% at 68% 34%, #000 0%, transparent 72%);
          mask-image: radial-gradient(115% 90% at 68% 34%, #000 0%, transparent 72%);
  animation: vxFade 1.6s ease-out backwards;
}

/* --------------------------------------------------------------------------
   Layout
   -------------------------------------------------------------------------- */

.wrap {
  position: relative;
  z-index: 1;
  flex: 1;
  width: 100%;
  max-width: 1060px;
  margin: 0 auto;
  padding: 9vh 26px 52px;
  display: grid;
  /* minmax(0,…) not `auto`: an auto track sizes to max-content, which lets
     .lede-col inflate to its max-width and push the page sideways. */
  grid-template-columns: minmax(0, 1fr);
  gap: 40px;
  align-content: center;
}

@media (min-width: 940px) {
  .wrap {
    grid-template-columns: minmax(0, 1fr) 336px;
    gap: 76px;
    align-items: center;
    padding-top: 9vh;
  }
}

.lede-col {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-width: 0;
  max-width: 34rem;
}

/* Above the copy on small screens — the mark is the hero, not an ornament. */
.mark-col {
  position: relative;
  order: -1;
  display: flex;
  justify-content: flex-start;
}
@media (min-width: 940px) {
  .mark-col { order: 0; justify-content: center; }
}

/* Ember light source. It sits behind the mark and tracks it at every
   breakpoint, which is what earns the warm top face on the cubes. */
.mark-col::before {
  content: '';
  position: absolute;
  z-index: -1;
  left: 50%;
  top: 50%;
  width: 148%;
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(234, 106, 10, .20), rgba(234, 106, 10, .05) 42%, transparent 68%);
  animation: vxFade 1.9s ease-out 1.7s backwards;
}

.mark {
  display: block;
  width: 172px;
  height: auto;
  overflow: visible;
  animation: vxFloat 10s ease-in-out 3.4s infinite;
}
@media (min-width: 600px) { .mark { width: 216px; } }
@media (min-width: 940px) { .mark { width: 100%; } }

/* --------------------------------------------------------------------------
   The mark
   -------------------------------------------------------------------------- */

.face-t { fill: var(--accent-hi); }
.face-l { fill: var(--accent); }
.face-r { fill: var(--accent-lo); }

.frame {
  fill: none;
  stroke: var(--wire);
  stroke-width: 5;
  stroke-linejoin: round;
}

/* pathLength="100" normalises every edge loop, so one dash length draws all
   three faces at the same rate regardless of their real perimeter. */
.edge {
  stroke-dasharray: 100;
  animation: vxDraw 1.45s cubic-bezier(.33, .8, .35, 1) backwards;
}
.e1 { animation-delay: .25s; }
.e2 { animation-delay: .58s; }
.e3 { animation-delay: .9s; }

/* Gentler overshoot than the short version had — over a full second a springy
   curve reads as wobble rather than weight. */
.module { animation: vxDrop 1.05s cubic-bezier(.25, 1.08, .35, 1) backwards; }
.m1 { animation-delay: 1.6s; }
.m2 { animation-delay: 2s; }

/* Eight slots, two filled. Hovering seats a third in the front one — the
   frame has room, which is the point of choosing this mark. */
.m3 {
  opacity: 0;
  transform: translateY(-26px);
  animation: none;
  transition: opacity .4s ease, transform .55s cubic-bezier(.22, 1.18, .36, 1);
}
@media (hover: hover) {
  .mark:hover .m3 { opacity: 1; transform: translateY(0); }
}

/* --------------------------------------------------------------------------
   Type
   -------------------------------------------------------------------------- */

.eyebrow {
  margin: 0 0 16px;
  font-family: var(--mono);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: .24em;
  text-transform: uppercase;
  color: var(--accent-hi);
}

h1 {
  margin: 0 0 22px;
  font-family: var(--display);
  font-size: clamp(46px, 8.4vw, 76px);
  line-height: 1;
  letter-spacing: -.038em;
  font-weight: 700;
  color: var(--ink);
  text-wrap: balance;
}

.lede {
  margin: 0 0 16px;
  font-size: clamp(17px, 2.2vw, 19px);
  line-height: 1.55;
  color: var(--ink);
  text-wrap: pretty;
}
.lede strong { font-weight: 600; }

.body {
  margin: 0 0 38px;
  font-size: 15.5px;
  color: var(--body);
  text-wrap: pretty;
}

/* --------------------------------------------------------------------------
   Waitlist form
   -------------------------------------------------------------------------- */

.signup { width: 100%; margin: 0 0 30px; }

.signup-label {
  margin: 0 0 12px;
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
}

.fields { display: flex; flex-wrap: wrap; gap: 10px; }

.fields input {
  flex: 1 1 175px;
  min-width: 0;
  padding: 13px 15px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--bg-lift);
  color: var(--ink);
  font: inherit;
  font-size: 15px;
}
.fields input::placeholder { color: var(--muted); }
.fields input:hover { border-color: #2F3542; }
.fields input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(234, 106, 10, .22);
}

.fields button {
  flex: 0 0 auto;
  padding: 13px 24px;
  border: 0;
  border-radius: 9px;
  background: var(--accent);
  color: var(--on-accent);
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background .18s ease;
}
.fields button:hover:not(:disabled) { background: var(--accent-hi); }
.fields button:disabled { opacity: .55; cursor: default; }

@media (max-width: 560px) {
  .fields button { flex: 1 1 100%; }
}

/* Off-screen rather than display:none — some bots skip hidden inputs. */
.hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.note { margin: 12px 0 0; font-size: 14px; min-height: 1em; }
.note.is-ok  { color: var(--ok); }
.note.is-bad { color: var(--bad); }

.fineprint { margin: 10px 0 0; font-size: 13px; color: var(--muted); }

/* --------------------------------------------------------------------------
   Secondary action
   Quiet on purpose. One ember button per page, and it belongs to the form.
   -------------------------------------------------------------------------- */

.cta { display: flex; flex-wrap: wrap; gap: 14px 22px; }

.btn-ghost {
  display: inline-block;
  padding: 12px 22px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: transparent;
  color: var(--ink);
  font-weight: 500;
  font-size: 15px;
  text-decoration: none;
  transition: border-color .18s ease, background .18s ease;
}
.btn-ghost:hover { border-color: var(--wire); background: var(--bg-lift); }

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */

.foot {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  width: 100%;
  max-width: 1060px;
  margin: 0 auto;
  padding: 22px 26px 40px;
  border-top: 1px solid var(--line-soft);
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
}
.foot a { color: var(--body); text-decoration: none; border-bottom: 1px solid var(--line); }
.foot a:hover { color: var(--accent-hi); border-bottom-color: var(--accent-lo); }

:focus-visible {
  outline: 2px solid var(--accent-hi);
  outline-offset: 3px;
  border-radius: 5px;
}

/* --------------------------------------------------------------------------
   Load sequence
   The frame draws itself, then the modules drop in. Every animated element
   rests at its final state in plain CSS and uses `backwards` fill, so if
   animation never runs the page is simply already assembled.
   -------------------------------------------------------------------------- */

@keyframes vxDraw {
  from { stroke-dashoffset: 100; }
  to   { stroke-dashoffset: 0; }
}

@keyframes vxDrop {
  from { opacity: 0; transform: translateY(-40px); }
  50%  { opacity: 1; }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes vxRise {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: none; }
}

@keyframes vxFade {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes vxFloat {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-7px); }
}

.rise { animation: vxRise .62s cubic-bezier(.2, .7, .3, 1) backwards; }
.eyebrow.rise { animation-delay: .30s; }
h1.rise        { animation-delay: .38s; }
.lede.rise     { animation-delay: .48s; }
.body.rise     { animation-delay: .56s; }
.signup.rise   { animation-delay: .64s; }
.cta.rise      { animation-delay: .74s; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-delay: 0ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}
