:root {
  --blue: #145fd8;
  --blue-dark: #123f9e;
  --blue-light: #4f9eff;
  --ink: #374151;
  --muted: #5f6b7d;
  --page: #eef4ff;
  --card: #ffffff;
  --card-edge: rgba(20, 95, 216, 0.14);
  --shadow: 0 24px 62px rgba(18, 63, 158, 0.16);
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 18px;
  font-family: "Aptos", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(79, 158, 255, 0.16), transparent 28%),
    radial-gradient(circle at bottom right, rgba(18, 63, 158, 0.12), transparent 32%),
    linear-gradient(180deg, #f8fbff 0%, #eef4ff 100%);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.page {
  width: min(100%, 430px);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.contact-card {
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-height: 480px;
  padding: 32px 28px 50px;
  border-radius: 34px;
  border: 1px solid var(--card-edge);
  background: var(--card);
  box-shadow: var(--shadow);
}

.header,
.rows {
  position: relative;
  z-index: 2;
}

.header {
  display: block;
}

.identity {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  min-width: 0;
}

.badge {
  flex: 0 0 auto;
  width: 86px;
  height: 52px;
  margin-top: 0;
  margin-left: -28px;
  padding-left: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  background: linear-gradient(135deg, var(--blue) 0%, #1152bf 100%);
  border-radius: 0 999px 999px 0;
  box-shadow: 0 10px 22px rgba(20, 95, 216, 0.22);
}

.badge svg {
  width: 24px;
  height: 24px;
}

.name-block {
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.brand-logo {
  display: block;
  width: 112px;
  margin: 0 auto 14px;
  text-decoration: none;
}

.brand-logo-img {
  display: block;
  width: 100%;
  height: auto;
}

.name {
  font-size: clamp(1.65rem, 6.4vw, 2.05rem);
  line-height: 1;
  letter-spacing: -0.045em;
  font-weight: 400;
  color: #394454;
}

.role {
  margin-top: 6px;
  padding-left: 3px;
  font-size: clamp(0.92rem, 3.4vw, 1.02rem);
  font-weight: 400;
  color: var(--muted);
}

.rows {
  margin-top: 28px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.card-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.save-contact {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  justify-content: center;
  width: min(100%, 260px);
  padding: 13px 20px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--blue) 0%, #1152bf 100%);
  color: #ffffff;
  font: inherit;
  font-size: 0.96rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  box-shadow: 0 10px 24px rgba(20, 95, 216, 0.24);
  cursor: pointer;
  transition: transform 0.16s ease, box-shadow 0.16s ease, opacity 0.16s ease;
}

.save-contact:hover,
.save-contact:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 14px 28px rgba(20, 95, 216, 0.28);
  outline: none;
}

.save-contact:disabled {
  cursor: wait;
  opacity: 0.86;
}

.save-contact svg {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}

.save-help {
  min-height: 1.2em;
  margin: 0;
  text-align: center;
  font-size: 0.88rem;
  line-height: 1.35;
  color: var(--muted);
}

.row {
  display: grid;
  grid-template-columns: 34px 2px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.icon {
  width: 34px;
  height: 34px;
  margin-top: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--blue);
}

.icon svg {
  width: 22px;
  height: 22px;
}

.sep {
  width: 2px;
  min-height: 54px;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--blue) 0%, var(--blue-light) 100%);
}

.values {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.values a,
.values span {
  color: #3d4553;
  text-decoration: none;
  font-size: clamp(1rem, 3.75vw, 1.16rem);
  line-height: 1.3;
  word-break: break-word;
}

.values a:hover,
.values a:focus-visible {
  color: var(--blue-dark);
  outline: none;
}

.corner {
  position: absolute;
  pointer-events: none;
  z-index: 1;
}

.corner-tl-light,
.corner-tl-mid,
.corner-tl-dark {
  top: 0;
  left: 0;
  clip-path: polygon(0 0, 0 100%, 100% 0);
}

.corner-br-light,
.corner-br-mid,
.corner-br-dark {
  right: 0;
  bottom: 0;
  clip-path: polygon(100% 0, 0 100%, 100% 100%);
}

.corner-tl-light,
.corner-br-light {
  width: 25%;
  height: 10%;
  background: #1b73ea;
}

.corner-tl-mid,
.corner-br-mid {
  width: 21%;
  height: 8%;
  background: var(--blue);
}

.corner-tl-dark,
.corner-br-dark {
  width: 17%;
  height: 6%;
  background: var(--blue-dark);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 420px) {
  body {
    padding: 10px;
  }

  .contact-card {
    min-height: 452px;
    padding: 28px 24px 46px;
    border-radius: 28px;
  }

  .badge {
    width: 78px;
    height: 46px;
    margin-left: -24px;
    padding-left: 12px;
  }

  .badge svg {
    width: 23px;
    height: 23px;
  }

  .rows {
    margin-top: 24px;
    gap: 18px;
  }

  .save-contact {
    width: min(100%, 240px);
    padding: 12px 16px;
    font-size: 0.92rem;
  }

  .save-help {
    font-size: 0.84rem;
  }

  .corner-tl-light,
  .corner-br-light {
    width: 26%;
    height: 9%;
  }

  .corner-tl-mid,
  .corner-br-mid {
    width: 22%;
    height: 7.5%;
  }

  .corner-tl-dark,
  .corner-br-dark {
    width: 18%;
    height: 5.5%;
  }

  .brand-logo {
    width: 100px;
    margin: 0 auto 12px;
  }
}
