/* ==========================================================================
   MyFloBoard, the way in.

   The parallax is sticky scenes rather than scroll-jacking. Each section is
   several viewports tall and holds one full-height panel pinned to the top of
   it; as the section passes, its layers are translated at different rates. The
   depth reads the same as a hijacked scroll and the page still scrolls the way
   every other page does, so a keyboard, a scrollbar drag and Find in page all
   keep working. That last part is not a small thing to give up for an effect.
   ========================================================================== */

:root {
  --ink-900: #0f1420;
  --ink-850: #121927;
  --ink-800: #151d2b;
  --ink-700: #1b2434;
  --ink-600: #222d40;
  --rule: #263149;
  --rule-strong: #3a4761;

  --text: #e7eaf1;
  --text-dim: #94a1b9;
  --text-faint: #64728d;

  /*
   * The landing page runs its own palette, and the one thing it does not use
   * is the app's amber. Violet against the same navy reads cooler and lets
   * cyan do the second light source, which amber never could without the two
   * fighting. The app is unchanged: its amber means "now", and that meaning
   * only holds because it appears nowhere else.
   *
   * --accent on --ink-900 measures 5.45:1, so it is legible as text and not
   * only as decoration. Ink on the accent rather than white, at 5.88:1, for
   * the same reason.
   */
  --accent: #8a7cff;
  --accent-soft: #a99cff;
  --accent-2: #45d4e0;
  --on-accent: #0b1020;

  --t-update: #6aa9ff;
  --t-client: #ff8f6b;
  --t-blocker: #ff6b6b;
  --t-demo: #4fd1c5;
  --ok: #4ade80;

  --font-mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
  --font-sans: "Avenir Next", Avenir, system-ui, -apple-system, "Segoe UI", sans-serif;

  color-scheme: dark;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--ink-900);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: inherit; }

.skip {
  position: absolute; left: -9999px; top: 0; z-index: 200;
  background: var(--accent); color: var(--on-accent);
  padding: 10px 16px; border-radius: 0 0 8px 0; font-weight: 600;
}
.skip:focus { left: 0; }

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

/* --- the bar ---------------------------------------------------------- */

.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px;
  padding: 18px clamp(16px, 4vw, 44px);
  transition: background .25s, border-color .25s, padding .25s;
  border-bottom: 1px solid transparent;
}
.nav.stuck {
  background: rgba(15, 20, 32, .82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom-color: var(--rule);
  padding-top: 12px; padding-bottom: 12px;
}

.mark {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-mono);
  font-size: 14px; letter-spacing: .16em; text-transform: uppercase;
  text-decoration: none; white-space: nowrap;
}
.mark b { color: var(--accent); font-weight: 700; }
.mark-dot {
  width: 9px; height: 9px; border-radius: 2px; background: var(--accent);
  box-shadow: 0 0 0 4px rgba(138, 124, 255, .18);
}

.nav-links { display: flex; align-items: center; gap: 10px; }

/* --- buttons ---------------------------------------------------------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 10px 18px;
  border-radius: 8px;
  border: 1px solid transparent;
  font-size: 15px; font-weight: 600;
  text-decoration: none; white-space: nowrap;
  transition: transform .14s, background .18s, border-color .18s;
}
.btn:hover { transform: translateY(-1px); }
.btn-solid { background: var(--accent); color: var(--on-accent); }
.btn-solid:hover { background: var(--accent-soft); }
.btn-quiet { color: var(--text-dim); }
.btn-quiet:hover { color: var(--text); background: var(--ink-700); }
.btn-ghost { border-color: var(--rule-strong); color: var(--text); }
.btn-ghost:hover { border-color: var(--text-dim); background: rgba(255, 255, 255, .04); }
.btn-lg { padding: 15px 30px; font-size: 16.5px; border-radius: 10px; }

/* --- scenes ----------------------------------------------------------- */

/*
 * Each scene is three viewports of scroll holding one pinned screen. The extra
 * height is the runway the layers travel along; without it there is nothing
 * for the parallax to happen over.
 */
.scene { position: relative; height: 260vh; }
.scene-feature { height: 200vh; }
.scene-cta { height: 150vh; }

