/* ==========================================================================
   ShipX E-Namecard
   Format and palette follow the supplied demo (index (2).html): white hero,
   white contact list, a full-bleed magenta action band, white about panel.
   Colours are the demo's exact values. Note that several of them fall below
   WCAG AA (see README) — raising them is a one-line change per token.
   ========================================================================== */

:root {
  /* Demo magenta ramp */
  --mag: #FF00B8;          /* signature magenta: bars, icons, accents */
  --mag-light: #FF6BE8;
  --mag-mid: #E5009E;
  --mag-deep: #E000A0;
  --mag-dark: #C8007E;     /* demo's gradient end stop */

  /* Tints */
  --tint-bg: #fdf5fb;      /* icon tile fill */
  --tint-border: #fde0f4;  /* icon tile border */
  --tag-bg: #fff0f9;
  --tag-border: #ffd6f0;
  --chip-bg: #fff8fd;
  --chip-border: #fad0f0;

  /* Neutrals */
  --page: #f3eef2;
  --ink: #111111;
  --ink-body: #1a1a1a;
  --ink-soft: #555555;
  --ink-chip: #333333;
  --label: #c8a8c0;        /* demo value */
  --line: #f0f0f0;

  /* Demo's translucent white veils on the band */
  --veil: rgba(255, 255, 255, .17);
  --veil-strong: rgba(255, 255, 255, .27);
  --veil-soc: rgba(255, 255, 255, .14);

  --ease: cubic-bezier(.2, .7, .3, 1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { -webkit-text-size-adjust: 100%; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  background: var(--page);
  color: var(--ink-body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

/* Consistent line icons everywhere. Without this the <use> shapes fall back to
   fill:black / no stroke and every icon renders as a solid blob, so the sprite
   also carries fill/stroke presentation attributes as a safety net. */
svg use, .btn__icon, .c-row__icon svg, .social__link svg,
.modal__close svg, .c-row__go {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

:where(a, button):focus-visible {
  outline: 3px solid var(--mag-dark);
  outline-offset: 3px;
  border-radius: 10px;
}

.cta :where(a, button):focus-visible { outline-color: #fff; }

.page {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 32px 16px calc(60px + env(safe-area-inset-bottom));
}

.card {
  width: 100%;
  max-width: 400px;
  border-radius: 26px;
  overflow: hidden;
  box-shadow: 0 4px 8px rgba(0, 0, 0, .06), 0 20px 60px rgba(180, 0, 130, .1);
}

/* ---------------------------------------------------------------- Hero --- */

.hero { background: #fff; }

.hero__bar {
  height: 5px;
  background: linear-gradient(90deg, var(--mag), var(--mag-light), var(--mag-deep));
}

.hero__body { padding: 28px 26px 24px; }

.hero__logo {
  display: block;
  height: 36px;
  width: auto;
  max-width: 180px;
  object-fit: contain;
  object-position: left center;
  margin-bottom: 20px;
}

.profile__name {
  font-size: 25px;
  font-weight: 800;
  color: var(--ink);
  letter-spacing: -.5px;
  line-height: 1.2;
  margin-bottom: 8px;
}

.profile__title-wrap { margin-top: 9px; }

.profile__title {
  display: inline-flex;
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #fff;
  background: linear-gradient(90deg, var(--mag), var(--mag-deep));
  padding: 5px 15px;
  border-radius: 50px;
}

/* ------------------------------------------------------------ Contacts --- */

.contacts { background: #fff; padding: 0 26px; }

.contacts__list { list-style: none; border-top: 1px solid var(--line); }

.c-row {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 13px 0;
  text-decoration: none;
  color: inherit;
}

.contacts__list li { border-bottom: 1px solid var(--line); }
.contacts__list li:last-child { border-bottom: none; }
.contacts__list li:last-child .c-row,
.contacts__list li:last-child .addr-row { padding-bottom: 16px; }

.c-row__icon {
  width: 36px;
  height: 36px;
  border-radius: 11px;
  background: var(--tint-bg);
  border: 1.5px solid var(--tint-border);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--mag);
  transition: background-color .18s var(--ease), border-color .18s var(--ease);
}

.c-row__icon svg { width: 16px; height: 16px; }

.c-row__body { flex: 1; min-width: 0; }

.c-row__label {
  display: block;
  font-size: 9px;
  font-weight: 700;
  color: var(--label);
  text-transform: uppercase;
  letter-spacing: .8px;
  margin-bottom: 2px;
}

.c-row__value {
  display: block;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--ink-body);
  line-height: 1.4;
  overflow-wrap: anywhere;
}

@media (hover: hover) {
  .c-row:hover .c-row__icon { background: var(--tag-bg); border-color: var(--chip-border); }
}

/* Address row carries the compact QR beside it, as in the demo. */
.addr-row {
  display: flex;
  align-items: flex-start;
  gap: 13px;
  padding: 13px 0;
}

.addr-row .c-row {
  flex: 1;
  min-width: 0;
  align-items: flex-start;
  padding: 0;
}

.addr-row .qr-box {
  flex-shrink: 0;
  align-self: center;
  width: 70px;
  height: 70px;
  padding: 4px;
  border-radius: 12px;
  background: var(--tint-bg);
  border: 1.5px solid var(--tint-border);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: border-color .18s var(--ease), transform .18s var(--ease);
}

.qr-box svg { display: block; width: 100%; height: 100%; }

/* Brand-magenta QR modules on a white field. The generator writes fill="black"
   as a presentation attribute, so this CSS wins. #C8007E rather than the
   brighter #FF00B8: at 5.59:1 against white it still decodes reliably once
   camera blur and noise are in play, where the brighter pink starts failing. */
.qr-box svg path,
.modal__qr svg path { fill: var(--mag-dark); }

@media (hover: hover) {
  .qr-box:hover { border-color: var(--mag); transform: translateY(-1px); }
}

/* ------------------------------------------------------- Magenta band --- */

.cta {
  background: linear-gradient(140deg, var(--mag) 0%, var(--mag-mid) 55%, var(--mag-dark) 100%);
  padding: 24px 26px 22px;
  position: relative;
  overflow: hidden;
}

.cta::before,
.cta::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, .07);
  pointer-events: none;
}

.cta::before { top: -60px; right: -60px; width: 200px; height: 200px; }
.cta::after { bottom: -70px; left: -40px; width: 220px; height: 220px; background: rgba(255, 255, 255, .05); }

.cta__buttons {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
  position: relative;
  z-index: 1;
}

.btn {
  flex: 1;
  min-height: 46px;
  padding: 12px 10px;
  border-radius: 50px;
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: none;
  white-space: nowrap;
  transition: transform .2s var(--ease), background-color .2s var(--ease), box-shadow .2s var(--ease);
}

.btn__icon { width: 14px; height: 14px; flex-shrink: 0; }
.btn__icon, .btn__icon use { stroke-width: 2.2; }

.btn--solid {
  background: #fff;
  color: var(--mag);
  box-shadow: 0 4px 18px rgba(0, 0, 0, .13);
}

.btn--ghost {
  background: var(--veil);
  color: #fff;
  border: 1.5px solid rgba(255, 255, 255, .45);
}

@media (hover: hover) {
  .btn--solid:hover { transform: translateY(-1px); box-shadow: 0 8px 28px rgba(0, 0, 0, .2); }
  .btn--ghost:hover { background: var(--veil-strong); }
}

.btn:active { transform: translateY(1px); }

.social {
  list-style: none;
  display: flex;
  justify-content: center;
  gap: 12px;
  position: relative;
  z-index: 1;
}

.social__link {
  width: 50px;
  height: 50px;
  border-radius: 16px;
  background: var(--veil-soc);
  border: 1.5px solid rgba(255, 255, 255, .28);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  transition: background-color .2s var(--ease), transform .2s var(--ease);
}

.social__link svg { width: 21px; height: 21px; }
.social__link svg, .social__link use { stroke-width: 1.9; }

@media (hover: hover) {
  .social__link:hover { background: var(--veil-strong); transform: translateY(-2px); }
}

/* --------------------------------------------------------------- About -- */

.about {
  background: #fff;
  padding: 24px 26px calc(28px + env(safe-area-inset-bottom));
}

.about__tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--tag-bg);
  border: 1px solid var(--tag-border);
  border-radius: 50px;
  padding: 4px 13px;
  font-size: 10px;
  font-weight: 700;
  color: var(--mag);
  text-transform: uppercase;
  letter-spacing: .7px;
  margin-bottom: 13px;
}

.about__tag::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--mag);
  display: block;
  flex-shrink: 0;
}

