/* glass.css — stanmaxx Liquid Glass design system
   Shared by view (public profile), edit (preview), auth (login/signup) and
   the landing. Designed mobile-first; the linktree column is capped at
   --col-w (440px). */

:root {
  --c1: #FFE066;
  --c2: #FF8A3D;
  --c3: #FF3D7F;
  --c4: #9D2BFF;
  --motion-dur: 18s;
  --grad-angle: 180deg;
  --grad-intensity: 1;

  --col-w: 440px;
  --pad: 22px;

  --glass-bg: rgba(255, 255, 255, 0.16);
  --glass-bg-strong: rgba(255, 255, 255, 0.28);
  --glass-stroke: rgba(255, 255, 255, 0.55);
  --glass-stroke-soft: rgba(255, 255, 255, 0.32);
  --glass-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.7),
    inset 0 -1px 0 rgba(255, 255, 255, 0.12),
    0 1px 2px rgba(0, 0, 0, 0.06),
    0 12px 32px -12px rgba(28, 8, 40, 0.32),
    0 24px 48px -24px rgba(28, 8, 40, 0.32);

  --ink: rgba(28, 8, 40, 0.92);
  --ink-soft: rgba(28, 8, 40, 0.62);
  --ink-faint: rgba(28, 8, 40, 0.42);
  --ink-on: #fff;
  --ink-on-soft: rgba(255, 255, 255, 0.78);
}

* { box-sizing: border-box; }

html, body, #root { height: 100%; margin: 0; }
body {
  font-family: ui-sans-serif, -apple-system, "SF Pro Text", "Helvetica Neue",
               system-ui, sans-serif;
  font-size: 15px;
  color: var(--ink);
  background: #100018;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: inherit; text-decoration: none; }
button { font: inherit; }

/* ── Page ── */
.page {
  position: relative;
  min-height: 100%;
  width: 100%;
  isolation: isolate;
}

/* ── Background ── */
.bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}
.bg-base {
  position: absolute;
  inset: -10%;
  background:
    linear-gradient(var(--grad-angle),
      var(--c1) 0%,
      var(--c2) 38%,
      var(--c3) 70%,
      var(--c4) 100%);
  filter: saturate(var(--grad-intensity));
}
.bg-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: .85;
  mix-blend-mode: screen;
  will-change: transform;
}
.bg-blob-a {
  width: 70vmax; height: 70vmax;
  left: -20vmax; top: -20vmax;
  background: radial-gradient(circle at 40% 40%, var(--c1) 0%, transparent 65%);
  animation: drift-a var(--motion-dur) ease-in-out infinite;
}
.bg-blob-b {
  width: 80vmax; height: 80vmax;
  right: -30vmax; top: 10vmax;
  background: radial-gradient(circle at 50% 50%, var(--c4) 0%, transparent 60%);
  opacity: .55;
  animation: drift-b calc(var(--motion-dur) * 1.2) ease-in-out infinite;
}
.bg-blob-c {
  width: 60vmax; height: 60vmax;
  left: 5vmax; bottom: -25vmax;
  background: radial-gradient(circle at 50% 50%, var(--c3) 0%, transparent 65%);
  opacity: .7;
  animation: drift-c calc(var(--motion-dur) * 0.9) ease-in-out infinite;
}
.bg-grain {
  position: absolute;
  inset: 0;
  opacity: .07;
  mix-blend-mode: overlay;
  background-image:
    radial-gradient(rgba(255,255,255,.6) 1px, transparent 1px),
    radial-gradient(rgba(0,0,0,.5) 1px, transparent 1px);
  background-size: 3px 3px, 5px 5px;
  background-position: 0 0, 1px 2px;
}

@keyframes drift-a {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  50%      { transform: translate3d(8vmax, 6vmax, 0) scale(1.08); }
}
@keyframes drift-b {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  50%      { transform: translate3d(-6vmax, 4vmax, 0) scale(0.95); }
}
@keyframes drift-c {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  50%      { transform: translate3d(4vmax, -7vmax, 0) scale(1.06); }
}

