:root {
  color-scheme: light;
  --navy-950: #031426;
  --navy-900: #061d37;
  --navy-800: #0a2c4d;
  --cyan: #00b6ef;
  --cyan-dark: #008dbd;
  --cyan-pale: #e8f9fe;
  --ink: #0c2238;
  --muted: #647486;
  --line: #d9e4eb;
  --paper: #ffffff;
  --canvas: #eef4f7;
}

* { box-sizing: border-box; }

html {
  min-height: 100%;
  background: var(--canvas);
}

body {
  min-height: 100%;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 12% 12%, rgba(0, 182, 239, .12), transparent 24rem),
    radial-gradient(circle at 88% 88%, rgba(6, 29, 55, .08), transparent 28rem),
    var(--canvas);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
a { font: inherit; }

a {
  color: inherit;
  text-decoration: none;
}

.page {
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: max(28px, env(safe-area-inset-top)) 20px max(30px, env(safe-area-inset-bottom));
}

.shell { width: min(100%, 940px); }

.card {
  position: relative;
  display: grid;
  grid-template-columns: minmax(300px, .82fr) minmax(480px, 1.35fr);
  min-height: 570px;
  overflow: hidden;
  border: 1px solid rgba(6, 29, 55, .11);
  border-radius: 30px;
  background: var(--paper);
  box-shadow: 0 34px 90px rgba(18, 42, 64, .17), 0 8px 24px rgba(18, 42, 64, .08);
  animation: card-in .46s ease-out both;
}

.brand-panel {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 31px 30px 28px;
  overflow: hidden;
  color: white;
  background: linear-gradient(150deg, var(--navy-800) 0%, var(--navy-900) 48%, var(--navy-950) 100%);
}

