/* Frame Forge website: the same quiet dark glass as the app. One material (near-black
   glass with a hairline edge) over the moving space scene, a flat violet for what is chosen,
   cyan for measured values, a light main button. */
@font-face { font-family: "Instrument Sans"; src: url("/fonts/InstrumentSans-Regular.ttf") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Instrument Sans"; src: url("/fonts/InstrumentSans-Medium.ttf") format("truetype"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Instrument Sans"; src: url("/fonts/InstrumentSans-SemiBold.ttf") format("truetype"); font-weight: 600; font-display: swap; }
@font-face { font-family: "JetBrains Mono"; src: url("/fonts/JetBrainsMono-Medium.ttf") format("truetype"); font-weight: 500; font-display: swap; }

:root {
  --ink: #0b0a16;
  --glass: rgba(11, 10, 22, 0.66);
  --edge: rgba(255, 255, 255, 0.10);
  --line: rgba(255, 255, 255, 0.08);
  --t1: #eeecf6;
  --t2: #b3aec9;
  --t3: #8f8aa8;
  --accent: #b7a2ff;
  --cyan: #7fe7f5;
  --amber: #ffc56b;
  --sans: "Instrument Sans", "Segoe UI", system-ui, sans-serif;
  --mono: "JetBrains Mono", "Cascadia Mono", Consolas, monospace;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }      /* hidden means hidden, whatever display a class sets */
html { scroll-behavior: smooth; scroll-padding-top: 96px; }
body { margin: 0; background: var(--ink); color: var(--t1); font: 400 17px/1.55 var(--sans); -webkit-font-smoothing: antialiased; overflow-x: clip; }
a { color: inherit; }
h1, h2, h3, p { margin: 0; }

/* The space scene, fixed behind everything: the still first, the moving scene over it once it
   plays, and a shade that is a little darker toward the top and bottom. */
.backdrop { position: fixed; inset: 0; z-index: -1; background: url("/img/backdrop.jpg") center / cover no-repeat var(--ink); }
.backdrop video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 1.4s ease; }
.backdrop video.on { opacity: 1; }
.backdrop::after { content: ""; position: absolute; inset: 0; background:
  linear-gradient(rgba(3, 2, 11, 0.62), rgba(3, 2, 11, 0.34) 30%, rgba(3, 2, 11, 0.40) 70%, rgba(3, 2, 11, 0.78)); }
/* The opening, as in the app: a round window widens onto the scene. */
.js .opening .backdrop { animation: porthole 1.7s var(--ease) both; }
@keyframes porthole { from { clip-path: circle(0% at 50% 36%); } to { clip-path: circle(140% at 50% 36%); } }

/* --- the bar ------------------------------------------------------------------- */
.bar { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; justify-content: space-between; gap: 16px;
  height: 68px; padding: 0 24px; }
/* Its backing arrives once the page has moved. */
.bar::before { content: ""; position: absolute; inset: 0; z-index: -1; background: rgba(6, 5, 16, 0.62); backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--line); pointer-events: none; opacity: 0; transition: opacity .35s ease; }
.bar.stuck::before, html:not(.js) .bar::before { opacity: 1; }
.js .opening .bar { animation: drop .9s var(--ease) .25s both; }
@keyframes drop { from { opacity: 0; transform: translateY(-14px); } }
.brand { display: flex; align-items: center; gap: 11px; text-decoration: none; font: 600 12px var(--sans); letter-spacing: 2.5px; }
.tabs { position: relative; display: flex; gap: 2px; padding: 3px; border: 1px solid var(--edge); border-radius: 14px; background: var(--glass); backdrop-filter: blur(18px); }
.tabs a { position: relative; padding: 8px 18px; border-radius: 10px; color: var(--t2); text-decoration: none; font: 500 14px var(--sans); transition: color .2s; }
.tabs a:hover, .tabs a.current { color: var(--t1); }
/* The lit tab is one pill that slides to the section on screen. */
.tabs .pill { position: absolute; top: 3px; left: 0; height: calc(100% - 6px); width: 0; border-radius: 10px; background: rgba(255, 255, 255, 0.10);
  opacity: 0; transition: transform .45s var(--ease), width .45s var(--ease), opacity .25s; }
