/* FedEx — mobile-first, layered hacker bg, detailed buttons */

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  margin: 0;
  background: #000;
  color: #fff;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
  min-height: 100%;
  overflow-x: hidden;
  overscroll-behavior-y: none;
}

::selection { background: #ff6600; color: #000; }

/* ============================================================
   BACKGROUND LAYERS
   stack (bottom→top): black · stars · radial glows · top grid ·
   horizon line · perspective floor grid · noise · vignette
   ============================================================ */
.bg {
  position: fixed; inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  background: radial-gradient(ellipse at 50% 0%, #0a0508 0%, #000 70%);
}

/* tiny static "stars" */
.bg-stars {
  position: absolute; inset: 0;
  background-image:
    radial-gradient(1px 1px at 12% 18%, rgba(255,255,255,0.55), transparent 50%),
    radial-gradient(1px 1px at 78% 9%, rgba(255,255,255,0.4), transparent 50%),
    radial-gradient(1px 1px at 33% 42%, rgba(255,255,255,0.35), transparent 50%),
    radial-gradient(1px 1px at 88% 31%, rgba(255,255,255,0.5), transparent 50%),
    radial-gradient(1px 1px at 55% 7%, rgba(255,255,255,0.4), transparent 50%),
    radial-gradient(1px 1px at 22% 60%, rgba(255,255,255,0.3), transparent 50%),
    radial-gradient(1px 1px at 92% 48%, rgba(255,255,255,0.4), transparent 50%),
    radial-gradient(1px 1px at 8% 38%, rgba(255,255,255,0.3), transparent 50%),
    radial-gradient(1.4px 1.4px at 64% 22%, rgba(255,180,140,0.6), transparent 50%);
  opacity: 0.7;
  animation: starTwinkle 7s ease-in-out infinite alternate;
}

/* warm radial glows — FedEx orange + purple */
.bg-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.55;
}
.bg-glow-a {
  width: 80vw; height: 80vw; max-width: 720px; max-height: 720px;
  left: 50%; top: -10vh;
  transform: translateX(-50%);
  background: radial-gradient(circle, rgba(255,102,0,0.55) 0%, rgba(255,102,0,0) 60%);
}
.bg-glow-b {
  width: 70vw; height: 70vw; max-width: 600px; max-height: 600px;
  left: 50%; top: 38vh;
  transform: translateX(-50%);
  background: radial-gradient(circle, rgba(77,20,140,0.55) 0%, rgba(77,20,140,0) 60%);
  opacity: 0.45;
}

/* upper grid — subtle plane indicating "we're on a grid" */
.bg-grid-top {
  position: absolute;
  inset: 0 0 50% 0;
  background-image:
    linear-gradient(to right, rgba(255,255,255,0.06) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255,255,255,0.06) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(to bottom, transparent 0%, #000 30%, #000 75%, transparent 100%);
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, #000 30%, #000 75%, transparent 100%);
  opacity: 0.55;
}

/* horizon — the "edge of the plane" with hot orange glow */
.bg-horizon {
  position: absolute;
  left: 0; right: 0;
  top: 50%;
  height: 2px;
  background: linear-gradient(90deg,
    transparent 0%,
    rgba(255,102,0,0.15) 15%,
    rgba(255,102,0,0.9) 50%,
    rgba(255,102,0,0.15) 85%,
    transparent 100%);
  box-shadow:
    0 0 20px rgba(255,102,0,0.6),
    0 0 60px rgba(255,102,0,0.35),
    0 -10px 40px rgba(255,102,0,0.25);
}

/* perspective floor — synthwave-style 3D grid receding to horizon */
.bg-floor {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 300vw;
  height: 100vh;
  transform: translateX(-50%) perspective(420px) rotateX(60deg);
  transform-origin: 50% 0%;
  mask-image: linear-gradient(to bottom, #000 0%, #000 60%, transparent 100%);
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 60%, transparent 100%);
}
.bg-floor-grid {
  position: absolute; inset: 0;
  background-image:
    /* vertical lines */
    linear-gradient(to right, rgba(255,102,0,0.55) 1px, transparent 1px),
    /* horizontal lines */
    linear-gradient(to bottom, rgba(255,102,0,0.45) 1px, transparent 1px);
  background-size: 60px 60px;
  animation: floorScroll 6s linear infinite;
  opacity: 0.85;
}

/* faint film grain via SVG noise */
.bg-noise {
  position: absolute; inset: 0;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 0.5 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)' opacity='0.55'/></svg>");
  opacity: 0.05;
  mix-blend-mode: overlay;
}

/* vignette — darken corners so content stays focal */
.bg-vignette {
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at center, transparent 40%, rgba(0,0,0,0.7) 100%);
}

/* ============================================================
   LAYOUT
   ============================================================ */