.brand-panel::before {
  content: "";
  position: absolute;
  z-index: -2;
  inset: 0;
  opacity: .16;
  background-image:
    linear-gradient(rgba(68, 205, 245, .18) 1px, transparent 1px),
    linear-gradient(90deg, rgba(68, 205, 245, .18) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(145deg, black, transparent 68%);
}

.brand-panel::after {
  content: "";
  position: absolute;
  z-index: -1;
  top: -86px;
  right: -112px;
  width: 270px;
  height: 460px;
  border: 1px solid rgba(44, 207, 255, .23);
  border-radius: 50%;
  transform: rotate(30deg);
  box-shadow: 0 0 0 44px rgba(0, 182, 239, .035), 0 0 0 88px rgba(0, 182, 239, .025);
}

.logo-wrap {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 190px;
  margin: 18px 0;
}

.brand-logo-frame {
  position: relative;
  flex: 1;
  min-width: 0;
  aspect-ratio: 2.5;
  overflow: hidden;
}

.logo {
  position: absolute;
  top: 50%;
  left: 50%;
  display: block;
  width: 120%;
  max-width: none;
  height: auto;
  transform: translate(-50%, -50%);
  filter: drop-shadow(0 12px 26px rgba(0, 0, 0, .18));
}

.logo-wrap.company-only .logo { width: 105%; }

.profile-photo {
  flex: 0 0 auto;
  display: block;
  width: 104px;
  height: 104px;
  border: 3px solid white;
  border-radius: 50%;
  box-shadow: 0 0 0 1px #c5e7ef, 0 8px 20px rgba(6, 29, 55, .16);
}

.profile-photo { object-fit: cover; }

.company-name {
  max-width: 270px;
  margin: 0;
  font-size: .83rem;
  font-weight: 780;
  letter-spacing: .14em;
  line-height: 1.55;
  text-transform: uppercase;
}

.service-line {
  margin: 14px 0 0;
  color: #add1e4;
  font-size: .83rem;
  font-weight: 560;
  line-height: 1.55;
}

.scan-card {
  display: grid;
  grid-template-columns: 82px 1fr;
  align-items: center;
  gap: 14px;
  margin-top: auto;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 18px;
  background: rgba(255, 255, 255, .07);
  backdrop-filter: blur(8px);
}

.scan-card img {
  display: block;
  width: 82px;
  height: 82px;
  padding: 6px;
  border-radius: 10px;
  background: white;
}

.scan-card strong {
  display: block;
  font-size: .9rem;
  line-height: 1.35;
}

.scan-card span {
  display: block;
  margin-top: 5px;
  color: #a9c7d9;
  font-size: .73rem;
  line-height: 1.4;
}

.content {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 48px 48px 31px;
  background: linear-gradient(90deg, rgba(0, 182, 239, .035), transparent 18%), white;
}

.content::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 118px;
  height: 5px;
  background: linear-gradient(90deg, var(--cyan), #45d7ff);
}

.identity-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.identity-copy { min-width: 0; }

.role {
  margin: 0;
  color: var(--cyan-dark);
  font-size: .77rem;
  font-weight: 820;
  letter-spacing: .15em;
  line-height: 1.4;
  text-transform: uppercase;
}

h1 {
  margin: 13px 0 0;
  color: var(--navy-900);
  font-size: clamp(2rem, 4vw, 2.9rem);
  font-weight: 790;
  letter-spacing: -.055em;
  line-height: .98;
}

h1.company-heading {
  max-width: 460px;
  font-size: clamp(2rem, 3.6vw, 2.75rem);
  line-height: 1.02;
}

.tagline {
  margin: 15px 0 0;
  color: var(--muted);
  font-size: 1.02rem;
  font-weight: 560;
  line-height: 1.5;
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  margin-top: 30px;
  padding: 1px 0;
  background: var(--line);
}

.contact-item {
  min-width: 0;
  display: grid;
  grid-template-columns: 39px minmax(0, 1fr);
  align-items: center;
  gap: 11px;
  padding: 14px;
  background: white;
  transition: color .16s ease, background .16s ease;
}

.contact-item.wide { grid-column: 1 / -1; }
.contact-item:hover { color: var(--cyan-dark); background: #fbfdfe; }
.contact-item:active { background: var(--cyan-pale); }

.contact-icon {
  display: grid;
  place-items: center;
  width: 39px;
  height: 39px;
  border: 1px solid #cce8f0;
  border-radius: 11px;
  color: var(--cyan-dark);
  background: #f4fbfd;
}

.contact-icon svg {
  width: 19px;
  height: 19px;
}

.contact-copy {
  min-width: 0;
  display: block;
}

.contact-copy small {
  display: block;
  margin-bottom: 3px;
  color: #778697;
  font-size: .68rem;
  font-weight: 730;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.contact-copy strong {
  display: block;
  min-width: 0;
  overflow-wrap: anywhere;
  color: var(--ink);
  font-size: .86rem;
  font-weight: 690;
  line-height: 1.35;
}

.phone-list a { white-space: nowrap; }
.phone-list span { color: #8a98a5; }

.primary-actions {
  display: grid;
  grid-template-columns: 1.15fr 1fr .82fr;
  gap: 10px;
  margin-top: 24px;
}

.button {
  min-width: 0;
  min-height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 0 14px;
  border: 0;
  border-radius: 13px;
  cursor: pointer;
  font-size: .9rem;
  font-weight: 760;
  transition: transform .16s ease, box-shadow .16s ease, background .16s ease;
}

.button:active { transform: translateY(1px) scale(.985); }

.button svg {
  flex: 0 0 auto;
  width: 19px;
  height: 19px;
}

.button-primary {
  color: white;
  background: var(--navy-900);
  box-shadow: 0 11px 24px rgba(6, 29, 55, .18);
}

.button-primary:hover {
  background: var(--navy-800);
  box-shadow: 0 13px 28px rgba(6, 29, 55, .22);
}

.button-share {
  color: white;
  background: linear-gradient(135deg, var(--cyan-dark), var(--cyan));
  box-shadow: 0 10px 22px rgba(0, 158, 208, .18);
}

.button-outline {
  border: 1px solid #b9cad5;
  color: var(--navy-900);
  background: white;
}

.button-outline:hover { background: #f3f8fa; }

.pillars {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  margin-top: auto;
  padding-top: 24px;
  color: #607284;
  font-size: .67rem;
  font-weight: 790;
  letter-spacing: .055em;
  text-transform: uppercase;
}

.pillars i {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--cyan);
}

.compatibility {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  margin: 17px 0 0;
  color: #5f7080;
  font-size: .8rem;
  font-weight: 560;
  text-align: center;
}

.compatibility::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 0 4px rgba(0, 182, 239, .1);
}

.card-directory {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 7px;
  margin-top: 11px;
  font-size: .72rem;
  font-weight: 680;
}

.card-directory a {
  padding: 6px 10px;
  border: 1px solid #d6e2e9;
  border-radius: 999px;
  color: #526577;
  background: rgba(255, 255, 255, .72);
}

.card-directory a:hover,
.card-directory a[aria-current="page"] {
  border-color: #a8dce9;
  color: var(--cyan-dark);
  background: white;
}

dialog {
  width: min(calc(100% - 30px), 400px);
  padding: 0;
  border: 0;
  border-radius: 24px;
  color: var(--ink);
  background: white;
  box-shadow: 0 35px 90px rgba(0, 12, 28, .35);
}

dialog::backdrop {
  background: rgba(1, 16, 31, .73);
  backdrop-filter: blur(7px);
}

.qr-modal {
  padding: 26px;
  text-align: center;
}

.qr-modal h2 {
  margin: 2px 0 6px;
  color: var(--navy-900);
  font-size: 1.48rem;
  letter-spacing: -.025em;
}

.qr-modal p {
  margin: 0;
  color: var(--muted);
  font-size: .94rem;
  line-height: 1.5;
}

.qr-frame {
  width: min(100%, 292px);
  margin: 20px auto;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 19px;
  background: white;
}

.qr-frame img {
  display: block;
  width: 100%;
  height: auto;
}

.close-button {
  width: 100%;
  color: white;
  background: var(--navy-900);
}

.toast {
  position: fixed;
  left: 50%;
  bottom: max(22px, env(safe-area-inset-bottom));
  z-index: 10;
  max-width: calc(100% - 32px);
  padding: 11px 16px;
  border-radius: 999px;
  color: white;
  background: var(--navy-900);
  box-shadow: 0 12px 34px rgba(0, 0, 0, .2);
  font-size: .86rem;
  font-weight: 650;
  transform: translate(-50%, 20px);
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease, transform .2s ease;
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

@keyframes card-in {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 820px) {
  .page { padding: max(14px, env(safe-area-inset-top)) 12px max(20px, env(safe-area-inset-bottom)); }
  .shell { width: min(100%, 440px); }
  .card { grid-template-columns: 1fr; min-height: 0; border-radius: 25px; }
  .brand-panel { min-height: 214px; padding: 23px 23px 20px; }
  .logo-wrap { min-height: 150px; margin: 8px 0 9px; }
  .company-name { font-size: .72rem; }
  .service-line { margin-top: 7px; font-size: .74rem; }
  .scan-card { display: none; }
  .content { padding: 28px 23px 23px; }
  .content::before { width: 92px; height: 4px; }
  h1,
  h1.company-heading { margin-top: 10px; font-size: 2rem; }
  .tagline { margin-top: 10px; font-size: .94rem; }
  .contact-grid { grid-template-columns: 1fr; margin-top: 24px; }
  .contact-item,
  .contact-item.wide { grid-column: 1; grid-template-columns: 36px minmax(0, 1fr); gap: 10px; padding: 12px 10px; }
  .contact-icon { width: 36px; height: 36px; border-radius: 10px; }
  .contact-icon svg { width: 17px; height: 17px; }
  .contact-copy strong { font-size: .83rem; }
  .contact-copy small { font-size: .62rem; }
  .primary-actions { grid-template-columns: 1fr 1fr; margin-top: 21px; }
  .primary-actions .button-primary { grid-column: 1 / -1; }
  .button { min-height: 50px; font-size: .86rem; }
  .pillars { justify-content: center; margin-top: 23px; padding-top: 20px; font-size: .62rem; }
  .compatibility { margin-top: 13px; font-size: .75rem; }
  .card-directory { margin-top: 9px; }
}

@media (max-width: 365px) {
  .page { padding-inline: 7px; }
  .content,
  .brand-panel { padding-inline: 18px; }
  .profile-photo { width: 90px; height: 90px; }
  .primary-actions { gap: 8px; }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition: none !important;
    animation: none !important;
  }
}