/* ── Stage ── */
.stage {
  width: 100%;
  max-width: var(--col-w);
  margin: 0 auto;
  padding: 14px var(--pad) 60px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 16px;
}

/* ── Header ── */
.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 2px;
  color: var(--ink-on);
}
.header-mark {
  display: inline-flex; align-items: center; gap: 8px;
  font-weight: 600; letter-spacing: .01em;
  font-size: 13px;
  text-shadow: 0 1px 2px rgba(0,0,0,.15);
}
.header-mark .dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: #fff;
  box-shadow:
    0 0 0 2px rgba(255,255,255,.3),
    0 0 14px 2px rgba(255,255,255,.6);
}
.header-mark .muted { opacity: .7; font-weight: 500; }
.header-share, .header-edit-btn {
  width: 34px; height: 34px;
  display: grid; place-items: center;
  border-radius: 50%;
  border: .5px solid var(--glass-stroke);
  background: var(--glass-bg);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
          backdrop-filter: blur(20px) saturate(180%);
  color: var(--ink-on);
  cursor: pointer;
  box-shadow: var(--glass-shadow);
  transition: transform .15s ease;
}
.header-share:hover, .header-edit-btn:hover { transform: translateY(-1px); }
.header-actions { display: flex; gap: 8px; align-items: center; }

/* ── Cover ── */
.cover {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  margin: 8px auto 4px;
  max-width: calc(var(--col-w) - var(--pad) * 2);
}
.cover-frame {
  position: relative;
  width: 100%; height: 100%;
  border-radius: 32px;
  overflow: hidden;
  background: var(--glass-bg-strong);
  border: 1px solid var(--glass-stroke);
  box-shadow:
    inset 0 1.5px 0 rgba(255, 255, 255, 0.85),
    inset 0 -1px 0 rgba(255, 255, 255, 0.18),
    inset 0 0 0 1px rgba(255,255,255,.08),
    0 1px 2px rgba(0,0,0,.06),
    0 30px 60px -20px rgba(28, 8, 40, 0.55),
    0 60px 120px -40px rgba(28, 8, 40, 0.4);
  -webkit-backdrop-filter: blur(2px);
          backdrop-filter: blur(2px);
}
.cover-photo {
  position: absolute;
  inset: 6px;
  border-radius: 26px;
  overflow: hidden;
  transition: opacity .35s ease, transform .45s cubic-bezier(.4,0,.2,1);
}
.cover-photo svg,
.cover-photo img {
  display: block;
  width: 100%; height: 100%;
  object-fit: cover;
}
.cover-photo.is-hidden {
  opacity: 0;
  transform: scale(1.04);
  pointer-events: none;
}
/* Glass gloss sheen across the top */
.cover-gloss {
  position: absolute;
  inset: 6px;
  border-radius: 26px;
  pointer-events: none;
  background:
    linear-gradient(160deg,
      rgba(255,255,255,.42) 0%,
      rgba(255,255,255,.10) 22%,
      rgba(255,255,255,0) 42%,
      rgba(255,255,255,0) 70%,
      rgba(255,255,255,.18) 100%);
  mix-blend-mode: overlay;
}
/* Inner rim — crisp white edge */
.cover-rim {
  position: absolute;
  inset: 6px;
  border-radius: 26px;
  pointer-events: none;
  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,.35),
    inset 0 1px 0 rgba(255,255,255,.6);
}
/* Verified chip */
.cover-chip {
  position: absolute;
  left: 14px; bottom: 14px;
  display: inline-flex; align-items: center; gap: 5px;
  padding: 6px 10px 6px 8px;
  border-radius: 999px;
  font-size: 11px; font-weight: 600;
  letter-spacing: .02em;
  color: var(--ink-on);
  background: rgba(0, 0, 0, 0.28);
  border: .5px solid rgba(255,255,255,.22);
  -webkit-backdrop-filter: blur(14px) saturate(160%);
          backdrop-filter: blur(14px) saturate(160%);
  box-shadow: 0 1px 0 rgba(255,255,255,.18) inset, 0 4px 12px rgba(0,0,0,.18);
  text-transform: lowercase;
}
.cover-chip svg { color: var(--c1); }

