:root {
  --bg-page: #a89a8c;
  --card-cream: #f7e9da;
  --card-cream-2: #f3e2d0;
  --ink: #1c1a17;
  --ink-soft: #2b2722;
  --pill-border: rgba(28, 26, 23, 0.45);
  --pill-bg: rgba(255, 255, 255, 0.25);
  --pill-bg-hover: rgba(255, 255, 255, 0.45);
  --icon-circle-bg: #f0f6ff;
  --navy: #0b1230;
  --gold-bright: #f7e7b4;
  --gold-mid: #d4af37;
  --gold-deep: #9c7a26;
  --font-mono: "Space Mono", "Courier New", monospace;
  --font-body: "Noto Sans Thai", "Space Mono", monospace;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  background: var(--bg-page);
  background: radial-gradient(circle at 50% 0%, #b6a899 0%, #a89a8c 60%);
  overflow-x: hidden;
}

.page-backdrop {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 64px;
  padding: 48px 24px;
  flex-wrap: wrap;
}

.card {
  width: 100%;
  max-width: 614px;
  min-width: 0;
  border-radius: 28px;
  background: linear-gradient(180deg, var(--card-cream) 0%, var(--card-cream-2) 100%);
  box-shadow: 0 30px 70px -20px rgba(20, 15, 8, 0.45), 0 0 0 1px rgba(255,255,255,0.25) inset;
  padding: 28px 28px 36px;
  position: relative;
}

/* status bar */
.status-bar {
  display: flex;
  justify-content: space-between;
  margin-bottom: 16px;
}

.icon-pill {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: none;
  background: #fffaf3;
  color: var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0,0,0,0.12);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.icon-pill:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(0,0,0,0.16);
}

/* profile */
.profile {
  text-align: center;
  padding: 4px 16px 8px;
}

.logo-badge {
  width: 132px;
  height: 132px;
  margin: 0 auto 22px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--navy);
  box-shadow: 0 10px 24px rgba(11, 18, 48, 0.35), 0 0 0 1px rgba(255,255,255,0.4) inset;
  position: relative;
}

.logo-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.32s ease, filter 0.32s ease;
}

/* curved fade + subtle blur overlays for logo */
.logo-badge::before {
  content: "";
  position: absolute;
  left: -10%;
  right: -10%;
  top: -18%;
  height: 72%;
  background: radial-gradient(60% 60% at 50% 0%, rgba(212,175,55,0.45) 0%, rgba(212,175,55,0.18) 28%, rgba(255,255,255,0) 60%);
  transform: rotate(-6deg);
  filter: blur(16px);
  opacity: 0.9;
  pointer-events: none;
  mix-blend-mode: screen;
  border-radius: 50% 50% 40% 40% / 60% 60% 40% 40%;
}

.logo-badge::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 42%;
  background: linear-gradient(180deg, rgba(11,18,48,0.28), rgba(11,18,48,0));
  filter: blur(8px);
  opacity: 0.9;
  pointer-events: none;
  border-radius: 0 0 40% 40% / 0 0 60% 60%;
}

/* gentle hover/press interaction to emphasize effect */
.logo-badge:hover .logo-img {
  transform: scale(1.02);
  filter: blur(0.6px);
}

@media (max-width: 480px) {
  .logo-badge { width: 108px; height: 108px; }
  .logo-badge::before { filter: blur(12px); top: -14%; }
  .logo-badge::after { filter: blur(6px); height: 36%; }
}

.brand-title {
  margin: 0 0 14px;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 28px;
  letter-spacing: -0.01em;
  color: var(--ink);
}

.brand-desc {
  margin: 0 auto 20px;
  max-width: 460px;
  font-size: 15px;
  line-height: 1.7;
  color: var(--ink-soft);
}

.social-row {
  display: flex;
  justify-content: center;
  gap: 18px;
  margin-bottom: 4px;
}

.social-icon {
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink);
  text-decoration: none;
  transition: transform 0.18s ease, opacity 0.18s ease;
}

.social-icon:hover {
  transform: translateY(-2px);
  opacity: 0.75;
}

/* link list */
.link-list {
  padding: 12px 4px 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.link-pill {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 17px 20px;
  border-radius: 999px;
  background: var(--pill-bg);
  border: 1.5px solid var(--pill-border);
  text-decoration: none;
  color: var(--ink);
  transition: transform 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.link-pill:hover {
  transform: translateY(-2px);
  background: var(--pill-bg-hover);
  box-shadow: 0 8px 18px rgba(20, 15, 8, 0.15);
}

.link-pill:active {
  transform: translateY(0);
}

.link-icon {
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink);
}

.link-label {
  flex: 1 1 auto;
  font-family: var(--font-mono);
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
  text-align: center;
  letter-spacing: -0.01em;
}

.link-menu {
  flex: 0 0 auto;
  font-size: 19px;
  line-height: 1;
  color: var(--ink-soft);
  opacity: 0.65;
  cursor: pointer;
}

/* QR panel (fixed floating badge in bottom-right) */
.qr-panel {
  position: fixed;
  right: 24px;
  bottom: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 12px;
  background: linear-gradient(180deg, rgba(255,255,255,0.98), var(--card-cream-2));
  border-radius: 14px;
  box-shadow: 0 18px 40px -12px rgba(20,15,8,0.45), 0 0 0 1px rgba(255,255,255,0.35) inset;
  z-index: 40;
  min-width: 140px;
  max-width: 220px;
}

.qr-label {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
}

.qr-frame {
  width: 140px;
  height: 140px;
  background: #fff;
  border-radius: 10px;
  padding: 10px;
  box-shadow: 0 12px 28px -8px rgba(20, 15, 8, 0.35);
}

.qr-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

@media (max-width: 720px) {
  .qr-panel {
    display: none;
  }
  .page-backdrop {
    padding: 32px 16px;
  }
}

@media (max-width: 480px) {
  .card {
    padding: 22px 18px 28px;
    border-radius: 22px;
  }
  .brand-title { font-size: 22px; }
  .logo-badge { width: 108px; height: 108px; }
  .link-pill { padding: 15px 16px; }
  .link-label { font-size: 14px; }
}

/* accessibility */
.link-pill:focus-visible,
.icon-pill:focus-visible,
.social-icon:focus-visible {
  outline: 2px solid var(--gold-mid);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  .link-pill, .social-icon, .icon-pill {
    transition: none;
  }
}
