/* BusCard — Richard B. Jamison personal digital card
   Cleopas / VOME-inspired visual language; facts from intake/FACTS.md only */

:root {
  --bg: #0b1612;
  --bg-elevated: #12201a;
  --bg-pill: rgba(18, 40, 30, 0.85);
  --border: rgba(232, 220, 200, 0.22);
  --border-soft: rgba(232, 220, 200, 0.14);
  --text: #f5f1ea;
  --text-muted: rgba(245, 241, 234, 0.72);
  --text-dim: rgba(245, 241, 234, 0.48);
  --peach: #e8b89a;
  --peach-deep: #d4a07f;
  --peach-ink: #2a1a12;
  --gold: #c9a86a;
  --crimson: #8b1e28;
  --serif: "Cormorant Garamond", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --sans: "DM Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --radius-pill: 999px;
  --radius-btn: 18px;
  --radius-row: 16px;
  --shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

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

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  background: #050a08;
  color: var(--text);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  display: flex;
  justify-content: center;
  min-height: 100dvh;
}

.card-shell {
  width: 100%;
  max-width: 430px;
  min-height: 100dvh;
  background: var(--bg);
  position: relative;
  overflow-x: hidden;
  box-shadow: var(--shadow);
}

/* —— Hero —— */
.hero {
  position: relative;
  height: clamp(280px, 52vw, 360px);
  max-height: 420px;
  overflow: hidden;
}

.geo-stage {
  position: absolute;
  inset: 0;
  background: #0a1612;
}

.hero-stage {
  position: absolute;
  inset: 0;
  background: #050a08;
}

.hero-video,
.hero-fallback {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 40%;
  pointer-events: none;
}

.hero-fallback {
  z-index: 0;
}

.hero-video {
  z-index: 1;
}

@media (prefers-reduced-motion: reduce) {
  .hero-video { display: none; }
  .hero-fallback { display: block !important; }
}



.geo-layer {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transform: scale(1.04) rotate(-1deg);
  transition: opacity 0.55s ease, transform 0.7s ease;
  pointer-events: none;
}

.geo-layer.is-active {
  opacity: 1;
  transform: scale(1) rotate(0deg);
}

.geo-vignette {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 65% 50% at 50% 38%, transparent 0%, rgba(11, 22, 18, 0.2) 50%, rgba(11, 22, 18, 0.88) 100%),
    linear-gradient(to bottom, transparent 50%, var(--bg) 100%);
  pointer-events: none;
}

.hero-top {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 3;
  display: flex;
  justify-content: flex-end;
  align-items: flex-start;
  padding: 16px 16px 0;
  gap: 10px;
}

.icon-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: rgba(11, 22, 18, 0.45);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: var(--text);
  display: grid;
  place-items: center;
  cursor: pointer;
  padding: 0;
  transition: background 0.2s, border-color 0.2s, transform 0.15s;
}

.icon-btn:hover,
.icon-btn:focus-visible {
  background: rgba(232, 184, 154, 0.12);
  border-color: var(--peach);
  outline: none;
}

.icon-btn:active { transform: scale(0.94); }

.icon-btn svg { width: 18px; height: 18px; }

.portrait-wrap {
  position: absolute;
  left: 50%;
  bottom: 8px;
  transform: translateX(-50%);
  z-index: 2;
  width: min(168px, 42vw);
  aspect-ratio: 1;
}

.portrait-ring {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  padding: 3px;
  background: linear-gradient(145deg, var(--gold), var(--peach), var(--crimson));
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.45);
}

.portrait {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  background: #0a1210;
  display: block;
  border: 3px solid var(--bg);
}

/* —— Body —— */
.body {
  position: relative;
  z-index: 1;
  padding: 8px 20px calc(28px + var(--safe-bottom));
}

.name-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 4px;
}

.name {
  margin: 0;
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(1.85rem, 7.2vw, 2.35rem);
  line-height: 1.1;
  letter-spacing: -0.01em;
  color: var(--text);
}

.tap-btn {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-family: var(--sans);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  cursor: pointer;
  padding: 6px 2px;
}

.tap-btn .tap-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid var(--border);
  display: grid;
  place-items: center;
  transition: transform 0.45s ease, border-color 0.2s, background 0.2s;
  background: rgba(18, 32, 26, 0.6);
}

.tap-btn:hover .tap-icon,
.tap-btn:focus-visible .tap-icon {
  border-color: var(--peach);
  background: rgba(232, 184, 154, 0.1);
  outline: none;
}

.tap-btn.is-spinning .tap-icon {
  transform: rotate(180deg);
}

.tap-btn svg { width: 14px; height: 14px; }

.titles {
  margin: 8px 0 0;
  font-size: 0.92rem;
  line-height: 1.45;
  color: var(--text-muted);
  font-weight: 400;
}

.pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  background: var(--bg-pill);
  color: var(--text);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  transition: border-color 0.2s, background 0.2s;
}

.pill:hover,
.pill:focus-visible {
  border-color: var(--peach);
  background: rgba(232, 184, 154, 0.08);
  outline: none;
}

.pill-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--peach);
  box-shadow: 0 0 0 2px rgba(232, 184, 154, 0.2);
}

/* CTA */
.save-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  margin-top: 18px;
  padding: 16px 20px;
  border: none;
  border-radius: var(--radius-btn);
  background: var(--peach);
  color: var(--peach-ink);
  font-family: var(--sans);
  font-size: 1.05rem;
  font-weight: 650;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(232, 184, 154, 0.22);
  transition: background 0.2s, transform 0.15s;
}