.tabs .pill.on { opacity: 1; }

/* --- buttons ------------------------------------------------------------------- */
.button { display: inline-flex; align-items: center; justify-content: center; height: 48px; padding: 0 22px; border-radius: 12px; border: 1px solid transparent;
  font: 600 16px var(--sans); text-decoration: none; cursor: pointer; transition: transform .25s var(--ease), background .2s, color .2s, border-color .2s; }
.button:active { transform: scale(0.97); }
.button svg { width: 20px; height: 20px; margin-right: 10px; fill: currentColor; flex: none; }
.button.light { background: var(--t1); color: var(--ink); }
.button.light:hover { background: #fff; }
.button.ghost { border-color: rgba(255, 255, 255, 0.16); color: var(--t1); background: rgba(255, 255, 255, 0.04); }
.button.ghost:hover { background: rgba(255, 255, 255, 0.10); }
.button.small { height: 38px; padding: 0 16px; font-size: 14px; border-radius: 10px; }
.button.wide { width: 100%; }
.button[disabled] { opacity: 0.5; cursor: default; }
.linkish { background: none; border: 0; color: var(--t2); font: 500 14px var(--sans); cursor: pointer; padding: 7px 10px; border-radius: 8px; transition: color .2s, background .2s; }
.linkish:hover { color: var(--t1); background: rgba(255, 255, 255, 0.08); }

/* --- type ---------------------------------------------------------------------- */
.label { font: 500 12px var(--mono); letter-spacing: 1.6px; text-transform: uppercase; color: var(--t3); }
h1 { font: 600 clamp(38px, 5.4vw, 68px)/1.04 var(--sans); letter-spacing: -0.03em; max-width: 15ch; }
h2 { font: 600 clamp(28px, 3.4vw, 40px)/1.12 var(--sans); letter-spacing: -0.02em; max-width: 22ch; }
h3 { font: 500 19px/1.3 var(--sans); }
.lead { font-size: clamp(18px, 1.6vw, 21px); color: var(--t2); max-width: 46ch; }
.note { color: var(--t2); }

/* --- layout -------------------------------------------------------------------- */
main { width: min(1080px, 100% - 48px); margin: 0 auto; }
.hero { position: relative; display: grid; gap: 22px; padding: 72px 0 40px; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 6px; }
.block { display: grid; gap: 18px; padding: 72px 0 0; }
.pane { border: 1px solid var(--edge); border-radius: 18px; background: var(--glass); backdrop-filter: blur(22px) saturate(1.2); }

/* The orbit and moon of the app's opening, around the mark. */
.orbit { position: absolute; top: 44px; right: 40px; width: 360px; height: 360px; display: grid; place-items: center; pointer-events: none; }
.orbit svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; transform: rotate(-90deg); }
.orbit circle { fill: none; stroke: rgba(255, 255, 255, 0.16); stroke-width: 1; vector-effect: non-scaling-stroke; stroke-dasharray: 1; stroke-dashoffset: 0; }
.orbit .moon { position: absolute; inset: 0; animation: turn 38s linear infinite; }
.orbit .moon::before { content: ""; position: absolute; top: -5px; left: calc(50% - 5px); width: 10px; height: 10px; border-radius: 50%; background: var(--t1); }
.orbit img { width: 112px; height: auto; animation: float 9s ease-in-out infinite; }
@keyframes turn { to { transform: rotate(360deg); } }
@keyframes float { 50% { transform: translateY(-7px); } }
.js .opening .orbit circle { animation: ring 1.8s var(--ease) .5s both; }
.js .opening .orbit .moon::before { animation: appear .8s ease 1.6s both; }
.js .opening .orbit img { animation: settle 1.2s var(--ease) .35s both, float 9s ease-in-out 1.6s infinite; }
@keyframes ring { from { stroke-dashoffset: 1; } }
@keyframes appear { from { opacity: 0; transform: scale(0.2); } }
@keyframes settle { from { opacity: 0; transform: scale(0.82); } }

