/* Robinland portal — one stylesheet, no webfonts, no third-party anything.
 *
 * The whole site is dark. That is a decision, not a default: the hero's
 * animated background is a near-black nebula in the logo's two blues, and a
 * light /privacy page hanging off the same header would read as a different
 * site. Long legal text in the dark is the one real cost, so the policy pages
 * get their own treatment further down — wider line-height, 68ch measure, a
 * slightly dimmer white than pure #fff so it does not glare.
 */

:root {
  --ink: #05080f;          /* page background */
  --ink-2: #080d18;        /* alternating band */
  --panel: #0d1424;        /* cards */
  --fg: #e9edf9;           /* body text — not #fff on purpose, see above */
  --fg-dim: #aeb7cf;
  --muted: #7d88a5;
  --line: rgba(255, 255, 255, 0.10);
  --line-soft: rgba(255, 255, 255, 0.055);

  /* Both blues are sampled from robinland-logo-120.png: the mark is a
   * diagonal gradient running #199CFD (top-left) to #0147FF (bottom-right). */
  --b1: #199cfd;
  --b2: #0147ff;
  --brand: linear-gradient(135deg, var(--b1), var(--b2));

  --max: 1080px;
  --radius: 16px;
  --ease: cubic-bezier(0.22, 0.8, 0.26, 1);

  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
    Arial, "Noto Sans", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--ink);
  color: var(--fg);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

a { color: #7ab8ff; text-decoration: none; }
a:hover { text-decoration: underline; }

img { max-width: 100%; height: auto; display: block; }

::selection { background: rgba(25, 156, 253, 0.32); }

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

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 24px; }

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--panel);
  color: var(--fg);
  padding: 12px 18px;
  border-radius: 0 0 10px 0;
  z-index: 100;
}
.skip:focus { left: 0; }

/* ---------------------------------------------------------------- header -- */

.hdr {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  display: flex;
  align-items: center;
  height: 62px;
  background: rgba(5, 8, 15, 0.72);
  backdrop-filter: saturate(150%) blur(14px);
  -webkit-backdrop-filter: saturate(150%) blur(14px);
  border-bottom: 1px solid transparent;
  opacity: 0;
  transform: translateY(-100%);
  transition: opacity 0.35s var(--ease), transform 0.35s var(--ease),
    border-color 0.35s var(--ease);
  pointer-events: none;
}
.hdr.show { opacity: 1; transform: none; border-bottom-color: var(--line-soft); pointer-events: auto; }

/* On the policy pages there is no hero to scroll past, so the header is
 * simply there from the start. */
.hdr.static { position: sticky; opacity: 1; transform: none; border-bottom-color: var(--line-soft); pointer-events: auto; }

.hdr .wrap { display: flex; align-items: center; gap: 14px; }
.hdr-mark { display: flex; align-items: center; gap: 10px; color: var(--fg); font-weight: 600; letter-spacing: -0.01em; }
.hdr-mark:hover { text-decoration: none; }
.hdr-mark img { width: 26px; height: 26px; border-radius: 7px; }
.hdr-spacer { flex: 1; }

/* ------------------------------------------------------------------ hero -- */

.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
  padding: 96px 0 120px;
}

/* The canvas is the WebGL nebula. #bg-fallback sits underneath it and is what
 * you see when WebGL is unavailable or the context is lost — it is a static
 * approximation of the same picture, so nothing looks broken. */
#bg-fallback {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(60% 55% at 28% 24%, rgba(25, 156, 253, 0.30), transparent 70%),
    radial-gradient(55% 50% at 74% 62%, rgba(1, 71, 255, 0.34), transparent 72%),
    radial-gradient(90% 80% at 50% 115%, rgba(1, 71, 255, 0.18), transparent 70%),
    var(--ink);
}

#bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  opacity: 0;
  transition: opacity 0.9s ease;
}
#bg.on { opacity: 1; }

