/**
 * ====================================================================
 * DR. IURI CARDOSO | LINKPAGE OFICIAL
 * Direção de Arte Editorial: Minimalismo Orgânico, Nobreza Médica & Linhas Arquitetônicas
 * Paleta: Obsidiana Noturna, Branco, Creme & Bege Areia (Quiet Luxury)
 * ====================================================================
 */

/* --------------------------------------------------------------------
   1. DESIGN TOKENS & PALETA EDITORIAL (BRANCO, CREME & BEGE)
   -------------------------------------------------------------------- */
:root {
  /* Tons Noturnos Profundos (Obsidiana & Safira Fumê) */
  --bg-deep: #050c13;
  --bg-surface: #081624;
  --bg-card: rgba(8, 22, 36, 0.65);
  --bg-card-hover: rgba(12, 30, 48, 0.82);
  --bg-card-whatsapp: rgba(9, 26, 23, 0.68);
  --bg-card-whatsapp-hover: rgba(13, 36, 32, 0.85);

  /* Paleta Nobre: Branco, Creme & Bege (Substituindo o dourado por tons orgânicos e sóbrios) */
  --accent-white: #ffffff;
  --accent-cream: #f4ede2;           /* Marfim / Creme suave aquecido */
  --accent-beige: #dfd3c3;           /* Bege areia refinado */
  --accent-beige-muted: #b5a794;     /* Bege neutro sutil */
  --accent-border: rgba(244, 237, 226, 0.16);
  --accent-border-hover: rgba(244, 237, 226, 0.38);

  /* Tipografia Humana (Marfim, Alabastro e Pedra Quente) */
  --text-ivory: #f4f0e8;
  --text-body: #cfc9be;
  --text-muted: #8c877d;
  --text-subtle: #5f5c56;

  /* Bordas Arquitetônicas Ultrafinas (Hairline) */
  --border-hairline: rgba(255, 255, 255, 0.08);
  --border-subtle: rgba(255, 255, 255, 0.14);

  /* Tipografia */
  --font-editorial: 'Cormorant Garamond', Georgia, serif;
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  /* Formas Orgânicas Suaves */
  --radius-xs: 6px;
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 22px;
  --radius-full: 9999px;

  /* Transições Físicas & Naturais */
  --ease-natural: cubic-bezier(0.2, 0.8, 0.2, 1);
  --ease-soft: cubic-bezier(0.4, 0, 0.1, 1);
  --trans-fast: 0.22s var(--ease-natural);
  --trans-normal: 0.38s var(--ease-natural);
  --trans-slow: 0.65s var(--ease-soft);
}

/* --------------------------------------------------------------------
   2. RESET & BASE (VIEWPORT-LOCKED / NO-SCROLL)
   -------------------------------------------------------------------- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

html, body {
  height: 100%;
  height: 100dvh;
  overflow: hidden;
  color-scheme: dark;
  background-color: var(--bg-deep);
}

body {
  font-family: var(--font-sans);
  color: var(--text-ivory);
  line-height: 1.4;
  position: relative;
  display: flex;
  flex-direction: column;
}

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

button {
  border: none;
  background: none;
  font-family: inherit;
  cursor: pointer;
  color: inherit;
}

img, svg {
  display: block;
  max-width: 100%;
}

:focus-visible {
  outline: 1.5px solid var(--accent-cream);
  outline-offset: 3px;
}

/* --------------------------------------------------------------------
   3. PRE-LOADER CINEMÁTICO (REVELAÇÃO POR FOCO ÓPTICO & HAIRLINE)
   -------------------------------------------------------------------- */
.preloader {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--bg-deep);
  transition: opacity 0.75s var(--ease-soft), visibility 0.75s var(--ease-soft);
}

.preloader--hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.preloader__backdrop {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 40%, rgba(11, 28, 44, 0.6) 0%, rgba(5, 12, 19, 0.98) 75%);
}

.preloader__card {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 2rem 1.5rem;
  max-width: 320px;
  width: 90%;
}

.preloader__logo-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 2rem;
  animation: preloaderReveal 1.6s var(--ease-soft) forwards;
}

.preloader__logo-img {
  width: min(220px, 70vw);
  height: auto;
  filter: drop-shadow(0 4px 20px rgba(0, 0, 0, 0.4));
}

@keyframes preloaderReveal {
  0% {
    opacity: 0;
    transform: scale(0.97);
    filter: blur(6px);
  }
  100% {
    opacity: 1;
    transform: scale(1);
    filter: blur(0px);
  }
}