/* The app's window leans back at first and levels out as it comes up the screen. */
.stage { margin: 34px 0 0; perspective: 1500px; }
.shot { margin: 0; transform-origin: 50% 100%; transform: rotateX(calc(var(--tilt, 0) * 1deg)) scale(calc(1 - var(--tilt, 0) * 0.006)); will-change: transform;
  border: 1px solid var(--edge); border-radius: 16px; overflow: hidden; background: var(--ink); box-shadow: 0 40px 120px rgba(0, 0, 0, 0.55); }
.shot img { display: block; width: 100%; height: auto; }

.list .row { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 20px 24px; }
.list .row + .row { border-top: 1px solid var(--line); }
.list p { color: var(--t2); margin-top: 3px; }
.readout { font: 500 14px var(--mono); color: var(--cyan); white-space: nowrap; }
/* A readout that steps through its values, one lit at a time. */
.cycle { display: inline-flex; gap: 14px; }
.cycle b { font-weight: 500; color: var(--t3); animation: pick 4.4s infinite; }
.cycle b:nth-child(2) { animation-delay: 1.1s; }
.cycle b:nth-child(3) { animation-delay: 2.2s; }
.cycle b:nth-child(4) { animation-delay: 3.3s; }
@keyframes pick { 0%, 100% { color: var(--t3); } 4%, 22% { color: var(--cyan); } 28% { color: var(--t3); } }
.cycle.two b { animation: pick-two 3.2s infinite; }
.cycle.two b:nth-child(2) { animation-delay: 1.6s; }
@keyframes pick-two { 0%, 100% { color: var(--t3); } 6%, 46% { color: var(--cyan); } 54% { color: var(--t3); } }
.tag { font: 500 11px var(--mono); letter-spacing: 1.2px; text-transform: uppercase; color: var(--amber); border: 1px solid rgba(255, 197, 107, 0.5); border-radius: 6px; padding: 3px 8px; white-space: nowrap; }

/* The same movement drawn at two frame rates. */
.motion { display: grid; gap: 14px; padding: 20px 24px; }
.lane { display: grid; grid-template-columns: 76px 1fr; align-items: center; gap: 16px; }
.lane .live { color: var(--cyan); }
.track { position: relative; height: 22px; border-radius: 7px; background: rgba(255, 255, 255, 0.05); overflow: hidden; }
.track i { position: absolute; top: 3px; left: 3px; width: 34px; height: 16px; border-radius: 5px; background: var(--t2); will-change: transform; }
.lane:last-child .track i { background: var(--cyan); }