.about__text {
  font-size: 13px;
  color: var(--ink-soft);
  line-height: 1.8;
  margin-bottom: 18px;
}

/* Two columns, not the demo's three. The card is capped at 400px, so three
   tracks are ~110px wide at best and leave "Philippines" barely a pixel of
   slack — it overflowed the pill outright on narrower phones. Two tracks fit
   every name in full at any width this card is ever shown at. */
.markets {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.markets li {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 8px 11px;
  border-radius: 50px;
  border: 1.5px solid var(--chip-border);
  background: var(--chip-bg);
  min-width: 0;
  transition: border-color .18s var(--ease), background-color .18s var(--ease);
}

@media (hover: hover) {
  .markets li:hover { border-color: var(--mag); background: var(--tag-bg); }
}

.markets .flag { font-size: 16px; line-height: 1; flex-shrink: 0; }

.markets .name {
  font-size: 10.5px;
  min-width: 0;
  font-weight: 700;
  color: var(--ink-chip);
  letter-spacing: .2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* --------------------------------------------------------------- Modal --- */

.modal {
  width: min(344px, calc(100vw - 32px));
  padding: 0;
  border: none;
  border-radius: 24px;
  background: transparent;
  overflow: visible;
}

.modal::backdrop { background: rgba(60, 0, 40, .55); backdrop-filter: blur(4px); }

.modal__box {
  position: relative;
  padding: 28px 24px 22px;
  background: #fff;
  border-radius: 24px;
  text-align: center;
  box-shadow: 0 30px 70px rgba(60, 0, 40, .35);
}

.modal__close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  background: var(--tint-bg);
  border: 1.5px solid var(--tint-border);
  border-radius: 50%;
  color: var(--mag-dark);
  cursor: pointer;
}

.modal__close svg { width: 16px; height: 16px; }

.modal__title {
  font-size: 15px;
  font-weight: 800;
  color: var(--ink);
  letter-spacing: -.1px;
  margin-bottom: 16px;
}

/* White field + 4-module quiet zone keeps the code reliably scannable. */
.modal__qr {
  width: 232px;
  height: 232px;
  margin: 0 auto;
  padding: 10px;
  background: #fff;
  border: 1.5px solid var(--tint-border);
  border-radius: 16px;
}

.modal__qr svg { display: block; width: 100%; height: 100%; }

.modal__url {
  margin-top: 14px;
  font-size: 11.5px;
  line-height: 1.5;
  color: var(--label);
  overflow-wrap: anywhere;
}

/* --------------------------------------------------------------- Toast --- */

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(22px + env(safe-area-inset-bottom));
  z-index: 50;
  max-width: calc(100vw - 32px);
  padding: 12px 18px;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.45;
  text-align: center;
  color: #fff;
  background: #2b0a22;
  border-radius: 18px;
  box-shadow: 0 12px 30px rgba(43, 10, 34, .3);
  opacity: 0;
  transform: translate(-50%, 14px);
  pointer-events: none;
  transition: opacity .22s var(--ease), transform .22s var(--ease);
}

.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }
.toast.is-error { background: #a3103a; }

.noscript {
  max-width: 400px;
  margin: 16px auto 0;
  padding: 14px 16px;
  font-size: 13px;
  line-height: 1.55;
  color: var(--ink-soft);
  background: #fff;
  border: 1px solid var(--tint-border);
  border-radius: 16px;
}

/* ---------------------------------------------------------- Responsive --- */

@media (max-width: 359px) {
  .cta__buttons { flex-direction: column; }
  .profile__name { font-size: 22px; }
  /* Too little room for the address and the QR side by side: give the
     address the full row and drop the QR beneath it. */
  .addr-row { flex-wrap: wrap; }
  .addr-row .c-row { flex: 1 0 100%; }
  .qr-box { width: 64px; height: 64px; margin: 10px auto 2px; }
  /* Reclaim chip padding so the longest market name keeps clear headroom. */
  .markets li { padding: 7px 9px; gap: 5px; }
  .social { gap: 9px; }
  .social__link { width: 46px; height: 46px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    transition-duration: .001ms !important;
  }
  .btn:hover, .social__link:hover, .qr-box:hover { transform: none; }
}
