/* rdtbot.xyz landing page. One idea: a radar that keeps watch, behind a wide, heavy wordmark. */

/* Fonts are served from this site (src/client/fonts, SIL Open Font License). */
@font-face { font-family: "Unbounded"; font-weight: 500; font-display: swap; src: url("/fonts/unbounded-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Unbounded"; font-weight: 800; font-display: swap; src: url("/fonts/unbounded-latin-800-normal.woff2") format("woff2"); }
@font-face { font-family: "Figtree"; font-weight: 400; font-display: swap; src: url("/fonts/figtree-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Figtree"; font-weight: 500; font-display: swap; src: url("/fonts/figtree-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Figtree"; font-weight: 600; font-display: swap; src: url("/fonts/figtree-latin-600-normal.woff2") format("woff2"); }

:root {
  --sea: #0b1a22;
  --deep: #11293a;
  --amber: #ffb547;
  --glass: #d9e7e4;
  --muted: #7f9b9f;
  --ring: rgba(255, 181, 71, 0.16);
  --sweep-time: 7s;
  color-scheme: dark;
}

* { box-sizing: border-box; }

html, body { height: 100%; overflow-x: hidden; overflow-x: clip; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  color: var(--glass);
  background:
    radial-gradient(1200px 700px at 78% 45%, var(--deep) 0%, transparent 70%),
    var(--sea);
  font: 400 1.0625rem/1.6 "Figtree", system-ui, sans-serif;
  overflow-x: hidden;
}

.stage {
  flex: 1;
  width: min(1180px, 100% - 3rem);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  align-items: center;
  gap: 2rem;
  padding: 4rem 0 2rem;
}

/* ---- words ---- */

.copy { position: relative; z-index: 2; }

.wordmark {
  /* Shrink-wrapped, so the gradient spans the whole word however wide it is. */
  display: inline-block;
  margin: 0 0 1.25rem;
  padding-right: 0.04em;
  font: 800 clamp(4.5rem, 10.5vw, 10rem)/0.82 "Unbounded", system-ui, sans-serif;
  letter-spacing: -0.02em;
  color: var(--glass);
  /* Lit from the radar side, as if the sweep had just passed over it. */
  background: linear-gradient(100deg, var(--glass) 55%, var(--amber) 130%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.headline {
  margin: 0 0 0.75rem;
  max-width: 22ch;
  font: 500 clamp(1.4rem, 2.6vw, 2rem)/1.2 "Unbounded", system-ui, sans-serif;
  letter-spacing: -0.01em;
}

.lede {
  margin: 0 0 2rem;
  max-width: 46ch;
  color: var(--muted);
}

.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1.25rem 1.75rem; }

.primary {
  display: inline-block;
  padding: 0.95rem 1.6rem;
  border-radius: 999px;
  background: var(--amber);
  color: var(--sea);
  font-weight: 600;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.primary:hover { transform: translateY(-1px); box-shadow: 0 8px 30px rgba(255, 181, 71, 0.28); }

.quiet {
  color: var(--glass);
  text-decoration: underline;
  text-decoration-color: rgba(217, 231, 228, 0.35);
  text-underline-offset: 0.3em;
}
.quiet:hover { text-decoration-color: var(--amber); }

a:focus-visible { outline: 3px solid var(--amber); outline-offset: 4px; border-radius: 999px; }
.quiet:focus-visible { border-radius: 4px; }

/* ---- radar ---- */

/* On wide screens the frame steps aside and the radar sits in the grid. */
.radar-frame { display: contents; }

.radar {
  position: relative;
  width: min(100%, 520px);
  aspect-ratio: 1;
  justify-self: center;
  border-radius: 50%;
  overflow: hidden;
  background: radial-gradient(circle, rgba(17, 41, 58, 0.9) 0%, rgba(11, 26, 34, 0.6) 70%);
  box-shadow: 0 0 0 1px var(--ring), 0 0 120px rgba(255, 181, 71, 0.06);
}

.rings {
  position: absolute;
  inset: 0;
  background:
    repeating-radial-gradient(circle, transparent 0 calc(12.5% - 1px), var(--ring) calc(12.5% - 1px) 12.5%),
    linear-gradient(var(--ring), var(--ring)) center / 1px 100% no-repeat,
    linear-gradient(var(--ring), var(--ring)) center / 100% 1px no-repeat;
}

.sweep {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  /* The bright edge leads (at 0deg, turning clockwise) and the glow trails behind it. */
  background: conic-gradient(from 0deg, transparent 0deg, transparent 285deg, rgba(255, 181, 71, 0.12) 332deg, rgba(255, 181, 71, 0.55) 360deg);
  animation: turn var(--sweep-time) linear infinite;
}

.hub {
  position: absolute;
  inset: calc(50% - 5px);
  border-radius: 50%;
  background: var(--amber);
  box-shadow: 0 0 16px var(--amber);
}

/* Contacts light up as the sweep passes them, then fade. Each delay matches its angle. */
.blip {
  position: absolute;
  width: 10px;
  height: 10px;
  margin: -5px 0 0 -5px;
  border-radius: 50%;
  background: var(--amber);
  box-shadow: 0 0 14px var(--amber);
  opacity: 0;
  animation: ping var(--sweep-time) linear infinite;
}
/* Positions are on the radar; angles count clockwise from straight up, like the sweep. */
/* delay = (angle / 360 - 1) x sweep time, so each lights up exactly as the beam reaches it. */
.b1 { left: 70%; top: 26%; animation-delay: calc(var(--sweep-time) * -0.889); }  /* 40deg */
.b2 { left: 78%; top: 62%; animation-delay: calc(var(--sweep-time) * -0.686); }  /* 113deg */
.b3 { left: 36%; top: 74%; animation-delay: calc(var(--sweep-time) * -0.416); }  /* 210deg */
.b4 { left: 24%; top: 34%; animation-delay: calc(var(--sweep-time) * -0.162); }  /* 302deg */

@keyframes turn { to { transform: rotate(1turn); } }

@keyframes ping {
  0%, 1% { opacity: 1; transform: scale(1.25); }
  30% { opacity: 0.25; transform: scale(1); }
  60%, 100% { opacity: 0; }
}

.foot {
  width: min(1180px, 100% - 3rem);
  margin: 0 auto;
  padding: 1.5rem 0 2rem;
  color: var(--muted);
  font-size: 0.875rem;
}

/* ---- phones: the radar sits behind the wordmark ---- */

@media (max-width: 820px) {
  .stage { grid-template-columns: 1fr; padding-top: 3rem; }
  /* A screen-wide frame that cuts off the radar's overhang, so the page stays phone-width. */
  .radar-frame {
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 110vw;
    overflow: hidden;
    pointer-events: none;
    z-index: 1;
  }
  .radar {
    position: absolute;
    top: -6vw;
    right: -30vw;
    width: 110vw;
    opacity: 0.55;
  }
  .wordmark { font-size: clamp(4rem, 23vw, 8rem); }
}

@media (prefers-reduced-motion: reduce) {
  .sweep { animation: none; transform: rotate(40deg); }
  .blip { animation: none; opacity: 0.7; }
  .primary { transition: none; }
}