.sticky {
  position: sticky; top: 0;
  height: 100vh; min-height: 560px;
  overflow: hidden;
  display: flex; align-items: center; justify-content: center;
}

.layer { will-change: transform; }

/* --- typography ------------------------------------------------------- */

.eyebrow {
  margin: 0 0 18px;
  font-family: var(--font-mono);
  font-size: 11.5px; letter-spacing: .22em; text-transform: uppercase;
  color: var(--text-faint);
}
.eyebrow.amber { color: var(--accent); }

h1 {
  margin: 0;
  font-size: clamp(38px, 6.4vw, 84px);
  line-height: 1.04;
  letter-spacing: -.035em;
  font-weight: 600;
}
h1 em { font-style: normal; color: var(--accent); }

h2 {
  margin: 0;
  font-size: clamp(38px, 7vw, 92px);
  line-height: 1.02;
  letter-spacing: -.04em;
  font-weight: 700;
}

h3 {
  margin: 0 0 16px;
  font-size: clamp(26px, 3.4vw, 44px);
  line-height: 1.12;
  letter-spacing: -.025em;
  font-weight: 600;
}

.lede {
  margin: 26px 0 0;
  max-width: 46ch;
  font-size: clamp(16px, 1.5vw, 19px);
  line-height: 1.65;
  color: var(--text-dim);
}
.lede.wide { max-width: 58ch; }

.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 36px; }
.cta-row.center { justify-content: center; }

/* --- 1. hero ---------------------------------------------------------- */

.scene-hero .sticky { align-items: center; }

.grid {
  position: absolute; inset: -20% -10%;
  background-image:
    linear-gradient(var(--rule) 1px, transparent 1px),
    linear-gradient(90deg, var(--rule) 1px, transparent 1px);
  background-size: 72px 72px;
  opacity: .3;
  mask-image: radial-gradient(120% 90% at 50% 42%, #000 30%, transparent 78%);
  -webkit-mask-image: radial-gradient(120% 90% at 50% 42%, #000 30%, transparent 78%);
}

.glow {
  position: absolute; inset: 0;
  background:
    radial-gradient(760px 520px at 22% 18%, rgba(138, 124, 255, .18), transparent 62%),
    radial-gradient(720px 560px at 82% 74%, rgba(69, 212, 224, .15), transparent 64%);
}

.hero-copy {
  position: relative; z-index: 3;
  width: min(900px, 88vw);
  padding: 0 clamp(0px, 2vw, 24px);
}

/* The floating cards. Each one is a real Floboard card, reduced to its shape. */
.cards { position: absolute; inset: 0; z-index: 2; }
.float {
  position: absolute;
  width: 168px;
  padding: 12px 14px;
  background: var(--ink-800);
  border: 1px solid var(--rule);
  border-radius: 10px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, .5);
  animation: bob 7s ease-in-out infinite;
}
.float i { display: block; height: 7px; border-radius: 4px; background: var(--ink-600); margin-top: 9px; }
.float i.short { width: 58%; }
.card-a { left: 1.5%;  top: 13%; animation-delay: -1s; }
.card-b { right: 1.5%; top: 10%; animation-delay: -3s; }
.card-c { left: 3%;    bottom: 10%; animation-delay: -5s; }
.card-d { right: 2.5%; bottom: 15%; animation-delay: -2s; }

@keyframes bob {
  0%, 100% { transform: translateY(0) rotate(-1deg); }
  50%      { transform: translateY(-16px) rotate(1deg); }
}

.chip {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 9.5px; letter-spacing: .12em; text-transform: uppercase;
  padding: 2px 8px; border-radius: 20px; border: 1px solid currentColor;
}
.chip.update { color: var(--t-update); }
.chip.client { color: var(--t-client); }
.chip.blocker { color: var(--t-blocker); }
.chip.demo { color: var(--t-demo); }

.scroll-hint {
  position: absolute; right: clamp(16px, 4vw, 44px); bottom: 26px;
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  font-family: var(--font-mono); font-size: 10px; letter-spacing: .28em;
  text-transform: uppercase; color: var(--text-faint);
}
.scroll-hint span {
  width: 1px; height: 46px;
  background: linear-gradient(var(--accent), transparent);
  animation: drop 2.1s ease-in-out infinite;
}
@keyframes drop { 0%, 100% { opacity: .25; transform: scaleY(.55); transform-origin: top; } 50% { opacity: 1; transform: scaleY(1); } }

/* --- 2. free ---------------------------------------------------------- */

.scene-free .sticky { background: var(--ink-900); }

/* The word itself, enormous, behind everything, moving slowest. */
.free-back {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  pointer-events: none;
}
.free-back span {
  font-size: clamp(180px, 38vw, 560px);
  font-weight: 800; letter-spacing: -.05em; line-height: 1;
  color: transparent;
  -webkit-text-stroke: 2px rgba(138, 124, 255, .16);
}

.free-mid {
  position: absolute; inset: 0;
  background: radial-gradient(900px 620px at 50% 50%, rgba(138, 124, 255, .14), transparent 66%);
}

.free-copy { position: relative; z-index: 3; text-align: center; width: min(980px, 92vw); }
.free-copy h2 { color: var(--accent); }
.free-copy .lede { margin-left: auto; margin-right: auto; }

.free-list {
  list-style: none; margin: 46px 0 0; padding: 0;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr)); gap: 18px;
  text-align: left;
}
.free-list li {
  padding: 18px 20px;
  background: rgba(255, 255, 255, .035);
  border: 1px solid var(--rule);
  border-radius: 12px;
}
.free-list b { display: block; font-size: 16px; }
.free-list span { display: block; margin-top: 4px; font-size: 13.5px; color: var(--text-faint); }