/* A dark wash so white type always clears contrast over the brightest frame
 * of the animation, plus a fade into the page background at the bottom edge. */
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(70% 60% at 50% 48%, rgba(5, 8, 15, 0.52), rgba(5, 8, 15, 0.72) 100%),
    linear-gradient(to bottom, transparent 62%, var(--ink) 99%);
}

.hero .wrap { position: relative; z-index: 2; }

.hero-logo {
  width: 72px;
  height: 72px;
  margin: 0 auto 34px;
  border-radius: 20px;
  box-shadow: 0 18px 50px -14px rgba(1, 71, 255, 0.75),
    0 0 0 1px rgba(255, 255, 255, 0.06);
}

/* ------------------------------------------------------- typed slogans --- */

/* Each line holds its full text in the HTML, so with JavaScript off all three
 * slogans are simply there, complete and readable. The typing is done by
 * animating the line's width from 0 to a measured pixel width with a steps()
 * timing function, which is what makes it advance one character at a time
 * instead of wiping smoothly. The caret is the line's right border, so it
 * rides along the edge of the reveal for free. */

.slogans {
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.34em;
  font-size: clamp(1.15rem, 3.6vw, 2.1rem);
  font-weight: 600;
  letter-spacing: -0.022em;
  line-height: 1.32;
}

/* The default is ordinary wrapping text. nowrap and the clipping that the
 * typing needs are applied only under .js-type — that is, only once the
 * script has MEASURED that the longest slogan fits on one line at this
 * width. A breakpoint cannot answer that question: the longest line is 49
 * characters, and at the sizes here it overflows anywhere below about 500px,
 * which includes a 430px iPhone Pro Max held upright. Guessing it produced
 * exactly that — "Your company of one. Your world of pos" on a phone. */
.slogans .line {
  display: inline-block;
  max-width: 100%;
  border-right: 2px solid transparent;
  padding-right: 3px;
  text-wrap: balance;
}

.js-type .slogans .line { white-space: nowrap; overflow: hidden; }

/* Phones, where the lines wrap: the slogans still arrive one at a time, as a
 * fade rather than as typing. Added by the script only, so no script means
 * three plain visible lines. */
/* Wrapped, the three slogans run together into one block of text, so they
 * need more air between them than between the two halves of one of them. */
.slogans.seq { gap: 0.8em; }
.slogans.seq .line { opacity: 0; transform: translateY(9px); transition: opacity 0.5s var(--ease), transform 0.5s var(--ease); }
.slogans.seq .line.in { opacity: 1; transform: none; }

