/* RANQD digital business card.
   Generated from build/card.css - edit there, not in card/. */

:root {
  --ink: #07090d;
  --accent: #e8ff47;
  --text: #eef2f7;
  --muted: #7a96a8;
  --line: rgba(238, 242, 247, 0.10);
  --raise: rgba(238, 242, 247, 0.04);

  --body: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, 'SF Mono', Menlo, monospace;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
  background: var(--ink);
}

body {
  color: var(--text);
  font-family: var(--body);
  -webkit-font-smoothing: antialiased;
  /* No pull-to-refresh bounce revealing white behind a dark card. */
  overscroll-behavior: none;
}

/* The card is presented, often at arm's length - never let a tap zoom it. */
a, button { -webkit-tap-highlight-color: rgba(232, 255, 71, 0.15); }

.view {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  padding:
    calc(24px + env(safe-area-inset-top))
    calc(20px + env(safe-area-inset-right))
    calc(24px + env(safe-area-inset-bottom))
    calc(20px + env(safe-area-inset-left));
}

/* ── Visitor ──────────────────────────────────────────────────────────────
   Someone who scanned the code or followed the link. One job: get the
   details into their phone. */

.view-visitor { justify-content: center; align-items: center; }

.sheet {
  width: 100%;
  max-width: 420px;
  /* A faint lift off the ink so the card reads as an object, not a page. */
  background: linear-gradient(180deg, var(--raise), transparent 60%);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 30px 26px 26px;
}

/* The wordmark is inlined outlined vector, so it needs sizing, not a font. */
.wordmark {
  margin: 0 0 26px;
  line-height: 0;
}
.wordmark svg {
  display: block;
  /* Aspect is ~2:1; height drives it so the two placements stay consistent. */
  height: 34px;
  width: auto;
}
.wordmark-sm { margin: 0; }
.wordmark-sm svg { height: 42px; opacity: 0.9; }

.identity h1 {
  font-size: clamp(29px, 8vw, 38px);
  line-height: 1.1;
  letter-spacing: -0.4px;
  font-weight: 600;
  margin: 0 0 8px;
}

.role {
  margin: 0 0 26px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.5;
}
.role .sep { padding: 0 7px; opacity: 0.55; }

.btn-primary {
  display: block;
  padding: 15px 22px;
  border-radius: 11px;
  background: var(--accent);
  color: var(--ink);
  font-size: 16px;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
}
.btn-primary:active { transform: translateY(1px); }

.channels {
  list-style: none;
  margin: 24px 0 0;
  padding: 0;
  border-top: 1px solid var(--line);
}
.channels li { border-bottom: 1px solid var(--line); }

.channels a {
  display: flex;
  align-items: baseline;
  gap: 16px;
  /* 52px of height keeps every row a comfortable target. */
  padding: 15px 2px;
  text-decoration: none;
  color: var(--text);
}

.lbl {
  flex: 0 0 46px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--muted);
}
.val { font-size: 16px; word-break: break-word; }

/* ── Presenter ────────────────────────────────────────────────────────────
   Held up for someone else to scan. The code gets the room. */

.view-presenter { justify-content: center; align-items: center; gap: 22px; }

.plate {
  width: 100%;
  max-width: min(62vw, 330px);
  /* Always white, in both themes. The padding doubles as the quiet zone the
     code needs on top of the margin baked into the SVG. */
  background: #ffffff;
  border-radius: 16px;
  padding: 14px;
}

#qr {
  display: block;
  width: 100%;
  height: auto;
  /* Never smooth the modules - a blurred edge is a failed scan. */
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

.readout { text-align: center; }

.readout-name {
  margin: 0 0 4px;
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.2px;
}
.readout-role {
  margin: 0 0 12px;
  font-size: 13px;
  color: var(--muted);
}
.readout-line {
  margin: 0 0 3px;
  font-family: var(--mono);
  font-size: 14px;
  color: var(--text);
}

.toggle {
  display: flex;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
}

.toggle button {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-family: var(--body);
  font-size: 13px;
  font-weight: 600;
  padding: 9px 18px;
  border-radius: 999px;
  cursor: pointer;
}
.toggle button[aria-pressed='true'] {
  background: var(--accent);
  color: var(--ink);
}

/* ── Shared ───────────────────────────────────────────────────────────── */

/* Both views start hidden and one is revealed by script, so nothing flashes
   the wrong layout before the display-mode check has run. */
[hidden] { display: none !important; }

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

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}

/* Landscape phone, presenting: put the code beside the details rather than
   letting it shrink to nothing. */
@media (orientation: landscape) and (max-height: 560px) {
  .view-presenter {
    flex-direction: row;
    flex-wrap: wrap;
    align-content: center;
    gap: 26px;
  }
  .plate { max-width: min(46vw, 300px); }
  .readout { text-align: left; }
  .toggle { flex-basis: 100%; justify-content: center; }
}