.preloader__progress-track {
  width: 120px;
  height: 1px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
  border-radius: var(--radius-full);
}

.preloader__progress-bar {
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, transparent, var(--accent-beige), var(--accent-cream));
  animation: preloaderLine 1.6s var(--ease-soft) forwards;
}

@keyframes preloaderLine {
  0% { width: 0%; }
  60% { width: 70%; }
  100% { width: 100%; }
}

/* --------------------------------------------------------------------
   4. BACKGROUND & TEXTURA TÁTIL
   -------------------------------------------------------------------- */
.page-wrapper {
  position: relative;
  height: 100%;
  height: 100dvh;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: clamp(0.4rem, 1.6vh, 1rem) clamp(0.75rem, 2.5vw, 1.4rem);
  box-sizing: border-box;
  overflow: hidden;
  z-index: 1;
}

.bg-layer {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

.bg-layer__picture {
  position: absolute;
  inset: 0;
}

.bg-layer__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  opacity: 0.18;
  filter: contrast(105%) brightness(80%);
}

.bg-layer__overlay {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 20%, rgba(13, 33, 52, 0.4) 0%, rgba(6, 15, 24, 0.85) 60%, rgba(4, 9, 14, 0.98) 100%);
  mix-blend-mode: multiply;
}

.bg-layer__grain {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, transparent 30%, rgba(4, 9, 14, 0.75) 100%);
}

/* --------------------------------------------------------------------
   5. CONTAINER PRINCIPAL (ESTRUTURA EDITORIAL CENTRALIZADA)
   -------------------------------------------------------------------- */
.main-card {
  position: relative;
  width: 100%;
  max-width: 420px;
  height: 100%;
  max-height: 100%;
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 0;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-sizing: border-box;
  animation: pageFadeIn 0.8s var(--ease-natural) backwards;
  animation-delay: 0.08s;
}

@keyframes pageFadeIn {
  0% {
    opacity: 0;
    transform: translateY(12px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

/* --------------------------------------------------------------------
   6. SEÇÃO DE PERFIL EDITORIAL (RETRATO LIMPO COM BORDAS MARFIM)
   -------------------------------------------------------------------- */
.profile-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin-top: clamp(0.35rem, 1.4vh, 0.8rem);
  margin-bottom: clamp(0.35rem, 1.2vh, 0.75rem);
  flex-shrink: 0;
}

.avatar-container {
  position: relative;
  width: clamp(76px, 10.8vh, 94px);
  height: clamp(76px, 10.8vh, 94px);
  margin-bottom: clamp(0.35rem, 0.9vh, 0.6rem);
}

.avatar-frame {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  overflow: hidden;
  border: 1px solid var(--accent-border);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.45);
  background-color: #0b1a26;
}

.avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform var(--trans-slow);
}

.avatar-container:hover .avatar-img {
  transform: scale(1.05);
}

.profile-name {
  font-family: var(--font-editorial);
  font-size: clamp(1.55rem, 2.7vh, 1.95rem);
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: 0.015em;
  color: var(--text-ivory);
  margin-bottom: clamp(0.15rem, 0.4vh, 0.25rem);
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.5);
}

.profile-subtitle {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-size: clamp(0.64rem, 1.05vh, 0.72rem);
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent-beige);
  margin-bottom: clamp(0.2rem, 0.6vh, 0.35rem);
}

.profile-subtitle .sep {
  opacity: 0.4;
  font-size: 0.6rem;
}

.instagram-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.18rem 0.65rem;
  font-size: clamp(0.72rem, 1.15vh, 0.78rem);
  font-weight: 400;
  color: var(--text-muted);
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid transparent;
  transition: all var(--trans-fast);
  margin-bottom: clamp(0.25rem, 0.8vh, 0.5rem);
}

.instagram-link:hover {
  color: var(--accent-white);
  background: rgba(255, 255, 255, 0.06);
  border-color: var(--accent-border);
  transform: translateY(-1px);
}

.icon-arrow-subtle {
  width: 10px;
  height: 10px;
  opacity: 0.6;
}

.profile-bio {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  max-width: 320px;
  margin: 0 auto;
}

.profile-bio__lead {
  font-family: var(--font-editorial);
  font-size: clamp(0.95rem, 1.6vh, 1.1rem);
  font-weight: 600;
  font-style: italic;
  letter-spacing: 0.01em;
  color: var(--accent-cream);
  line-height: 1.25;
}

.profile-bio__sub {
  font-size: clamp(0.76rem, 1.2vh, 0.84rem);
  font-weight: 400;
  color: var(--text-body);
  line-height: 1.35;
}