.slogans .line:nth-child(2) {
  background: linear-gradient(100deg, #cfe4ff, #ffffff 42%, #9ec9ff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* Set by JS once the lines have been measured. Until then nothing is hidden,
 * which is the whole point: a failure leaves the text visible. */
.js-type .slogans .line { visibility: hidden; width: 0; }
.js-type .slogans .line.typing,
.js-type .slogans .line.done { visibility: visible; }
.js-type .slogans .line.typing {
  width: 0;
  animation: type var(--dur) steps(var(--n), end) forwards;
  border-right-color: var(--b1);
}
.js-type .slogans .line.done { width: auto; }
.js-type .slogans .line.caret { border-right-color: var(--b1); animation: blink 1.05s step-end infinite; }

@keyframes type { to { width: var(--w); } }
@keyframes blink { 0%, 100% { border-right-color: var(--b1); } 50% { border-right-color: transparent; } }

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  height: 50px;
  padding: 0 28px;
  border-radius: 999px;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -0.005em;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.22s var(--ease), box-shadow 0.22s var(--ease),
    background-color 0.22s var(--ease);
}
.btn:hover { text-decoration: none; }

.btn-primary {
  background: var(--brand);
  color: #fff;
  box-shadow: 0 10px 30px -10px rgba(1, 71, 255, 0.9);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 16px 38px -10px rgba(1, 71, 255, 1); }
.btn-primary:active { transform: translateY(0); }

.btn-ghost {
  background: rgba(255, 255, 255, 0.055);
  border-color: var(--line);
  color: var(--fg);
}
.btn-ghost:hover { background: rgba(255, 255, 255, 0.1); }

.btn-sm { height: 38px; padding: 0 18px; font-size: 0.92rem; }

.hero-cta { margin-top: 44px; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.hero-note { color: var(--muted); font-size: 0.88rem; }

/* The hero's intro: logo, then the call to action. Keyed on .js-intro, not on
 * .js-type — the logo should fade in on a phone too, where the slogans are
 * faded rather than typed and .js-type is never set. */
.js-intro .hero-logo,
.js-intro .hero-cta,
.js-intro .scroll-cue { opacity: 0; }
.js-intro .hero-logo.in { animation: rise-in 0.75s var(--ease) forwards; }
.js-intro .hero-cta.in { animation: rise-in 0.6s var(--ease) forwards; }

@keyframes rise-in { from { opacity: 0; transform: translateY(14px) scale(0.97); } to { opacity: 1; transform: none; } }

.scroll-cue {
  position: absolute;
  left: 50%;
  bottom: 26px;
  transform: translateX(-50%);
  z-index: 2;
  color: var(--muted);
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
}
.js-intro .scroll-cue.in { animation: cue-in 0.6s var(--ease) forwards, bob 2.4s ease-in-out 1s infinite; }
.scroll-cue.in { animation: bob 2.4s ease-in-out 1s infinite; }
@keyframes cue-in { to { opacity: 1; } }
@keyframes bob { 0%, 100% { transform: translate(-50%, 0); } 50% { transform: translate(-50%, 7px); } }

/* ---------------------------------------------------------------- bands -- */

.band { position: relative; padding: clamp(80px, 11vw, 140px) 0; border-top: 1px solid var(--line-soft); }
.band.alt { background: var(--ink-2); }

/* A hairline that lights up in the middle and fades to nothing at both ends.
 * It is the one piece of decoration in the scrolling half of the page, and it
 * is there because without it the bands read as one flat black field. */
.band::before {
  content: "";
  position: absolute;
  inset: -1px 0 auto 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(25, 156, 253, 0.5) 50%, transparent);
  opacity: 0.75;
}

.eyebrow {
  display: inline-block;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--b1);
  margin: 0 0 18px;
}

h1, h2, h3 { letter-spacing: -0.028em; line-height: 1.15; margin: 0 0 18px; }
h2 { font-size: clamp(1.75rem, 4.2vw, 2.65rem); font-weight: 650; }
h3 { font-size: 1.1rem; font-weight: 650; letter-spacing: -0.015em; }

.lede { font-size: clamp(1.05rem, 2.2vw, 1.22rem); color: var(--fg-dim); max-width: 60ch; margin: 0; }

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
  margin-top: 52px;
}

.card {
  position: relative;
  padding: 28px 26px 30px;
  border-radius: var(--radius);
  background: var(--panel);
  border: 1px solid var(--line-soft);
  transition: transform 0.3s var(--ease), border-color 0.3s var(--ease);
}
.card:hover { transform: translateY(-3px); border-color: rgba(25, 156, 253, 0.4); }
.card p { margin: 0; color: var(--fg-dim); font-size: 0.97rem; }

.card-ico {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--brand);
  display: grid;
  place-items: center;
  margin-bottom: 18px;
  color: #fff;
}

.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 72px); align-items: start; }
.split p { color: var(--fg-dim); }
.split p:last-child { margin-bottom: 0; }

.rule { height: 1px; background: var(--brand); opacity: 0.5; margin: 0 0 26px; width: 56px; }