/* Stack variant — layered cards behind */
.cover-shadow {
  position: absolute;
  inset: 0;
  border-radius: 32px;
  background: var(--glass-bg);
  border: .5px solid var(--glass-stroke-soft);
  box-shadow: 0 20px 40px -20px rgba(28,8,40,.4);
  -webkit-backdrop-filter: blur(14px);
          backdrop-filter: blur(14px);
}
.cover-shadow-1 {
  transform: translate(-10px, 8px) rotate(-3deg);
  opacity: .9;
}
.cover-shadow-2 {
  transform: translate(14px, 16px) rotate(4deg);
  opacity: .65;
}

/* ── Bubble ── */
.bubble {
  position: absolute;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px 8px 8px;
  background: rgba(255,255,255,.42);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
          backdrop-filter: blur(20px) saturate(180%);
  border: .5px solid rgba(255,255,255,.7);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.9),
    inset 0 -1px 0 rgba(255,255,255,.2),
    0 8px 24px -8px rgba(28,8,40,.4),
    0 16px 32px -16px rgba(28,8,40,.35);
  color: var(--ink);
  cursor: pointer;
  transition: transform .25s cubic-bezier(.4,0,.2,1),
              box-shadow .25s ease;
  z-index: 2;
}
.bubble:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.95),
    0 12px 32px -8px rgba(28,8,40,.5),
    0 20px 40px -16px rgba(28,8,40,.4);
}
.bubble.is-active {
  background: rgba(255,255,255,.78);
}

/* Bubble shapes */
.bubble-rounded { border-radius: 22px; }
.bubble-pill    { border-radius: 999px; }
.bubble-blob {
  border-radius: 60% 40% 70% 30% / 50% 60% 40% 50%;
}

/* Bubble corners — locked to top-right rounded by product spec, kept
   flexible so the public preview can render any saved corner. */
.bubble-tr { top: -14px; right: -10px; }
.bubble-bl { bottom: -14px; left: -10px; }
.bubble-br { bottom: -14px; right: -10px; }

.bubble-thumb {
  position: relative;
  width: 36px; height: 36px;
  border-radius: 14px;
  overflow: hidden;
  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,.5),
    0 2px 6px rgba(0,0,0,.2);
  flex: 0 0 auto;
}
.bubble-pill .bubble-thumb,
.bubble-blob .bubble-thumb { border-radius: 50%; }
.bubble-thumb svg,
.bubble-thumb img {
  display: block;
  width: 100%; height: 100%;
  object-fit: cover;
}

.bubble-close {
  position: absolute;
  inset: 0;
  display: grid; place-items: center;
  background: rgba(0,0,0,.45);
  color: #fff;
  -webkit-backdrop-filter: blur(4px);
          backdrop-filter: blur(4px);
}

.bubble-text {
  display: flex;
  flex-direction: column;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: -.005em;
  line-height: 1.2;
  color: var(--ink);
  white-space: nowrap;
}
.bubble-text span:first-child { color: var(--ink); }
.bubble-text span + span { color: var(--ink-soft); font-weight: 500; }

