:root {
  --bg: #0f1115;
  --surface: rgba(255, 255, 255, 0.06);
  --surface-strong: rgba(255, 255, 255, 0.1);
  --text: #f4f5f7;
  --muted: #9aa3b2;
  --line: rgba(255, 255, 255, 0.12);
  --accent: #2575fc;
  --accent-2: #4d8fff;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
  --radius: 1.25rem;
  --font: "Sora", "Noto Sans TC", "Noto Sans SC", system-ui, sans-serif;
  --max: 26rem;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100dvh;
  font-family: var(--font);
  color: var(--text);
  background:
    radial-gradient(120% 80% at 50% -10%, rgba(37, 117, 252, 0.28), transparent 55%),
    radial-gradient(80% 50% at 100% 20%, rgba(77, 143, 255, 0.12), transparent 45%),
    linear-gradient(180deg, #12151c 0%, var(--bg) 40%, #0b0d11 100%);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  color: inherit;
  border: 0;
  background: none;
  cursor: pointer;
}

.page {
  width: min(100%, var(--max));
  margin: 0 auto;
  padding: 1rem 1rem calc(3rem + var(--safe-bottom));
  position: relative;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1rem;
  animation: rise 0.6s ease both;
}

.lang {
  display: inline-flex;
  padding: 0.2rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(10px);
}

.lang button {
  padding: 0.4rem 0.65rem;
  border-radius: 999px;
  font-size: 0.72rem;
  letter-spacing: 0.02em;
  color: var(--muted);
  transition: background 0.2s ease, color 0.2s ease;
}

.lang button[aria-pressed="true"] {
  background: var(--accent);
  color: #fff;
}

.icon-actions {
  display: flex;
  gap: 0.4rem;
}

.icon-btn {
  width: 2.5rem;
  height: 2.5rem;
  display: grid;
  place-items: center;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(10px);
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.icon-btn:hover,
.icon-btn:focus-visible {
  transform: translateY(-1px);
  background: var(--surface-strong);
  border-color: rgba(37, 117, 252, 0.5);
  outline: none;
}

.icon-btn svg {
  width: 1.2rem;
  height: 1.2rem;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 0.35rem);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.03));
  box-shadow: var(--shadow);
  animation: rise 0.7s 0.08s ease both;
}

.hero {
  position: relative;
  height: 8.75rem;
  overflow: hidden;
  background:
    radial-gradient(120% 90% at 15% 0%, rgba(77, 143, 255, 0.55), transparent 55%),
    radial-gradient(90% 80% at 90% 30%, rgba(37, 117, 252, 0.4), transparent 50%),
    linear-gradient(145deg, #1a3f8f 0%, #152038 48%, #0f1115 100%);
}

.hero::before {
  content: "";
  position: absolute;
  inset: -20%;
  background:
    repeating-linear-gradient(
      -18deg,
      transparent 0 18px,
      rgba(255, 255, 255, 0.035) 18px 19px
    );
  opacity: 0.9;
}

.hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 3.75rem;
  background: linear-gradient(180deg, transparent, rgba(23, 26, 33, 0.98));
}

.profile {
  display: grid;
  justify-items: center;
  text-align: center;
  padding: 0 1.25rem 1.5rem;
  margin-top: -3.25rem;
  position: relative;
  z-index: 1;
}

