@import url('https://fonts.googleapis.com/css2?family=DM+Serif+Display:ital@0;1&family=DM+Sans:wght@300;400;500&display=swap');

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

html, body {
  height: 100%;
}

body {
  font-family: 'DM Sans', sans-serif;
  font-weight: 400;
  background: #f8f8f8;
  color: #222;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* === Entrance animations === */
@media (prefers-reduced-motion: no-preference) {
  @keyframes fadeUp {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
  }

  body {
    animation: fadeUp 0.35s ease both;
  }

  .link-item:nth-child(1) { animation: fadeUp 0.35s 0.05s ease both; }
  .link-item:nth-child(2) { animation: fadeUp 0.35s 0.10s ease both; }
  .link-item:nth-child(3) { animation: fadeUp 0.35s 0.15s ease both; }
  .link-item:nth-child(4) { animation: fadeUp 0.35s 0.20s ease both; }
  .link-item:nth-child(5) { animation: fadeUp 0.35s 0.25s ease both; }
}

/* === Layout === */
.page {
  width: 100%;
  max-width: 540px;
  padding: 72px 24px 48px;
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
}

/* === Avatar === */
.avatar {
  margin-bottom: 28px;
}

.avatar img {
  width: 130px;
  height: 130px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}

/* === Heading === */
.heading {
  font-family: 'DM Serif Display', serif;
  font-style: italic;
  font-size: 36px;
  font-weight: 400;
  color: #111;
  text-align: center;
  margin-bottom: 40px;
  letter-spacing: -0.01em;
}

/* === Links === */
.links {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.link-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 24px;
  background: #fff;
  border-radius: 14px;
  text-decoration: none;
  color: #111;
  border: 1px solid #e8e8e8;
  transition: background 0.2s ease, transform 0.15s ease, border-color 0.2s ease;
}

.link-item:hover {
  background: #f5f5f5;
  border-color: #d0d0d0;
  transform: translateX(4px);
  color: #111;
}

.link-icon {
  font-size: 20px;
  width: 22px;
  text-align: center;
  color: #666;
  flex-shrink: 0;
}

.link-name {
  font-family: 'DM Sans', sans-serif;
  font-weight: 500;
  font-size: 16px;
  flex: 1;
}

.link-detail {
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  color: #999;
  font-weight: 300;
}

/* === Footer === */
footer {
  padding: 24px;
  background-color: #f8f8f8;
}

/* === Lock indicator on locked cards === */
.lock-indicator {
  font-size: 11px;
  color: #ccc;
}

/* Revealed contact — fades in */
.reveal-area span {
  animation: fadeIn 0.2s ease both;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* === Bottom unlock bar === */
.unlock-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  padding: 24px 24px 40px;
  background: linear-gradient(to bottom, transparent, rgba(248, 248, 248, 0.96) 40%);
  pointer-events: none;
  transition: opacity 0.35s ease, transform 0.35s ease;
}

.unlock-bar.unlock-bar--hidden {
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
}

.unlock-bar-inner {
  pointer-events: all;
  display: flex;
  align-items: center;
  gap: 10px;
  background: #fff;
  border: 1px solid #e8e8e8;
  border-radius: 14px;
  padding: 14px 18px;
  width: 100%;
  max-width: 400px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.07);
}

.unlock-bar-icon {
  font-size: 13px;
  color: #ccc;
  flex-shrink: 0;
}

.passcode-input {
  flex: 1;
  min-width: 0;
  padding: 0;
  border: none;
  border-bottom: 1px solid #e8e8e8;
  border-radius: 0;
  font-size: 14px;
  font-family: 'DM Sans', sans-serif;
  font-weight: 300;
  color: #444;
  background: transparent;
  outline: none;
  letter-spacing: 0.04em;
  transition: border-color 0.15s ease;
}

.passcode-input::placeholder {
  color: #ccc;
  font-style: italic;
}

.passcode-input:focus {
  border-bottom-color: #bbb;
}

.unlock-bar-btn {
  flex-shrink: 0;
  background: none;
  border: none;
  padding: 0;
  color: #ccc;
  font-size: 13px;
  cursor: pointer;
  transition: color 0.15s ease;
}

.unlock-bar-btn:hover {
  color: #888;
}

.passcode-input.passcode-error {
  border-bottom-color: #e05;
  animation: shake 0.3s ease;
}

.unlock-bar-icon.passcode-error {
  color: #e05;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25%       { transform: translateX(-4px); }
  75%       { transform: translateX(4px); }
}