/* --------------------------------------------------------------------
   7. LINKS PRINCIPAIS (PLACAS TÁTEIS & ARQUITETÔNICAS)
   -------------------------------------------------------------------- */
.links-section {
  display: flex;
  flex-direction: column;
  gap: clamp(0.5rem, 1.1vh, 0.75rem);
  margin-bottom: clamp(0.45rem, 1.1vh, 0.75rem);
  flex-shrink: 0;
}

.link-card {
  position: relative;
  display: flex;
  align-items: center;
  gap: clamp(0.85rem, 2.2vw, 1.15rem);
  padding: clamp(0.72rem, 1.4vh, 0.95rem) clamp(0.95rem, 2.5vw, 1.25rem);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-hairline);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  transition: all var(--trans-normal);
  cursor: pointer;
  text-decoration: none;
}

/* Card WhatsApp: Tom Esmeralda Fumê Suave com Acabamento Creme Sutil */
.link-card--whatsapp {
  background: var(--bg-card-whatsapp);
  border-color: rgba(56, 161, 105, 0.22);
  box-shadow: 0 8px 24px -8px rgba(0, 0, 0, 0.45);
}

.link-card--whatsapp:hover {
  background: var(--bg-card-whatsapp-hover);
  border-color: rgba(56, 161, 105, 0.45);
  transform: translateY(-2px);
  box-shadow: 0 14px 32px -8px rgba(0, 0, 0, 0.6);
}

/* Card Localização: Tom Safira Fumê Noturno com Borda Creme */
.link-card--location {
  background: var(--bg-card);
  border-color: var(--accent-border);
  box-shadow: 0 8px 24px -8px rgba(0, 0, 0, 0.45);
}

.link-card--location:hover {
  background: var(--bg-card-hover);
  border-color: var(--accent-border-hover);
  transform: translateY(-2px);
  box-shadow: 0 14px 32px -8px rgba(0, 0, 0, 0.6);
}

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

/* Ícone orgânico livre (sem moldura, fundo ou caixa em volta) */
.link-card__icon-wrapper {
  position: relative;
  flex-shrink: 0;
  width: clamp(22px, 3.2vh, 26px);
  height: clamp(22px, 3.2vh, 26px);
  background: transparent !important;
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-beige);
  transition: transform var(--trans-fast), color var(--trans-fast);
}

.link-card--whatsapp .link-card__icon-wrapper {
  color: #55c898;
}

.link-card:hover .link-card__icon-wrapper {
  background: transparent !important;
  border: none !important;
  transform: scale(1.1);
}

.link-card__icon {
  width: 100%;
  height: 100%;
}

/* Tipografia Arquitetônica do Card */
.link-card__content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.12rem;
  min-width: 0;
}

.link-card__title {
  font-family: var(--font-editorial);
  font-size: clamp(1.1rem, 1.8vh, 1.25rem);
  font-weight: 600;
  line-height: 1.15;
  color: var(--text-ivory);
  letter-spacing: 0.015em;
}

.link-card__description {
  font-size: clamp(0.68rem, 1.05vh, 0.74rem);
  font-weight: 400;
  color: var(--text-muted);
}

.link-card__phone,
.link-card__place {
  font-size: clamp(0.72rem, 1.1vh, 0.78rem);
  font-weight: 500;
  color: var(--accent-cream);
  letter-spacing: 0.02em;
  margin-top: 0.05rem;
}

/* Seta Hairline Elegante (Sem círculo chamativo) */
.link-card__action {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  transition: all var(--trans-fast);
}

.link-card__arrow-svg {
  width: clamp(17px, 2.3vh, 19px);
  height: clamp(17px, 2.3vh, 19px);
  transition: transform var(--trans-fast), color var(--trans-fast);
}

.link-card:hover .link-card__arrow-svg {
  color: var(--accent-white);
  transform: translateX(3px);
}

/* --------------------------------------------------------------------
   8. FERRAMENTAS RÁPIDAS (BARRA DE APOIO ELEGANTE)
   -------------------------------------------------------------------- */
.quick-tools {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
  margin-bottom: clamp(0.45rem, 1vh, 0.75rem);
  flex-shrink: 0;
}

.quick-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: clamp(0.55rem, 1.1vh, 0.75rem) 0.75rem;
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-sm);
  font-size: clamp(0.72rem, 1.15vh, 0.78rem);
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--text-body);
  transition: all var(--trans-fast);
}

.quick-btn:hover {
  background: rgba(255, 255, 255, 0.07);
  border-color: var(--accent-border);
  color: var(--accent-white);
  transform: translateY(-1px);
}