/* Closing call to action. */
.closer { text-align: center; padding: clamp(96px, 13vw, 160px) 0; position: relative; overflow: hidden; }
.closer::before {
  content: "";
  position: absolute;
  inset: auto 0 -60% 0;
  height: 120%;
  background: radial-gradient(50% 50% at 50% 50%, rgba(1, 71, 255, 0.26), transparent 70%);
  pointer-events: none;
}
.closer .wrap { position: relative; }
.closer h2 { margin-bottom: 28px; }

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

.ftr { border-top: 1px solid var(--line-soft); padding: 34px 0; color: var(--muted); font-size: 0.88rem; }
.ftr .wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 22px; }
.ftr a { color: var(--fg-dim); }
.ftr-spacer { flex: 1; }

/* ------------------------------------------------------------ prose page -- */

/* The heading shares the prose column. Left on the default 1080px .wrap it
 * started 160px to the left of the first line of text under it. */
.prose-head { padding: 104px 0 0; }
.prose-head .wrap { max-width: 760px; }
.prose-head h1 { font-size: clamp(1.9rem, 5vw, 2.6rem); }

.prose { padding: 26px 0 100px; }
.prose .wrap { max-width: 760px; }
.prose p, .prose li { color: var(--fg-dim); line-height: 1.78; font-size: 1.02rem; }
.prose p { margin: 0 0 1.15em; max-width: 68ch; }
.prose em { color: var(--muted); font-style: normal; font-size: 0.92rem; }
.prose h2 {
  font-size: 1.32rem;
  font-weight: 650;
  margin: 2.4em 0 0.7em;
  padding-top: 1.5em;
  border-top: 1px solid var(--line-soft);
  color: var(--fg);
}
.prose h2:first-of-type { border-top: 0; padding-top: 0; }
.prose ul { margin: 0 0 1.15em; padding-left: 1.2em; max-width: 68ch; }
.prose li { margin: 0 0 0.45em; }
.prose li::marker { color: var(--b1); }
.prose strong { color: var(--fg); font-weight: 650; }
.prose code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.88em;
  background: rgba(255, 255, 255, 0.07);
  padding: 0.12em 0.4em;
  border-radius: 5px;
  color: #cfe0ff;
}

/* --------------------------------------------------------------- reveal -- */

/* Same rule as the slogans: the hidden state is switched on by a class the
 * script adds to <html>, never by this file alone. Written the obvious way
 * round — .rv { opacity: 0 } — a portal.js that fails to load, is blocked, or
 * throws on an old browser takes every section below the hero with it, and
 * the page silently becomes a hero and a footer. */
.js-rv .rv {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
.js-rv .rv.in { opacity: 1; transform: none; }
.js-rv .rv:nth-child(2) { transition-delay: 0.07s; }
.js-rv .rv:nth-child(3) { transition-delay: 0.14s; }

/* ------------------------------------------------------------- mobile ---- */

@media (max-width: 760px) {
  body { font-size: 16px; }
  .wrap { padding: 0 20px; }
  .split { grid-template-columns: 1fr; gap: 40px; }
  .hero { padding: 86px 0 104px; }
  .hero-logo { width: 62px; height: 62px; border-radius: 17px; margin-bottom: 28px; }
  .slogans { font-size: clamp(1.02rem, 5.2vw, 1.5rem); gap: 0.3em; }
  .cards { margin-top: 38px; }
  .ftr .wrap { flex-direction: column; align-items: flex-start; }
  .ftr-spacer { display: none; }
}

/* ------------------------------------------------------ reduced motion --- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js-type .slogans .line,
  .js-intro .hero-logo,
  .js-intro .hero-cta,
  .scroll-cue,
  .slogans.seq .line { visibility: visible !important; width: auto !important; opacity: 1 !important; transform: none !important; animation: none !important; transition: none !important; border-right-color: transparent !important; }
  .rv { opacity: 1; transform: none; transition: none; }
  .card:hover, .btn:hover { transform: none; }
  .scroll-cue.in { animation: none; }
  .js-rv .rv { opacity: 1; transform: none; transition: none; }
}
