:root {
  --primary: #087b58;
  --primary-light: #3fc27f;
  --surface: #ffffff;
  --page-bg: #f4f6f5;
  --text: #101714;
  --muted: #748079;
  --line: #e9edeb;
  --icon-bg: #f6f8f7;
  --shadow: 0 22px 60px rgba(18, 49, 38, 0.12);
}

* {
  box-sizing: border-box;
}

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

body {
  min-height: 100%;
  margin: 0;
  font-family: "Inter", Arial, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top, rgba(63, 194, 127, 0.10), transparent 34rem),
    var(--page-bg);
}

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

button,
a {
  -webkit-tap-highlight-color: transparent;
}

.page {
  width: 100%;
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: 24px 14px;
}

.card {
  width: min(100%, 430px);
  overflow: hidden;
  border-radius: 28px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.hero {
  position: relative;
  min-height: 350px;
  padding: 54px 28px 78px;
  overflow: hidden;
  text-align: center;
  color: #fff;
  background: linear-gradient(145deg, var(--primary) 0%, var(--primary-light) 100%);
  border-radius: 0 0 48% 10% / 0 0 14% 6%;
}

.hero::after {
  content: "";
  position: absolute;
  right: -15%;
  bottom: -78px;
  width: 130%;
  height: 115px;
  background: var(--surface);
  transform: rotate(-1.6deg);
}

.hero-decoration {
  position: absolute;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.hero-decoration-one {
  top: -70px;
  right: -60px;
  width: 220px;
  height: 220px;
}

.hero-decoration-two {
  bottom: 30px;
  left: -85px;
  width: 180px;
  height: 180px;
}

.profile-photo-wrap {
  position: relative;
  z-index: 2;
  width: 146px;
  height: 146px;
  margin: 0 auto 26px;
  padding: 7px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.18);
}

.profile-photo {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  object-position: center;
}

.identity {
  position: relative;
  z-index: 2;
}

.identity h1 {
  margin: 0;
  font-size: clamp(1.65rem, 7vw, 2.1rem);
  line-height: 1.2;
  letter-spacing: -0.035em;
}

.identity p {
  margin: 10px 0 5px;
  font-size: 1.4rem;
  font-weight: 600;
}

.identity span {
  font-size: 0.84rem;
  color: rgba(255, 255, 255, 0.78);
}

.quick-actions {
  position: relative;
  z-index: 5;
  display: flex;
  justify-content: center;
  gap: 18px;
  margin-top: -47px;
}

.quick-action {
  width: 74px;
  height: 74px;
  display: grid;
  place-items: center;
  border: 8px solid var(--surface);
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 12px 30px rgba(23, 53, 42, 0.13);
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.quick-action:active {
  transform: scale(0.96);
}

.quick-action svg {
  width: 28px;
  height: 28px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.details {
  margin: 30px 18px 24px;
  padding: 10px 18px;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 10px 35px rgba(14, 42, 32, 0.06);
}

.detail-row {
  min-height: 86px;
  display: flex;
  align-items: center;
  gap: 16px;
  border-bottom: 1px solid var(--line);
}

.detail-row:last-child {
  border-bottom: 0;
}

.detail-icon {
  flex: 0 0 auto;
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #7d8782;
  background: var(--icon-bg);
}

.detail-icon svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.65;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.detail-copy {
  min-width: 0;
  display: grid;
  gap: 5px;
}

.detail-copy small {
  font-size: 0.83rem;
  color: var(--muted);
}

.detail-copy strong {
  overflow-wrap: anywhere;
  font-size: 0.98rem;
  font-weight: 600;
}

.add-contact {
  width: calc(100% - 36px);
  min-height: 66px;
  margin: 0 18px;
  padding: 15px 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border: 0;
  border-radius: 14px;
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  box-shadow: 0 12px 26px rgba(8, 123, 88, 0.24);
  font: inherit;
  font-size: 1.05rem;
  font-weight: 700;
  cursor: pointer;
}

.add-contact:active {
  transform: translateY(1px);
}

.add-contact svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.privacy-note {
  margin: 14px 20px 24px;
  text-align: center;
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.5;
}

@media (max-width: 460px) {
  .page {
    padding: 0;
    background: #fff;
  }

  .card {
    min-height: 100svh;
    border-radius: 0;
    box-shadow: none;
  }

  .hero {
    min-height: 340px;
    padding-top: calc(42px + env(safe-area-inset-top));
  }

  .details {
    margin-top: 26px;
  }

  .privacy-note {
    padding-bottom: env(safe-area-inset-bottom);
  }
}

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


/* ------------------------------
   Subtle entrance animations
------------------------------ */

body.is-ready .hero {
  animation: heroReveal 750ms cubic-bezier(.2,.8,.2,1) both;
}

body.is-ready .profile-photo-wrap {
  animation: profileReveal 850ms 120ms cubic-bezier(.2,.8,.2,1) both;
}

body.is-ready .identity {
  animation: fadeUp 700ms 240ms ease both;
}

body.is-ready .quick-action {
  opacity: 0;
  animation: actionPop 520ms cubic-bezier(.2,.9,.25,1.2) both;
}

body.is-ready .quick-action:nth-child(1) {
  animation-delay: 360ms;
}

body.is-ready .quick-action:nth-child(2) {
  animation-delay: 450ms;
}

body.is-ready .details {
  animation: fadeUp 700ms 480ms ease both;
}

body.is-ready .detail-row {
  opacity: 0;
  animation: rowReveal 520ms ease both;
}

body.is-ready .detail-row:nth-child(1) {
  animation-delay: 560ms;
}

body.is-ready .detail-row:nth-child(2) {
  animation-delay: 640ms;
}

body.is-ready .detail-row:nth-child(3) {
  animation-delay: 720ms;
}

body.is-ready .detail-row:nth-child(4) {
  animation-delay: 800ms;
}

body.is-ready .add-contact {
  animation: fadeUp 650ms 880ms ease both;
}

body.is-ready .privacy-note {
  animation: fadeUp 600ms 980ms ease both;
}

.profile-photo-wrap {
  transition: transform 220ms ease, box-shadow 220ms ease;
}

.profile-photo-wrap:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 20px 42px rgba(0, 0, 0, 0.20);
}

.quick-action:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 34px rgba(23, 53, 42, 0.18);
}

.detail-row {
  transition: transform 180ms ease, background-color 180ms ease;
}

a.detail-row:hover {
  transform: translateX(4px);
}

.detail-icon {
  transition: transform 180ms ease, color 180ms ease, background-color 180ms ease;
}

a.detail-row:hover .detail-icon {
  transform: scale(1.06);
  color: var(--primary);
  background: rgba(8, 123, 88, 0.08);
}

.add-contact {
  position: relative;
  overflow: hidden;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.add-contact::after {
  content: "";
  position: absolute;
  top: -50%;
  left: -35%;
  width: 28%;
  height: 200%;
  background: rgba(255, 255, 255, 0.24);
  transform: rotate(20deg) translateX(-260%);
}

.add-contact:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 34px rgba(8, 123, 88, 0.30);
}

.add-contact:hover::after {
  animation: buttonShine 850ms ease;
}

.add-contact.is-downloading {
  pointer-events: none;
}

.add-contact.is-downloading svg {
  animation: contactPulse 700ms ease infinite alternate;
}

.hero-decoration-one {
  animation: floatOne 7s ease-in-out infinite;
}

.hero-decoration-two {
  animation: floatTwo 8s ease-in-out infinite;
}

@keyframes heroReveal {
  from {
    opacity: 0;
    transform: translateY(-22px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes profileReveal {
  0% {
    opacity: 0;
    transform: scale(.72) translateY(16px);
  }
  70% {
    opacity: 1;
    transform: scale(1.04) translateY(-2px);
  }
  100% {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes actionPop {
  from {
    opacity: 0;
    transform: translateY(16px) scale(.75);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes rowReveal {
  from {
    opacity: 0;
    transform: translateX(-14px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes buttonShine {
  from {
    transform: rotate(20deg) translateX(-260%);
  }
  to {
    transform: rotate(20deg) translateX(650%);
  }
}

@keyframes contactPulse {
  from {
    transform: scale(1);
  }
  to {
    transform: scale(1.16);
  }
}

@keyframes floatOne {
  0%, 100% {
    transform: translate(0, 0);
  }
  50% {
    transform: translate(-12px, 14px);
  }
}

@keyframes floatTwo {
  0%, 100% {
    transform: translate(0, 0);
  }
  50% {
    transform: translate(15px, -10px);
  }
}

@media (prefers-reduced-motion: reduce) {
  body.is-ready .hero,
  body.is-ready .profile-photo-wrap,
  body.is-ready .identity,
  body.is-ready .quick-action,
  body.is-ready .details,
  body.is-ready .detail-row,
  body.is-ready .add-contact,
  body.is-ready .privacy-note,
  .hero-decoration-one,
  .hero-decoration-two {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
}
