/* Microsite shared base — CSS variables driven */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
}

body.ms-page {
  font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  color: var(--ms-text, #111);
  background: var(--ms-bg, #fff);
  background-attachment: fixed;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}

.ms-page[data-bg="pattern"] {
  background-color: var(--ms-bg, #F8F5F0);
  background-image:
    linear-gradient(90deg, rgba(0,0,0,0.03) 1px, transparent 1px),
    linear-gradient(rgba(0,0,0,0.03) 1px, transparent 1px);
  background-size: 24px 24px;
}

.ms-wrap {
  width: 100%;
  max-width: 680px;
  margin: 0 auto;
  padding: 2.5rem 1.25rem 2rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.ms-avatar {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  object-fit: cover;
  background: rgba(255,255,255,0.15);
  box-shadow: 0 8px 24px rgba(0,0,0,0.15);
  margin-bottom: 1rem;
}

.ms-title {
  margin: 0 0 0.35rem;
  font-size: 1.35rem;
  font-weight: 700;
  text-align: center;
  color: var(--ms-text, #111);
  word-break: break-word;
}

.ms-desc {
  margin: 0 0 1.75rem;
  font-size: 0.95rem;
  font-weight: 400;
  text-align: center;
  opacity: 0.85;
  color: var(--ms-text, #111);
  max-width: 28rem;
  line-height: 1.45;
}

.ms-links {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.ms-page[data-button="torn"] .ms-links {
  gap: 1.1rem;
}

.ms-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 3.25rem;
  padding: 0.85rem 1.25rem;
  text-decoration: none;
  text-align: center;
  font-weight: 650;
  font-size: 0.95rem;
  color: var(--ms-text, #111);
  border-radius: var(--ms-button-radius, 12px);
  border: 2px solid transparent;
  background: rgba(255,255,255,0.18);
  backdrop-filter: blur(6px);
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, color 0.18s ease;
  word-break: break-word;
}

.ms-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.12);
}

.ms-page[data-button="outline"] .ms-link {
  background: transparent;
  border-color: currentColor;
}

.ms-page[data-button="outline"] .ms-link:hover {
  background: var(--ms-accent);
  color: #fff;
  border-color: var(--ms-accent);
}

.ms-page[data-button="rounded"] .ms-link,
.ms-page[data-button="pill"] .ms-link,
.ms-page[data-button="square"] .ms-link {
  background: var(--ms-accent);
  color: #fff;
  border-color: var(--ms-accent);
}

.ms-page[data-button="rounded"] .ms-link:hover,
.ms-page[data-button="pill"] .ms-link:hover,
.ms-page[data-button="square"] .ms-link:hover {
  filter: brightness(1.08);
}

/* Torn / brush-stroke — solid white fill so it always pops off busy backgrounds */
.ms-page[data-button="torn"] .ms-link {
  border-radius: 0;
  border: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  background: #ffffff;
  color: #1a1a2e;
  padding: 1.15rem 1.5rem;
  min-height: 3.5rem;
  filter: drop-shadow(0 3px 10px rgba(0, 0, 0, 0.18));
  /* Thick paint-stroke silhouette — deeper waves, fewer serrations */
  clip-path: polygon(
    0% 22%, 4% 8%, 8% 18%, 12% 4%, 17% 20%, 22% 6%, 27% 16%, 32% 3%,
    38% 19%, 43% 5%, 48% 17%, 53% 2%, 58% 21%, 63% 7%, 68% 15%, 73% 4%,
    78% 20%, 83% 6%, 88% 18%, 93% 3%, 97% 14%, 100% 9%,
    100% 78%, 96% 92%, 92% 82%, 88% 96%, 83% 80%, 78% 94%, 73% 84%, 68% 97%,
    62% 81%, 57% 95%, 52% 83%, 47% 98%, 42% 79%, 37% 93%, 32% 85%, 27% 96%,
    22% 80%, 17% 94%, 12% 82%, 7% 97%, 3% 86%, 0% 91%
  );
}

.ms-page[data-button="torn"] .ms-link:hover {
  background: #ffffff;
  color: #1a1a2e;
  box-shadow: none;
  filter: drop-shadow(0 6px 16px rgba(0, 0, 0, 0.28));
  transform: translateY(-2px);
}

.ms-preview-frame .ms-page[data-button="torn"] .ms-link {
  min-height: 2.75rem;
  padding: 0.75rem 1rem;
}

.ms-footer {
  width: 100%;
  padding: 1.5rem 1rem 2rem;
  text-align: center;
  margin-top: auto;
}

.ms-footer img {
  width: 10rem;
  max-width: 60%;
  height: auto;
  opacity: 0.9;
}

.ms-footer p {
  margin: 0.75rem 0 0;
  font-size: 0.8rem;
  opacity: 0.75;
  color: var(--ms-text, #111);
}

.ms-footer--light img {
  filter: brightness(0) invert(1);
  opacity: 0.7;
}

/* Preview mode (admin form phone frame) */
.ms-preview-frame {
  width: 280px;
  height: 520px;
  border-radius: 28px;
  border: 10px solid #1f2937;
  overflow: hidden;
  box-shadow: 0 20px 40px rgba(0,0,0,0.18);
  background: #111;
  position: relative;
}

.ms-preview-frame .ms-page {
  min-height: 100%;
  height: 100%;
  overflow-y: auto;
  font-size: 13px;
}

.ms-preview-frame .ms-wrap {
  padding: 1.25rem 0.85rem 1rem;
}

.ms-preview-frame .ms-avatar {
  width: 64px;
  height: 64px;
}

.ms-preview-frame .ms-title {
  font-size: 1rem;
}

.ms-preview-frame .ms-desc {
  font-size: 0.8rem;
  margin-bottom: 1rem;
}

.ms-preview-frame .ms-link {
  min-height: 2.5rem;
  font-size: 0.8rem;
  padding: 0.6rem 0.85rem;
}

.ms-preview-frame .ms-footer img {
  width: 7rem;
}
