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

:root {
  --navy: #081B2E;
  --navy-light: #0f2a47;
  --navy-glow: rgba(8, 27, 46, 0.5);
  --white: #FFFFFF;
  --gray-light: #F6F8FA;
  --gray-mid: #e8ecf0;
  --gray-dark: #2E3A4C;
  --gray-text: #6b7a8e;
  --red: #C62839;
  --red-soft: #d94a5a;
  --red-glow: rgba(198, 40, 57, 0.3);
  --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --radius-sm: 12px;
  --radius: 16px;
  --radius-lg: 24px;
  --transition: 350ms cubic-bezier(0.16, 1, 0.3, 1);
  --bounce: 500ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font);
  background: var(--navy);
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  color: var(--navy);
  line-height: 1.6;
  position: relative;
  overflow-x: hidden;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 90% 55% at 50% -20%, rgba(198, 40, 57, 0.12), transparent),
    radial-gradient(ellipse 70% 45% at 80% 110%, rgba(198, 40, 57, 0.06), transparent),
    radial-gradient(ellipse 60% 40% at 20% 110%, rgba(8, 27, 46, 0.4), transparent);
  pointer-events: none;
  z-index: 0;
  animation: bgPulse 8s ease-in-out infinite alternate;
}

@keyframes bgPulse {
  0% { opacity: 0.7; }
  50% { opacity: 1; }
  100% { opacity: 0.7; }
}

.page {
  width: 100%;
  max-width: 700px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.card {
  background: rgba(255, 255, 255, 0.98);
  border-radius: var(--radius-lg);
  padding: 52px 44px;
  box-shadow:
    0 2px 8px rgba(0, 0, 0, 0.08),
    0 16px 48px rgba(0, 0, 0, 0.12),
    0 48px 80px rgba(0, 0, 0, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.6);
  animation: cardIn 0.8s var(--bounce) both;
  position: relative;
}

.card::before {
  content: '';
  position: absolute;
  top: -1px;
  left: 20%;
  right: 20%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--red), transparent);
  border-radius: 2px;
  opacity: 0.6;
}

@keyframes cardIn {
  from {
    opacity: 0;
    transform: translateY(40px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.hero {
  text-align: center;
  margin-bottom: 40px;
  animation: floatUp 0.7s var(--bounce) 0.1s both;
}

.hero-photo-wrapper {
  width: 128px;
  height: 128px;
  margin: 0 auto 24px;
  border-radius: 50%;
  padding: 4px;
  background: linear-gradient(140deg, var(--navy), var(--red-soft), var(--red));
  box-shadow: 0 8px 40px var(--red-glow);
  position: relative;
  transition: transform var(--transition), box-shadow var(--transition);
}

.hero-photo-wrapper:hover {
  transform: scale(1.05);
  box-shadow: 0 12px 56px var(--red-glow);
}

.hero-photo-wrapper::after {
  content: '';
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  background: linear-gradient(140deg, var(--navy), transparent, var(--red));
  opacity: 0.2;
  filter: blur(12px);
  z-index: -1;
  animation: glowPulse 3s ease-in-out infinite alternate;
}

@keyframes glowPulse {
  0% { opacity: 0.15; transform: scale(1); }
  100% { opacity: 0.35; transform: scale(1.1); }
}

.hero-photo {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  display: block;
  background: var(--gray-light);
  object-fit: cover;
}

.hero-name {
  font-size: 2rem;
  font-weight: 700;
  color: var(--navy);
  letter-spacing: -0.03em;
  line-height: 1.2;
  margin-bottom: 6px;
}

.hero-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--red);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 4px;
}

.hero-brand {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--gray-dark);
  margin-bottom: 14px;
}

.hero-description {
  font-size: 0.925rem;
  font-weight: 400;
  color: var(--gray-text);
  max-width: 480px;
  margin: 0 auto;
  line-height: 1.7;
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 32px;
  animation: floatUp 0.7s var(--bounce) 0.2s both;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  background: var(--gray-light);
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  transition:
    border-color var(--transition),
    background var(--transition),
    transform var(--transition),
    box-shadow var(--transition);
}

.contact-item:hover {
  background: var(--white);
  border-color: var(--gray-mid);
  transform: translateX(8px) scale(1.01);
  box-shadow: 0 8px 28px rgba(8, 27, 46, 0.08);
}

.contact-item:active {
  transform: translateX(4px) scale(0.99);
}

.contact-icon {
  flex-shrink: 0;
  color: var(--red);
  opacity: 0.85;
  transition: transform var(--transition);
}

.contact-item:hover .contact-icon {
  transform: scale(1.1);
}

.contact-label {
  display: block;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--gray-text);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 1px;
}

.contact-value {
  display: block;
  font-size: 0.925rem;
  font-weight: 500;
  color: var(--navy);
  text-decoration: none;
  transition: color var(--transition);
}

.contact-value:hover {
  color: var(--red);
}

.buttons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 28px;
  animation: floatUp 0.7s var(--bounce) 0.3s both;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 18px 20px;
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  border: 1.5px solid var(--gray-mid);
  background: var(--white);
  color: var(--navy);
  transition:
    transform var(--transition),
    box-shadow var(--transition),
    background var(--transition),
    color var(--transition),
    border-color var(--transition);
  -webkit-tap-highlight-color: transparent;
  position: relative;
  overflow: hidden;
}

.btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--navy), var(--navy-light));
  opacity: 0;
  transition: opacity var(--transition);
}

.btn:focus-visible {
  outline: 2px solid var(--navy);
  outline-offset: 2px;
}

.btn > svg,
.btn > span {
  position: relative;
  z-index: 1;
  transition: transform var(--transition);
}

.btn:hover {
  color: var(--white);
  border-color: var(--navy);
  transform: translateY(-4px);
  box-shadow:
    0 12px 32px rgba(8, 27, 46, 0.15),
    0 4px 12px rgba(8, 27, 46, 0.1);
}

.btn:hover > svg,
.btn:hover > span {
  color: var(--white);
}

.btn:hover::before {
  opacity: 1;
}

.btn:hover > svg {
  transform: scale(1.15);
}

.btn:active {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(8, 27, 46, 0.1);
}

.save-contact-section {
  text-align: center;
  margin-bottom: 40px;
  animation: floatUp 0.7s var(--bounce) 0.4s both;
}

.save-contact-section {
  position: relative;
}

.btn-save {
  width: 100%;
  padding: 20px 24px;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  border: none;
  background: linear-gradient(135deg, var(--red), var(--red-soft));
  color: var(--white);
  box-shadow: 0 8px 32px var(--red-glow);
  animation: savePulse 2.5s ease-in-out infinite;
  gap: 12px;
}

.btn-save::before {
  display: none;
}

.btn-save::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -60%;
  width: 40%;
  height: 200%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
  transform: rotate(25deg);
  animation: shimmer 3s ease-in-out infinite;
}

@keyframes shimmer {
  0% { left: -60%; }
  50% { left: 120%; }
  100% { left: 120%; }
}

.btn-save-arrow {
  transition: transform var(--transition);
}

.btn-save:hover .btn-save-arrow {
  transform: translateY(3px);
  animation: arrowBounce 0.8s ease-in-out infinite;
}

@keyframes arrowBounce {
  0%, 100% { transform: translateY(3px); }
  50% { transform: translateY(6px); }
}

.btn-save:hover {
  transform: translateY(-4px) scale(1.01);
  box-shadow:
    0 16px 48px var(--red-glow),
    0 4px 16px rgba(198, 40, 57, 0.3);
  animation-play-state: paused;
}

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

@keyframes savePulse {
  0%, 100% {
    box-shadow: 0 8px 32px var(--red-glow);
  }
  50% {
    box-shadow: 0 8px 48px rgba(198, 40, 57, 0.45), 0 0 60px rgba(198, 40, 57, 0.15);
  }
}

.toast {
  position: fixed;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--navy);
  color: var(--white);
  padding: 14px 28px;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 500;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
  opacity: 0;
  transition: opacity 0.4s var(--transition), transform 0.4s var(--transition);
  pointer-events: none;
  z-index: 100;
  white-space: nowrap;
}

.toast--visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.qrcode-section {
  text-align: center;
  margin-bottom: 32px;
  animation: floatUp 0.7s var(--bounce) 0.5s both;
}

.qrcode-title {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--gray-text);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 16px;
}

.qrcode-container {
  display: inline-flex;
  padding: 14px;
  background: var(--white);
  border-radius: var(--radius-sm);
  border: 1px solid var(--gray-mid);
  box-shadow: 0 2px 8px rgba(8, 27, 46, 0.04);
  line-height: 0;
  transition: transform var(--transition), box-shadow var(--transition);
}

.qrcode-container:hover {
  transform: scale(1.05);
  box-shadow: 0 8px 28px rgba(8, 27, 46, 0.08);
}

.qrcode-container img {
  display: block;
  width: 128px;
  height: 128px;
}

.social {
  display: flex;
  justify-content: center;
  gap: 14px;
  margin-bottom: 24px;
  animation: floatUp 0.7s var(--bounce) 0.55s both;
}

.social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--gray-light);
  color: var(--gray-dark);
  border: 1px solid transparent;
  transition:
    background var(--transition),
    color var(--transition),
    transform var(--transition),
    border-color var(--transition),
    box-shadow var(--transition);
}

.social-link:hover {
  background: var(--white);
  color: var(--red);
  border-color: var(--gray-mid);
  transform: translateY(-4px) scale(1.1);
  box-shadow: 0 8px 24px rgba(8, 27, 46, 0.08);
}

.social-link:active {
  transform: translateY(-1px) scale(1.05);
}

.footer {
  text-align: center;
  animation: floatUp 0.7s var(--bounce) 0.6s both;
}

.footer p {
  font-size: 0.75rem;
  color: var(--gray-text);
  opacity: 0.5;
}

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

@media (max-width: 600px) {
  body {
    padding: 12px;
  }

  .card {
    padding: 28px 18px;
    border-radius: 20px;
  }

  .hero-photo-wrapper {
    width: 108px;
    height: 108px;
    margin-bottom: 20px;
  }

  .hero-name {
    font-size: 1.6rem;
  }

  .hero-description {
    font-size: 0.875rem;
  }

  .buttons {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .btn {
    padding: 16px 18px;
    font-size: 0.875rem;
  }

  .btn-save {
    padding: 18px 20px;
    font-size: 1rem;
  }

  .contact-item {
    padding: 12px 14px;
  }

  .contact-value {
    font-size: 0.875rem;
  }
}

@media (min-width: 601px) and (max-width: 900px) {
  .card {
    padding: 40px 32px;
  }
}