.quick-btn:active {
  transform: scale(0.97);
}

.quick-btn__icon {
  width: 14px;
  height: 14px;
  color: var(--accent-beige);
}

/* --------------------------------------------------------------------
   9. RODAPÉ (ASSINATURA SUTIL E ATEMPORAL)
   -------------------------------------------------------------------- */
.page-footer {
  text-align: center;
  padding-top: clamp(0.35rem, 0.8vh, 0.6rem);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(0.15rem, 0.4vh, 0.25rem);
  flex-shrink: 0;
}

.footer-brand {
  margin-bottom: 0.1rem;
  opacity: 0.75;
  transition: opacity var(--trans-fast);
}

.footer-brand:hover {
  opacity: 1;
}

.footer-logo {
  width: clamp(66px, 8vh, 76px);
  height: auto;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.4));
}

.footer-legal {
  font-size: clamp(0.62rem, 0.95vh, 0.67rem);
  color: var(--text-muted);
  max-width: 280px;
}

.footer-copy {
  margin-top: 0.05rem;
  font-size: clamp(0.58rem, 0.85vh, 0.63rem);
  color: var(--text-subtle);
}

/* --------------------------------------------------------------------
   10. MODAL DE QR CODE
   -------------------------------------------------------------------- */
.modal {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
}

.modal.modal--open {
  display: flex !important;
}

.modal[hidden] {
  display: none !important;
}

.modal__overlay {
  position: absolute;
  inset: 0;
  background: rgba(4, 9, 14, 0.92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  animation: modalFadeIn 0.3s ease-out;
}

.modal__content {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 330px;
  background: #091724;
  border: 1px solid var(--accent-border);
  border-radius: var(--radius-lg);
  padding: 1.75rem 1.4rem;
  text-align: center;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.75);
  animation: modalScaleUp 0.32s var(--ease-natural);
}

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

@keyframes modalScaleUp {
  from {
    opacity: 0;
    transform: scale(0.95) translateY(10px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.modal__close {
  position: absolute;
  top: 0.85rem;
  right: 0.85rem;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  transition: all var(--trans-fast);
}

.modal__close:hover {
  background: rgba(255, 255, 255, 0.12);
  color: var(--text-ivory);
}

.modal__logo-box {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 0.65rem;
  padding: 0.45rem;
  background: #ffffff;
  border-radius: var(--radius-sm);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.modal__logo-img {
  width: 105px;
  height: auto;
}

.modal__title {
  font-family: var(--font-editorial);
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--text-ivory);
  margin-bottom: 0.2rem;
}

.modal__desc {
  font-size: 0.76rem;
  color: var(--text-muted);
  line-height: 1.4;
  margin-bottom: 1.15rem;
}

.qr-box {
  display: inline-flex;
  padding: 0.75rem;
  background: #ffffff;
  border-radius: var(--radius-sm);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.35);
  margin-bottom: 1.15rem;
}

.qr-img {
  width: 160px;
  height: 160px;
  display: block;
}

.btn-copy-link {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.15rem;
  background: linear-gradient(135deg, #ffffff 0%, var(--accent-cream) 100%);
  border-radius: var(--radius-full);
  color: #060d14;
  font-weight: 600;
  font-size: 0.8rem;
  letter-spacing: 0.02em;
  transition: all var(--trans-fast);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.3);
}

.btn-copy-link:hover {
  transform: translateY(-1px);
  filter: brightness(1.05);
}

.icon-inline {
  width: 15px;
  height: 15px;
}

/* --------------------------------------------------------------------
   11. TOAST NOTIFICATION
   -------------------------------------------------------------------- */
.toast {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%) translateY(25px);
  z-index: 10001;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.6rem 1.15rem;
  background: rgba(9, 22, 34, 0.95);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--accent-border);
  border-radius: var(--radius-full);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5);
  opacity: 0;
  pointer-events: none;
  transition: all 0.35s var(--ease-natural);
}

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

.toast__icon {
  width: 15px;
  height: 15px;
  color: var(--accent-cream);
  flex-shrink: 0;
}

.toast__msg {
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text-ivory);
}

/* --------------------------------------------------------------------
   12. DISPOSITIVOS EXTREMOS (< 500px ALTURA)
   -------------------------------------------------------------------- */
@media (max-height: 520px) {
  html, body, .page-wrapper {
    overflow-y: auto !important;
    height: auto !important;
    min-height: 100vh !important;
  }
}

/* Redução de movimento para usuários sensíveis */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