/* Tail — small glassy circle pointing toward cover */
.bubble-tail {
  position: absolute;
  width: 10px; height: 10px;
  border-radius: 50%;
  background: rgba(255,255,255,.42);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
          backdrop-filter: blur(20px) saturate(180%);
  border: .5px solid rgba(255,255,255,.7);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.9);
}
.bubble-tr .bubble-tail { left: 18px;  bottom: -10px; }
.bubble-bl .bubble-tail { right: 22px; top: -10px; }
.bubble-br .bubble-tail { left: 22px;  top: -10px; }
.bubble-tail::after {
  content: "";
  position: absolute;
  width: 4px; height: 4px; border-radius: 50%;
  background: rgba(255,255,255,.7);
  border: .5px solid rgba(255,255,255,.8);
}
.bubble-tr .bubble-tail::after { left: -8px;  bottom: -6px; }
.bubble-bl .bubble-tail::after { right: -8px; top: -6px; }
.bubble-br .bubble-tail::after { left: -8px;  top: -6px; }

/* ── Identity ── */
.identity {
  text-align: center;
  padding: 6px 8px 0;
  color: var(--ink-on);
}
.identity-name {
  margin: 0 0 4px;
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -0.025em;
  text-shadow: 0 1px 2px rgba(0,0,0,.14);
  display: inline-flex;
  align-items: baseline;
  gap: 0;
  line-height: 1.05;
}
.identity-given {
  background: linear-gradient(180deg, #FFFBEC 0%, #FFE7B0 100%);
  -webkit-background-clip: text;
          background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  filter: drop-shadow(0 1px 2px rgba(60,10,40,.18));
}
.identity-handle {
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -0.025em;
  color: #fff;
  opacity: .92;
}
.identity-tag {
  margin: 4px 0 0;
  font-size: 13.5px;
  line-height: 1.45;
  color: var(--ink-on-soft);
  font-weight: 500;
  text-wrap: pretty;
  text-shadow: 0 1px 2px rgba(0,0,0,.1);
}

/* ── Glass surfaces (event + links) ── */
.glass {
  background: var(--glass-bg);
  border: .5px solid var(--glass-stroke);
  -webkit-backdrop-filter: blur(22px) saturate(180%);
          backdrop-filter: blur(22px) saturate(180%);
  box-shadow: var(--glass-shadow);
  border-radius: 22px;
  color: var(--ink-on);
  position: relative;
  overflow: hidden;
}
.glass::before {
  content: "";
  position: absolute; inset: 0;
  border-radius: inherit;
  background: linear-gradient(160deg,
    rgba(255,255,255,.35) 0%,
    rgba(255,255,255,0) 40%);
  pointer-events: none;
}

/* ── Event ── */
.event {
  display: grid;
  grid-template-columns: 56px 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 14px 14px 14px 14px;
  margin-top: 6px;
  cursor: pointer;
  transition: transform .2s ease;
}
.event:hover { transform: translateY(-1px); }
.event-date {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 56px; height: 56px;
  background: rgba(255,255,255,.78);
  color: var(--ink);
  border-radius: 16px;
  border: .5px solid rgba(255,255,255,.9);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.95),
    0 4px 10px -4px rgba(0,0,0,.2);
  line-height: 1;
}
.event-d {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}
.event-m {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  margin-top: 4px;
  color: var(--ink-soft);
}
.event-body { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.event-badge {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--ink-on);
  opacity: .9;
  margin-bottom: 2px;
}
.event-pulse {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 0 0 rgba(255,255,255,.7);
  animation: pulse 1.6s ease-out infinite;
}
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(255,255,255,.7); }
  70%  { box-shadow: 0 0 0 8px rgba(255,255,255,0); }
  100% { box-shadow: 0 0 0 0 rgba(255,255,255,0); }
}
.event-title {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--ink-on);
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
}
.event-sub {
  font-size: 12.5px;
  color: var(--ink-on-soft);
  font-weight: 500;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
}
.event-cta {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 8px 12px 8px 14px;
  background: rgba(255,255,255,.85);
  color: var(--ink);
  font-size: 12px;
  font-weight: 600;
  border-radius: 999px;
  border: .5px solid rgba(255,255,255,.95);
  box-shadow: 0 4px 10px -4px rgba(0,0,0,.2),
              inset 0 1px 0 rgba(255,255,255,.9);
  white-space: nowrap;
}

