:root {
  color-scheme: dark;
  --background: #080f1f;
  --panel: #111d33;
  --text: #f5f7fa;
  --muted: #a8b4c7;
  --gold: #d6b36a;
  --line: rgb(214 179 106 / 23%);
  --line-strong: rgb(214 179 106 / 65%);
  font-family: "Segoe UI", Tahoma, Arial, sans-serif;
  color: var(--text);
  background: var(--background);
}

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

body {
  margin: 0;
  min-height: 100vh;
  line-height: 1.65;
  background:
    radial-gradient(ellipse at 85% 0%, #172642 0%, transparent 56%),
    var(--background);
}

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

.icon {
  width: 1.25rem;
  height: 1.25rem;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.65;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.layout {
  width: min(69rem, calc(100% - 1.5rem));
  margin-inline: auto;
  padding-block: clamp(.75rem, 3vw, 2.5rem) max(1.25rem, env(safe-area-inset-bottom));
  display: grid;
  gap: .875rem;
}

.surface {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 1.3rem;
  background: linear-gradient(145deg, var(--panel), #0d172a 80%);
  box-shadow: 0 14px 36px rgb(0 0 0 / 22%);
}

.profile {
  display: grid;
  min-width: 0;
  padding: clamp(.875rem, 3vw, 2rem);
}

.portrait {
  position: relative;
  min-width: 0;
  display: grid;
  place-items: center;
  padding: 1rem 1.65rem;
  border: 1px solid var(--line);
  border-radius: .95rem;
  background: radial-gradient(ellipse at 45% 30%, #253652, #111d33 72%);
}

.portrait-frame {
  width: min(100%, 23rem);
  padding: .28rem;
  border: 1px solid var(--line-strong);
  border-radius: .8rem;
  background: linear-gradient(150deg, #544630, #192842 55%, #3c352b);
  box-shadow: 0 14px 30px rgb(0 0 0 / 28%);
}

.portrait-frame img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: .52rem;
}

.portrait-mark {
  position: absolute;
  inset-block-end: .55rem;
  inset-inline-end: .55rem;
  display: grid;
  place-items: center;
  width: clamp(3.25rem, 13vw, 4.75rem);
  aspect-ratio: 1;
  padding: .47rem;
  border: 1px solid var(--gold);
  border-radius: .75rem;
  background: #fbf4e5;
  box-shadow: 0 6px 18px rgb(0 0 0 / 28%);
}

.portrait-mark img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 0;
  object-fit: contain;
}

.profile-info {
  align-self: center;
  min-width: 0;
  padding-block-start: 1rem;
}

.profile-info::before {
  display: block;
  width: 2.8rem;
  height: 2px;
  margin-block-end: .65rem;
  background: var(--gold);
  content: "";
}

h1 {
  margin: 0;
  font-size: clamp(1.65rem, 5.55vw, 3rem);
  line-height: 1.28;
  font-weight: 750;
}

h1 span { display: inline-block; }

.profile-roles {
  display: grid;
  gap: .1rem;
  margin: .5rem 0 1rem;
}

.role {
  margin: 0;
  color: var(--muted);
  font-size: clamp(.9375rem, 2vw, 1.125rem);
}
.role:first-child { color: var(--gold); font-weight: 650; }

.primary-actions, .secondary-actions, .service-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .55rem;
}

.action, .service-list a, .floating-whatsapp {
  display: flex;
  align-items: center;
  gap: clamp(.35rem, 1.3vw, .65rem);
  min-height: 3rem;
  min-width: 0;
  padding: .55rem;
  border: 1px solid var(--line);
  border-radius: .75rem;
  background: #15223a;
  color: var(--text);
  font: inherit;
  font-size: .9375rem;
  font-weight: 650;
  line-height: 1.35;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .18s ease, border-color .18s ease, transform .18s ease;
}

.action, .floating-whatsapp { justify-content: center; text-align: center; }
.action:hover, .service-list a:hover, .floating-whatsapp:hover {
  background: #1e2e4a;
  border-color: var(--line-strong);
}

.action:active, .service-list a:active, .floating-whatsapp:active {
  transform: translateY(1px);
}

.action:focus-visible, .service-list a:focus-visible, .floating-whatsapp:focus-visible,
.manual-share input:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

.primary-actions .action { min-height: 3.6rem; }
.call { background: #d6b36a; color: #080f1f; border-color: var(--gold); }
.call:hover { background: #e8c883; border-color: #e8c883; }
.call small {
  display: block;
  margin-block-start: .1rem;
  font-size: .8125rem;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}
.whatsapp, .secondary-actions .icon, .floating-whatsapp { color: var(--gold); }

.services, .card-tools { padding: clamp(.875rem, 2.25vw, 1.4rem); }

h2 {
  display: flex;
  align-items: center;
  gap: .6rem;
  margin: 0 0 .75rem;
  font-size: 1.125rem;
  line-height: 1.35;
}

h2::before {
  width: .1875rem;
  height: 1rem;
  flex: none;
  border-radius: 2px;
  background: var(--gold);
  content: "";
}

.service-list { list-style: none; padding: 0; margin: 0; }
.service-list li { min-width: 0; }
.service-list a { height: 100%; min-height: 3.4rem; }

.service-icon {
  display: grid;
  place-items: center;
  flex: none;
  width: 2rem;
  height: 2rem;
  border: 1px solid var(--line);
  border-radius: .5rem;
  background: rgb(214 179 106 / 9%);
  color: var(--gold);
}

.status { margin: .6rem 0 0; color: var(--muted); text-align: center; }
.status:empty { margin: 0; }
.manual-share { display: block; margin-block-start: .6rem; color: var(--muted); }
.manual-share[hidden], .floating-whatsapp { display: none; }

.manual-share input {
  display: block;
  width: 100%;
  margin-block-start: .3rem;
  padding: .6rem;
  border: 1px solid var(--line-strong);
  border-radius: .55rem;
  background: var(--background);
  color: var(--text);
  font: inherit;
}

.qr-slot:not([hidden]) {
  display: grid;
  place-items: center;
  margin-block-start: .9rem;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: .75rem;
  background: #0c1628;
}

.qr-slot img { display: block; max-width: 100%; height: auto; border-radius: .3rem; }

@media (max-width: 22rem) {
  .primary-actions, .secondary-actions { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 47.999rem) {
  .floating-whatsapp:not([hidden]) {
    position: fixed;
    z-index: 1;
    inset-inline-end: max(1rem, env(safe-area-inset-left));
    inset-block-end: calc(.75rem + env(safe-area-inset-bottom));
    display: flex;
    width: 3rem;
    border-radius: 50%;
    border-color: var(--line-strong);
    box-shadow: 0 6px 18px rgb(0 0 0 / 35%);
  }
}

@media (min-width: 48rem) {
  .layout { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 1rem; }
  .profile {
    grid-column: 1 / -1;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
    gap: clamp(1.25rem, 4vw, 3.5rem);
  }
  .portrait { grid-column: 2; grid-row: 1; padding: 1.1rem 1.5rem; }
  .profile-info { grid-column: 1; grid-row: 1; padding-block: 1rem; }
  .profile-roles { margin-block-end: 1.5rem; }
  .primary-actions { max-width: 27rem; }
  .secondary-actions { grid-template-columns: minmax(0, 1fr); }
  .secondary-actions .action { justify-content: start; padding-inline: .8rem; }
}

@media (prefers-reduced-motion: no-preference) {
  .profile, .services, .card-tools { animation: enter .3s ease-out backwards; }
  @keyframes enter {
    from { opacity: .7; transform: translateY(5px); }
    to { opacity: 1; transform: translateY(0); }
  }
}

@media (prefers-reduced-motion: reduce) {
  .action, .service-list a, .floating-whatsapp { transition: none; }
  .action:active, .service-list a:active, .floating-whatsapp:active { transform: none; }
}
