/* ============================================================
   DEJAVU — Social hub
   Monochrome, dark, hairline-led. No frameworks, no webfonts.
   ============================================================ */

:root {
  /* Surfaces */
  --ink:        #08090a;
  --card:       #0c0d10;
  --card-hover: #101216;
  --tile:       #15171c;

  /* Hairlines */
  --line:   rgba(255, 255, 255, 0.09);
  --line-2: rgba(255, 255, 255, 0.17);
  --line-3: rgba(255, 255, 255, 0.30);

  /* Type */
  --text:  #f2f3f5;
  --muted: #9aa0a9;
  --dim:   #7a8089;

  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI Variable Text",
          "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --shell: 720px;
  --radius: 16px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

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

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

body {
  margin: 0;
  min-height: 100%;
  background-color: var(--ink);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

a { color: inherit; }

img, svg { display: block; max-width: 100%; }

::selection { background: rgba(255, 255, 255, 0.16); }

/* ---------- Focus ----------------------------------------- */

:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.75);
  outline-offset: 3px;
  border-radius: 6px;
}
:focus:not(:focus-visible) { outline: none; }

.skip {
  position: absolute;
  left: 50%;
  top: 10px;
  transform: translate(-50%, -160%);
  z-index: 10;
  padding: 10px 16px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  background: var(--tile);
  font-size: 14px;
  text-decoration: none;
}
.skip:focus { transform: translate(-50%, 0); }

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* ---------- Background ------------------------------------ */

.bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: var(--ink);
}

.bg__glow {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(58% 42% at 50% -6%,  rgba(255, 255, 255, 0.085), transparent 70%),
    radial-gradient(80% 50% at 50% 108%, rgba(255, 255, 255, 0.045), transparent 72%);
}

.bg__grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right,  rgba(255, 255, 255, 0.055) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.055) 1px, transparent 1px);
  background-size: 88px 88px;
  background-position: center top;
  -webkit-mask-image: radial-gradient(58% 48% at 50% 0%, #000 0%, transparent 78%);
          mask-image: radial-gradient(58% 48% at 50% 0%, #000 0%, transparent 78%);
  opacity: 0.55;
}

/* A single hairline of light dropping into the mark — the page's spine. */
.bg__seam {
  position: absolute;
  top: 0;
  left: 50%;
  width: 1px;
  height: 138px;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0.28), transparent);
}

/* ---------- Shell ----------------------------------------- */

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

/* ---------- Brand ----------------------------------------- */

.brand { text-align: center; }

.brand__logo {
  width: 76px;
  height: 76px;
  margin: 0 auto 30px;
  color: var(--text);
}
.brand__logo img,
.brand__logo svg { width: 100%; height: 100%; }

/* The wordmark carries a faint offset echo behind it — déjà vu. */
.wordmark {
  position: relative;
  display: inline-block;
  margin: 0;
  font-size: clamp(30px, 8.6vw, 46px);
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0.3em;
  text-indent: 0.3em; /* cancels the trailing letter-space so the word optically centres */
}
.wordmark__echo {
  position: absolute;
  inset: 0;
  color: rgba(255, 255, 255, 0.115);
  transform: translateX(0.24em);
  pointer-events: none;
}

.brand__role {
  margin: 22px 0 0;
  color: var(--muted);
  font-size: 13.5px;
  font-weight: 500;
  letter-spacing: 0.14em;
}

.brand__tagline {
  margin: 14px 0 0;
  font-size: clamp(19px, 5vw, 23px);
  font-weight: 300;
  letter-spacing: -0.015em;
  color: var(--text);
}

.brand__intro {
  max-width: 44ch;
  margin: 20px auto 0;
  color: var(--dim);
  font-size: 15px;
  line-height: 1.65;
}

.rule {
  width: 100%;
  height: 1px;
  margin: 44px 0 28px;
  border: 0;
  background: linear-gradient(to right, transparent, var(--line) 22%, var(--line) 78%, transparent);
}

/* ---------- Account cards --------------------------------- */

.accounts { list-style: none; margin: 0; padding: 0; }

.accounts > li + li { margin-top: 12px; }

.card {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  padding: 17px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  text-decoration: none;
  transition:
    transform 0.32s var(--ease),
    border-color 0.32s var(--ease),
    background-color 0.32s var(--ease),
    box-shadow 0.32s var(--ease);
}

/* Hairline highlight along the top edge, brightening on hover. */
.card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0.05), transparent 42%);
  opacity: 0;
  transition: opacity 0.32s var(--ease);
  pointer-events: none;
}

.card__icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--tile);
  color: var(--text);
  transition: border-color 0.32s var(--ease), background-color 0.32s var(--ease);
}
.card__icon svg { width: 22px; height: 22px; }

.card__body { min-width: 0; }

.card__head {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 4px 9px;
}

.card__name {
  font-size: 16.5px;
  font-weight: 550;
  letter-spacing: -0.005em;
}

.card__handle {
  color: var(--dim);
  font-size: 13.5px;
  letter-spacing: 0;
}