/* ── Links ── */
.links {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 4px;
}
.link {
  display: grid;
  grid-template-columns: 40px 1fr 28px;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  cursor: pointer;
  transition: transform .15s ease, background .2s ease;
}
.link:hover {
  transform: translateY(-1px);
  background: rgba(255,255,255,.24);
}
.link-icon {
  width: 40px; height: 40px;
  display: grid; place-items: center;
  border-radius: 14px;
  background: rgba(255,255,255,.32);
  border: .5px solid rgba(255,255,255,.55);
  color: var(--ink-on);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.6);
}
.link-icon svg { width: 20px; height: 20px; }
.link-body { min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.link-label {
  font-size: 14.5px;
  font-weight: 600;
  letter-spacing: -0.005em;
  color: var(--ink-on);
}
.link-sub {
  font-size: 12px;
  color: var(--ink-on-soft);
  font-weight: 500;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
}
.link-arrow {
  color: var(--ink-on);
  opacity: .55;
  display: grid; place-items: center;
}

/* ── Footer ── */
.footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 24px 0 12px;
  font-size: 11px;
  color: var(--ink-on-soft);
  letter-spacing: .02em;
  text-shadow: 0 1px 2px rgba(0,0,0,.12);
}
.footer .dot-sep { opacity: .55; }
.footer a:hover { color: var(--ink-on); }

/* ── Empty state placeholder photos ── */
.photo-placeholder {
  width: 100%; height: 100%;
  background: linear-gradient(135deg,
    rgba(255,255,255,.3) 0%,
    rgba(255,255,255,.1) 100%);
  display: grid; place-items: center;
  color: var(--ink-on-soft);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: .02em;
}

/* ── Mobile tuning ── */
@media (max-width: 480px) {
  :root { --pad: 18px; }
  .stage { padding: 10px var(--pad) 44px; gap: 14px; }
  .header-mark { font-size: 12.5px; }
  .cover { margin-top: 4px; }
  .cover-frame { border-radius: 28px; }
  .cover-photo { inset: 5px; border-radius: 23px; }
  .cover-rim, .cover-gloss { inset: 5px; border-radius: 23px; }
  .cover-chip { left: 12px; bottom: 12px; padding: 5px 9px 5px 7px; font-size: 10.5px; }
  .identity { padding-top: 2px; }
  .identity-name { font-size: 26px; }
  .identity-handle { font-size: 26px; }
  .identity-tag { font-size: 12.5px; }
  .event { grid-template-columns: 50px 1fr auto; gap: 12px; padding: 12px; }
  .event-date { width: 50px; height: 50px; border-radius: 14px; }
  .event-d { font-size: 21px; }
  .event-title { font-size: 15px; }
  .event-sub { font-size: 12px; }
  .event-cta { padding: 7px 11px 7px 13px; font-size: 11.5px; }
  .links { gap: 8px; }
  .link { grid-template-columns: 38px 1fr 22px; gap: 10px; padding: 11px 12px; min-height: 60px; }
  .link-icon { width: 38px; height: 38px; border-radius: 13px; }
  .link-icon svg { width: 18px; height: 18px; }
  .link-label { font-size: 14px; }
  .link-sub { font-size: 11.5px; }
  .bubble { padding: 7px 12px 7px 7px; gap: 9px; }
  .bubble-thumb { width: 32px; height: 32px; border-radius: 12px; }
  .bubble-text { font-size: 11.5px; }
  .footer { padding-top: 18px; font-size: 10.5px; }
}
@media (max-width: 360px) {
  .identity-name, .identity-handle { font-size: 23px; }
  .cover-frame { border-radius: 24px; }
}

/* Honour the iPhone safe-area */
.stage {
  padding-bottom: max(60px, env(safe-area-inset-bottom));
}

/* ── Reduced motion ── */
@media (prefers-reduced-motion: reduce) {
  .bg-blob { animation: none !important; }
  .event-pulse { animation: none !important; }
}
