/* Public profile pages. Mobile-first: this is what opens when a card is tapped. */
:root {
  --brand: #1f4e79;
  --on-brand: #ffffff;
  --ink: #16181d;
  --muted: #5b6270;
  --line: #e3e5ea;
  --surface: #ffffff;
  --page: #f4f5f7;
  --radius: 14px;
}
@media (prefers-color-scheme: dark) {
  :root { --ink: #eceef2; --muted: #a3a9b6; --line: #2d313a; --surface: #1b1e24; --page: #111317; }
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", sans-serif;
  overflow-wrap: anywhere;
}
a { color: inherit; }

.profile {
  max-width: 480px;
  margin: 0 auto;
  padding: 0 16px calc(32px + env(safe-area-inset-bottom));
}
.hero {
  margin: 0 -16px 16px;
  padding: 40px 16px 28px;
  background: var(--brand);
  color: var(--on-brand);
  text-align: center;
  border-radius: 0 0 var(--radius) var(--radius);
}
.logo {
  display: block;
  width: 96px;
  height: 96px;
  margin: 0 auto 14px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--surface);
  border: 3px solid var(--surface);
}
.logo.initials {
  display: grid;
  place-items: center;
  background: var(--on-brand);
  border-color: var(--on-brand);
  color: var(--brand);
  font-size: 34px;
  font-weight: 700;
}
h1 { margin: 0; font-size: 26px; line-height: 1.2; }
.tagline { margin: 6px 0 0; opacity: .9; }
.about { margin: 0 0 16px; color: var(--muted); text-align: center; }
.back { margin: 0 0 12px; text-align: center; font-size: 15px; }

.module {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 16px;
  margin-bottom: 12px;
}
.module h2 { margin: 0 0 12px; font-size: 17px; }
.module p { margin: 0 0 12px; }
.contact-name { font-size: 19px; font-weight: 650; margin: 0 !important; }
.contact-role { color: var(--muted); margin: 2px 0 0 !important; }
.contact-head { margin-bottom: 14px; }
.detail { color: var(--muted); font-size: 15px; }
.address { white-space: pre-line; }

/* Tap targets are at least 48px tall and full width on phones. */
.button, .action {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 16px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  font-weight: 600;
  text-decoration: none;
  text-align: center;
  -webkit-tap-highlight-color: transparent;
}
.button { width: 100%; }
.button.primary, .button.review { background: var(--brand); color: var(--on-brand); border-color: var(--brand); }
.button:active, .action:active, .link:active { transform: scale(.98); }
.button:focus-visible, .action:focus-visible, .link:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; }
.actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(90px, 1fr)); gap: 8px; margin-bottom: 12px; }
.actions:last-child { margin-bottom: 0; }
.stack { display: grid; gap: 8px; }

.links { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 52px;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--brand);
  border-radius: 12px;
  text-decoration: none;
}
.link-platform { font-weight: 600; }
.link-label { color: var(--muted); font-size: 14px; text-align: right; }
.platform-facebook { border-left-color: #1877f2; }
.platform-instagram { border-left-color: #d62976; }
.platform-tiktok { border-left-color: #25f4ee; }
.platform-youtube { border-left-color: #ff0000; }
.platform-linkedin { border-left-color: #0a66c2; }
.platform-x, .platform-threads { border-left-color: var(--ink); }
.whatsapp { border-color: #25d366; }
.viber { border-color: #7360f2; }

.empty { text-align: center; color: var(--muted); }
.powered { margin-top: 24px; text-align: center; font-size: 13px; color: var(--muted); }
.notice { padding-top: 64px; text-align: center; }
.notice h1 { margin-bottom: 12px; }
.landing .button { margin-top: 24px; }
.preview-banner { background: #fff4cc; color: #5a4300; text-align: center; padding: 8px 16px; font-size: 14px; }

@media (min-width: 600px) {
  .profile { padding-top: 24px; }
  .hero { margin: 0 0 16px; border-radius: var(--radius); }
}

/* Background image: text that sits directly on the photo gets its own surface. */
html { background: var(--page); }
.has-bg .about, .has-bg .back, .has-bg .empty, .has-bg .powered {
  background: var(--surface);
  border-radius: 12px;
  padding: 10px 14px;
}
.has-bg .about { margin-top: 0; }
.has-bg .hero { box-shadow: 0 8px 24px rgba(0, 0, 0, .18); }

/* Custom HTML section */
.html-embed { padding: 0; overflow: hidden; }
.html-embed h2 { padding: 18px 16px 0; }
.html-embed iframe { display: block; width: 100%; border: 0; background: #fff; }

.page-preview { margin: 0; }
.page-preview-frame { display: block; width: 100%; height: calc(100vh - 37px); border: 0; }