.card__desc {
  margin-top: 4px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.card__go {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  color: var(--dim);
  transition: transform 0.32s var(--ease), color 0.32s var(--ease);
}
.card__go svg { width: 20px; height: 20px; }

/* Hover / focus — desktop pointers only, so taps don't stick on mobile. */
@media (hover: hover) and (pointer: fine) {
  .card:hover {
    transform: translateY(-3px) scale(1.006);
    border-color: var(--line-2);
    background: var(--card-hover);
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.55);
  }
  .card:hover::before { opacity: 1; }
  .card:hover .card__icon { border-color: var(--line-2); background: #191c21; }
  .card:hover .card__go { transform: translateX(4px); color: var(--text); }
}

.card:focus-visible {
  border-color: var(--line-2);
  background: var(--card-hover);
}
.card:focus-visible .card__go { transform: translateX(4px); color: var(--text); }

.card:active { transform: translateY(-1px) scale(0.998); }

/* Empty state — account enabled but no URL set yet. */
.card--empty {
  border-style: dashed;
  border-color: rgba(255, 255, 255, 0.13);
  background: transparent;
  cursor: default;
}
.card--empty .card__icon { color: var(--dim); }
.card--empty .card__name { color: var(--muted); }
.card--empty .card__note {
  margin-top: 4px;
  color: var(--dim);
  font-size: 13.5px;
}
.card--empty .card__note code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12.5px;
  color: var(--muted);
}

/* ---------- QR -------------------------------------------- */

.qr {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 20px;
  margin-top: 34px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
}

.qr__code {
  width: 108px;
  height: 108px;
  padding: 9px;
  border-radius: 10px;
  background: #ffffff;
}
.qr__code img { width: 100%; height: 100%; }

.qr__title {
  margin: 0;
  font-size: 15.5px;
  font-weight: 550;
}
.qr__text {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}
.qr__target {
  margin-top: 8px;
  color: var(--dim);
  font-size: 13px;
  word-break: break-all;
}

/* ---------- Footer ---------------------------------------- */

.footer {
  margin-top: 52px;
  padding-top: 30px;
  border-top: 1px solid var(--line);
  text-align: center;
}

.footer__name {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.26em;
  text-indent: 0.26em;
}
.footer__role {
  margin: 9px 0 0;
  color: var(--muted);
  font-size: 13.5px;
}
.footer__tagline {
  margin: 4px 0 0;
  color: var(--dim);
  font-size: 13.5px;
}

.footer__link {
  display: inline-block;
  margin-top: 20px;
  padding-bottom: 2px;
  border-bottom: 1px solid var(--line-2);
  color: var(--text);
  font-size: 14px;
  text-decoration: none;
  transition: border-color 0.3s var(--ease), color 0.3s var(--ease);
}
.footer__link:hover { border-color: var(--line-3); }

.footer__legal {
  margin: 22px 0 0;
  color: var(--dim);
  font-size: 12.5px;
}

.noscript {
  margin: 24px 0 0;
  padding: 16px 18px;
  border: 1px dashed var(--line-2);
  border-radius: var(--radius);
  color: var(--muted);
  font-size: 14px;
  text-align: center;
}

/* ---------- Load sequence --------------------------------- */
/* One orchestrated entrance: the echo settles, then the page fills in. */

.js .reveal {
  opacity: 0;
  animation: rise 0.75s var(--ease) forwards;
  animation-delay: var(--delay, 0ms);
}

@keyframes rise {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: none; }
}

.js .brand__logo {
  opacity: 0;
  animation: mark 0.9s var(--ease) forwards;
}
@keyframes mark {
  from { opacity: 0; transform: scale(0.94); }
  to   { opacity: 1; transform: none; }
}

.js .wordmark__echo {
  animation: echo 1.5s var(--ease) 0.25s both;
}
@keyframes echo {
  0%   { opacity: 0; transform: translateX(0.75em); }
  40%  { opacity: 1; transform: translateX(0.75em); }
  100% { opacity: 1; transform: translateX(0.24em); }
}

.js .bg__seam {
  transform-origin: top;
  animation: seam 1.1s var(--ease) both;
}
@keyframes seam {
  from { transform: scaleY(0); opacity: 0; }
  to   { transform: scaleY(1); opacity: 1; }
}

/* ---------- Responsive ------------------------------------ */

@media (max-width: 620px) {
  .shell { padding: 60px 18px 44px; }

  .brand__logo { width: 62px; height: 62px; margin-bottom: 24px; }
  .brand__intro { font-size: 14.5px; }
  .rule { margin: 36px 0 24px; }

  .card {
    gap: 14px;
    padding: 15px 15px;
    border-radius: 15px;
  }
  .card__icon { width: 42px; height: 42px; border-radius: 11px; }
  .card__icon svg { width: 20px; height: 20px; }
  .card__name { font-size: 15.5px; }
  .card__desc { font-size: 13.5px; }
  .card__go { width: 26px; height: 26px; }
  .card__go svg { width: 18px; height: 18px; }

  .qr {
    grid-template-columns: 1fr;
    justify-items: center;
    gap: 16px;
    text-align: center;
    padding: 22px 18px;
  }
  .qr__code { width: 120px; height: 120px; }

  .bg__seam { height: 106px; }
}

@media (max-width: 360px) {
  .card__handle { width: 100%; }
}

/* Bigger tap targets on touch devices. */
@media (pointer: coarse) {
  .card { min-height: 76px; }
}

/* ---------- Reduced motion -------------------------------- */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .js .reveal { opacity: 1; transform: none; animation: none; }
  .js .brand__logo { opacity: 1; transform: none; animation: none; }
  .js .wordmark__echo { animation: none; opacity: 1; transform: translateX(0.24em); }
  .js .bg__seam { animation: none; transform: none; opacity: 1; }
  @media (hover: hover) and (pointer: fine) {
    .card:hover { transform: none; }
    .card:hover .card__go { transform: none; }
  }
}

/* ---------- Print ----------------------------------------- */

@media print {
  body { background: #fff; color: #000; }
  .bg, .skip { display: none; }
  .card { border-color: #ccc; background: #fff; }
  .card__desc, .brand__intro, .footer__legal { color: #444; }
}
