:root {
  --ink: #f6f7fb;
  --muted: #a9adbd;
  --faint: #6f7487;
  --night: #050712;
  --panel: #101421;
  --line: rgba(255, 255, 255, 0.1);
  --magenta: #f6a20b;
  --magenta-deep: #c87900;
  --cyan: #24d5ff;
  --cyan-soft: #82eaff;
  --success: #25d366;
  --radius: 2px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  min-height: 100dvh;
  color: var(--ink);
  background:
    radial-gradient(circle at 50% -10%, rgba(246, 162, 11, 0.18), transparent 45%),
    radial-gradient(circle at 100% 100%, rgba(36, 213, 255, 0.12), transparent 40%),
    var(--night);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.5;
}

body::before {
  position: fixed;
  z-index: 10;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  content: "";
  background: linear-gradient(90deg, var(--magenta), #ffd15c, var(--cyan));
  pointer-events: none;
}

::selection {
  color: var(--night);
  background: var(--magenta);
}

.tree {
  display: flex;
  width: min(100% - 40px, 420px);
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0 auto;
  padding: 56px 0 28px;
  flex-direction: column;
  gap: 32px;
}

.profile {
  text-align: center;
  animation: rise 0.7s var(--ease) backwards;
}

.logo {
  display: grid;
  width: 76px;
  height: 86px;
  margin: 0 auto 22px;
  place-items: center;
  color: #fff;
  font-size: 40px;
  font-weight: 800;
  line-height: 1;
  clip-path: polygon(20% 0, 100% 0, 80% 100%, 0 100%);
  background: linear-gradient(145deg, var(--magenta), #0a132b 68%);
  filter: drop-shadow(0 0 18px rgba(36, 213, 255, 0.35));
}

.profile h1 {
  margin: 0;
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.bio {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 15px;
}

.credential {
  margin: 6px 0 0;
  color: var(--magenta);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.credential span {
  color: var(--faint);
}

.links {
  display: grid;
  gap: 14px;
}

.link {
  position: relative;
  display: flex;
  min-height: 64px;
  padding: 10px 16px;
  align-items: center;
  gap: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink);
  background: linear-gradient(145deg, rgba(19, 24, 39, 0.92), rgba(9, 12, 25, 0.92));
  text-decoration: none;
  transition:
    transform 0.25s var(--ease),
    border-color 0.25s var(--ease),
    box-shadow 0.25s var(--ease);
  animation: rise 0.7s var(--ease) backwards;
  -webkit-tap-highlight-color: transparent;
}

.link:nth-child(1) {
  animation-delay: 0.08s;
}

.link:nth-child(2) {
  animation-delay: 0.16s;
}

.link:nth-child(3) {
  animation-delay: 0.24s;
}

.link:hover,
.link:focus-visible {
  transform: translateY(-2px);
}

.link:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
}

.link:active {
  transform: translateY(0) scale(0.99);
}

.link-icon {
  display: grid;
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  place-items: center;
  border-radius: var(--radius);
}

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

.link-copy {
  display: grid;
  min-width: 0;
  flex: 1;
  gap: 2px;
}

.link-copy strong {
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.01em;
}

.link-copy small {
  color: var(--muted);
  font-size: 13px;
}

.link-arrow {
  color: var(--faint);
  font-size: 20px;
  transition:
    transform 0.25s var(--ease),
    color 0.25s var(--ease);
}

.link:hover .link-arrow {
  transform: translateX(3px);
}

.link-primary {
  border-color: var(--magenta);
  color: #151006;
  background: linear-gradient(105deg, var(--magenta), var(--magenta-deep));
  box-shadow: 0 10px 35px rgba(246, 162, 11, 0.22);
}

.link-primary .link-copy small,
.link-primary .link-arrow {
  color: rgba(21, 16, 6, 0.72);
}

.link-primary .link-icon {
  background: rgba(21, 16, 6, 0.14);
}

.link-primary:hover {
  box-shadow: 0 14px 40px rgba(246, 162, 11, 0.34);
}

.link-cyan .link-icon {
  color: var(--cyan);
  background: rgba(36, 213, 255, 0.1);
}

.link-cyan:hover {
  border-color: rgba(36, 213, 255, 0.55);
  box-shadow: 0 10px 35px rgba(36, 213, 255, 0.14);
}

.link-cyan:hover .link-arrow {
  color: var(--cyan);
}

.link-whatsapp .link-icon {
  color: var(--success);
  background: rgba(37, 211, 102, 0.1);
}

.link-whatsapp:hover {
  border-color: rgba(37, 211, 102, 0.55);
  box-shadow: 0 10px 35px rgba(37, 211, 102, 0.14);
}

.link-whatsapp:hover .link-arrow {
  color: var(--success);
}

.tree-footer {
  margin-top: auto;
  color: var(--faint);
  font-size: 12px;
  text-align: center;
}

.tree-footer p {
  margin: 4px 0;
}

.tree-footer a {
  color: var(--muted);
  text-decoration: none;
}

.tree-footer a:hover {
  color: var(--ink);
}

.legal-modal {
  width: min(100% - 32px, 560px);
  max-height: min(100% - 48px, 640px);
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink);
  background: var(--panel);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.6);
}

.legal-modal[open] {
  display: flex;
  flex-direction: column;
  animation: rise 0.35s var(--ease);
}

.legal-modal::backdrop {
  background: rgba(5, 7, 18, 0.78);
  backdrop-filter: blur(4px);
}

.legal-head {
  display: flex;
  padding: 14px 16px 14px 20px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--line);
}

.legal-head strong {
  font-size: 16px;
  font-weight: 800;
}

.legal-close {
  display: grid;
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  place-items: center;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--muted);
  background: transparent;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.legal-close:hover,
.legal-close:focus-visible {
  color: var(--ink);
  border-color: var(--magenta);
}

.legal-body {
  padding: 4px 20px 20px;
  overflow-y: auto;
  font-size: 14px;
}

.legal-body a {
  color: var(--cyan-soft);
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .profile,
  .link {
    animation: none;
  }

  .link,
  .link-arrow {
    transition: none;
  }
}