.grid.three { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.card { display: grid; align-content: end; gap: 8px; min-height: 190px; padding: 24px; transition: transform .45s var(--ease), background .25s; }
.card:hover { transform: translateY(-3px); background: rgba(11, 10, 22, 0.56); }
.card p { color: var(--t2); }
/* Each card's sign is drawn as the card arrives. */
.card svg { width: 34px; height: 34px; margin-bottom: 26px; fill: none; stroke: var(--accent); stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.card svg path { stroke-dasharray: 1; stroke-dashoffset: 0; }
.js .card svg path { stroke-dashoffset: 1; transition: stroke-dashoffset 1.3s var(--ease) calc(var(--d, 0ms) + 250ms); }
.js .card.in svg path { stroke-dashoffset: 0; }

.buy { display: grid; grid-template-columns: 1fr 1.15fr; }
.offer { display: grid; align-content: start; gap: 14px; padding: 30px; }
.price { color: var(--t2); }
.price span { font: 600 56px/1 var(--sans); letter-spacing: -0.03em; color: var(--t1); margin-right: 8px; }
.offer ul { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 10px; color: var(--t2); }
.offer li { padding-left: 26px; position: relative; }
.offer li::before { content: ""; position: absolute; left: 2px; top: 0.48em; width: 12px; height: 7px; border-left: 2px solid var(--accent); border-bottom: 2px solid var(--accent); transform: rotate(-45deg); }
.pay { display: grid; align-content: start; gap: 18px; padding: 30px; border-left: 1px solid var(--line); min-height: 280px; }
.pay > [hidden] { display: none; }
.pay > :not(.steps) { animation: arrive .5s var(--ease) both; }
@keyframes arrive { from { opacity: 0; transform: translateY(8px); } }
/* Three steps; the one you are on is lit, the ones behind you are ticked. */
.steps { list-style: none; margin: 0 0 4px; padding: 0; display: grid; gap: 12px; color: var(--t3); }
.steps li { display: flex; align-items: center; gap: 12px; transition: color .35s; }
.steps .badge { position: relative; flex: none; width: 26px; height: 26px; border-radius: 50%; border: 1px solid var(--edge); display: grid; place-items: center;
  font: 500 12px var(--mono); transition: background .35s, border-color .35s, color .2s; }
.steps li.now { color: var(--t1); }
.steps li.now .badge { border-color: var(--accent); color: var(--accent); }
.steps li.done { color: var(--t2); }
.steps li.done .badge { background: var(--accent); border-color: var(--accent); color: transparent; }
.steps li.done .badge::after { content: ""; position: absolute; left: 7px; top: 8px; width: 10px; height: 5px; border-left: 2px solid var(--ink); border-bottom: 2px solid var(--ink);
  transform: rotate(-45deg); animation: tick .4s var(--ease) both; }
@keyframes tick { from { opacity: 0; transform: rotate(-45deg) scale(0.4); } }
.who { display: flex; align-items: center; gap: 10px; padding: 8px 8px 8px 10px; border: 1px solid var(--edge); border-radius: 12px; background: rgba(255, 255, 255, 0.04); }
.who img { width: 32px; height: 32px; border-radius: 50%; background: rgba(255, 255, 255, 0.08); }
.who span { flex: 1; min-width: 0; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.status { color: var(--t2); }
.status.error { color: #ff9c9c; }
#checkout-form { min-height: 320px; }

.join { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 30px; }
.join h2 { margin-top: 10px; }

.foot { width: min(1080px, 100% - 48px); margin: 96px auto 0; padding: 28px 0 48px; border-top: 1px solid var(--line); display: grid; gap: 12px; color: var(--t3); font-size: 14px; }
.foot .brand { color: var(--t2); }
.foot a { color: var(--t2); }

/* --- the key, here and on the order confirmation page -------------------------------- */
.thanks { min-height: calc(100vh - 68px); display: grid; place-items: center; padding: 40px 0; }
.thanks .pane { width: min(620px, 100%); padding: 34px; display: grid; gap: 18px; }
.thanks [hidden] { display: none; }
.key { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 18px 20px; border: 1px solid var(--edge); border-radius: 12px; background: rgba(255, 255, 255, 0.04); }
.key code { font: 500 clamp(15px, 2.6vw, 21px) var(--mono); color: var(--cyan); letter-spacing: 1px; word-break: break-all; }
.pay .key { padding: 14px 14px 14px 16px; }
.pay .key code { font-size: 14px; letter-spacing: 0.4px; }
/* Its letters arrive one after another. */
.key code span { display: inline-block; animation: letter .45s var(--ease) both; animation-delay: calc(var(--i) * 22ms); }
@keyframes letter { from { opacity: 0; transform: translateY(8px); } }
.sent { display: flex; align-items: center; gap: 10px; color: var(--t2); animation: arrive .5s var(--ease) both; }
.sent svg { width: 20px; height: 20px; flex: none; fill: var(--accent); }
.sent.blocked svg { fill: var(--amber); }

/* --- the owner's licence page (admin address only) ----------------------------------- */
.admin { display: grid; gap: 16px; padding: 28px 0 72px; }
.admin .pane { padding: 26px; display: grid; gap: 18px; }
.admin [hidden] { display: none; }
#desk { display: grid; gap: 16px; }
.brand .label { margin-left: 6px; padding-left: 14px; border-left: 1px solid var(--edge); }
.who.slim { padding: 5px 6px 5px 8px; }
.who.slim img { width: 28px; height: 28px; }
.who.slim span { flex: none; max-width: 180px; }
.gate { width: min(520px, 100%); margin: 12vh auto 0; justify-items: start; }
.make-head, .ledger-head { display: flex; align-items: end; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.make-head h2 { margin-top: 8px; }
.counts { display: flex; gap: 26px; }
.count { display: grid; gap: 2px; justify-items: end; }
.count b { font: 500 22px/1 var(--mono); color: var(--cyan); }
.fields { display: flex; align-items: end; gap: 12px; flex-wrap: wrap; }
.field { display: grid; gap: 7px; width: 210px; }
.field.grow { flex: 1; min-width: 200px; width: auto; }
.field.narrow { width: 96px; }
.field > span { font: 500 12px var(--mono); letter-spacing: 1.2px; text-transform: uppercase; color: var(--t3); }
input:not([type="checkbox"]) { height: 48px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--edge); background: rgba(255, 255, 255, 0.05); color: var(--t1);
  font: 400 16px var(--sans); outline: none; transition: border-color .2s, background .2s; width: 100%; }
input:not([type="checkbox"])::placeholder { color: var(--t3); }
input:not([type="checkbox"]):focus { border-color: var(--accent); background: rgba(255, 255, 255, 0.08); }
.ledger-head input { width: min(380px, 100%); height: 40px; border-radius: 10px; font-size: 15px; }
.check { display: flex; align-items: center; gap: 10px; color: var(--t2); cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--accent); }
#made { display: grid; gap: 10px; justify-items: start; }
#made .key { width: 100%; }
#made:empty { display: none; }
.rows { display: grid; border: 1px solid var(--edge); border-radius: 14px; background: rgba(255, 255, 255, 0.03); overflow: hidden; }
.rows:empty { display: none; }
.lrow { display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 18px; padding: 14px 16px; animation: arrive .4s var(--ease) both; }
.lrow + .lrow { border-top: 1px solid var(--line); }
.lmain { min-width: 0; }
.lmain code { font: 500 15px var(--mono); color: var(--t1); letter-spacing: 0.4px; }
.lmain p { color: var(--t2); font-size: 14px; margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lrow.off .lmain code { color: var(--t3); text-decoration: line-through; }
.ltags, .lacts { display: flex; align-items: center; gap: 10px; }
.readout.dim { color: var(--t3); }
.linkish[disabled] { opacity: 0.5; cursor: default; }
@media (max-width: 820px) {
  .lrow { grid-template-columns: 1fr; gap: 10px; }
  .counts { gap: 18px; }
  .field, .field.narrow { width: 100%; }
}

/* --- motion: things rise in once, as they come into view; headings come up word by word --- */
.js .rise { opacity: 0; transform: translateY(16px); transition: opacity .7s var(--ease) var(--d, 0ms), transform .7s var(--ease) var(--d, 0ms); }
.js .rise.in { opacity: 1; transform: none; }
.words .w { display: inline-block; overflow: hidden; vertical-align: top; padding: 0 0.04em 0.16em; margin: 0 -0.04em -0.16em; }
.words .w > span { display: inline-block; transform: translateY(112%); transition: transform .95s var(--ease) calc(var(--d, 0ms) + var(--i) * 42ms); }
.words.in .w > span { transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .rise { opacity: 1; transform: none; }
  .words .w > span { transform: none; }
  .js .card svg path { stroke-dashoffset: 0; }
  .shot { transform: none; }
  .cycle b { color: var(--cyan); }
}

@media (max-width: 1020px) { .orbit { display: none; } }
@media (max-width: 820px) {
  .tabs { display: none; }
  .grid.three, .buy { grid-template-columns: 1fr; }
  .pay { border-left: 0; border-top: 1px solid var(--line); }
  .join { flex-direction: column; align-items: flex-start; }
  .list .row { flex-direction: column; align-items: flex-start; gap: 10px; }
  main, .foot { width: min(1080px, 100% - 32px); }
  .hero { padding-top: 44px; }
  .lane { grid-template-columns: 62px 1fr; gap: 12px; }
}