.wrap {
  position: relative;
  z-index: 1;
  max-width: 460px;
  margin: 0 auto;
  padding:
    calc(40px + env(safe-area-inset-top))
    calc(20px + env(safe-area-inset-right))
    calc(40px + env(safe-area-inset-bottom))
    calc(20px + env(safe-area-inset-left));
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

/* header */
.head { text-align: center; padding: 8px 0 36px; }
.logo {
  display: block;
  margin: 0 auto;
  width: 180px;
  height: auto;
  max-width: 70%;
  filter: drop-shadow(0 6px 22px rgba(255,102,0,0.45));
  user-select: none;
  -webkit-user-drag: none;
}
.tagline {
  margin-top: 14px;
  color: #ddd;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.tagline-sub {
  margin-top: 6px;
  color: #ff6600;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-shadow: 0 0 14px rgba(255,102,0,0.45);
}

/* ============================================================
   LINKS
   ============================================================ */
.links { display: flex; flex-direction: column; gap: 12px; }

.hint {
  text-align: center;
  color: #666;
  font-size: 13px;
  padding: 22px 0;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.btn {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 64px;
  padding: 12px 14px 12px 12px;
  background: linear-gradient(180deg, rgba(20,20,20,0.85) 0%, rgba(10,10,10,0.85) 100%);
  border: 1px solid #1f1f1f;
  border-radius: 14px;
  color: #fff;
  text-decoration: none;
  overflow: hidden;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: transform 140ms ease, background 140ms ease, border-color 140ms ease, box-shadow 140ms ease;
}
.btn::before {
  /* left accent stripe — hidden until interaction */
  content: "";
  position: absolute;
  left: 0; top: 10%; bottom: 10%;
  width: 2px;
  background: linear-gradient(180deg, #ff6600, #4d148c);
  opacity: 0;
  transition: opacity 140ms ease;
}
.btn::after {
  /* sweeping shine on hover */
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg, transparent 30%, rgba(255,102,0,0.08) 50%, transparent 70%);
  transform: translateX(-100%);
  transition: transform 600ms ease;
  pointer-events: none;
}
.btn:active {
  transform: scale(0.985);
  border-color: #ff6600;
  box-shadow: 0 0 0 1px rgba(255,102,0,0.4), 0 6px 24px rgba(255,102,0,0.18);
}
.btn:active::before { opacity: 1; }
@media (hover: hover) {
  .btn:hover {
    border-color: #2e2e2e;
    background: linear-gradient(180deg, rgba(28,28,28,0.92) 0%, rgba(14,14,14,0.92) 100%);
    box-shadow: 0 6px 28px rgba(0,0,0,0.55), 0 0 0 1px rgba(255,102,0,0.18);
  }
  .btn:hover::before { opacity: 1; }
  .btn:hover::after { transform: translateX(100%); }
}
.btn:focus-visible {
  outline: none;
  border-color: #ff6600;
  box-shadow: 0 0 0 2px rgba(255,102,0,0.35);
}

/* avatar — letter chip with FedEx-tinted gradient */
.btn-avatar {
  flex: 0 0 auto;
  width: 42px; height: 42px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    linear-gradient(135deg, rgba(255,102,0,0.25), rgba(77,20,140,0.25)),
    #0c0c0c;
  border: 1px solid #232323;
  position: relative;
}
.btn-avatar::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 9px;
  background: linear-gradient(135deg, transparent 0%, rgba(255,255,255,0.05) 50%, transparent 100%);
  pointer-events: none;
}
.btn-letter {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  text-shadow: 0 0 12px rgba(255,102,0,0.5);
  letter-spacing: -0.02em;
}

/* svg icon — color via mask so monochrome stays consistent */
.btn-icon {
  display: none;
  width: 22px; height: 22px;
  background-color: #fff;
  -webkit-mask-position: center;
          mask-position: center;
  -webkit-mask-repeat: no-repeat;
          mask-repeat: no-repeat;
  -webkit-mask-size: contain;
          mask-size: contain;
  filter: drop-shadow(0 0 8px rgba(255,102,0,0.35));
  transition: background-color 140ms ease;
}
.btn-avatar.has-icon .btn-letter { display: none; }
.btn-avatar.has-icon .btn-icon { display: block; }
.btn:hover .btn-icon,
.btn:active .btn-icon { background-color: #ff6600; }

.btn-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.btn-title {
  font-size: 15px;
  font-weight: 600;
  color: #fff;
  letter-spacing: -0.005em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.btn-host {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11.5px;
  color: #777;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: 0.01em;
}

.btn-arrow {
  flex: 0 0 auto;
  width: 32px; height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #666;
  background: rgba(255,255,255,0.02);
  border: 1px solid #1c1c1c;
  transition: color 140ms ease, transform 180ms ease, background 140ms ease, border-color 140ms ease;
}
.btn:hover .btn-arrow,
.btn:active .btn-arrow {
  color: #ff6600;
  transform: translate(2px, -2px);
  background: rgba(255,102,0,0.08);
  border-color: rgba(255,102,0,0.35);
}

/* ============================================================
   FOOTER
   ============================================================ */
.foot {
  margin-top: auto;
  padding-top: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: #555;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.foot-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: #00ff8c;
  box-shadow: 0 0 8px #00ff8c;
  animation: pulse 1.6s ease-in-out infinite;
}

/* ============================================================
   ANIMATIONS
   ============================================================ */
@keyframes floorScroll {
  0%   { background-position: 0 0; }
  100% { background-position: 0 60px; }
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%      { opacity: 0.55; transform: scale(0.85); }
}
@keyframes starTwinkle {
  0%   { opacity: 0.55; }
  100% { opacity: 0.85; }
}

/* mobile nudges */
@media (max-width: 380px) {
  .wrap { padding-left: 16px; padding-right: 16px; }
  .logo { width: 150px; }
  .btn { padding: 10px 12px 10px 10px; min-height: 60px; }
  .btn-avatar { width: 38px; height: 38px; }
  .btn-arrow { width: 28px; height: 28px; }
}

/* desktop tighter */
@media (min-width: 600px) {
  .wrap { padding-top: 60px; }
  .head { padding-bottom: 44px; }
  .logo { width: 200px; }
}

/* reduced motion */
@media (prefers-reduced-motion: reduce) {
  .bg-floor-grid,
  .bg-stars,
  .foot-dot { animation: none; }
  .btn,
  .btn::after,
  .btn-arrow { transition: none; }
}