/* --- 3. features ------------------------------------------------------ */

.scene-feature.alt .sticky { background: var(--ink-850); }

.feature {
  display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 6vw, 84px);
  align-items: center;
  width: min(1180px, 92vw);
}
.feature.reverse .feature-copy { order: 2; }
.feature-copy p { margin: 0; color: var(--text-dim); font-size: clamp(15px, 1.4vw, 18px); max-width: 46ch; }

.mock {
  border: 1px solid var(--rule);
  border-radius: 16px;
  background: var(--ink-800);
  box-shadow: 0 40px 90px rgba(0, 0, 0, .55);
  padding: 18px;
}

.board-mock { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.board-mock .col { background: var(--ink-850); border: 1px solid var(--rule); border-radius: 10px; padding: 10px; }
.board-mock header {
  display: flex; justify-content: space-between; align-items: center;
  font-family: var(--font-mono); font-size: 9px; letter-spacing: .12em;
  text-transform: uppercase; color: var(--text-faint); margin-bottom: 10px;
}
.board-mock header i { font-style: normal; }
.board-mock .c { height: 34px; border-radius: 7px; background: var(--ink-700); margin-bottom: 8px; border-left: 3px solid var(--rule-strong); }
.board-mock .c.hot { border-left-color: var(--accent); }
.board-mock .c.warn { border-left-color: var(--t-blocker); }
.board-mock .c.ok { border-left-color: var(--ok); opacity: .55; }
.board-mock .done { background: linear-gradient(180deg, rgba(74, 222, 128, .07), transparent 70%), var(--ink-850); }

.canvas-mock {
  position: relative; height: 260px;
  background-image: radial-gradient(circle, var(--rule) 1px, transparent 1px);
  background-size: 22px 22px;
  background-color: var(--ink-850);
}
.canvas-mock svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.canvas-mock .node {
  position: absolute;
  padding: 12px 16px;
  border: 1px solid var(--rule-strong);
  border-radius: 8px;
  background: var(--ink-800);
  font-size: 13px; font-weight: 500;
}
.canvas-mock .node.amber { border-color: var(--accent); color: var(--accent); }
.canvas-mock .n1 { left: 6%;  top: 20%; }
.canvas-mock .n2 { left: 42%; top: 46%; }
.canvas-mock .n3 { right: 6%; bottom: 16%; }

.deck-mock { background: var(--ink-900); padding: 28px; }
.deck-mock .k { margin: 0 0 18px; font-family: var(--font-mono); font-size: 11px; letter-spacing: .24em; color: var(--accent); }
.deck-mock h4 { margin: 0; font-size: 21px; font-weight: 500; letter-spacing: -.015em; }
.deck-mock .m { margin: 4px 0 22px; font-family: var(--font-mono); font-size: 12px; color: var(--text-faint); }
.deck-mock .bar { height: 3px; background: var(--ink-700); border-radius: 3px; overflow: hidden; margin-top: 8px; }
.deck-mock .bar span { display: block; width: 36%; height: 100%; background: var(--ok); }

/* --- 4. import -------------------------------------------------------- */

.scene-import .sticky { background: var(--ink-850); }
.import-back {
  position: absolute; inset: 0;
  background:
    radial-gradient(700px 480px at 78% 30%, rgba(69, 212, 224, .14), transparent 62%),
    radial-gradient(620px 460px at 18% 76%, rgba(69, 212, 224, .12), transparent 64%);
}
.import-copy { position: relative; z-index: 2; width: min(1000px, 92vw); }

.pills { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 32px; }
.pills span {
  font-family: var(--font-mono); font-size: 12px;
  padding: 8px 14px; border-radius: 20px;
  border: 1px solid var(--rule-strong); color: var(--text-dim);
}

/* --- 5. call to action ------------------------------------------------ */

.scene-cta .sticky { background: var(--ink-900); }
.cta-glow {
  position: absolute; inset: 0;
  background: radial-gradient(820px 560px at 50% 58%, rgba(138, 124, 255, .20), transparent 66%);
}
.cta-copy { position: relative; z-index: 2; text-align: center; width: min(860px, 92vw); }
.cta-copy .lede { margin-left: auto; margin-right: auto; }

/* --- footer ----------------------------------------------------------- */

.foot {
  border-top: 1px solid var(--rule);
  background: var(--ink-850);
  padding: clamp(40px, 7vw, 72px) clamp(16px, 4vw, 44px);
}
.foot-inner {
  max-width: 1180px; margin: 0 auto;
  display: flex; flex-direction: column; align-items: center; gap: 14px; text-align: center;
}
.made { margin: 0; font-size: 15.5px; color: var(--text-dim); }
.made a { color: var(--text); font-weight: 600; text-decoration: none; border-bottom: 1px solid var(--accent); }
.made a:hover { color: var(--accent); }
.heart { color: var(--t-blocker); font-style: normal; }

.foot-links { margin: 0; display: flex; align-items: center; gap: 12px; font-family: var(--font-mono); font-size: 13px; }
.foot-links a { color: var(--text-dim); text-decoration: none; }
.foot-links a:hover { color: var(--accent); }
.foot-links span { color: var(--text-faint); }

/* --- narrow ----------------------------------------------------------- */

@media (max-width: 900px) {
  /* Sticky is off below here, so clipping at the scene is safe. It would not
     be above: `overflow: hidden` makes an ancestor a scroll container, and a
     sticky child of one has nothing left to stick to. Without it the
     full-bleed decorative layers escape and push the page sideways. */
  .scene, .scene-feature, .scene-cta { height: auto; overflow: hidden; }
  .sticky { position: static; height: auto; min-height: 0; padding: clamp(70px, 14vw, 120px) 0; }
  .feature { grid-template-columns: 1fr; }
  .feature.reverse .feature-copy { order: 0; }
  .hero-copy, .free-copy, .import-copy, .safe-copy, .cta-copy { padding-left: 20px; padding-right: 20px; }
  .cards, .scroll-hint { display: none; }
  .free-back span { -webkit-text-stroke-width: 1px; }
  .board-mock { grid-template-columns: repeat(2, 1fr); }
}

/*
 * The whole effect is decoration. Nothing here carries meaning that the words
 * do not, so when somebody has asked for less movement they get a plain page.
 */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .layer { transform: none !important; will-change: auto; }
  .float, .scroll-hint span { animation: none; }
  *, *::before, *::after { transition-duration: .001ms !important; }
}

/* A short window cannot hold four floating cards and a headline at once. */
@media (max-height: 720px) {
  .cards, .scroll-hint { display: none; }
}