.save-cta:hover,
.save-cta:focus-visible {
  background: #f0c4a8;
  outline: none;
}

.save-cta:active { transform: scale(0.985); }

.save-cta svg { width: 18px; height: 18px; flex-shrink: 0; }

/* Quick grid */
.quick-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 14px;
}

.quick-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 88px;
  padding: 14px 8px;
  border-radius: var(--radius-btn);
  border: 1px solid var(--border);
  background: rgba(18, 32, 26, 0.55);
  color: var(--text);
  text-decoration: none;
  font-size: 0.78rem;
  font-weight: 500;
  transition: border-color 0.2s, background 0.2s, transform 0.15s;
}

.quick-btn:hover,
.quick-btn:focus-visible {
  border-color: var(--peach);
  background: rgba(232, 184, 154, 0.08);
  outline: none;
}

.quick-btn:active { transform: scale(0.97); }

.quick-btn .qi {
  width: 28px;
  height: 28px;
  color: var(--peach);
}

.quick-btn .qi svg { width: 100%; height: 100%; }

/* FOLLOW ALONG */
.follow {
  margin-top: 26px;
}

.follow-label {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  color: var(--gold);
  font-size: 0.68rem;
  font-weight: 650;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.follow-label::before,
.follow-label::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(201, 168, 106, 0.45), transparent);
}

.follow-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.follow-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border-radius: var(--radius-row);
  border: 1px solid var(--border-soft);
  background: rgba(18, 32, 26, 0.45);
  text-decoration: none;
  color: inherit;
  transition: border-color 0.2s, background 0.2s;
}

.follow-row:hover,
.follow-row:focus-visible {
  border-color: var(--peach);
  background: rgba(232, 184, 154, 0.07);
  outline: none;
}

.follow-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: rgba(232, 184, 154, 0.1);
  border: 1px solid var(--border-soft);
  display: grid;
  place-items: center;
  color: var(--peach);
  flex-shrink: 0;
}

.follow-icon svg { width: 18px; height: 18px; }

.follow-text {
  flex: 1;
  min-width: 0;
}

.follow-title {
  display: block;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.25;
}

.follow-sub {
  display: block;
  margin-top: 2px;
  font-size: 0.78rem;
  color: var(--text-dim);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.follow-arrow {
  color: var(--text-dim);
  flex-shrink: 0;
}

.follow-arrow svg { width: 16px; height: 16px; }

/* Footer */
.footer {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  margin-top: 28px;
  padding-top: 8px;
}

.footer-mark {
  font-family: var(--serif);
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  color: var(--text-dim);
  text-transform: uppercase;
}

.footer-mark span {
  color: var(--gold);
  font-weight: 600;
}

/* Modals / sheets */
.overlay {
  position: fixed;
  inset: 0;
  z-index: 40;
  background: rgba(0, 0, 0, 0.55);
  display: none;
  align-items: flex-end;
  justify-content: center;
  padding: 16px;
  padding-bottom: calc(16px + var(--safe-bottom));
}

.overlay.is-open { display: flex; }

.sheet {
  width: 100%;
  max-width: 430px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 22px;
  padding: 22px 20px 20px;
  box-shadow: var(--shadow);
  animation: sheet-up 0.28s ease;
}

@keyframes sheet-up {
  from { transform: translateY(18px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.sheet h2 {
  margin: 0 0 6px;
  font-family: var(--serif);
  font-size: 1.35rem;
  font-weight: 600;
}

.sheet p {
  margin: 0 0 16px;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.sheet-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sheet-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 13px 16px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: rgba(11, 22, 18, 0.6);
  color: var(--text);
  font-family: var(--sans);
  font-size: 0.95rem;
  font-weight: 550;
  cursor: pointer;
  text-decoration: none;
}

.sheet-btn.primary {
  background: var(--peach);
  color: var(--peach-ink);
  border-color: transparent;
}

.sheet-btn:hover,
.sheet-btn:focus-visible { outline: none; border-color: var(--peach); }

.qr-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin: 8px 0 16px;
}

.qr-box img,
.qr-box canvas,
.qr-box svg {
  width: 200px;
  height: 200px;
  border-radius: 12px;
  background: #fff;
  padding: 10px;
}

.qr-url {
  font-size: 0.75rem;
  color: var(--text-dim);
  word-break: break-all;
  text-align: center;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  border: 0;
}

@media (min-width: 480px) {
  body { padding: 24px 0; align-items: flex-start; }
  .card-shell {
    min-height: auto;
    border-radius: 28px;
    border: 1px solid var(--border-soft);
    overflow: hidden;
  }
  .hero { height: 340px; }
}


/* Video-forward hero — no portrait circle */
.hero--video {
  height: clamp(320px, 72vw, 480px);
  max-height: 560px;
}

.hero--video .portrait-wrap {
  display: none !important;
}

.hero--video .hero-video,
.hero--video .hero-fallback {
  object-position: center center;
}

.hero--video .geo-vignette {
  background:
    radial-gradient(ellipse 80% 60% at 50% 45%, transparent 0%, rgba(11, 22, 18, 0.12) 55%, rgba(11, 22, 18, 0.75) 100%),
    linear-gradient(to bottom, transparent 62%, var(--bg) 100%);
}


/* Never show native video chrome / play button */
.hero-video::-webkit-media-controls,
.hero-video::-webkit-media-controls-start-playback-button,
.hero-video::-webkit-media-controls-overlay-play-button {
  display: none !important;
  -webkit-appearance: none;
  opacity: 0;
  pointer-events: none;
}
.hero-video {
  pointer-events: none;
}