.avatar {
  width: 6.5rem;
  height: 6.5rem;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid #1b1f28;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  background: #222;
  animation: pop 0.55s 0.15s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.brand {
  margin: 1rem 0 0.35rem;
  font-size: clamp(1.45rem, 5vw, 1.7rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.role {
  margin: 0;
  color: var(--accent-2);
  font-size: 0.92rem;
  font-weight: 600;
}

.meta {
  margin: 0.45rem 0 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.lead {
  margin: 1rem 0 0;
  color: #c8ced8;
  font-size: 0.9rem;
  line-height: 1.55;
  max-width: 22rem;
}

.cta-wrap {
  width: 100%;
  margin-top: 1.35rem;
}

.btn-primary {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  padding: 0.95rem 1.2rem;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent), #1a5fe0);
  color: #fff;
  font-weight: 650;
  font-size: 1rem;
  box-shadow: 0 12px 28px rgba(37, 117, 252, 0.35);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-primary:hover,
.btn-primary:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 16px 34px rgba(37, 117, 252, 0.45);
  outline: none;
}

.btn-primary svg {
  width: 1.25rem;
  height: 1.25rem;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.btn-primary.is-success {
  background: linear-gradient(135deg, #24b86a, #1a9a56);
  box-shadow: 0 12px 28px rgba(36, 184, 106, 0.35);
}

.hint {
  margin: 0.65rem 0 0;
  color: var(--muted);
  font-size: 0.75rem;
  line-height: 1.4;
}

.actions {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.65rem;
  width: 100%;
  margin-top: 1.15rem;
}

.action {
  display: grid;
  gap: 0.5rem;
  justify-items: center;
  padding: 0.9rem 0.4rem 0.85rem;
  border-radius: 1rem;
  border: 1px solid var(--line);
  background: var(--surface);
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.action:hover,
.action:focus-visible {
  background: var(--surface-strong);
  border-color: rgba(37, 117, 252, 0.45);
  transform: translateY(-1px);
  outline: none;
}

.action .bubble {
  width: 2.75rem;
  height: 2.75rem;
  display: grid;
  place-items: center;
  border-radius: 999px;
  overflow: hidden;
}

.action .bubble svg {
  width: 1.35rem;
  height: 1.35rem;
  display: block;
}

.action.email .bubble {
  background: #ea4335;
}

.action.web .bubble {
  background: var(--accent);
}

.action.whatsapp .bubble {
  background: #25d366;
}

.action span {
  font-size: 0.75rem;
  color: #d5dae3;
}

.promo {
  margin: 1rem 0 0;
  padding: 1.1rem 1.15rem 1.2rem;
  border-radius: 1rem;
  border: 1px solid var(--line);
  background: rgba(37, 117, 252, 0.08);
  text-align: center;
  display: grid;
  justify-items: center;
}

.promo h2 {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 650;
}

.promo p {
  margin: 0.45rem 0 0.95rem;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.45;
  max-width: 20rem;
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.6rem 1.1rem;
  border-radius: 999px;
  border: 1px solid rgba(37, 117, 252, 0.45);
  color: #dce7ff;
  font-size: 0.82rem;
  font-weight: 600;
  transition: background 0.2s ease, transform 0.2s ease;
}

.btn-secondary:hover,
.btn-secondary:focus-visible {
  background: rgba(37, 117, 252, 0.18);
  transform: translateY(-1px);
  outline: none;
}

.faq {
  margin-top: 1rem;
  padding: 0 0.15rem;
  animation: rise 0.7s 0.12s ease both;
}

.faq h2 {
  margin: 0 0 0.75rem;
  font-size: 1rem;
  text-align: center;
}

.faq details {
  border: 1px solid var(--line);
  border-radius: 0.9rem;
  background: rgba(255, 255, 255, 0.04);
  padding: 0.85rem 1rem;
  margin-bottom: 0.55rem;
}

.faq summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 0.88rem;
  list-style: none;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: "+";
  float: right;
  color: var(--accent-2);
  font-weight: 700;
}

.faq details[open] summary::after {
  content: "–";
}

.faq details p {
  margin: 0.65rem 0 0;
  color: #c8ced8;
  font-size: 0.82rem;
  line-height: 1.55;
}

.footer {
  margin-top: 1.35rem;
  text-align: center;
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.5;
  animation: rise 0.7s 0.18s ease both;
  padding-bottom: 0.5rem;
}

.footer a {
  color: #c9d4ea;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.sheet-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  z-index: 40;
}

.sheet-backdrop.is-open {
  opacity: 1;
  pointer-events: auto;
}

.sheet {
  position: fixed;
  left: 50%;
  bottom: 0;
  width: min(100%, var(--max));
  transform: translate(-50%, calc(100% + 2.5rem));
  background: #151922;
  border: 1px solid var(--line);
  border-bottom: 0;
  border-radius: 1.25rem 1.25rem 0 0;
  padding: 1rem 1.15rem calc(1.5rem + var(--safe-bottom));
  z-index: 50;
  transition: transform 0.28s cubic-bezier(0.2, 0.8, 0.2, 1);
  visibility: hidden;
  pointer-events: none;
}

.sheet.is-open {
  transform: translate(-50%, 0);
  visibility: visible;
  pointer-events: auto;
}

.sheet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.85rem;
}

.sheet-head h2 {
  margin: 0;
  font-size: 1rem;
}

.sheet p {
  margin: 0;
  color: var(--muted);
  font-size: 0.85rem;
  line-height: 1.45;
  text-align: center;
}

#qr {
  width: 11rem;
  height: 11rem;
  margin: 1rem auto;
  padding: 0.75rem;
  border-radius: 1rem;
  background: #fff;
}

#qr svg {
  width: 100%;
  height: 100%;
  display: block;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(1.25rem + var(--safe-bottom));
  transform: translate(-50%, calc(100% + 2rem));
  z-index: 60;
  padding: 0.7rem 1rem;
  border-radius: 999px;
  background: #1f2430;
  border: 1px solid var(--line);
  color: var(--text);
  font-size: 0.82rem;
  box-shadow: var(--shadow);
  transition: transform 0.25s ease;
  white-space: nowrap;
  visibility: hidden;
  pointer-events: none;
  max-width: calc(100vw - 2rem);
  overflow: hidden;
  text-overflow: ellipsis;
}

.toast.is-show {
  transform: translate(-50%, 0);
  visibility: visible;
}

.seo-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pop {
  from {
    opacity: 0;
    transform: scale(0.86);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
